Near the beginning of his career, Einstein thought that Newtonian mechanics was no longer enough to reconcile the laws of classical mechanics with the laws of the electromagnetic field. This led him to develop his special theory of relativity during his time at the Swiss Patent Office in Bern (1902–1909). However, he realized that the principle of relativity could also be extended to gravitational fields, and he published a paper on general relativity in 1916 with his theory of gravitation. He continued to deal with problems of statistical mechanics and quantum theory, which led to his explanations of particle theory and the motion of molecules. He also investigated the thermal properties of light which laid the foundation of the photon theory of light. In 1917, he applied the general theory of relativity to model the structure of the universe. Except for one year in Prague, Einstein lived in Switzerland between 1895 and 1914, during which time he renounced his German citizenship in 1896, then received his academic diploma from the Swiss federal polytechnic school later the Eidgenössische Technische Hochschule in Zürich in 1900. After being stateless for more than five years, he acquired Swiss citizenship in 1901, which he kept for the rest of his life. In 1905, he was awarded a PhD by the University of Zurich. The same year, he published four groundbreaking papers during his renowned annus mirabilis (miracle year) which brought him to the notice of the academic world at the age of 26. Einstein taught theoretical physics at Zurich between 1912 and 1914 before he left for Berlin, where he was elected to the Prussian Academy of Sciences. In 1933, while Einstein was visiting the United States, Adolf Hitler came to power. Because of his Jewish background, Einstein did not return to Germany. He settled in the United States and became an American citizen in 1940.