Yes—500 Days of Summer was heavily inspired by a relationship experienced by co-writer Scott Neustadter. Tom and Summer are fictional characters, but much of what happens between them came from his own life.

In a 2009 interview, Neustadter explained that he and writing partner Michael H. Weber began working on the screenplay after he was dumped. Writing became a way to work through the experience and eventually find some humor in it. He said that even certain musical choices came directly from moments in the real relationship.

That doesn’t make the finished movie a literal record of everything that happened. The writers shaped those experiences into a fictional story. But the confusion of thinking you’ve found your person, only to discover they don’t feel the same way? That part was personal.