There is tremendous beauty and pain to be found in Moonlight. Written and directed by Barry Jenkins (based on the Tarell Alvin McCraney play In Moonlight Black Boys Look Blue), the film drops in at three points in the life of Chiron (played as a boy by Alex Hibbert, as a teen by Ashton Sanders, and as an adult by Trevante Rhodes). The film probes into the challenge of coming to terms with one’s identity while operating in a fraught society that brutally rejects the version of self that’s emerging. Growing up is difficult enough without the added strain of being bullied by, so it seems, existence itself. Within this story, Jenkins carves out small, lopsided totems of hope. That the moments of grace are often shadowed by tragedy doesn’t diminish their promise, only obscures it. Jenkins forms his film with empathy and visual poetry, avoiding the trap of wallowing in the hardship of the urban agonies by emphasizing the tenderness that runs through the tale, such as the unlikely mentorship provided by a local drug dealer (the extraordinary Mahershala Ali) and the offhand rescue provided by a phone call that carries echoes of the past. There is a resolute insistence on letting the characters be more than their easiest definition. Chiron’s mother (Naomie Harris) is prime example of this. In the first two segments of the film, the character is familiar from any number of similarly woeful tales: damaged and drug-addicted. In the closing third of the film, she emerges with a survivor’s complexity. Jenkins gives her the dignity of completeness, of being more than another gear in the storytelling machinery. Moonlight is powerful in the deep impressions of its individual moments, but it is the commitment to the whole — to the shadings that are all too easy to bypass — that makes it transcendent. And all that makes it the best film of 2016.