One of the few elite screenwriters with a branded name, Charlie Kaufman has intelligently and consistently established himself as master navigator of the human mind’s numerous wormholes.

But his dizzying tales of creativity, identity and destiny to date have been inked with a somewhat cynical, angry slant. Not so in Eternal Sunshine of the Spotless Mind, a film as wholeheartedly and bittersweetly romantic as his Being John Malkovich was ultimately bleak and sad.

Its sumptuous love story is a close cousin of the bent originality found in Amélie and Punch Drunk Love. Kaufman focuses less on the grand and sappy, and more on those brief moments where a heartstring tug is inexplicable to anyone besides those doing the pulling — the quiet solitude of an under-the-covers conversation, the first cutesy phone call, calming reassurance in the face of a loved one’s insecurities.

But the film is not leisurely, even incorporating suspense and chase-film elements in the dynamite conceit wrapped around this strong emotional core — a doctor (Tom Wilkinson) offers jilted lovers the option to wipe their mind clean of any of the relationship’s memories. Kaufman doesn’t belabor the sci-fi edge of his story. And merely imagining the visual possibilities lain out to director Michel Gondry won’t give you the slightest idea of the surrealistic scope he has set.

People in the mind fog out, at times imperceptibly. Faces distort in the background. Street signs fade away. It is a film where the effects aren’t flashy, but truly special, serving the story at every one of its hairpin turns.

Eternal Sunshine also manages to completely tone down an actor for whom that notion seems impossible. As Joel, Jim Carrey plays a character that signs up for the memory wipe after learning his recent ex Clementine (Kate Winslet) already has had the procedure done.

Carrey is in such complete control of his talent that you almost forget it’s him, that guy who once talked out of his butt. Never once, even in the handful of physical comedy scenes, does he let his multimillion-dollar shtick overtake his character’s essence — a guy with a hangdog notion of love who finds and clings to the one unabashed moment of happiness he finds in his mind.

Much has been made of Carrey’s Oscar snubs for his time-and-again proven merit at dramatic acting. But much like Bill Murray’s work in Lost in Translation, this is worthy not solely for its break of a comedian’s persona, but for the most fully realized, engaging character he’s ever played.

The ensemble supporting him is the epitome of genius casting. The film’s conflict plays out largely in Joel’s brain, as he decides mid-procedure that he wants to keep Clementine in his memory and tries hijacking her to recollections where she’s not expected to be. As they weave through his mind, Winslet proves a perfect toe-to-toe match for Carrey, their chemistry so intense, we understand why they came together and, more sadly, why they broke apart.

The film’s outside world boasts some amazing supporting performances as well from Kirsten Dunst, Mark Ruffalo and Elijah Wood as the trio of doctors’ assistants performing the procedure.

Remember how you wanted to give Frodo some help and a hug? Here, Wood creates his own sort of Gollum, a disingenuous little sneak you’ll want to throttle. Ruffalo goes geek-chic to create a character that’s hunkier, but no less lovably nerdy, than Rick Moranis’ Louis Tully in Ghostbusters. And Dunst not only provides comedic gems with her scenes of stoner paranoia, but also handles her storyline’s boffo twist with admirable restraint.

Kaufman saves any big romantic keypunch for the epilogue, which takes a hugely satisfying bite into the emotional ethics of the choice both Clementine and Joel have made. It’s a hugely ambitious, entertaining, insightful and painterly film, by far one of the year’s best.