[step:Project $f$ onto each orthogonal basis vector]Define complex numbers $c_1,\dots,c_d \in \mathbb{C}$ by
\begin{align*}
c_j := \frac{(f,f_j)_{\mathrm{Pet}}}{(f_j,f_j)_{\mathrm{Pet}}}
\end{align*}
for $j \in \{1,\dots,d\}$. The denominator is nonzero because $f_j$ is a basis vector, hence $f_j \neq 0$, and the Petersson inner product is positive definite on $V$.
Set
\begin{align*}
g := f - \sum_{j=1}^{d} c_j f_j \in V.
\end{align*}
For a fixed index $\ell \in \{1,\dots,d\}$, linearity of the Petersson inner product in the first variable gives
\begin{align*}
(g,f_\ell)_{\mathrm{Pet}}
&= (f,f_\ell)_{\mathrm{Pet}} - \sum_{j=1}^{d} c_j (f_j,f_\ell)_{\mathrm{Pet}}.
\end{align*}
Since the basis is orthogonal, $(f_j,f_\ell)_{\mathrm{Pet}} = 0$ whenever $j \neq \ell$. Therefore
\begin{align*}
(g,f_\ell)_{\mathrm{Pet}}
&= (f,f_\ell)_{\mathrm{Pet}} - c_\ell (f_\ell,f_\ell)_{\mathrm{Pet}} \\
&= (f,f_\ell)_{\mathrm{Pet}} - \frac{(f,f_\ell)_{\mathrm{Pet}}}{(f_\ell,f_\ell)_{\mathrm{Pet}}}(f_\ell,f_\ell)_{\mathrm{Pet}} \\
&= 0.
\end{align*}
Thus $g$ is orthogonal to every vector in the basis $(f_1,\dots,f_d)$.[/step]