Why did he get nervous when he saw me?

I have been talking (ish) with this guy, and there is definitely a mutual attraction between us.

I was outside the library, talking on the phone when I saw him walk inside. He was working and moving palettes. He noticed me, then looked away and straight ahead. He came back out and side looked at me and kept walking. This happened a couple of times: he looked at me, then looked away.

He finally waved at me when he was going into the library the last time.
Why did he get nervous when he saw me?
Post Opinion