Fierce solar magnetic storm barely missed Earth in 2012