Atomic origin of magneto-crystalline anisotropy in NdFeB