On Telegraph Hill, Jerry Lubenow got his biggest shock when he arrived at his apartment after the deadly earthquake.
"There was no damage to our place or in our neighborhood," he said.
The only thing Lubenow could figure out was that "Telegraph Hill is on rock." He then talked to friends who live on Nob Hill and Russian Hill, which are also situated on rock, and learned that their residences also avoided damage.
"You almost feel guilty," he said, referring to his own good fortune. "(It's) like living through the blitz in London in the Second World War."
Only a few miles away in San Francisco's affluent Marina District, dozens of fashionable townhouses were damaged or destroyed. Some buckled and pitched forward off their foundations into the street. Others appeared outwardly sound but sustained interior damage that rendered them uninhabitable.
Why did some of the luxury, four-story apartment buildings collapse at the Marina while in nearby Chinatown, shops made of unreinforced masonry sustained little damage in the 6.9 temblor?
Why did high-rises that form the elegant San Francisco skyline escape virtually unscathed while an office building in the city's southeast district peel apart, killing five pedestrians below?
"The buildings that collapsed did so because of a combination of two things: very poor soil and very poor structural design," said Peter I. Yanev, chairman of EQE Engineering Inc., a structural engineering firm in San Francisco.
"They were on top of the worst soil conditions in the city," explained Yanev, who said he has traveled to "all the major earthquakes" in the last 20 years studying their impact on construction.
The soil beneath the Marina District, where six buildings burned down or collapsed, is made up of landfill partly dredged from the bay more than 70 years ago.
Yanev said many of the buildings in the neighborhood were erected in the early part of this century when there were no earthquake codes.
"What collapsed and killed some people were four-story apartment buildings that had garages built all the way along the bottom (floor)," Yanev said. "So, you have a bunch of garages underneath all these apartments. You effectively have no walls on one side of the building. The connections just break, and the front end falls into the street."
Yanev called the two conditions a "disaster waiting to happen."
"Should we have an earthquake centered off the Golden Gate Bridge instead of Santa Cruz, you'd probably have hundreds of these buildings collapse," he said.
Experts said they did not anticipate that the Marina District would be the major problem in an earthquake. The worst areas, they believed, would be Chinatown and the Tenderloin, where brick buildings abound.
Chinatown survived relatively intact, Yanev said, because it is located "up in the hills" atop "very firm soil," and the epicenter of the temblor was many miles away.
In the city's high-rise office towers, a few broken windows and other cosmetic damage could be seen. A preliminary survey found only three skyscrapers rendered unsafe by the quake. But most buildings, including the landmark Transamerica Pyramid, were not touched.
Jay Cahill, an owner of Cahill Construction Co., a contractor that built several high-rises in the city, said the earthquake codes "did their job."
"What this quake proves is that the engineers were right" when they said tall buildings could withstand a strong quake, he said. They said the downtown buildings are constructed to withstand a quake of at least 8 magnitude with an epicenter in San Francisco.
Earthquake experts said they were not surprised that the high-rises swayed with the earthquake while four-story buildings collapsed.
"An earthquake means that the ground shakes, and that means force is applied to the sides of buildings," said George C. Lee, acting director of the National Center for Earthquake Engineering Research at the University of Buffalo.
When architects design skyscrapers, Lee said, they factor in wind gusts and earth movement--forces that are not considered as much when constructing smaller buildings.
In smaller buildings, he said, contractors usually make sure that vertical forces--such as snow and ice--cannot force a structure to collapse.
Throughout the Bay Area, residents were left to puzzle over why the earthquake savaged some buildings and bypassed others, much like San Francisco was left to wonder why the Marina District was hard hit and others spared.
In Santa Cruz, initial damages were estimated at $350 million, and 30% of the downtown mall--the heart of the city--was severely damaged. An estimated 20 commercial buildings must be razed, a county official said.
In Los Gatos, 30 miles northeast of Santa Cruz, portions of the downtown area were destroyed. Several dozen Victorian homes were shifted off their foundations, and numerous chimneys crumbled.
San Francisco fire officials said as many as 60 buildings in the Marina District may have to be torn down because of structural instability caused by the earthquake.
"Some of the buildings are extremely hazardous," Assistant Fire Chief Frank Blackburn said. "They are four-story buildings above garages. All they had were vertical columns holding up the structures. If you picture a building sitting on columns with no lateral support on those columns, when you get sideways motion, the buildings slide left and right."
Blackburn said many residents are not going to be able to get their belongings out.
"If a (big) aftershock comes, it'll collapse," he said.
Buildings collapsed like cakes without yeast. One fourth-floor apartment dweller stepped through her window onto the street after her building crumbled beneath her.