Stock market today: Mega-cap tech drives S&P 500 and Nasdaq to record highs