Hagia Sofia: historical perspective