500 million years of climate history pinned on plate tectonics