Compositional and mechanical layers of the earth