Dynamics of the Neoproterozoic carbon cycle