Credit: Christopher Polk/Getty Images

When she first scaled the charts in 2013, Lorde wasn’t exactly the girl you wanted at your weekend rager. Then 16, she loved to document the rituals and behaviors of fellow young people but was uninterested in taking part in the fun herself. On her snappy breakout single, “Royals,” she rolled her eyes at the hedonism and conspicuous consumption of the Top 40. Later, on her hit song “Team,” she admitted, “I’m kind of over getting told to put my hands up in the air.”

But with her second album, Melodrama, Lorde would probably be the first one to jump into the pool. In interviews, she’s described the LP as a loose story about a single house party. Now 20, Lorde recognizes that a night out isn’t always about losing yourself in a sea of bottles and bodies — it’s about finding yourself, too. Without the detached coolness that characterized 2013’s Pure Heroine, Melodrama retains all the precocious smarts of its predecessor while offering a riveting, more emotional journey of self-discovery. Here, Lorde makes getting drunk and hooking up sound downright spiritual as she examines her fumbles through adulthood with enviable grace, lacerating honesty, and even humor. Take “The Louvre,” about the early stages of a fling doomed to fail: “[I’ll] blow all my friendships to sit in hell with you/But we’re the greatest, they’ll hang us in the Louvre…down the back, but who cares! Still the Louvre!”

That song begins with just Lorde’s voice and a guitar, but it swells into a storm of glitchy electro-pop courtesy of Bleachers’ Jack Antonoff, who co-wrote and co-produced almost every song on the LP. Together their shape-shifting compositions give Melodrama a richer, more dynamic palette than the muted, minimalist beats of Pure Heroine. There’s no better showcase for their approach than lead single “Green Light,” which features a jarring key change and a herky-jerky house rhythm that builds toward an epic, festival-ready sing-along.

Still, it’s Lorde’s own storytelling that offers Melodrama‘s most rewarding twists. She writes about a breakup with winking self-awareness, taking the cliché of the crazy ex-girlfriend to Fatal Attraction-esque extremes on “Hard Feelings/Loveless” (“I’m gonna mess your life up,” she taunts in an eerie high register) and acknowledging the trope of the scorned lover on “Writer in the Dark” (a song about writing songs about an ex). The tracks are in constant dialogue with themselves: Motifs of riding in cars and the “ribbons” that bind her to a lover repeat throughout the album, adding layers to the story. On “Sober,” she asks a partner what will happen when their buzz fades, but she lets the question hang in the air until the worthy payoff of “Sober II (Melodrama),” several songs later. Just when you think you’re nearing the end of Lorde’s journey, her words pull you back in for another listen. It’s a puzzle that’ll keep you busy long after the party is over.