Designed by a physicist and a mathematician, the Hagia Sophia church in Istanbul, Turkey acted as an experimental test case in which advanced knowledge of geometrical constructs, sophisticated understanding of light behaviour, and religious and cosmological beliefs combined to create a magnificent structure. While some of its design concepts are known, many remain hidden. Earthquakes have demolished parts of the church ? such as the original dome. Researchers have in the past misinterpreted their observations and perpetuated false conclusions. Lastly, the lack of digital tools has until now prevented verification and analysis of prior findings. In this paper, we integrate traditional historical research, parametric digital analysis, and lighting simulation to analyze several aspects of the church. In particular, we focus on the geometry of the floor plan, the geometry of the apse, and light behaviour in the original dome. Our findings point to the potential of digital tools in the discovery of a structure's hidden features and design rules.