When a massive earthquake and fire leveled San Francisco neighborhoods in 1906, developers used the disaster to circumvent red tape and build much denser housing than before. Now a team of designers thinks that an impending disaster–sea level rise–can help the Bay Area solve its current housing crisis in a similar way.

In a new speculative design called “Mega Margin,” they map out how neighborhoods bordering the waterfront could retreat from rising water, with new parks at the water’s edge. A ring of new buildings, safely set back, would be built to house many more people than a typical block in San Francisco, Berkeley, or San Mateo currently holds.

“The Mega Margin targets an area that will inevitably need to change in response to sea level rise,” says designer Emily Schlickman, who worked on the project with Anya Domlesky at XL, a new innovation lab at the Bay Area-based design firm SWA.

At the firm’s offices, in the waterfront town of Sausalito, flooding is already a problem in the winter, innudating bike paths, bridges, and parking lots. “Last winter we got a glimpse of what the future of sea level rise could look like,” says Schlickman.

The architects realized that the slow-moving disaster of sea level rise–which threatens $77 billion worth of property in San Francisco alone–is, by necessity, forcing cities to redesign neighborhoods that border the bay. That need could solve another problem facing the area: There isn’t enough housing to meet demand, but anti-growth politics make it challenging to build more.

“This project takes two seemingly intractable issues–sea level rise and the housing crisis–and thinks about a way to confront each that is not doom and gloom,” says Domlesky. “There are pathways forward. We want to push people to rethink the city they live in, what the region has become today, and what it could be tomorrow.”

Along the bay, the Mega Margin uses natural space and parks as a buffer. “We wanted to explore how managed retreat could be an alternative to traditional engineering solutions that tend to favor hard infrastructure over soft,” says Schlickman. “By relocating some buildings upland, the potential for catastrophic loss due to sea level rise can be reduced. Also, by adapting to a new shoreline and creating a resilient public space capable of inundation, we can design for even more densification.”