The shaking surpassed building code requirements and exceeded what engineers had prepared for, and although most dwellings in the valley had been built in the prior two decades, even modern earthquake-resistant structures sustained serious damage.