Lisa Vogt has always been on the margins of San Francisco’s tech sector. In the 1990s, she was learning basic Web design while the dot-com boom reshaped the city. In the late 2000s, as Twitter, Salesforce and other tech giants expanded in San Francisco, Vogt taught beginner computer users how to maneuver the Internet.

In 2014, though, she dove head-first into the industry, enrolling in a 12-week Web development boot camp at General Assembly, a tech vocational school. That led to software engineering jobs at a small video game company, then a stint at the much larger gaming firm Zynga — best known for its popular mobile app, “Words With Friends.”

Still, Vogt felt like an outsider in tech — and in some significant ways, she is. About three-quarters of computer and mathematical workers in San Francisco are men, according to census data, a figure that has remained stubbornly static for years.

That gender segregation in one of San Francisco’s fastest-growing and most lucrative industries has helped fuel a growing pay gap in the city, experts say. Since the end of the recession, the pay disparity between fully employed men and women, those with advanced degrees and even those holding tech jobs, has grown wider, according to census data.

“Not seeing many people that look like you, having that added element of discomfort, makes it difficult to enter the industry,” Vogt said. “I’m sure the impostor syndrome has a lot to do with it, the feeling that everyone else knows so much more than I do, which isn’t necessarily true.”

A handful of programs and nonprofits are trying to diversify tech — and in turn possibly shrink the pay gap — but the lack of women in the industry has complex roots. Factors include a shortage of female engineers, a higher-than-average exit rate for women within the sector, possible bias that impacts hiring and promotions, a lack of female executives and board members, and uncomfortable work environments for women at some companies.

“It’s a death by 10,000 paper cuts: Women in tech aren’t being promoted in the same way, sponsored in the same way, getting the same opportunities,” said Marianne Cooper, a sociologist at Stanford’s Clayman Institute for Gender Research. “After a while of dealing with issue after issue, people feel this isn’t the place they want to be.”

Growing disparity

The pay gap between the sexes in San Francisco has been wide at times in the past. But in 2009, as the recession was winding down, fully employed men and women in the city had roughly the same median income: $66,000 and $64,000 per year, respectively, after adjusting for inflation. By 2014, men working full time made about $73,400 per year, $11,300 more than women on average.

A similar trend played out in five-year census data, which have lower margins of error because of the larger sample size. Between 2005 and 2014, the median income for fully employed women in the city remained more or less flat, near $60,500. Meanwhile, men’s median income increased by about $4,600 over that time, from $67,500 to $72,100.

Pay disparity also ballooned among the highly educated. In 2009, men with bachelor’s degrees in the city made about $8,500 more than women with bachelor’s degrees. As the city’s economy grew, so did the difference in income, reaching about $15,000 in 2014.

Despite the increasing discrepancy, the gender pay gap isn’t as large in San Francisco as in other parts of the state, including nearby San Mateo and Santa Clara counties — home to most of the region’s major tech companies. The disparity also isn’t solid proof of discrimination; many believe it’s more a reflection of growing job segregation.

“The big sector that has contributed to the boom for San Francisco, the recovery from the recession, is tech,” said Elizabeth Newman, workplace policy director for San Francisco’s Department on the Status of Women. “There are more men in tech, and women are more likely to be employed in the minimum-wage service sector.”

S.F. schools open path

Many tech firms have made a concerted effort to both improve gender diversity and create income parity among staff. Salesforce did an internal audit of its payroll last year, leading to $3 million in raises for female employees to better ensure equity. (San Francisco’s Department on the Status of Women is encouraging other firms to follow suit.) Google recently rolled out an “unconscious bias” workshop for staff. And, thanks to an intentional hiring push, Airbnb has doubled the proportion of female data scientists — from 15 to 30 percent — according to a recent company post on Medium.

The California Legislature also recently enacted the strictest equal-pay law in the country, which should help curb any discriminatory pay practices that might exist within companies.

Nonetheless, female engineers are scarce at many tech firms, a fact many industry leaders attribute in part to the lack of women studying computer sciences.

Of all computer and information science degrees handed out in 2013, just 13 percent were awarded to women, according to a recent report by the National Center for Women & Information Technology — a steep decline from decades past. In San Francisco, about 30 percent of public high school students currently enrolled in computer science classes are girls, an increase from the previous year but still a relatively low proportion.

Useful entry for youths

To try to boost those numbers, San Francisco Unified School District recently introduced computer science classes at a handful of middle schools — the first step in a broader campaign to integrate that field into the entire pre-K-through-12 curriculum.

“Right now, not all students living in San Francisco are on the path to take the jobs opening up in their backyard,” said Bryan Twarek, the school district’s computer science coordinator. “If we normalize computer science education early, hopefully more students will choose to pursue it in high school and beyond.”

During a recent class at James Lick Middle School in Noe Valley, a group of preteens — about equal parts boys and girls — built mazes using a program called Scratch. While simple in design, Scratch can serve as a useful entry into coding for youths; many of its functions are similar to more complex programming languages such as Python, but still simple enough for youngsters to digest.

Hopefully, the class will spark a ripple effect, Twarek explained, encouraging a more diverse group of students to pursue computer science in high school, then college, and then, a decade or so down the line, to work in San Francisco’s growing tech sector.

“The workforce is asking for it. They’re desperate to make their workplaces more inclusive and diverse,” he said. “And what better place to fill those roles than from within the city?”

Exposing young girls and minorities to computer sciences could diversify the future Googles, Facebooks and Twitters, but it won’t address the industry’s current struggles hiring and retaining female employees.

Past studies have found that more than half of the women in the tech sector leave the industry mid-career, a disproportionately high number. Many even end up quitting science and tech fields altogether.

Leaving jobs over pay gap

Some cite internal pay disparities for the high exit rate. According to census data, women working in San Francisco’s computer and mathematics industry — which includes programmers — made roughly $12,700 less annually than their male counterparts between 2010 and 2014, a figure that rose 30 percent from the five years spanning 2005 to 2009. Other data points, however, suggest that once education and work experience are factored into employee compensation, the gap in tech disappears.

A lack of advancement opportunities has also been blamed for tech’s high female attrition rate. A recent Chronicle analysis found that of the 15 largest publicly traded tech firms in the Bay Area, only a handful had a significant number of female managers reporting directly to the CEO.

Alaina Percival, who heads the nonprofit Women Who Code, said she believes a lot of women end up leaving tech because of uncomfortable work environments, which are fueled in part by a lack of diversity. “On a daily basis you have really small things that happen that aren’t big enough to cry or complain about, or quit your job over, but they add up,” she said. “When more women are in the tech industry, those things will start to go away; women won’t be tokens anymore.”

As many groups try to diversify tech and close the pay gap, Lisa Vogt is looking for a job. Currently unemployed, she’s working on sharpening her coding skills.

Study groups and meet-ups

On a warm night in mid-February, Vogt joined more than a dozen women at a Ruby/Rails workshop hosted by Women Who Code, which runs study groups and meet-ups around the world for women in tech. Vogt has attended more than a dozen of the events, and while she already knows Ruby, she was excited to brush up on Javascript and other Web skills.

After a quick “lightning talk” on Ruby, Vogt worked on her own projects, occasionally asking other attendees for help and advice.

Vogt says the meet-ups help her feel like she’s making inroads into the industry she’s determined to be a part of. “I’m on a job search, I’m not in an office every day, and it’s really nice to have a community here,” she said. “It’s a great way to feel supported and connected.”