A unified theory for organic matter accumulation