Mercury is closer to the Sun, but Venus is the solar system's hottest planet. Venus possesses an extremely dense carbon dioxide atmosphere which acts as a heat blanket. This atmosphere traps absorbed solar energy, preventing efficient heat escape into space. Mercury, lacking a substantial atmosphere, experiences extreme temperature swings between day and night. The comparison highlights how planetary atmospheres significantly influence climate conditions.