Five-time Emmy nominated film and television screenwriter-producer Gene Stupnitsky has splashed out $3.45 million for a duplex penthouse atop a pristine, Romanesque Revival-style townhouse on a prime, tree-lined block in Brooklyn’s historic Brooklyn Heights neighborhood. Conveniently accessible by elevator, the three-bedroom and 2.5-bathroom co-operative penthouse, which includes four fireplaces, combines up-to-date modern technology with high-end finishes and preserved original architectural details.

The lower floor accommodates an unexpectedly generous foyer and stair hall and a sunny, south-facing living room that spans the full width of the 25-foot-wide townhouse with fireplace, built-in bookshelves, coffered ceiling and access to an approximately 600-square-foor private terrace. The dining room features a cozy window seat and a fireplace flanked by closets, one wired for use as wine cave; the slender galley kitchen features granite countertops on cherry wood cabinetry and patterned slate floor tiles. A small office and two guest bedrooms on the upper level, the larger with a fireplace and three arched windows, share a skylight-topped hall bathroom. The more amply proportioned master suite offers a fireplace bookended by built-in cabinets, a roomy walk-in closet and petite, updated bathroom.

Stupnitsky, a former writer on “The Office” who co-created, wrote and produced the short-lived HBO series “Hello Ladies” and currently executive produces the Showtime series “SMILF,” previously maintained an impressive 1930s traditional privately set behind gates and a high privet hedge in Los Angeles’ pricey Hancock Park area. He acquired the property in late 2012 for almost $3.1 million and, after an extensive renovation, restoration and update, sold it in the spring of 2016 to Damon Wayans Sr. for $5.35 million.

listing photos and floor plan: Brown Harris Stevens