The ghost of Dashiell Hammett haunts the corridors of a nondescript suburban high school in this odd but engagingly off-kilter thriller. Mercilessly intelligent loner Brendan (Joseph Gordon-Levitt) has been in a deeper-than-usual funk ever since his girlfriend, Emily (Emilie de Ravin), left him for insecure, Mohawked druggie Dode (Noah Segan). She calls months later, her voice vibrating with suppressed hysteria. Brendan is ready to leap to her aid, but when they meet up a little later, she swears she's fine. Twenty-four hours after that, Brendan discovers her body in a culvert and vows to find out who killed her and why. His investigation cuts across the school's social strata, bringing him into the orbits of Dode's stoner posse; volatile thug Tugger (Noah Fleiss); cool kids, like pompous jock Brad (Brian J. White) and his girlfriend, filthy rich fille fatale Laura (Nora Zehetner); and bitchy theater diva Kara (Meagan Good), who once toyed with Brendan's freshman affections. It also lands him squarely in the sights of tough-as-nails Assistant Vice Principal Trueman (Richard Roundtree), who knows something is going on and intends to find out what it is. All trails eventually lead to a shadowy figure called the Pin (Lukas Haas) and the mysterious "brick" that started all the trouble. First-time writer-director Rian Johnson's gimmick is that his SoCal teens talk like film-noir yeggs and dames, slinging hard-boiled shade and spitting out terse, rat-a-tat dialogue peppered with slang that was yesterday's news 40 years before they were born. But the result is, against all odds, marvelously entertaining. The incongruities are occasionally very funny: The sinister Pin — a skinny, underage Dr. Mabuse with a cane, a cape and a clubfoot — operates out of a finished basement in his parents' tacky ranch house, while Brendan's sidekick, the Brain (Matt O'Leary), promises that he can borrow his mother's car for a hasty getaway — as long as the rumpus doesn't start too early. But the film is also unexpectedly poignant, perfectly capturing the way brainy, introspective teenagers mentally recast their dreary day-to-day miseries as thrilling, sexy, dangerous pulp fictions. The rumpled Gordon-Levitt actually manages to exude a credible whiff of Bogart as he sleuths and slugs his way through layers of lies and obfuscation to the truth, and his scenes with Haas, whose outsize ears lend the menacingly soft-spoken Pin a slightly comical air, crackle with a seething energy that belies their cleverly mannered dialogue. --Maitland McDonagh