Theory of electron-irradiation-induced amorphization