I’m having a hard time with this concept. Air expands and becomes less dense when it is heated, it’s molecules spread apart. As air cools, the molecules become packed more closely together, making it denser and heavier than warm air. Ok, then why is air denser at the ground where it is warmer and less dense the higher you go when it is cooler? I must be missing something but I can’t figure out what it is. I study weather theory, it says one thing, and airplane performance (density alt) says another. Thanks for any help on this.