Design of earthquake-resistant buildings