Mechanistic insight into photocatalytic CO2 reduction by a Z-scheme g-C3N4/TiO2 heterostructure