Nanopatterning with conformable phase masks