BEIJING (AFP) - Browsing the Internet as a young policeman in China, Mr Ma Baoli recalls the sheer volume of Web pages telling him he was a pervert, diseased and in need of treatment - simply because he was gay.
"I felt extremely lonely after I became aware of my sexual orientation," says Mr Ma, at the time a newly minted officer in a small coastal city.
Two decades later, the softly spoken 43-year-old now helms Blued, one of the world's largest dating platforms for gay men.
The app went public last July with an US$85 million (S$112.52 million) debut on Nasdaq, a remarkable tech success story from a country that classified homosexuality as a mental illness as recently as 2001.
Parent company BlueCity's sunlit Beijing campus teems with young and casually dressed programmers who hold meetings in rooms named after Oscar Wilde and other prominent lesbian, gay, bisexual, transgender and queer (LGBTQ) figures from around the world.
The office boasts rainbow unicorn mascots, gender-neutral toilets and photos of Mr Ma's meetings with dignitaries, including Chinese Premier Li Keqiang.
'Everyone was scared'
Mr Ma's journey to the apex of China's tech industry began in the early 2000s when he began publishing Danlan.org, a blog about his life as a gay man.
There were few places in China at the time for gay men to socialise, Mr Ma says, adding that "people would write on the walls of public toilets, saying meet here at this and that time".
"Everyone was scared of being found out by others."
Mr Ma's blog gradually expanded into an influential online forum for LGBTQ people in China to share lifestyle articles, health advice and short stories.
"I thought I could build a website, to tell gay people like me... you don't need to feel inferior, you don't need to be suicidal," he told AFP.
Increasing local media coverage of the website outed Mr Ma to his co-workers and prompted him to leave the police force in 2012.
He launched Blued the same year.
The app today says it has more than 58 million users in China and countries including India, South Korea and Thailand.
It has yet to turn a profit, but company figures show losses have narrowed since the platform began paid memberships, live streams and ads in 2016.
Like other dating apps, many Blued users are seeking hook-ups and casual dates.
But Mr Ma also keeps a stack of letters on his desk from users who have written to thank him for helping connect them to their long-term partners.
Working for tolerance
Discussion of LGBTQ issues remains contentious in China, with activists complaining of tightened restrictions on public discussion in recent years.
But despite Danlan.org being repeatedly shut down in the first few years of its existence, Blued has largely avoided conflict with the authorities.
It has opted for a cautious approach in raising mainstream awareness and tolerance of the LGBTQ community.
That includes its efforts to tackle the stigma around HIV that has fuelled discrimination against gay men and prevented people from seeking medical care.
BlueCity runs an online platform that sells HIV diagnostic kits and brokers consultations with doctors.
It also works with local authorities to direct users to free testing centres.
Mr Ma said he was pleasantly surprised by the response he received after sounding out health officials to cooperate on HIV prevention campaigns.
"They said they had really wanted to reach the gay community," Mr Ma told AFP, "but they didn't have the channels and didn't know how to find them."
'Brighter and healthier'
Still, the platform has suffered its share of teething problems.
It temporarily froze new user registrations in 2019 after local media reported that underaged boys had been using the app, and the company pledged to tighten age and content controls.
Mr Ma says his team is committed to "building a brighter and healthier image of the community".
He believes his work has helped improve the mainstream perception of LGBTQ people in China, including friends and family who previously shunned him.
And he thinks more positive recognition is on the horizon.
"I think there will eventually be a day when gay marriage is legal in China," he says.
"It's only a matter of time."