Hello-You gave a lot of detail on what seems to be a complicated situation. Hoping I can help a little but if I miss any part of what you are looking for please let me know! It sounds like what you are writing is that you have a very close relationship with this co-worker and there is some sexual tension or just plain chemistry between the both of you. You mentioned that you have a boyfriend so I am sure that adds some confusion within itself. The messages the co-worker is giving you are definitely ones that show he is flirting with you on some level, but then gives some other messages that show that he isn't interested in that way (like not accepting you on facebook). Those mixed messages can be hard to read and understand what the meaning is behind them. What I'm sure makes it even harder is being so close with him and now he is acting distant. One question I have for you is what do you want from the relationship with him? As in do you have interest in him and if he was interested in you how would that change things with you?
It completely makes sense what you are feeling. You love your boyfriend but it always nice and exciting to have someone be interested or just treat you nicely like he has. Although I cannot for sure say why he is acting the way he is, it does seem that he seems to enjoy flirting with you. It could be a couple of different reasons. Maybe he feels that connection that you feel but also knows that nothing can come from it. So he is able to flirt in a safe way, if that makes sense, but also does keep some boundaries on it. With him going to a new team it could make a difference in his behaviors. Like you stated office politics can be difficult and maybe he is trying to figure all of that out. Plus now with a new team, there may be more distance between you. It sounded like earlier you were saying he would stare at you but not act the same way as he had before. Maybe he is trying to figure out how to fit into the new team. It sounds like you both have a level of comfort-ability with each other. With him keeping some boundaries he also may just be being respectful to the relationship you have with your boyfriend and keeping it at a friendly flirting level. Do any of those kind of fit or make sense?
Has anything happened in the past week that may have changed how he interacts with you? Maybe not just between the two of you but anything in the office as well? It sounds like he enjoyed flirting with you for sure. That does not appear to be just in your head. He maybe felt comfortable enough with you that he could act more flirtatious but also knew it wouldn't happen so was fine with meeting your boyfriend. Also maybe felt protective in wanting to know your boyfriend to see that he treats you right or was likable. There is a fine line on if you should ask again. You don't want to do too much that ends up pushing him away but also maybe finding different ways to find out what is going on. Maybe even texting him something like "since we are on different teams now we don't see each other often. Want to do lunch or get a drink after work" Something along those lines that doesn't put questioning on him but allows you to communicate with him. Do you think that would work?
He obviously cares about the relationship that you both have. He wouldn't make the effort to call if he didn't care. If he didn't care he could have blown off the text or just left it at a text. Him calling shows that he wanted to make sure that you and the relationship were ok. He does show signs that it is more than just friends on his part. The staring at you, calling to make sure things are good, wanting to come to the BBQ. One way to really tell if he is interested is by his body language when he is around you. Does he touch you when talking? Here are some signs for body language of someone who is interested: plays with their hair when around you, licks their lips when around you, raises their eyebrows, keeps eye contact for a longer period of time, body will be faced towards you, mirroring your body language, eyes dilated, sits closer to you, etc. If he is doing a lot of those (and it seems you have mentioned quite a few already), it does seem that he is interested but keeping a boundary because of your boyfriend or just respect for you.