Tech giants beat quarterly expectations as Trump's tariffs hit the sector