K- and L-edge X-ray absorption spectrum calculations of closed-shell carbon, silicon, germanium, and sulfur compounds using damped four-component density functional response theory.