Changes in pH and NADPH regulate the DNA binding activity of neuronal PAS domain protein 2, a mammalian circadian transcription factor.