Modelling the detailed physics of the circumgalactic and interstellar media have proved challenging for numerical models of galaxy formation due to the large dynamic range of scales involved, their multi-phase and often non-equilibrium nature, and complex physical processes involved. Connecting galaxy formation simulations with real observations represents a further challenge for both using data to constrain models of galaxy formation and to test observational models for inferring physical properties of real galaxies. Here I will introduce RAMSES-RTZ, a galaxy formation code that simultaneously models the detailed non-equilibrium chemistry of >100 primordial, metal, molecular, and dust species, coupled to on-the-fly radiation transfer which is ideal for forward-modelling emission and absorption observations of the CGM. I will discuss measurements of CGM metallicity, outflow rates, and non-equilibrium effects. Finally, I will introduce the MEGATRON simulations, a large-scale project designed to study the CGM of galaxies from cosmic dawn to cosmic noon.