  When orbiting hotter stars, hot Jupiters are often highly inclined relative
to their host star equator planes. By contrast, hot Jupiters orbiting cooler
stars are more aligned. Prior attempts to explain this correlation between
stellar obliquity and effective temperature have proven problematic. We show
how resonance locking -- the coupling of the planet's orbit to a stellar
gravity mode (g mode) -- can solve this mystery. Cooler stars with their
radiative cores are more likely to be found with g-mode frequencies increased
substantially by core hydrogen burning. Strong frequency evolution in resonance
lock drives strong tidal evolution; locking to an axisymmetric g mode damps
semi-major axes, eccentricities, and as we show for the first time,
obliquities. Around cooler stars, hot Jupiters evolve into spin-orbit alignment
and may avoid engulfment. Hotter stars lack radiative cores, and therefore
preserve congenital spin-orbit misalignments. We focus on resonance locks with
axisymmetric modes, supplementing our technical results with simple physical
interpretations, and show that non-axisymmetric modes also damp obliquity.
Outstanding issues regarding the dissipation of tidally-excited modes and the
disabling of resonance locks are discussed quantitatively.
