Optical nanocavity enabling hyper resolution in 2D and 3D two photon direct writing lithography towards flat metalens