|Third-generation synchrotron radiation sources provide ultrabright fluxes of highly monochromatic X-rays that we use to excite highly charged ions (HCI) produced and confined in electron beam ion traps (EBITs). In this way, we make accessible a regime of radiation-matter interaction, which is prevalent in hot astrophysical plasmas such as active galactic nuclei, accretion disks, stellar radiative cores, and coronae. Unlike neutrals, HCI thrives under those intense conditions, modifying energy transfer and delivering spectral lines for diagnostics. Space missions need laboratory-benchmarked theories and models for achieving their science goals. Here I present experimental studies of X-ray photoexcitation and photoionization of HCI, which tested the atomic theory with unprecedented accuracy, solved two longstanding astrophysical questions, and enabled future stringent tests of quantum electrodynamic calculations in complex isoelectronic sequences.