'Brainy's the new sexy."

So declares one of Sherlock Holmes' most formidable, if scandalously flirtatious, adversaries, Irene Adler in A Scandal in Belgravia, a new installment in the BBC's superb drama Sherlock, which returns for a second season Sunday on PBS' Masterpiece Mystery. Scandal will be followed by two other feature-length Holmes mysteries.

Irene, played with keenly sentient sensuality by Lara Pulver (True Blood, MI-5), is referring to Arthur Conan Doyle's famed brainiac, but she might as well be talking about the series.

An exuberant celebration of the Holmes canon, created by Doctor Who collaborators Steven Moffat and Mark Gatiss, Sherlock is an imaginative, visually arresting Holmes adaptation that sets the story in contemporary England. It features arguably the best Holmes-Dr. Watson on-screen pairing, with Benedict Cumberbatch (Tinker Tailor Soldier Spy, War Horse) as the titular hero and Hobbit star Martin Freeman as his conscience, Dr. John Watson.

Their chemistry is electric. They're not so much Johnson and Boswell as Ralph Kramden and Ed Norton. Rounding out the cast are Una Stubbs as the very flappable Mrs. Hudson, Rupert Graves as Detective Lestrade, and a very creepy Andrew Scott as Holmes' archenemy, Jim Moriarty. Gatiss is always brilliant as Holmes' more intelligent brother, British Intelligence spymaster Mycroft Holmes.

This season, Moffat and Gatiss make an audacious move by adapting three of Conan Doyle's best-known canonical Holmes mysteries: A Scandal in Belgravia is a take on A Scandal in Bohemia (1891), which introduced Irene, or "The Woman" as Holmes refers to her in the story. The Hounds of Baskerville is an eerie reworking of Doyle's famous 1902 novel as a sci-fi conspiracy thriller about genetic experiments conducted by the military.

The stunning concluding piece, The Reichenbach Fall, is taken from 1893's The Final Problem, about the deadly showdown between Holmes and Moriarty.

Sherlock strikes a perfect — and delicious — balance among comedy, pathos, murder, and mystery. And it uses eye-popping visuals to get us inside Holmes' head so we can experience his very peculiar thought process. (In Hounds, he is zapped by an LSD-like hallucinogenic gas. The effects are seriously far-out and terrifying to watch.)

"You can have scientists on the ground who analyze forensics, but they won't be able to take that leap which takes them to a conclusion," says Cumberbatch. "It takes [Holmes'] leap of both imagination as well as his knowledge to connect the dots."

Every time Holmes is processing a scene, we are treated to exciting, rapid little montage sequences showing a parade of objects connected to the murder victim: a ticket stub, a passport, keys, cellphone, soiled shoes, broken shoelaces, lapel pin, lint on the shoulder. All these images are cut up piece by piece, then put back together to show the connection Holmes sees between them.

Sherlock also features on-screen texts that come up each time Holmes takes note of something.

"Sherlock Holmes sees the world in an extraordinary way," Moffat says in a video on the making of Sherlock that will accompany the series' DVD release, scheduled for May 22. "So in a way, it's incumbent on us to visualize the world in an extraordinary way."

The on-screen texts reveal a great deal about Holmes when he first encounters Irene in the first film: He doesn't know what to make of her, this brilliant, beautiful, sexually adventurous criminal genius. Whenever he looks at her, the on-screen text simply reads "?????"

When sex enters the scene, Holmes is befuddled. He denies it, of course, telling Irene, "Sex doesn't alarm me."

Her reply: "How do you know?"

A dominatrix, Irene provides "recreational scolding" to the rich and powerful. Holmes is called in to retrieve compromising photos she took of a young member of the royal family. Irene and Holmes have a great time exchanging barbs, insults, and put-downs — a scene of lovemaking straight out of a Bogey and Bacall movie.

Eventually, Irene beats him at his own game — then literally beats him with her riding crop. Ouch!

Moffat admits he souped up Irene. Doyle's original, he says, isn't all that interesting.

"She never does anything that amazing, but [Holmes] is very, very complimentary to her," Moffat says. "I remember as a 12-year-old, reading the story and thinking, 'Why do you think she's so brilliant'? I didn't think he was falling for her mind, but because she was a girl.'?"

Do Holmes and Irene fall for each other? Is Holmes even capable of love? You decide.

It's clear Holmes isn't quite at home when it comes to feelings, desires, primal urges.

For all his genius, the Holmes we meet in Sherlock is less superhero than a high-functioning sociopath with grandiose ideas. ("I think you're damaged, delusional, and believe in a higher power," Irene tells him. "In your case, it's yourself.")

Holmes is a maladjusted recluse who doesn't understand human interactions. When a child client gives him a gift for saving his father's life, Holmes shakes the box, immediately deduces that it contains a tie pin, and complains that only an idiot would give a tie pin to someone who doesn't wear ties.

Holmes' pathology takes center stage this season. While the first season constructed the character for us, showing us how he thinks and solves crimes, season two takes a scalpel to his soul and shows us how he can be undone by his more elemental instincts. In The Hounds of Baskerville, he comes face to face with existential terror, with dread, while in The Reichenbach Fall his entire world, his sense of having a mission in life, his friendships and his identity, are taken from him by Moriarty.

Cumberbatch, who calls Moriarty the first comic-book super villain, says Moriarty is Holmes' double.

"The two of them are perfectly bored by the ordinary world and crave excitement. And like all polarities, they need each other," the actor says, adding that like Holmes, Moriarty isn't motivated by money or fame, but by his desire to find interesting, challenging things to do, no matter if it leads to people's deaths.

"Holmes tries to make sense of a chaotic world by imposing rational order on it," says Cumberbatch. "Like the Joker in Batman Returns, Moriarty believes once you remove the skin, everything below is savage and chaotic and he wants to release that chaos."

Talk about a cosmic showdown between two great forces. And Sherlock delivers a final episode worthy of myth.

Contact Tirdad Derakhshani at 215-854-2736 or tirdad@phillynews.com.