Six days after sharing Microsoft's blowout earnings with Wall Street in July, Satya Nadella stops to listen to a few of the more than 23,500 employees taking part in a three-day hackathon the company is hosting at its headquarters in Redmond, Washington.

One team shows him digital tattoos made of gold leaf that's embedded with sensors. Apply these wearables to your skin and, with a tap, you one day might be able to turn on the house lights or play a tune on your digital piano. Another team tells him about a feature for the company's Seeing AI app that uses your phones' camera as an optical character recognition device, speaking menus and other text so the visually impaired can play video games.

As he walks among tables littered with laptops, soldering irons, empty cans of Talking Rain sparkling water (a Microsoft customer) and 3-inch-high silver toy robots that read "Hackathon 2018," a crowd of employees follows him like groupies at a music festival. "He's taller than I thought," one says. "Do you think he'll let us take a photo?" asks another.

Nadella dreamed up the Microsoft Hackathon, which the company calls the "largest private hackathon in the world," when he became CEO in February 2014. Just a few of the thousands of projects pitched over the past five years have inspired mainstream products. Most of these let's-change-the-world ideas aren't the kind of business tech that Microsoft makes the bulk of its money on -- at least not today.

That's just fine with Nadella, because the meetup serves another purpose: rebranding Microsoft as a modern, relevant company. When he became the third CEO of the world's largest software company, after Bill Gates and Steve Ballmer, Nadella made changing Microsoft's rigid, hierarchical and arrogant culture his top priority. He sort of had to. Though arguably one of the most successful technology companies in history, Microsoft's had a string of high-profile misses in mobile, search and social networking. Additionally, the company's toxic culture, characterized by corporate politics, infighting and backstabbing, fed an image of Microsoft as a fading legend.

Rivals Apple, Google and Facebook were seen as innovators creating shiny new opportunities with their disruptive tech. A generation grew up without ever having used a Microsoft product.

"One of the things that happens when you're super successful is you sort of sometimes lose touch with what made you successful in the first place," Nadella tells us when we ask what he was trying to solve with the hackathon.

"I wanted to go back to the very genesis of this company: What is that sense of purpose and drive that made us successful? What was the culture that may have been there in the very beginning or in the times when we were able to achieve that success? How do we really capture it?" says Nadella, who joined Microsoft in 1992. It's about "the renaissance as much as about just sort of fixing something that's broken."

The first order of business was jettisoning the rally-the-troops employee meetings Ballmer held each year at the local sports arena. Instead, Nadella opted for One Week, a global fest that, in addition to the hackathon, includes a science fair and an expo of upcoming products and technologies. His aim: Getting Microsoft's 131,000 employees around the world to step away from their day jobs, think ambitiously and collaborate on projects the world might need — not just on products Microsoft thinks it can sell.

The event is "the metaphor for the one week that then informs the rest of the year in terms of really getting in touch with the core of this company around innovation -- but that innovation being driven by a sense of purpose and reinforcing a culture that we aspire to," Nadella says.

The culture fix seems to be paying off. Annual revenue crossed $100 billion in the fiscal year ended in June (the highest in its 43-year history), driven by demand for the company's cloud computing business products. And Microsoft's stock price has tripled since Nadella took charge. The stellar share price and financial performance speak to his success, say analysts, in changing investors' perceptions of Microsoft as dated and in decline.

"Satya is owning the market he already had, and he's doing a bang-up job of gaining share in a market we weren't sure he was going to be successful at," says Maribel Lopez, head of Lopez Research and a longtime Microsoft watcher.

Now the question that Nadella and Microsoft, founded by Gates and Paul Allen in 1975, need to answer is what this software behemoth will become next.

So we've been invited to get an inside look at One Week and learn from employees and executives how Microsoft has changed and why they believe Nadella's path will lead to continued success.

Asta Roseway, a principle research designer who's worked at Microsoft for two decades, is pretty candid in her description of life before and after Nadella took over. She said collaborative projects like her gold-leaf tattoos wouldn't even have been discussed a few years ago. "This feels like, collectively, we're building toward more creativity," she says. "It's why we're here."

For nearly as long as there's been a personal computer industry, there's been Microsoft. Its DOS, Windows and Office software powered billions of PCs and helped usher in the modern tech era. After watching the rise of Netscape Communications' browser and the World Wide Web, Gates in May 1995 famously refocused the company on the "Internet Tidal Wave" and ended up securing Microsoft's place in the online revolution, in part with its rival Internet Explorer browser.

James Martin/CNET

Microsoft made billions of dollars from Windows' monopolistic hold over desktop operating systems, its top-selling Office apps and its internet cred thanks to IE. It stood at the center of the tech industry while rivals like Apple played on the fringes.

But things changed. The geek culture of the early 2000s hated Microsoft's sharp-elbowed ways and criticized its problem-prone software (Blue Screen of Death anyone?) so much the company was shorthanded as M$ in chatrooms for putting profit before the concerns of people using its products. When Google became the next big thing and went public in 2004, it established a corporate ethos that served as a referendum on Microsoft: "Don't be evil." (Note: Google, which has been accused of monopolistic behavior with its market-leading search engine, dropped that phrase from its code of conduct in 2015, opting instead for "Do the Right Thing.")

Between smartphones, search engines and social networking, Microsoft missed three big technological shifts over the past decade that gave rise to Google's search, Apple's iPhone and Facebook's social network.

After the company spent billions of dollars on lost efforts to catch up, including an unsuccessful $45 billion bid for Yahoo 10 years ago and Ballmer's failed 2014 acquisition of mobile phone maker Nokia for $7.2 billion, Nadella decided to reboot Microsoft's identity. Wired wrote about his pitch in 2015 and 2017 with Restart: Microsoft in the age of Satya Nadella and How Satya Nadella helped Microsoft get its groove back. Last year, Fast Company described how Satya Nadella Rewrites Microsoft's Code.

You join here not to be cool, but to make others cool. Satya Nadella

And in his 2017 book Hit Refresh: The Quest to Rediscover Microsoft's Soul and Imagine a Better Future for Everyone, Nadella shared his take on what he's been doing. Part autobiography, part management guide, Hit Refresh details his personal journey and gives insight into his plan to make Microsoft a more empathetic company, something he admits he lacked as a leader.

He tells us about embracing a growth mindset, which he learned from the work of Stanford University professor Carol Dweck, and recognizing "what we're trying to pursue, which is to be comfortable acknowledging that we are imperfect, and we'll always remain so."

Which is why it's not as big a shock to read his admission in Hit Refresh that the PC-centric world Microsoft helped create is gone. He's also candid in his assessment that leading a company that's "motivated to change through envy" by the success of Apple and Google "wouldn't carry us very far down the path to true renewal."

It's a huge change in thinking from the Gates and Ballmer eras. And it's starting to show up in Microsoft's products. A few years ago, nearly everything the company made had some tie to Windows. Today, you can run its Office apps — Word, Excel, PowerPoint, Outlook and OneNote — on an iPad and on Android devices. You can use Microsoft's Visual Studio coding tools on a Mac, too. Earlier this year, Microsoft spent $7.5 billion to buy GitHub, a developers service whose open-source, code-sharing ethos is considered the antithesis of the old Microsoft.

James Martin/CNET

That new mindset is why Peggy Johnson, who leads business development and oversees acquisitions, decided to quit her job at Qualcomm (where she'd worked for 25 years) and join Nadella in 2014. She says she was sold by his "unexpected" decision to allow Office apps to run on Apple's iOS and Google's Android software.

She was Nadella's first executive hire as CEO.

"I just was surprised by that move," Johnson says. "You had to really step away from what had been core to the company for so long and say, What do our customers really want? And it turns out our customers really wanted to use those applications on the devices that they were carrying.

"Satya talked about having an outside-in view and looking at partnerships not as zero-sum games," where Microsoft and its partners would "find profitability in that shared value and acceptance and build something together," she adds. "That resonated with me and I thought, this is something I really want to do."

Nadella grew up the son of a government official in Hyderabad as India was reshaping itself as an independent country. He traveled around India, attending some of its best schools and becoming fascinated with computers. As a boy, he dreamed of playing professional cricket. (A revamp of Microsoft's Redmond campus, to be completed by 2022, will feature a cricket pitch — a nod to the changing demographics inside the company and not to his personal passion, Nadella says with a small laugh.)

He's more visionary than a Cook, he's not crazy out there like a Musk. Bob O'Donnell

He joined the now-defunct computer maker Sun Microsystems in 1990, then moved to Microsoft two years later. He famously gave up his green card to allow his wife, Anu, to more easily enter the country on an H-1B visa for extraordinary workers and their spouses. He speaks candidly about the need for the US to embrace "enlightened" immigration policies so it can remain competitive.

"I've always said that I'm a product of these two amazing American things. Both American technology reaching me where I was growing up, as well as the American immigration policy letting me even live the dream," Nadella, 51, says. "That story still today, in spite of all of our challenges, is only possible in the United States."

But it's his struggles with empathy that may be the most revealing.

His book recounts an anecdote about one of his interviews before joining Microsoft, when he was asked what he would do if he saw a baby lying in the street. "You call 911," Nadella answered.

"You need some empathy, man," his interviewer said. "If a baby is lying on a street crying, pick up the baby."

He talks about how his family -- particularly his son, Zain, born with cerebral palsy -- helped him learn empathy. "I was devastated. But mostly, I was sad for how things turned out for me and Anu," Nadella wrote about Zain's birth 22 years ago. "Thankfully, Anu helped me to understand that it was not about what happened to me."

He made it his mission to teach Microsoft the empathy he, himself, struggled to achieve.

James Martin/CNET

As the new CEO, he inherited a senior leadership team he describes as a "more like a group of individuals," operating in silos. He asked each to read Marshall Rosenberg's Nonviolent Communication, a guide to building compassion in businesses and other organizations. He got managers to support one another, rather than snipe at each other. Pitch meetings that were famous for intense grillings became encouragement sessions.

And urged on by employees who want the company to have a social conscience, Nadella and his team took public stands on immigration and privacy, notably supporting Apple in its 2016 fight against the FBI's request to bypass the iPhone's security and calling privacy a human right.

The company also jettisoned the idea that Microsoft knows best. It's now obsessing (Nadella's word) about customers and paying attention to what people are saying about its products.

"Focusing on our customer, focusing on who we are and understanding that the products and service we build are a reflection of how we work with each other has been really critical to the changes I've seen at this company," says Phil Spencer, a 30-year Microsoft veteran tapped by Nadella to head the Xbox gaming team in March 2014.

Last year, Nadella promoted Spencer to the company's Senior Leadership Team, 15 executives who meet every Friday with the CEO to decide Microsoft's direction. Spencer sees himself as one of the voices in the room advocating for consumers who use the company's products, even though Xbox revenue pales in comparison to the cloud computing and business software sales that, combined, account for nearly 70 percent of Microsoft's profit.

Nobody "has to use the products I build," Spencer says of Xbox games. "The decision to put gaming at the senior leadership table was an affirmation from the company that all customers are important to us."

His push for empathy and enlightenment didn't stop Nadella from making a spectacular blunder at the Grace Hopper Celebration of Women in Computing in October 2014. Former Microsoft board member Maria Klawe, president of Harvey Mudd College, asked what advice he had for women seeking a pay raise but uncomfortable asking for one.

"It's not really about asking for the raise but knowing and having faith that the system will give you the right raises as you go along," he told her. "And that might be one of the additional superpowers that women who don't ask for the raise have because that's good karma. It'll come back."

Klawe rejected his contention that women should just wait for the system and "karma" to reward them. She wasn't the only one. People across the tech industry condemned his response.

Nadella, the father of two girls and husband to a trained architect, says he was embarrassed. He also apologized for failing to recognize that women are often the victims of workplace bias even when they ask for a raise. In the years since, he's worked toward closing the gender pay gap so a "raise is not needed because of a bias." The company has also released more numbers about diversity and inclusion, and in August implemented a new policy requiring that all of its workers, including subcontractors, be offered a minimum of 12 weeks of paid parental leave.

James Martin/CNET

We ask him to rewind the clock and tell us what advice he should have given women four years ago. After saying his original answer was "completely nonsensical" and sharing details about making sure job descriptions for new roles invite diverse candidates, he offers this advice.

"First of all, advocate for themselves. They should find other allies, male or female who can advocate for them. And make sure that they don't accept status quo," he says. "Then the responsibility of people like me, who are leaders of organizations, is to be able to listen to women who are advocating for themselves or their allies, and make sure we don't even have to put them in that situation."

Even so, Microsoft — like many of its tech siblings — continues to describe its diversity and inclusion efforts as a work in progress. In November, Microsoft said women represent 27.3 percent of its employee base, up from 25.8 percent in 2016. But the gain was mostly driven by Microsoft's takeover of LinkedIn. Without that, the number of female Microsoft employees was little changed year over year.

The week of our visit, Johnson announced that Microsoft's 2-year-old venture fund, M12, is running a competition for business-focused tech and giving two winners $2 million each. The catch: They must be women-led startups. Despite Microsoft's diversity efforts, just 7.5 percent of M12's portfolio companies are founded by women. And while Johnson said that's above the industry average of about 5 percent, it's not enough. "We need more," women in tech, she says.

The overriding message from Nadella, his book and the employees and executives we talk to is that the company has morphed from a hypercompetitive and mean-spirited caterpillar into a kinder, gentler, yet still massive and powerful butterfly. That's no small accomplishment. But what comes next?

That question, it turns out, is something Microsoft itself seems casting about to answer.

"Nadella actually gave people a sense of, 'We really want to compete. We're not just a company that's established and entrenched. We need to compete,'" says analyst Lopez.

For Nadella, the answer has been to turn Microsoft's products into a sort of fabric for all our lives. You may not use a Windows PC, but you may edit a document with its Word software using an iPad Pro. You may not use Microsoft's Cortana voice assistant, but maybe the next time you call a company for customer service, Cortana's tech will help the automated assistant direct you to the right person that much faster.

Or perhaps the next time you fire up the latest video game to play against a friend in another state, your match will be powered by Microsoft's servers, known as Azure. (A team that, incidentally, Nadella used to run, and which Lopez says her research shows is the second-most popular web service among other tech companies, behind Amazon's Web Services cloud business, but ahead of Google.)

And Microsoft may (or may not) make its $5,000 HoloLens augmented reality system — arguably the sexiest tech it's working on — available to consumers,. Even so, Microsoft is confident that AR will transform businesses, from the way way data is visualized to training apps.

"What's hard is convincing people you are as innovative as other companies in the market — convincing people you are as innovative as Facebook or Google," Lopez says. Nadella may not have achieved that with consumers, who so far haven't bought Microsoft Surface computers in high volumes, but he's winning over the business community, she adds.

Bob O'Donnell, founder and chief analyst of Technalysis Research, says Nadella is "doing very well, but nobody's perfect." He compares Microsoft's chief to Apple CEO Tim Cook, Tesla co-founder Elon Musk and Google CEO Sundar Pichai.

"He's more visionary than a Cook, he's not crazy out there like a Musk," O'Donnell says. "Maybe he's kind of along the lines of Sundar, but even more collaborative than Sundar because Google wants to invent a lot of their own stuff."

Back at the hackathon, there's a team working on a feature for Microsoft's Xbox video game console that guides people through physical therapy exercises at home. Another team of 25 is playing around with an app that works with sensors that homeless shelters could use to predict needs as they change.

Microsoft says it picks multiple winners from the different categories. Projects that have been born from the event include the Xbox Adaptive Controller for disabled gamers, going on sale in September, and reading technology for people with dyslexia that's since been added to Microsoft's OneNote app.

Cool stuff, right? That's just what Nadella is going for.

"You join here not to be cool, but to make others cool," he tell us. Anyone who touches a Microsoft product today "should feel that association with Microsoft is empowering to them. That's what I want us to stand for. You want to be cool by doing that empowerment, but not just to be able to sort of associate yourself with cool technology.

"It's the result that matters."

First published Aug. 20, 5 a.m. PT.

Update, Aug. 30 at 3:39 p.m.: Adds information about Microsoft's new paid parental leave policy.

Q&A with Microsoft's CEO: Satya Nadella on helping a faded legend find a 'sense of purpose'

Q&A with Microsoft's Xbox head: Phil Spencer is a big voice for consumers inside Microsoft.