One of the greatest magic tricks any filmmaker ever pulls off is that of taking an improbable scenario and revealing the human heart that beats beneath. This feat requires great delicacy on the part of the filmmaker, who needs to respect both the uniqueness of the plot and the universality of its themes. Director Michael Gondry manages just such a feat with "Eternal Sunshine of the Spotless Mind." The movie borrows its title from an Alexander Pope poem about the pain of love and loss. Together with screenwriter Charlie Kaufman, Gondry takes a wildly imaginative situation and turns it into something utterly relatable. Heartbreaking and witty by turns, the romantic drama also deftly weaves in elements of sci-fi quirkiness.

Joel Barish (Jim Carrey) is solitary, introverted and subdued. On a bleak winter's day, he's on a Long Island train heading towards Rockville Center, the dim landscape outside the window matching his mindset. Dressed in monochromatic colors, Joel is a stark visual opposite of Clementine Kruczynski (Kate Winslet). A fellow passenger on the train, Clementine's bold orange jacket and blue-streaked hair are external indicators of her gregarious, impulsive personality. If opposites attract, then Clementine and Joel seem destined for each other. Sure enough, Clementine soon approaches Joel. The two feel a nagging familiarity: they feel they've seen each other before. Clementine soon lands on an easy solution. She believes she's met Joel before at Barnes & Noble, where Clementine works as a "book slave."

Their initial conversation is a study in awkwardness, their opposite personalities clashing and then clashing again. Blue-haired Clementine gamely suggests that she "applies her personality with a paste," and when Joel politely disagrees, she snaps that he doesn't really know her. Despite Clementine's total lack of a filter and Joel's stiff discomfort, something clicks in their conversation. At moments, their bickering has the tone of a long-married couple.

This is not just any meet-cute scene. Joel and Clementine have a grudging chemistry because they were once, in fact, a couple. The reason for their confusing meeting on the train reveals itself slowly, in a narrative that jumps back and forth, asking the viewer to keep up. Fortunately, keeping up with Kaufman's plot is rewarding and pleasurable.

A company called Lacuna Inc. offers the biggest clue in the mystery of Joel's past life with Clementine. The office of this ambiguous business seems innocent enough. It includes four employees. The reassuring Dr. Howard Mierzwiak (Tom Wilkinson) heads the whole operation. Mary (Kirsten Dunst) is the doe-eyed secretary, while Patrick (Elijah Wood) and Stan (Mark Ruffalo) take care of the grunt work. Lacuna Inc. is in the business of giving people a new lease on their romantic lives. After a difficult breakup or a regrettable tryst, disappointed lovers need only head to Dr. Mierzwiak and his team. Before long, all their memories of the relationship will be gone, leaving behind the blissfulness of a blank slate.

It's now up to Joel to piece back together the dissolution of his romance with Clementine. It becomes clear that Clementine sought the services of Lacuna after her relationship with Joel ended on a sour note. Learning of this, Joel also decided to have his memories erased, leaving the two of them without any history or complications. Theoretically, this could have ended with Joel and Clementine heading into a brighter future, free from emotional baggage. Instead, Joel manages to hold onto enough memories to recognize and miss his romance with Clementine. As the narrative twists backward and forward, Joel's quest to erase his relationship instead morphs into a desperate attempt to hold on to the good times.

"Eternal Sunshine of the Spotless Mind" makes up for its complexity and occasional self-indulgence with a true warmth and depth. The characters are flawed and funny, even the minor ones. Carrey, mostly known for his rubber-faced, manic comedy, is surprisingly compelling as the quiet, withdrawn Joel. Winslet's incredible talents as an actress imbue Clementine with a winsome blend of toughness and vulnerability. Their chemistry is not smooth and easy, but its very jaggedness makes it believable. Joel and Clementine don't have a fairy tale romance. What they have is more difficult and sometimes more heartbreaking, but also more genuine.

Gondry and Kaufman are a dream team when it comes to smart, surreal films. "Eternal Sunshine of the Spotless Mind" transcends its odd and speculative premise to become an authentic exploration of love and loss. In the end, the film is every bit as romantic as fluffier offerings. Gondry isn't afraid to explore the shadowy sides of love, in addition to the sunny aspects. With its unexpectedly hopeful and tender message, "Eternal Sunshine of the Spotless Mind" honors the memories that make human relationships so complex, for better and for worse.