I want to be leaner but I also want to gain more muscle mass. Is it possible to do both at the same time? If not, which one should I focus on first?
Gaining muscle while losing fat is not impossible but it is extremely difficult for genetically-average drug-free trainees because when you eat for one the energy balance and resulting hormonal environment is not conducive to the other.
The most common exceptions to this appear to be people who have a lot of body fat and are either beginners or regaining lost muscle (the Colorado Experiment is a good example of this). The further you are from your maximum muscular potential and the less accustomed your muscles are to intense work the faster your body will tend to respond to training and the less it takes to effectively stimulate muscular strength and size increases. The fatter you are the easier it is for you to lose fat and the more muscle you will be able to maintain while doing so.
For everyone else, whether you should focus on losing fat or building muscle first depends on your current body composition. If your goal is to have a lean, well-defined, physique this means having a around ten percent bodyfat or below if you are male, and a bodyfat percentage in the low to mid teens if you are female. If you are a male with a bodyfat percentage around or above the mid teens or a female with a bodyfat percentage around or above the low twenties reducing your bodyfat will improve your physical appearance more than gaining muscle, and leaning down first helps because the leaner you are the less fat you will tend to gain as you start building muscle and the easier it is to distinguish between fat and muscle gains.
Once you’ve leaned down do not immediately increase your calories to over maintenance levels, though. Your body will have adapted to the lower calorie intake and if you rush to increase your calories you’ll gain fat more easily. Instead, bring your calories back up to maintenance over a period of a few weeks then stay at maintenance calories for a few more before gradually increasing your intake.
If your bodyfat is already below this level and you don’t want or need to get even leaner for a competition, photoshoot, or to make weight for athletic competition or some other event you should focus on gaining muscle, but keep an eye on your bodyfat percentage and if it gets back up to the mid teens if you’re male or the low twenties if you’re female stop and take a few weeks to diet back down before focusing on gaining again.
Leaning down first and then alternating between short periods of calorie surplus for gaining muscle and calorie restriction to bring your bodyfat back down whenever it goes up more than a few percent is more effective for genetically average, drug-free trainees than the traditional approach of using long “bulking” and “cutting” phases. You will look better most of the time if you don’t let your bodyfat get too high, and by avoiding the need for an extended period of calorie restriction to get lean again you’ll hold on to more of the muscle you’ve gained.