Why does my male friend stare at me like he is in a daze even in front of his girlfriend?

Sometimes an intense, serious expression, sometimes a deer in the headlights look, sometimes stealing a glance, he has teased me in the past, said suggestive things, and looks at my breasts (again in front of her sometimes). He has on one occasion, taken my hand, started stroking it and looking in my eyes (in front of her but she didn’t see). Ultimately however, he had started dating her at this point so nothing progressed beyond this. I’m head over heels for him but I keep my distance these days and we might see each other once every week or two weeks at social events with other people but I keep it brief and platonic. Now he started following me on Duolingo and started learning the language I’m learning only a few months ago possibly at the time he learnt I was learning it. She is on the app too but he isn’t learning the language she is learning. What might be going through his mind?
Why does my male friend stare at me like he is in a daze even in front of his girlfriend?
Post Opinion