US CPI tops 4% for first time in 3 years as energy costs surge