First-principles investigation of the insulator–metal transition in layered NaNiO 2 : coupled electronic and lattice effects | Synapse