If Matt Fein had an emblem, it would be a doughnut.

Doughnuts permeate his dreams. They slip into his text messages, decorate his socks, fill his diet (about a dozen a week), and literally eat up his workday.

Fein is the culinary director of Federal Donuts, a role that pays him to come up with deep-fried cake creations.

“If you would’ve told me 10 years ago in culinary school that I would be making doughnut flavors, I would’ve laughed — but I love it,” said Fein, 33. “I get to actually play with my food and bring visions in my mind to life, like an artist.”

At all of its locations save Citizens Bank Park, Federal Donuts offers nine doughnut varieties daily. Three are “Hot Fresh,” cooked-to-order; the remaining six are “Fancy” — pre-fried, glazed, and shipped out from its North Philadelphia headquarters. Every two to four weeks, a new flavor kicks out an older one. Fein decides what the new one will be.

In nearly seven years of doughnut development, he can count less than five flavors that have been repeated.

The recipe development process has been fine-tuned as a result. Fein is at the center of it, as is a “Doughnut Calendar,” which allows Federal Donuts’ brain trust — the owners, director of operations, and other key staff — to weigh in and follow along. Fein projects three months ahead, with tasting sessions scheduled every other Thursday.

“Can we bump up the vanilla in this?” asked Tom Henneman, Federal Donuts’ CEO and co-owner, in a recent tasting. “The cookie flavor is great, but let’s jack up the glaze.” Fein was serving a new version of existing fan-favorite Cookies and Cream, this time with a chocolate doughnut base (instead of original cake).

At a table inside the North Philly headquarters, a group of five gathered to deliver their critiques. Occasionally a customer would walk in — they’d be invited to try, too.

During each session, Fein jots down commentary in a notebook. He’ll use it to tweak the flavors until the doughnut is deemed ready for its debut. (Cookies and Cream premieres June 7 — National Doughnut Day — so he had a couple of weeks to perfect it.)

“So many people eat with their eyes, and half of it for us is just getting it into their hands,” Henneman said while reaching for a glittery deep-purple-glazed doughnut. “You have to be mindful of so many factors, like making sure there aren’t too many doughnuts with nuts or too many that are brown.”

He bit into the vanilla-lavender treat, dubbed Purple Rain. It was a big hit when first released in 2016 to honor Prince, and was up for consideration to make a one-day return for National Doughnut Day.

As with the Purple Rain, Fein occasionally draws on pop culture references. He recently created a Homer Simpson-inspired doughnut (pink glaze, white chocolate) to mark the show’s season 30 finale. Other past flavors include the Fluffhead, a peanut butter-glazed doughnut with Marshmallow Fluff piped into the center, designed as a nod to the band Phish.

“I’ll often wake up craving a certain food, and then just start thinking about how I can turn that into a doughnut flavor,” Fein said. “I also think about seasonality.” He’s been dreaming of a summery peach-ricotta-honey combo, where a dollop of ricotta fills the center of each doughnut.

“The only major flop I can remember is when I tried out this cucumber watermelon lime,” he said, recalling hours spent breaking down and macerating whole watermelons. “It taught me early on that simplicity usually goes over better.”

Transforming beloved classics, like strawberry shortcake and chocolate éclair, into doughnut form is common, but it’s done carefully. Fein was tinkering with a carrot cake flavor at a recent tasting session, a flavor he’s been testing on and off for the past year. The glaze still wasn’t quite right, he said. He would incorporate carrot juice into the next batch to amp up the carrot flavor.

Fein will mine local tastes, too.

“Philly has a thing for cream cheese. Anytime we do a cream cheese glaze, people go crazy for it,” he said. “We did a blueberry mascarpone — a play on old school Italian South Philly. That was a big hit.”

His favorite creation so far is the French Toast doughnut. Cinnamon Bun is a close second, and currently is available at all six in-store locations. It adds a rare element of surprise — a base that has a cinnamon mousse swirled into every bite.

Besides chocolate-based doughnuts, nearly all Federal Donuts start with the exact same cake batter, then vary by glazes and toppings. Federal Donuts’ headquarters houses only two Doughnut Robots (the machine that shapes and fries the doughnuts), making it impossible to change up the batter for each flavor.

That doesn’t mean creativity is limited, however. Glazes can turn into multistep processes, as with the current Cereal Glaze doughnut, for which milk steeps with Fruity Pebbles for several hours before it’s whipped with powdered sugar and salt.

Then, there are times when companies like Campbell’s ask to do a collaboration. The wild result was a tomato soup-flavored doughnut topped — naturally — with Goldfish crackers.

While the base rarely changes, Fein has made small refinements to the original recipe over the years, adding sour cream to help fluff up the circular cake structure. (If you scroll far down on Federal Donuts’ Instagram feed, you’ll find photos of flatter doughnuts with larger holes.)

A freshly fried, plain doughnut dipped in sugar — a.k.a., the staple Hot Fresh option — remains his overall favorite. But he’ll always consider creating the Fancy flavors the best part of his job, in addition to seeing customers try new flavors.

“I never thought something like doughnuts could bring so much happiness to people, but they do,” Fein said. “There’s nothing better than witnessing a first bite that brings back a childhood memory.”