  We present HST near-ultraviolet (NUV) transits of the hot Jupiter WASP-121b,
acquired as part of the PanCET program. Time series spectra during two transit
events were used to measure the transmission spectra between 2280 and 3070
Angstroms at a resolution of 30,000. Using HST data from 61 STIS visits, we
show that data from HST's Pointing Control System can be used to decorrelate
the instrument systematic errors (Jitter Decorrelation), which we used to fit
the WASP-121b light curves. The NUV spectrum show very strong absorption
features, with the NUV white light curve found to be larger than the average
optical and near-infrared value at 6-$\sigma$ confidence. We identify and
spectrally resolve absorption from the Mg ii doublet in the planetary exosphere
at a 5.9-$\sigma$ confidence level. The Mg ii doublet is observed to reach
altitudes of $R_{pl}/R_{star}=0.284\pm0.037$ for the 2796 Angstrom line and
$0.242\pm0.0431$ in the 2804 Angstrom line, which exceeds the Roche lobe size
as viewed in transit geometry ($R_{\rm eqRL}/R_{star}$ = 0.158). We also detect
and resolve strong features of the Fe ii UV1 and UV2 multiplets, and observe
the lines reaching altitudes of $R_{pl}/R_{star}\approx0.3$. At these high
altitudes, the atmospheric Mg ii and Fe ii gas is not gravitationally bound to
the planet, and these ionized species may be hydrodynamically escaping or could
be magnetically confined. Refractory Mg and Fe atoms at high altitudes also
indicates that these species are not trapped into condensate clouds at depth,
which places constraints on the deep interior temperature.
