Curiosity rover sheds new light on how Mars became uninhabitable