https://www.usgs.gov/centers/western-geographic-science-cent...
> "Fog pushes against, over, and through gaps in the coastal mountains, transporting water and other aerosol materials into coastal ecosystems. If the temperature or pressure differences (gradients) are too strong, winds will be generated and the additional turbulent mixing will dissipate the fog."
Across most of California the Coast Ranges block the inland movement of the offshore marine layer in summer, with the break in the ranges at the San Francisco Bay the marine layer can flow in and out without having to climb the ranges and waterfall down the other side (that's an impressive sight when it does). As far as climate, the physical flow of the California Current is driven by planetary rotation, but the Gulf of Alaska has been generally warming and experiencing heatwaves, so perhaps some warming of the California Current is expected:
https://www.fisheries.noaa.gov/feature-story/central-gulf-al...
Sometimes the atmospheric outflow from the hot Central Valley through the Bay gap is strong enough to keep the fog bank well offshore (or dissolve it altogether). It comes down to the dynamics of local winds, the temperature differential (colder ocean = more fog, hotter valley air outflow = less onshore fog). Climate-wise, the California Central Valley is getting warmer with more extreme heat days:
https://blog.ucsusa.org/pablo-ortiz/climate-change-impacts-o...
Thus, less fog coming into the SF Bay is a reasonable prediction.