The vintage hippie anthem “San Francisco (Be Sure To Wear Flowers In Your Hair),” keeps popping up throughout The Last Black Man In San Francisco. Its use is ironic, referencing the mythology of the city’s fabled past while its characters—two young black men born and raised in the city—reckon with the uncertainty of its present.

The most apropos lyric from the song, however, is never actually sung in the movie: the recurring refrain “People in motion.” Everything is on the move here—the protagonist on his skateboard, navigating the city’s steep hills and ramshackle neighborhoods; passers-by in the streets; chattering Muni bus passengers; platoons of sanitation workers in neon vests marching out to clean up the toxic waterfront. And yet, despite all the activity around them, the protagonists seem rooted in place, unable to move forward as time marches on, struggling to imagine viable new lives for themselves in the rapidly evolving city they love.

This is the first feature from rookie director Joe Talbot, who wrote the script with Rob Richert, based on a story Talbot concocted with his longtime friend and fellow San Francisco native Jimmie Fails. In the movie, Fails stars as a semi-autobiographical character named Jimmie Fails, who spends most days with his best bud Montgomery Allen (Jonathan Majors). Soft-spoken, kind-hearted Jimmie works as a caregiver in a nursing home. Mont sells fish on the waterfront but devotes every spare minute to drawing in his sketchpad and trying to write a play.

Jimmie’s passion is the stately, Victorian-style home in the Fillmore district that his grandfather built in the postwar 1940s, after entire communities of Japanese-Americans had been removed to internment camps. It’s long since fallen out of his family’s possession, but Jimmie is so fixated on the house that he drops by often to repaint the window trims and spruce up the yard—to the ire of the current owners.

The idea of home is important to Jimmie, who has lived for a time in both a group home and a car. His affectionate auntie (Tichina Arnold) lives in the suburbs across the bay. He rarely sees his small-time scammer father (Rob Morgan). His businesswoman mother is almost entirely absent. At present, Jimmie is crashing at the house where Mont lives with his blind but still feisty grandpa (Danny Glover)—until the owners of Jimmie’s family home move out, leaving “his” house tantalizingly unoccupied.

The story is based in part on the experiences of the real-life Fails, who once lived with his family in a gingerbread San Francisco Victorian. It may seem a bit thin, plot-wise, but the storytelling is everything in this splendidly atmospheric mood piece. Themes of displacement, gentrification and cultural identity are there to be pondered in every dreamy, thoughtfully composed shot, without Talbot beating us over the head with them.

In a moment of hypnotic eeriness, characters step out of a bus into a drifting white haze that might be fog or smoke as a briefly glimpsed candlelight vigil parades by. A gang of street-corner youths outside Mont’s grandpa’s house posture aggressively while a cover of Joni Mitchell’s melancholy “Blue” swells on the soundtrack. A cable car full of drunken tourists comes searching for that long-lost ’60s vibe, “Somebody To Love” blaring over the loudspeaker.

That Fails and Majors are in their late 20s feels odd at times, when plot elements like skateboarding and the absence of any romantic relationships suggest teenagers. Mont seems almost childlike in his social wariness and compulsive creativity, yet he is savvy enough to de-escalate a scary trash-talking incident. (Majors also delivers a moment of electrifying poignancy as Mont acts out a scene from his play.)

Majors and Fails establish a vein of friendship and loyalty that goes far deeper than the usual buddy-bonding movie. They couldn’t be any better at conveying their characters’ yearning to stitch together random fragments of experience into a life.

Lisa Jensen grew up in Hermosa Beach, CA, watching old movies on TV with her mom. After graduating from UCSC, she worked at a movie theater, and a bookstore, before signing on as a stringer for the chief film critic at Good Times, in 1975. A year later, she inherited the job. Thousands of reviews later, she still loves the movies!