Solar carbon fuel via photoelectrochemistry