Why does this guy give me mixed signals?

We are both 17. When we met, both of us were in a relationship so we did not really flirt with each other. After we were both single he admited that he likes me a lot, we hanged out a few times and we even kissed and made out in the school's bathroom 2 times. He was really sweet to me in the beginning. After that he said he wanted to have sex with me (he had sex with many girls before me) but I said no, because I'm a religious person. The next few days he was cold to me, his responses were very short and he said he didn't wanted to make out with me again (I said ,, ok" with a smile on my face, because I'm a confident girl that doesn't let herself get played by someone and does not run around for a guy). After a few days he texted me in the middle of the night while he was drunk at a party that I should come here to be with him and said that he'll go to sleep only if I come by for him to see me (I obviously said no and ended the conversation). He didn't talk to me much after that, he basically ignored me for a week, but when we went to school I said I want to sit next to him (because why not) and he told his friend that sat next to him since the beginning of the year to find another sit because he wants me to sit next to him and the whole day he stared at me and smiled. When I texted him the same day, he was ice cold again, answering my texts with one word messages. I was never disperate around him, every time he was ignoring me, I ignored him as well. I wouldn't say I'm extraordinary beautiful, but I'm definitely not ugly. Many men try to get my attention (even much older ones) but I never let myself fall in love with someone like a fool, and I'm definitely not in love with this guy, honestly I like him a little bit, but I would never want a long term relationship with him because he's pretty much a player, however I'm genuinely curious why he gives me so many mixed signals.
Why does this guy give me mixed signals?
Post Opinion