How LLMs Learn Low-, Medium-, and High-Effort Reasoning Modes