Let $k$ be an algebraically closed field of characteristic $0$, $0 < d < n$ be integers,$\mathrm{Gr}_k(d,n)$ be the Grassmannian parametrizing all linear subvarieties of dimension $d$ contained in $\mathbb{A}^n_k$, $C$ be an irreducible curve in $\mathbb{A}^1_k \times \mathbb{A}^n_k$, $\pi : \mathbb{A}^1_k \times \mathbb{A}^n_k \to \mathbb{A}^1_k$ be the projection onto the $1$st coordinate. I want to show that $$ Z := \{(x,V) \in \mathbb{A}^1_k \times \mathrm{Gr}_k(d,n)\ |\ C \cap \pi^{-1}(x) \subseteq \{x\} \times V \} $$ is a Zariski closed subset of $\mathbb{A}^1_k \times \mathrm{Gr}_k(d,n)$.
For a fixed $x \in k$, I can show that $\{V \in \mathrm{Gr}_k(d,n)\ |\ C \cap \pi^{-1}(x) \subseteq V \}$ is a Zariski closed subset of $\mathrm{Gr}_k(d,n)$, since in this case, I can take an affine open subset of $\mathrm{Gr}_k(d,n)$ which isomorphic to $\mathbb{A}^{d(n-d)}_k$ and write down the coordinates of each point in $C \cap \pi^{-1}(x)$, and then substitute these coordinates into the algebraic equations that $V$ should satisfy, thereby obtaining the algebraic relations that the coordinates of $V$ should satisfy. However, for the global situation, the coordinates of each point in $C \cap \pi^{-1}(x)$ are determined by some (maybe nonlinear) equations, and I don't know how to substitute the algebraic relations corresponding to these equations into the algebraic equations that $V$ should satisfy.
I also attempted to construct a morphism such that $Z$ is either the preimage of a morphism or the image of a projective morphism, but without success.
Any help would be appreciated.