I want to study the embedding of $U(n)$ in $SO(2n)$. I write $Z=X+iY\in U(n)$ and use the realification map
\begin{align*} \varphi:C^n\rightarrow R^{2n}:X+iY\mapsto\begin{bmatrix} X &-Y\\ Y & X \end{bmatrix}. \end{align*}
I note that
\begin{align*} \begin{bmatrix} X & -Y\\ Y & X \end{bmatrix}^T\begin{bmatrix} X & -Y\\ Y & X \end{bmatrix}=\begin{bmatrix} X^TX+Y^TY & -X^TY+Y^TX\\ -Y^TX+X^TY & Y^TY+X^TX \end{bmatrix}=\begin{bmatrix} I & 0\\ 0 & I \end{bmatrix} \end{align*}
since $Z^*Z=(X^T-iY^T)(X+iY)=X^TX+iX^TY-iY^TX+Y^TY=I$.
My question is: how to determine the orthogonal projection operator $\pi$ of any $A\in R^{2n\times 2n}$ on the tangent space of $\varphi U(n)$ at $\varphi Z$?
Attempt: I note that any element of the tangent space of $\varphi U(n)$ at $\varphi Z$ must be on the form
\begin{bmatrix} A & -B\\ B & A \end{bmatrix}
and must satisfy $A^TX+X^TA+B^TY+Y^TB=0$ and $-A^TY+X^TB+B^TX+Y^TA=0$. The last relations are from the time derivatives of the matrix equations above. I am stuck here. How to orthogonally project an arbitrary matrix on
\begin{align} \left\{\begin{bmatrix} A & -B\\ B & A \end{bmatrix}\in R^{2n\times 2n}\,|\, A^TX+X^TA+B^TY+Y^TB=0,-A^TY+X^TB+B^TX+Y^TA=0\right\}? \end{align}