US stocks close mixed as tech losses weigh on Nasdaq, Europe mostly up