US stocks close day in red as tech shares down sharply