Define \( f: \mathbb{R} \to \mathbb{R} \) by
\[
f(x) =
\begin{cases}
\frac{1 - \cos 4x}{x^2}, & x < 0 \\
a, & x = 0 \\
\frac{\sqrt{x}}{\sqrt{16 + \sqrt{x}} - 4}, & x > 0
\end{cases}
\]
Find the value of \( a \) such that \( f \) is continuous at \( x = 0 \).