Interfacial vs confinement effects in the anisotropic frequency-dependent dielectric, THz and IR response of nanoconfined water