2. Given that the side length of rhombus $A B C D$ is $a, \angle A=$ $\frac{\pi}{3}$. Fold the rhombus $A B C D$ along the diagonal to form a dihedral angle $\theta$. If $\theta \in\left[\frac{\pi}{3}, \frac{2 \pi}{3}\right]$, then the maximum distance between the skew lines $A C$ and $B D$ is ( ).
(A) $\frac{3}{2} a$
(B) $\frac{\sqrt{3}}{4} a$
(C) $\frac{\sqrt{3}}{2} a$
(D) $\frac{3}{4} a$
2.D.
(1) As shown in Figure 3, fold along $AC$ to form a dihedral angle, and let $O$ be the midpoint of $AC$. Since $AC \perp OB$ and $AC \perp OD$, we have $AC \perp$ plane $BOD$. Therefore, $\angle BOD = \theta$. Draw $OE \perp BD$ at $E$, then $OE$ is the distance between $AC$ and $BD$.
From $\angle BAC = \frac{1}{2} \times \frac{\pi}{3} = \frac{\pi}{6}$, we get $OB = OD = \frac{a}{2}$. Hence, $OE = OB \cos \frac{\theta}{2} \leqslant \frac{a}{2} \cos \frac{\pi}{6} = \frac{\sqrt{3}}{4} a$. When $BD = \frac{a}{2}$, $OE = \frac{\sqrt{3}}{4} a$.
(2) Fold along $BD$ to form a dihedral angle, and let $O$ be the midpoint of $BD$. Similarly to (1), we get $OA = OC = \frac{\sqrt{3}}{2} a$.
Thus, $OE' = OA \cos \frac{\theta}{2} \leqslant \frac{\sqrt{3}}{2} a \cos \frac{\theta}{6} = \frac{3}{4} a$. When $\angle BOD = \frac{\pi}{3}$, $OE' = \frac{3}{4} a$.

Comparing (1) and (2), the maximum value sought is $\frac{3}{4} a$.