Spectral and spatial tuning of absorption for enhanced solar energy conversion