Sub-2 nm precision nanolithography for photonics and sensors