It’s hard to imagine anyone having a bigger year than Lin-Manuel Miranda, creator of the hit musical Hamilton. Here, the 36-year-old star talks about trusting his instincts, the value of a vacation, and how he accidentally married the oldest form of entertainment with the newest form of social media.

Responses have been edited for clarity and length.

What surprised you most about the Hamilton phenomenon?

Um, everything. Honestly. I knew we’d be a hit with history teachers. Everything else has been sort of a surprise.

Do you have a process, a formula, for your creative work?

Not really. One of the best things about the success of Hamilton is that this is an idea that sounds crazy when you say it in one sentence. I had that experience over and over again. When I performed the first song at the White House, on that YouTube video in 2009, I said, “Someone who embodies hip-hop, Treasury Secretary Alexander Hamilton,” and the room laughed. Then by the end of the song they’re in it because they’re sucked into the story. Which is what happened to me. I picked up Ron Chernow’s [biography of Hamilton] and I got sucked into the story. I had the idea when I grabbed Ron’s book to read on vacation.

Lin-Manuel Miranda is No. 30 on our 2016 40 under 40 list. See the full list here.

What are the lessons there?

One: You can have good ideas when you take a break from what you’re normally doing and don’t just go 100 miles an hour. Two: Really trusting my gut. I won a Tony with In the Heights. I got offered movie adaptations of musicals. I got offered a lot of Latin-theme stuff. But I had faith that the idea I was chasing with Hamilton would be worthwhile.

It takes years to make a musical. So I’ve got to choose projects knowing that even if they open and close in a day, I will not regret the time I spent on them. And so you can’t choose on what you think is going to be a financial success. You’ve got to pick the idea that excites you and inspires you to write.

That was actually my next question: How much does the commercial potential influence you?

Exactly zero percent. Honestly. Look at the field in which I work. One in five shows that go to Broadway make their money back. If you invest in Broadway musicals, it has to be because you love the things, because, you know, four out of five times you’re not going to make your money back.

Lin-Manuel Miranda celebrates receiving the GRAMMY award for "Hamilton's" Best Musical Theater Album on stage during a February, 2016 performance. Lin-Manuel Miranda celebrates receiving the GRAMMY award for “Hamilton’s” Best Musical Theater Album on stage during a February, 2016 performance.Photo: Theo Wargo—Wireimage/Getty Images

How have digital media like Spotify affected your approach?

What’s been interesting is that Hamilton has proliferated in the age of social media. I believe the magic of theater is that we are all in the same room having the same experience. I think people really crave that communal experience. But I also saw what happened when the cast album came out. It was first streamed for free on NPR, and people started freaking out when they heard it then, and then it was on sale later that week. And streaming it for free didn’t hurt the sales at all—it whetted people’s appetite. So that was fascinating.

Then there was the #Ham4Ham experience. Our plan was always to have a lottery outside the theater for the front row, sell the front row seats for $10. Ham for Ham: You pay a Hamilton to see Hamilton. And 700 people showed up to our first lottery drawing—that is an insane amount of people. I was there watching this crowd grow, I got a megaphone and said, “Thank you so much for coming, I love you very much, goodbye.” And my collaborator Tommy Kail said, “There’s 20 people who got the tickets and 680 people who are just going to be sent disappointed into the streets of New York. You should grab the megaphone before every lottery drawing.” That became the #Ham4Ham show and this de facto talent show. I brought in actors from other theaters and some of my musical theater heroes. It could be anything from Jonathan Groff and I singing songs we sang in middle school, to dancers from the New York City Ballet doing a solo in the streets of New York. And then as people filmed that, and that went online, that became this extra experience for fans.

What we created almost by accident is this community of people who are very invested in the show and invested in the people who work on the show, and also the sort of “only in New York” moments that we create outside the box office.

Miranda outside the Richard Rodgers Theater in June. Photo: Walter McBride—Getty Images

What are you listening to these days?

I’m listening to the new Aesop Rock album. I think that’s one of my favorite hip-hop albums this year. I have an advance copy of Regina Spektor’s new album, which is incredible. It’s not out yet but she sent it to me and it’s blowing my mind. That’s kind of it.

We’re halfway to 75% done with this thing called the Hamilton Mixtape, which is going to come out in October. We turned to a lot of the artists who inspired me when I was writing Hamilton and said, “Okay how does Hamilton inspire you, and what does it inspire you to create?” Some are covers of Hamilton songs and some of them are inspired by Hamilton, but they’re totally their own thing. It has been a dream-come-true experience. I get to work with Busta Rhymes, Regina Spektor, Sia, Queen Latifah, and Common, and a lot of my hip-hop heroes, and heroes in the music world. So we’re figuring out what that thing is. You know, I’m being very laissez-faire about it. We’re saying, “What does this inspire you to do?” and then they turn in stuff, and it sort of blows our minds, and we go, “Okay, where does this go on the mixtape?” That’s been an enormously joyous project.

What would Hamilton think of the current election season?

I think he would have been very comfortable with the rough-and-tumble of it. I mean, read some of the things he wrote about Jefferson; they’re every bit as mean-spirited as anything you see in today’s politics. The other answer I give is I think he would be freaking out over computers and how they work and the speed of information. In the election of 1800, a group of Federalists sent out a paper saying Jefferson was dead, hoping to suppress his support, and just hoping word would travel slow that he wasn’t dead. That is dirty f***ing politics. You wouldn’t get away with that now. And the fact that the election changes at the speed of one of Donald Trump’s tweets, I don’t know what Hamilton would say about that!

Have you ever had any desire to get into tech the way Ashton Kutcher, Nas, and others have done?

I am interested in telling stories. That’s what I do at the end of the day, whether that’s writing songs, whether that’s acting in a film. That’s what I love. I think even if the robots take over and everything goes to hell, I think humans are still going to get in a circle and tell stories, and that’s what I feel lucky enough to be able to do. And anything that gets too far outside of that, I get uncomfortable. I say, this is the thing I’m good at, this is the thing I’ve worked very hard to be good at, and I double down on that.

A version of this article appears in the October 1, 2016 issue of Fortune with the headline “Hamilton, Nonstop.”