Chemical evolution of the Earth