I would like to thank my wife Yulya and my children Sima and Aliosha for their patience. During my stay at Harvard, I received help and encouragement from Joseph Bernstein, Joe Harris, David Kazhdan, Y.-T. Siu and S.-T. Yau. The mathematical content of this work is due to the inspiration by David Kazhdan, Misha Finkelberg, Sasha Shen, Arkadiy Vaintrob, Leonid Levitov and Victor Ginzburg, who taught me; Arkadiy Vaintrob, who told me about hyperkaehler manifolds in 1987; Victor Ginzburg, who told me about Deligne-Griffiths-Morgan-Sullivan; Alexander Beilinson, who read a course on Hodge theory in 1989 at MIT; Misha Finkelberg and Dima Kaledin, who explained me perverse sheaves, D-modules and mixed Hodge theory; Pierre Deligne, whose works were always a great inspiration, who expressed interest in this work and found a number of unpleasant errors in the final version; Valeriy Lunts, who helped me with algebraic part of this paper. The subject itself owes its existence to the works of E. Calabi, S.-T. Yau, F. A. Bogomolov, A. Beauville and A. Todorov.

I am also thankful to Leonid Positselskiy, for keeping in me faith in mathematics, Roman Bezrukavnikov for his enthusiasm, Tony Pantev for his generosity and knowledge, Alexander Vishik for human presence, Yura Chinkel for his interest and Vladimir Voevodsky for being around.

Dedicated to my parents and all those who lent me inspiration, with greetings to my friends Yulya Fridman, Pasha Ivanov, Masha Gorelik and Sergey Lakatosh. With reverence to Frater Perdurabo (Aleister Crowley).