The average distance of Mercury from the Sun is 36 million m…

The average distance of Mercury from the Sun is 36 million miles, and the average distance of Venus from the Sun is 67 million miles. However, the average surface temperature of Mercury is 260°C and the average temperature of Venus is 480°C. How do astronomers account for Venus being farther from the Sun than Mercury but having a higher surface temperature than Mercury?