When Lin Xiaotao came out as gay to his female best friend, in 2007, she responded in the way that many caring BFFs in China would: She offered to marry him so he could keep his sexuality a secret from his parents indefinitely.

"I was in my mid-20s and she was the first person I came out to," says Lin. "She half-heartedly said we should marry. She said she'd help hide my sexuality and keep my mum from being heartbroken. But after thinking about it for a few months, I decided this wasn't the way to go."

Lin, who is from Ganzhou in Jiangxi Province and is now 28, kept his sexuality secret for another three years. He describes his mother's personality using a Chinese phrase that translates as, "Having a mouth like a knife and a heart like tofu," meaning a person who is outspoken but has a soft heart. "I had a feeling she would accept it, but I had no real clue as to the specifics of how my parents would react," he says. "When I told them, they didn't go into denial. They just sort of … acknowledged it."

Lin Xianzhi, Lin Xiaotao's father, recalls a slightly different reaction. "I was so stunned my head went blank," he says. "I felt terrible. I thought my kid had suffered from bad influences or was trying to catch up with some new trend. In the past I'd told him to stay away from homosexual-related things, and that one has to get married."

Five years on, Lin Xianzhi's opinion about his son's sexuality is unrecognizable from his initial reaction. In February he sent copies of a seven-page letter he'd written calling for the discussion of the legalization of gay marriage to 1,000 legislators and political advisers. With gay marriage not an option in China, his proposal is pushing for equal rights for gay couples in areas including medical care, inheritance, and property purchases.

"Most misunderstandings come from ignorance, and my father is a scholarly guy," says Lin Xiaotao of his dad, an ex-civil servant and labor union president. "After I came out, I'd do things like send him articles about gays doing great things."

"Eventually I decided that he is, after all, my son," says Lin Xianzhi. "So I just accepted the reality."

Homosexuality was illegal in China until 1997, and in 2001 it was removed from an official list of mental illnesses. In 2004 China's health department estimated that there were around 10 million male homosexuals in the country, which has a population of 1.3 billion. But in 2012 renowned homosexuality and AIDS researcher Zhang Beichuan said there were around 40 million homosexuals in China, including both females and males.

By 2013, according to a survey by US research group Pew, only 21 percent of Chinese people were in favor of accepting homosexuality. Advocacy group Parents, Families, Friends of Lesbians and Gays (PFLAGChina, which is independent of any other PFLAG branches worldwide) estimates that around two percent of homosexuals in China come out to their parents, and sham marriages are still common.

Despite these statistics, recent high-profile court cases and actions such as Lin Xianzhi's lobbying have led to optimism about a sea change in public opinion. There is a spark of hope that a path leading to the legalization of gay marriage can be laid. "Our government loves going with the tide," says PFLAG China founder Ah Qiang. "If there is enough of a media wave and people such as Lin are demanding it, there will be politicians working on it. There seems to be a surging call from society."

Li Yinhe, a sociologist and gay rights activist, agrees. "The public attitude has absolutely changed for the better," she says. "In 2011 the China Daily newspaper had a positive report on gay pride and things moved forwards in a profound way. Then Premier Li Keqiang met the founder of Danlan, China's biggest gay community website. What it takes is lots of public figures having a continued push for the public to learn more, then further down the line there will be enough ground made for legislation to come in."

Another landmark moment came last December. A Beijing court ruled in favor of a man named Yang Teng, who had sued a clinic for giving him electroshock treatment to "cure" him of his homosexuality. It is widely considered the first major victory for gay rights in a Chinese court.

Yang said he agreed to the treatment after pressure from his parents. His case was a reflection of one of the biggest causes of grief for young gay people in China: butting against traditional values held by their families. There is a huge societal emphasis in China on the importance of raising a successor, with most Chinese couples having one child despite the recent relaxation of the single-child policy.

"People in China raise kids to ensure they can be cared for when they retire," says Wang Haijun, a lawyer from Hunan Province. Wang gives services to gay people suffering discrimination as part of a group called the Rainbow Legal Team. "Not marrying and having a kid is seen as abnormal by parents," he continues. "There are also still conservative opinions—people who believe that being gay is like being a psychopath, something that needs to be corrected."

Lin Xiaotao concurs. "I felt like it was my responsibility to produce offspring and get married," he says. "Gay people have invisible chains locked in their heads. They often think that not walking the path that is normal for them, living the life they want to, is selfish and not paying respect to their family."

With the government's stance on gay marriage unlikely to shift before society's does, the key to law change could lie with changing parents' attitudes. While acknowledging the difficulty of getting a generation to cast aside deep-rooted values, PFLAG Chinafounder Ah Qiang says his group's work shows there's cause for optimism.

"We've communicated with between 1,000 and 2,000 parents so far," says Ah, who organizes meet-up sessions for parents of gay sons and daughters. "Of these, around 80 percent agree that homosexuality should be accepted but still don't want people outside of their family to know their child's sexuality. They have accepted it but fear losing face—'face' is so important in China."

Lin Xianzhi's lobbying got a positive response from the public on Chinese social media. It was also covered by the Global Times newspaper, which is often used by the government to blast out firebrand warnings about dissent and freedom of speech.

By taking the unusual step of highlighting a positive relationship between gay people and their parents he has scored a big publicity win. But even China's most strident gay rights campaigners acknowledge that the gay marriage discussion is a long way from reaching the National People's Congress (NPC) agenda.

The NPC is China's national legislature; it has some 3,000 members and is currently convening in Beijing. For gay marriage to be discussed at a future session at least 30 members would have to bring forward the issue, and as yet none have agreed to.

The issue was, at least, raised in public earlier this year by an NPC member named Ran Ran, who is from the city of Chongqing's delegation and said that laws should protect homosexuals' basic rights. According to China National Radio she said that, "Gender and sexual education should be included in sex education courses in school, that homosexuality can be something discussed in public instead of a taboo, and that students need to have objective knowledge on homosexual people."

Activist Li Yinhe has made multiple attempts to get an NPC member to bring up the issue for proper debate. "I've found that they dodge the bullet by saying, 'This isn't my field,'" she says. "Everyone has their own field and they don't care for things that aren't part of them. So it's still an issue of how groups are represented in congress. For example, there are NPC migrant worker representatives who can pursue things on their behalf. If there was a representative for gay people, they would be able to fight for related proposals."

Lawyer Wang thinks China is still "at least 30 years" away from seeing gay marriage legalized. "Even if government departments or NPC members want to do it, they need to wait for the wider, more tolerant social basis to open up the possibility," he says. Li is more hopeful that the wait will be shorter. "If people born in the 1980s and '90s become NPC members, based on the attitudes towards gay issues now, I think things will be much easier to pursue by then," she says.

Lin Xianzhi, meanwhile, says he is optimistic that the issue will reach discussion level within 10 years. "Legalizing gay marriage is just a matter of time," he says. "Food security, the environment, and so on seem to be the more pressing issues, so it's not on top of the list yet."

His son has a long-term boyfriend, and he says that having fully turned around his views on homosexuality he's even looking beyond the legalization of gay marriage in terms of China's progress. "As parents, my son's marriage to his boyfriend will be a dream come true for my wife and I," he says. "But even if gay marriage is legalized, it doesn't mean it's the end of the road. We will still need to promote gay rights. There will always be confusion and gay people who are afraid to come out."

For now, Lin Xiaotao will get on with loving his boyfriend and supporting his dad's lobbying, as the boulder begins to slowly shift. "We're stable and like a married couple," he says. "We're joining a gay couples event in the States in June, we may get a license there but it won't hold up here. We hope we can get married on Chinese soil in our lifetimes. But until then, life still goes on."

Additional reporting by Jiehao Chen