On My Block defies expectations. It’s one part teen sex comedy, with jokes about masturbation and human anatomy, and one part caper, with each season revolving around a new mystery. But it distinguishes itself with how it portrays brown and black teendom, exploring the various paths open to its young protagonists: Who’s going to college and who’s going to get stuck in the hood? Who hooks up and who drifts apart? The third season continues this trajectory, shuttling between belly laughs and that feeling of despair you get in the pit of your stomach.

The first episode sets up a new quest for our group of teen friends. The literal bags come off their heads and they’re confronted with Cuchillos, this season’s big baddie (played by Ada Luz Pla) who’s been running the Santos gang this whole time. She tells them Lil’ Ricky is alive and tasks them with finding him. If they do, they’ll get the Rollerworld money (again). But if they don’t … well, they’re disposable teen gumshoes in gangland — anything could happen.

Thankfully, the original four — Monse (Sierra Capri), Cesar (Diego Tinoco), Jamal (Brett Gray) and Ruby (Jason Genao) — get some backup from Jessica Marie Garcia’s Jasmine. Jasmine’s evolution over the course of On My Block is my favorite, demonstrating the show’s true genius. She started off as simple comic relief, the over-the-top thirsty girl from the hood. But as we learned her back story in season two — veteran Dad, member of the Explorers — she became a real person with a real purpose in our story. In season three, she’s officially part of our main group with Ruby contemplating returning her affection and her connection to the cops paying even more dividends as she vies to become the leader in the search for Lil’ Ricky. Garcia gets everything possible out of the role, with her eyebrows alone deserving an Emmy for best supporting role.

Of course, Jasmine isn’t the only one to seamlessly go from silly to poignant, from ridiculous to suspenseful. This medley of tones is present throughout the show. Take the grave-digging scene in the season three premiere, ostensibly a dark and dirty endeavor. In it, Spooky (Julio Macias) and Jamal are trying to determine if Lil’ Ricky faked his own death. The sequence opens with Jamal exclaiming “your hole has gotten big,” a wisecrack transition as the previous visual was Cesar and Monse hooking up despite being broken up.

Next, Spooky (covered in dirt) is climbing out of the grave and telling Jamal (in full hazmat suit) that it’s his turn: It’s time to open the casket. Jamal balks, saying he’s scared of a zombie biting him (but not mentioning the more likely possibility of soon being face-to-face with a rotting corpse). Macho Spooky is scared too. Not of zombies (he tells Jamal they’re not real). And not of corpses (he’s killed some people). But rather that he might “get a ghost.” Soon, Jamal and Spooky are debating the relative scariness of ghosts and zombies with Spooky telling the story of his tio-on-his-mother’s-side who “got a ghost” and was haunted ever after. Spooky wins, as you’d expect, and Jamal finds a gnome inside that casket, not a body. On My Block is at its best in moments like this, when it handily mixes Hamlet’s macabre tone with High Fidelity’s satirized masculine dialogue and Jane the Virgin’s knowing cultural wink.

When it works, this mix of tones is delightful and insightful. But when it doesn’t, the show can feel artificial, creating instead an isolating distance between its audience and protagonists. Take the lunchtime scene where the group debates the next steps after Cuchilllos sets them free. Cesar and Monse spar over the meaning of their tryst with him lording it over her like he did in the first season. This time, though, there’s no discussion of the inherent gender imbalance so Cesar comes off as a jerk and Monse as naive. It’s not a good look and it’s made worse in comparison to the genuinely funny bit before about music snobbery and Ruby’s typical-teen concern for his parents after.

In the end, though, On My Block’s season three successfully combines all of its ingredients, making a rich and complicated sauce out of things you might not guess would go together: First romances. Gang violence. Garden gnomes. Absent fathers. It’s like mole, sweet and surprisingly filling. I loved it but I wouldn’t order it every day.

Season three of On My Block is now streaming on Netflix.