It is hotter for the same distance over the top of a fire than it is in the side of it, mainly because
Air conducts heat upwards
Heat is radiated upwards
Conversion takes more heat upward.
Conversion, conduction and radiation all contribute significantly transferring heat upwards.
As we have learnt,
Convection -
Mode of transfer of heat by means of migration of material particles of the medium.
Convection significantly transferring heat upwards