Browsing the internet as a young policeman in China, Ma Baoli recalls the sheer volume of web pages telling him he was a pervert, diseased and in need of treatment — simply because he is gay. “I felt extremely lonely after I became aware of my sexual orientation,” says 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 $85 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 LGBTQ figures from around the world. The office boasts rainbow unicorn mascots, gender-neutral toilets and photos of Ma’s meetings with dignitaries, including Chinese premier Li Keqiang. 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 socialize, 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.” 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 said. Increasing local media coverage of the website outed Ma to his coworkers and prompted him to leave the police force in 2012. He launched Blued the same year.