For more than two decades, Nick Hornby and the various films adapted from his novels have been exploring the perils of obsessive fandom. In “Fever Pitch,” it was sports fandom. In “High Fidelity,” it was an elitist form of pop music fandom.

In “Juliet, Naked” (based on Hornby’s 2009 book), the obsessive is Duncan, a cultural studies professor who has a borderline troubling fixation with Tucker Crowe (Ethan Hawke), an iconic ’90s singer-songwriter who long ago faded into oblivion.

Duncan, even more so than past Hornby protagonists, is a pretentious, insufferable manchild. He runs a Tucker Crowe fansite and pontificates endlessly online, deconstructing the hidden meanings of 25-year-old rock lyrics.

A movie about Duncan would be unwatchable. So “Juliet, Naked” (book and movie) goes a different route, focusing on the collateral damage of his fandom: his long-suffering girlfriend, Annie (Rose Byrne).

Duncan and Annie live in a quiet seaside town in England, where she runs a crumbling museum. Their relationship long ago grew stale and sexless. Their only remaining mutual interest appears to be prestige TV. She tolerates Duncan’s Tucker Crowe obsession, but it’s getting a bit old.

Things come to a breaking point when a fellow Tucker superfan sends Duncan a copy of “Juliet, Naked,” the unreleased demo sessions of Tucker’s most famous album, “Juliet.”

Duncan declares it a masterpiece. Annie has the temerity to disagree with him. Their argument bleeds into the forums of Duncan’s Tucker fansite, where Annie makes a post criticizing the album. And all of this leads to a most unexpected romance.

Tucker, now a recluse living in the garage of his ex-wife, reads Annie’s scathing review of “Juliet, Naked” and reaches out to her online, telling her she “nailed it.” This leads to a curious, flirty email correspondence and, before long, Tucker is coming to England for a (perhaps romantic) visit.

(The film’s plot admittedly belongs to an earlier, more innocent era of the Internet.)

“Juliet, Naked” was directed by Jesse Peretz from a screenplay co-written by Jim Taylor, Alexander Payne’s longtime writing partner. The filmmakers capture the tone and feel of Hornby’s book perfectly, tackling the themes of regret and longing that mark most of Hornby’s work. The film is particularly astute at articulating a certain strain of fandom that makes people (typically white, overeducated men) unbearable to be around.

We see this most poignantly in Duncan and Tucker’s pathetic first meeting. Tucker is indifferent to his own legacy and loathes his old music. As such, he’s contemptuous of Duncan’s obsession with him. He more or less tells Duncan that both their adult lives have been a waste. A way to not actually live their lives.

Like the book on which it’s based, “Juliet, Naked” is pretty darn slight. But undeniably endearing, also.

The script, which gets voice-overs from Annie and Duncan’s email correspondences, is witty, and the leads are perfectly cast.

Byrne, as always, does fine work, leaning into her charming, awkward persona.

And Hawke? There’s no actor better suited for the role of Tucker.

Tucker is a scraggly, aging, slightly overweight former rock star now coping with the messy aftereffects of his youth. He has several children scattered about the western world. A few of them hate him. One of them has never even met him. He’s trying to make amends, but it might be too late.

Using ’80s and ’90s footage of a young Ethan Hawke, “Juliet, Naked” becomes as much as anything a tribute to the laid-back charisma of the aging movie star. Hawke and Tucker are both reckoning with their pasts and their artistic legacies, slipping into middle age a bit craggier, maybe a bit wiser. When called upon, they both still know how to play their songs beautifully.