Of course I say all of that and it's good to know what could happen if a terrible downturn does happen like in 2008 (even the nicest Bay Area hoods prices dropped 25%+).
Last thing, single family houses, especially in the Bay Area, are typically more insulated from price drops (insulated not immune). If you can afford a small single family then it might be worth it, especially if there's expansion potential (either for yourself or the next buyer if you decide to move on). And even better if there are some cosmetic problems that are tractable because let's say you do get laid off there's nothing like building some sweat equity in the downtime.
Just my two cents having gone through similar in the past.