  Many exoplanetary systems containing hot Jupiters (HJs) exhibit significant
misalignment between the spin axes of the host stars and the orbital angular
momentum axes of the planets ("spin-orbit misalignment"). High-eccentricity
migration involving Lidov-Kozai oscillations of the planet's orbit induced by a
distant perturber is a possible channel for producing such misaligned HJ
systems. Previous works have shown that the dynamical evolution of the stellar
spin axis during the high-$e$ migration plays a dominant role in generating the
observed spin-orbit misalignment. Numerical studies have also revealed various
patterns of the evolution of the stellar spin axis leading to the final
misalignment. Here we develop an analytic theory to elucidate the evolution of
spin-orbit misalignment during the Lidov-Kozai migration of planets in stellar
binaries. Secular spin-orbit resonances play a key role in the misalignment
evolution. We include the effects of short-range forces and tidal dissipation,
and categorize the different possible paths to spin-orbit misalignment as a
function of various physical parameters (e.g. planet mass and stellar rotation
period). We identify five distinct spin-orbit evolution paths and outcomes,
only two of which are capable of producing retrograde orbits. We show that
these paths to misalignment and the outcomes depend only on two dimensionless
parameters, which compare the stellar spin precession frequency with the rate
of change of the planet's orbital axis, and the Lidov-Kozai oscillation
frequency. Our analysis reveals a number of novel phenomena for the stellar
spin evolution, ranging from bifurcation, adiabatic advection, to fully chaotic
evolution of spin-orbit angles.
