Theory of fertility decline