In Bo Burnham's Eighth Grade, a teen girl spends most of her waking moments — and moments when she's supposed to be sleeping — bathed in the eerie blue glow of her smartphone, utterly absorbed in the persona she's created for herself online.

Sounds like the premise to another internet scare movie, like Unfriended: Dark Web, but Burnham goes in the other direction in Eighth Grade, drawing on his own experiences to create a charming comedy about what it's like to grow up online.

"The first generation really raised on the internet is just now coming of age. As younger people make more movies, I think you're going to see the internet treated in a more experience-based and more interesting way," said Burnham, 26, and himself propelled to stand-up fame via self-made YouTube videos while growing up in Massachusetts.

A few years ago Burnham set down to write a multicharacter piece about mobile phones, social media, and modern life. One of the characters was a middle-school student, and Burnham found the character so interesting and strong, he decided to build the story around her.

It became Eighth Grade, the story of Kayla (Elsie Fisher), a shy and lonely 13-year-old about to enter high school, living with a single dad, spending almost all of her free time online, embellishing her profile, posting daily lifestyle videos online that offer advice to struggling teens.

>> READ MORE: 'Eighth Grade': High marks for Bo Burnham's coming-of-age comedy

But these are not self-pitying laments of outsider commiseration. She has created a super-competent "Kayla" to inhabit during these videos, projecting the confidence, self-possession, and scripted cool she lacks in real life. Burnham finds comedy in the contrast between the actual and virtual Kayla. And he invites the viewer to reconsider her apparent zero-follower loneliness — she does have an audience, and it's herself.

"It's a little like praying, or something," Burnham said. "She's using it as a way to connect to herself. To have an excuse to think out loud, to form ideas and to express them out loud, and it's a positive thing."

He understands that older generations watch young people tethered to phones and see a threat, and while he's aware of the well-documented downside to online exposure, his own life as a teen YouTube performer taught him that the web can also be a way for young people to explore and refine identity. At its best, he said, social media "connects people that have no other connection, and gives visibility to people that have no visibility."

He also says that for his and subsequent generations, online living isn't really optional.  It's "just all around us. It's the air we breathe. It's just kind of the water we swim in."

For Kayla, the internet isn't good or bad. It just is. So it's where she goes to help figure herself out.

"Yes, there's some disassociation, if you view yourself as an object in a story, and that can be a bummer too. There is the way that the internet fractures us, so that we're trying on different versions of ourselves. But that's what being a kid is. Who am I, and who do I want to be? What does it mean to be myself?"

Those themes, he said, are universal. Or universal enough that Burnham didn't feel like a cultural/gender trespasser writing about the life of a tween girl.

"I felt a deep connection to Kayla. I felt I understood her, mostly as a nervous person writing about another nervous person," he said.

Creating Kayla was for Burnham a feat of empathy and imagination, the sort of thing he seeks out when he watches movies.

"The greatest gift movies give me is to expose me to someone whose life experience is dissimilar to mine, at least on the surface. My favorite movies are those that don't demographically align with me – Moonlight, or Andrew Haigh's 45 Years. Those aren't my stories, but they've moved me deeply."

He hopes Kayla's story moves people in the same way, once they've stopped laughing.