Ab initio simulations of the effects of nanoscale confinement on proton transfer in hydrophobic environments.