And you thought Dan Humphrey was creepy.

Penn Badgley is back on TV in Lifetime's "You" (Sunday, 10 EDT/PDT, ★★★ out of four), based on the book by Caroline Kepnes. And although he might have been trying to shake off his "Gossip Girl" baggage with the new series, his character, Joe, is disturbingly like an older, more intense and pathological version of the New York prep-school student that made Badgley famous. But hey, if this is typecasting, it's really excellent typecasting.

Joe is, by all accounts, a nice, sweet guy. He works in a bookstore, reveres rare first editions, befriends his kid neighbor (whose mother has an abusive boyfriend) and is nearly always charming and smiling.

The only thing is, under that charming smile Joe is a violent sociopath and stalker. One day he meets Beck (Elizabeth Lail) at his job and instantly becomes obsessed with her. He methodically stalks her and starts manipulating her life, little by little, until he worms his way into her heart – and bed.

More:How Rob Lowe's 'Bad Seed' remake on Lifetime cleverly pays homage to the horror classic

Joe's love for Beck is matched only by his hatred for her female friends – his rivals for Beck's attention – including Peach (Shay Mitchell, "Pretty Little Liars"), a wealthy party girl who is instantly suspicious of Joe. But Beck thinks she has finally met the one guy who understands her. And he does, just a little too well.

More:Penn Badgley on a 'Gossip Girl' reunion and the parallels to his new Lifetime show, 'You'

It's a skin-crawling setup, and "You" works because it leans into its campy thriller bones, not unlike the cheesy movies that populate Lifetime's Saturday night lineup. But the series, created by Sera Gamble ("The Magicians") and Greg Berlanti ("Riverdale"), offers a slightly more nuanced take on the genre. There are plenty of twists, exposed secrets and shocking moments of violence, but "You" stays grounded by supplying a measured amount of dry humor, often at the expense of its sociopathic lead. Joe is scary, for sure, but he's also absurd, and the writers never forget that.

Badgley is paramount to the series' success. With his piercing blue eyes and cheekbones sharp enough to cut glass, Joe is like a kitten made into a man, all imploring glances and hidden claws. He may be disturbed, but he's no mastermind, and the ease with which he stalks Beck has everything to do with how public she lives her life online.

The series often satirizes millennial social media practices, from Beck's lax cybersecurity to her "Instagram Influencer" friend Annika (Kathryn Gallagher). Anyone would be vulnerable; we all do for the sake of "likes." But once Joe graduates into real-world criminal behavior, like breaking into her apartment or trying to dispose of damning evidence, he's considerably clumsier than he was online.

"You" is blisteringly claustrophobic. It forces you to get inside Joe's head with his near-constant internal monologue as he justifies his actions. It's a version of toxic masculinity you might find in various corners of the Internet, written by self-proclaimed "nice guys" who can't understand why they never get the girl.

The "You" writers try to imbue the series with ambitious ideas and big statements about "the way we live now," but they are most successful at skewering the "nice guy" trope and fumble heavier topics like sexuality and feminism. The plot mechanics of a thriller sabotage their social criticism. And that's the series' biggest weakness: Often it takes the safest, most predictable option in crafting its narrative, sometimes veering into the cliche.

But "You" is still reasonably captivating, right from its demented beginning, and cliffhanger endings make it an ideal binge-watch. The series really hits its stride in Episode 4, when Joe's oppressive narration takes a break and Beck takes the reins, showcasing her own problems, secrets and lies. It gets to the heart of one of the points the series tries to make: that everybody's just a little messed up.

Even you.