Elucidating the electronic structure of CuWO4 thin films for enhanced photoelectrochemical water splitting