Given a line parameterized by 
\[
\mathbf{r}(t) = \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix} + t \begin{pmatrix} 4 \\ -1 \\ 2 \end{pmatrix},
\]
find the value of \( t \) such that the magnitude of the position vector \( \mathbf{r}(t) \) is 13. Let's think step by step and output the final answer within \boxed{}.
user