Encapsulating a Ni(II) molecular catalyst in photoactive metal-organic framework for highly efficient photoreduction of CO2.