Supreme Court legalizes gay marriage nationwide