Theoretical insight into the mechanism of photoreduction of CO2 to CO by graphitic carbon nitride.