“I didn't realize that you were on a first-name basis.”
You're talking with a friend who's in the same class as you. She's talking about your teacher, but uses his first name instead of calling him by his last name. You're surprised.
I didn't realize that you were on a first-name basis.
"I didn't realize ___" means "I didn't notice ___" or "I didn't know ___".
You use this phrase to explain why you did something in the recent past. For example, imagine that you were in the bathroom for a long time. When you finally come out, your roommate is waiting outside of the bathroom and looks angry at you. You can say:
Oh, I didn't realize you needed to use it.
"I didn't realize" is followed by a clause, which is like a sentence inside of another sentence. Sometimes the clause can begin with "that":
I didn't realize that she had gotten laid off. If I had, i wouldn't have made those comments.
But it's often left off in casual speech:
Hey! I didn't realize you were in town!
When people in English-speaking countries get to know each other well, they often start to call each other by each other's first names. People who use each other's first names are "on a first name basis".
If someone calls a person like a teacher, a political figure, a celebrity, etc. by their first name, you can tease this person:
Oh, are you on a first name basis now?