Hagia Sophia was built with fire proof materials. Crushed fire burnt stones were added to the mortar which us more flexible and light than the ones we use today.