Down these mean cinderblock hallways a man must go.
Actually, he's more of a boy. Brendan Frye (Joseph Gordon-Levitt) is 16 years old, shaggy and bespectacled, and so wearily honest that he doesn't have to prove it. Between Brendan and the truth lie a corpse, a mystery, and an army of losers, goons, dames, and kingpins. All he knows is that he'll probably end up with less than he started with.
''Brick" is Bogart goes to high school, in other words, but that thumbnail description doesn't begin to convey the lasting pleasures of Rian Johnson's directorial debut. Low of budget, grainy of image, and wobbly of sound, this is still a film to warm the hearts of old-movie junkies and indie kids alike. It's a near-perfect mash-up of ''The Maltese Falcon" and a Gus Van Sant film, to the point that when the plot turns a little incoherent you're not sure which genre Johnson is honoring, the private-eye mystery or the disaffected-teen drama.
Brendan's ex-girlfriend Emily (Emilie de Ravin) has already turned up dead at the entrance of a storm drain in the film's arresting opening sequence, and he decides to play sleuth rather than dial 911. He considers it his duty to Emily -- what any real friend would do. This being high school, real friends are few. It's a world where ''Where do you eat?" means ''What clique are you in?"
Flashbacks establish that Emily was running with the druggies at their San Clemente, Calif., school, and that her final desperate message to Brendan made cryptic reference to a ''brick" and ''the pin." Availing himself of class nerd The Brain (Matt O'Leary), who's friendless and thus knows and sees all, the hero plunges into the school's criminal subculture. In the grand tradition of Sam Spade and Philip Marlowe, the closer he gets to the facts, the harder the punches land.
''Brick" is almost fiendish in its insistence on finding modern-day parallels to classic pulp-fiction figures. There's a Mr. Big, a drug dealer who works out of his parents' wood-paneled suburban basement and who's played by a spooky, cane-wielding Lukas Haas, long ago the little boy from ''Witness." The dealer has a hired thug named Tugger (Noah Fleiss), who's both sensitive and homicidal in a manner that character actor Elisha Cook Jr. once had a lock on. A weak-willed punk (Noah Segan) channels the ghost of Peter Lorre.
There must be a girl: Laura Dannon (Nora Zehetner), a rich kid with luscious lips and a smart mouth who acts as Brendan's sometime protector. Less rooted in the old flicks is the manipulative Kara (Meagan Good, very funny), who's literally the school drama queen and who wears makeup for a different play every time we see her.
''Brick" even gives us a police lieutenant to harass the hero, only here it's the school's vice principal, played by Richard ''Shaft" Roundtree. That he's one of only two grown-ups in the movie (the other is the drug dealer's clueless mother) is very much the point. In high school, you're invisible to the adults and they to you. You're in the underworld.
This would all be clever and pointless -- a winking put-on -- if Rian Johnson weren't essentially serious about the resolve that renders Brendan a freak to his peers. He's as much the capable lone knight as Spade and Marlowe were: Brendan eats with nobody. Gordon-Levitt was the lank-haired kid in TV's ''Third Rock From the Sun," and he startled moviegoers with a turn as a damaged teen hustler in last year's ''Mysterious Skin," but he comes of age in ''Brick," convincing us of the hero's smarts, depth of feeling, and ability to take a heinous beating. Gordon-Levitt barely raises his voice, but he makes Brendan the most passionate person here.
You may be pressed to understand what the actors are talking about even when they're shouting. The sound mix in ''Brick" is genuinely atrocious, as if the budget had gone to Dixie cups and floss instead of microphones. On top of that, the characters all speak in an invented slang, half B-movie tough-guy patter and half shopping-mall whatever. It's pretty wonderful, though, and it furthers the sense we're peering into a world we and Brendan only partially comprehend.
Still, the lousy sound and a creeping narrative murk prevent ''Brick" from fully becoming the ''Chinatown" of high school flicks, and the final scenes don't lift off from private-eye cliches so much as cave in to them. Johnson has the chutzpah and the heart of a born filmmaker, but not the skill -- not yet. God help us when he does.
Ty Burr can be reached at email@example.com.