"Who was here at night?"
Translation:Хто був тут уночі?
No, «хто» is treated as a masculine word.
I see. So is it masculine by default? We really don't know if who is a man or woman.
Yes. The grammatical gender depends on the word. «Кто» is a masculine word, so you use masculine verb forms with it. Likewise, in «Що за люди́на була́ тут уночі́?» 'What kind of person was here at night?', you use feminine verb forms, because люди̂на 'person' is feminine.
It doesn't matter if the person is actually male or female, it just depends on the gender of the word.
Also, neuter gender is not normally used about people. If you do so, it would mean comparing the person to a thing, and this would be pretty offensive in most cases.
Thanks as always! Your example sentence brought another question. Can you say also "Яка людина була тут уночі?" I read that який-яка-яке mean which/what/what kind. I see you used "що за" which I'm not familliar with.
Yes, «яка» works too.
«Що за» means roughly the same thing as «який». It was borrowed from German «was für», so it doesn't make much sense in Ukrainian: usually, «за» is used with Instrumental or Accusative case, but «що за» is used with all the cases. You can't break this expression into two words because it was borrowed from another language.