UV-Vis and fluorescence spectroscopy. UV-Vis measurements were performed using Cary 60 spectrophotometer (Agilent) and the fluorescence measurements were performed using Fluorolog fluorometer (HORIBA). A quartz cuvette with a pathlength of 0.5 cm was used for both the UV-Vis and fluorescence measurements. The slit size in the fluorescence measurements was adjusted to 2 nm. The concentration of photoacids/photobases used in the spectroscopy measurements was 0.1mM.