Conversion of FeCo from soft to hard magnetic material by lattice engineering and nanopatterning