Fundamentals of photoelectrochemical water splitting