Is it possible to lose fat and gain muscle at the same time?

Options
My main goal is to lose fat. I've lost a few pounds by tracking my cals and eating way better than I used to. I also go to the gym 5 days a week.
However, I haven't noticed much gain in my muscle mass. I don't mind not gaining muscle yet, since I'm focused on getting slimmer for now. I realize it has everything to do with my weight loss, so I was wondering: can fat loss/muscle building only be done in two separate steps?
First, calorie deficit, lose fat. Then, calorie maintenance, gain muscle?