Electronic structure and magnetism in compressed 3d transition metals