Nitrate sinks and sources as controls of spatio-temporal water quality dynamics in an agricultural headwater catchment