Daniel Handler, the novelist who wrote 13 A Series of Unfortunate Events books under the pen name of Lemony Snicket, found inspiration for his new novel by eavesdropping on teenagers. During his frequent trips on public transportation in San Francisco, Handler made a discovery: “I’m completely invisible to the young people who are around me. They will be having conversations about their lives right over my head,” he says. “As a writer, [invisibility] is an endless boon.”

Fascinated by the “cadences” of 21st-century teens, Handler used his authorial invisibility to capture how this new generation talks about friendship, relationships, and sexuality. The result is a steamy new book, All the Dirty Parts (Bloomsbury, Aug.).

The novel follows the sexual adventures of Cole, a promiscuous young high school boy who has mastered the art of seduction. Cole’s erotic conquests are revealed in vivid, immediate prose. It’s the print equivalent of Snapchats from a randy teenager. As the school year continues, Cole’s sexual obsessions give way to thornier problems—he struggles to identify his sexual orientation and sustain a meaningful relationship.

Handler has often revisited high school in his writing. His debut novel, The Basic Eight (1998), cast a satirical eye on high school as the adult narrator reframed her teenage diary and letters. A few of the short narratives in Adverbs (2005) also featured teenage protagonists. In Why We Broke Up (2011), Handler wrote about a doomed high school romance in the “romantic and old-fashioned” medium of a long letter.

In contrast, All the Dirty Parts is told through short and intense dispatches, a style that may be more familiar to readers raised on text messages and social media posts. Sensational news reports regularly conjure adult anxieties about teens’ Facebook obsessions and sexually explicit texts, but Handler is less critical. “I actually see a lot of ways that digital communication is really ending loneliness, particularly in matters of sexuality,” he says. Handler (like many other readers) remembers the difficulty of engaging in “open talks about sexuality” as a teen, but these new technologies make such conversations easier.

While writing All the Dirty Parts, Handler revisited the authors who inspired him as a “serious reader” from the ages of 17 to 20. “The books were all filthy,” he says, recalling the “bold sexuality” that drove literature by Milan Kundera, Oscar Hijuelos, and Anaïs Nin. “I remember [sexuality] being such a huge part of the conversation internally. And I thought it was really alluring; it was really terrifying; it was really exciting—all these things at once,” he explains.

Handler worries that young adult literature has steered clear of male sexuality for too long, and young boys have no literary road map to follow. Even though most teenagers are wrestling with sexuality, Handler thinks it is “the most policed aspect of content.”

“There [are] just so many heroes in young adult literature who are murdering people, behaving like spies, or doing all kinds of really abominable behavior that [still] makes them heroes and noble,” Handler concludes. “But actually, I think there’s very little treatment of male sexuality as most men remember themselves.”

Handler doesn’t plan on making a career out of this kind of sexually driven novel, but All the Dirty Parts could forge some new literary territory for other authors to explore.

Today, 10:30—11:30 a.m. Daniel Handler will sign All the Dirty Parts in the Autographing Area, at Table 7.