Dissecting the Size–Mass and Σ1–Mass Relations at 1.0 < z < 2.5: Galaxy Mass Profiles and Color Gradients as a Function of Spectral Shape