Modern Thermodynamics: From Heat Engines to Dissipative Structures