What was Albert Einstein's job when he came up with his Theory of Relativity?

Within the span of a year in 1905, he went from obscurity to worldwide fame. His accomplishments during that time included the completion of his doctoral degree and the publication of four of his most influential research papers. For those reasons, his biographers have called that period his "annus mirabilis" which translates to "miracle year."