Quantitative modeling of the lithosphere dynamics, earthquakes and seismic hazard