Solution (source code)

= Solution

Write $n=2m-1$. On $\mathbb R^{2m}$ define the orthogonal <linear map>
$$
J(x_1,x_2,\ldots,x_{2m-1},x_{2m})=(-x_2,x_1,\ldots,-x_{2m},x_{2m-1}).
$$
It satisfies $J^T=-J$ and $J^TJ=I$. Hence $\langle x,Jx\rangle=0$ and $\|Jx\|=\|x\|$. Restricting to the <unit sphere> gives
$$
\boxed{f(x)=Jx\in S^{2m-1},\qquad f(x)\perp x.}
$$
This continuous unit tangent field is available exactly because the ambient dimension is even.