MORGAN HILL, Calif. — Think of it as the ultimate ivory tower for academics: a castle inspired by Spain's Alhambra, lavished with sun-dappled courtyards, artisan-crafted frescoes, grottoes, fountains and a patio with 12 marble lions that spit water every hour on the hour.
But instead of housing nobles atop an Iberian hill, the newest fortress will serve as a quiet retreat for mathematicians next to a golf course in suburban Silicon Valley.
The castle, which the Morgan Hill City Council approved last month, will be the new headquarters of the American Institute of Mathematics. It's expected to be completed by 2009.
The institute and castle are the brainchild of electronics retailer John Fry, who owns the nearby links and plans to donate his impressive collection of historical documents -- including original math texts and writings of Nobel Prize winners such as Albert Einstein -- to the institute's library.
Fry, the media-shunning co-founder and chief executive of Fry's Electronics Inc., refused requests to be interviewed about the castle he's funding.
The 167,000-square-foot palace -- bigger than a typical Wal-Mart -- is rumored to cost more than $50 million, although people involved in the project admit that no one will know the true cost until it's finished.
The retail magnate, who studied math at Santa Clara University, is taking a hands-on role in the project, including the design and the selection of tile artisans and woodworkers. He spent five days in the Alhambra, exploring villas, chambers and salons with Scott Stotler, a consultant who for years has been tweaking the design to Fry's specifications.
"We spent so much time there that you could pretty much stick us in a dungeon and I'd know how to get out," said Stotler, head of Stotler Design Group.
Fry's involvement in the minutiae of castle construction doesn't surprise people who know him. He's shaped nearly every aspect of his family's 32-store chain, a nerdy utopia where techno-savvy shoppers can get deals on computer parts, networking equipment and appliances -- if they're willing to overlook abysmal customer service, sketchy refund policies and clerks who make little more than minimum wage.
Fry opened the first store in Sunnyvale with his brothers in 1985, and Fry's Electronics now operates in nine states.
The Better Business Bureau routinely pans Fry's. Consumer advocates complain that the stores lure shoppers with deeply discounted items, then entice them to buy higher-priced merchandise and make impulse purchases.
But Fry's, which sells potato chips as well as microchips, has obsessive fans, particularly in Silicon Valley.
Fry, who learned about retailing from his grocer father, co-founded the mathematics institute in 1994. About 800 scholars go to its campus in Palo Alto each year to ponder math questions.
About five years ago, academics from Princeton University and elsewhere convened at the institute to solve one piece of a conundrum known as the "perfect graph conjecture." It involved an analysis of 2,000 hours of supercomputer calculations from 1976.
Fry, who also owns the San Jose SaberCats arena football team, visited numerous castles, looking for inspiration for the new headquarters. He fixed on the Alhambra for aesthetics -- it's considered the best example of Moorish art in Europe -- and mathematical symbolism.
The Andalusian fortress, built primarily between 1248 and 1354, bursts with geometric patterns in every arabesque, column, garden and reflecting pool. It was built with running water and a medieval climate-control system envied throughout Europe and the Islamic world.
"The interesting geometric patterns present throughout the Alhambra's tiles, ceilings and walls -- they're perfect for mathematicians," said institute Executive Director Brian Conrey, who hasn't visited Granada, home of the Alhambra, but hopes to soon.
"Mathematicians have a tradition of communing with nature while thinking about deep questions. It's inspiring to be in a location that lets you ponder the things mathematicians like to think about, and Morgan Hill will be just such a place."
The castle will replace the Flying Lady Ranch, a vacant restaurant on 190 acres of Fry family property south of San Jose. Demolition will begin in October.
Stotler emphasized that the math castle would be an homage to the Alhambra, not a replica. Although Spanish stone masons and stained-glass artisans will give the place an authentic feel, it will have unabashedly modern touches, including 30,000 square feet of underground parking and a gourmet industrial kitchen with master chefs from a San Francisco seafood restaurant and a Napa Valley resort.
The math castle will include its own version of the Fountain of Lions, the Alhambra's alabaster basin flanked by 12 white marble lions, which signify strength and courage. In the 15th century, each lion spit a stream of water every hour -- a clock far more advanced than any sundial at the time.
During the reconquest of Spain in 1492, Christians disassembled the clock to see how it functioned. Since then, no one has been able to get it to work.
"We could cheat and do it electronically, but I'm not sure if John would allow that," Stotler said.