The Dynamics of Carbon and Energy Intensity in a Model of Endogenous Technical Change