A Variational Framework for Spectral Approximations of Kohn–Sham Density Functional Theory