Let $\mathbf{S}^n$ denote the space of symmetric, real-valued $n \times n$ matrices. Consider the closed convex set
$$ \mathcal{C} := \left\{ (X, x) \in \mathbf{S}^n \times \mathbf{R}^n : X \succeq xx^T, ~ \operatorname{tr} (X) \leq 1 \right\},$$
where $\succeq$ above denotes the positive semidefinite (Loewner) order, and $\operatorname{tr}(\cdot)$ denotes the trace operator. I would like to compute the Euclidean projection onto this set, i.e., I wonder if there is a closed form for the following operator, $\mathrm{proj}: \mathbf{S}^n \times \mathbf{R}^n \to \mathcal{C}$, which is variationally given by
$$ \operatorname{proj}(Z, z) = \underset{(X, x) \in \mathcal{C}}{\operatorname{argmin}} \left( \frac12 \| Z - X \|_{\text{F}}^2 + \frac12 \|z - x\|_2^2 \right),$$
where $\|\cdot\|_{\text{F}}$ denotes the Frobenius norm.