Periodic nanostructures for photonics