For a State Representative, the Ideal Candidate

It wasn’t long after Malcolm Kenyatta began messaging Matthew Jordan Miller on Instagram in April 2016 that Mr. Kenyatta started to wonder if the man he had started talking to was bad news.

Dr. Miller’s social media profile was perfect. So was his hair. Convinced this spelled trouble, a friend of Mr. Kenyatta’s told him, ‘‘‘Malcolm, he could be a murderer,’” he recalled.

Mr. Kenyatta, 31, is a Pennsylvania state representative and Democratic candidate for U.S. Senate. Dr. Miller, 32, who has a Ph.D. in urban planning from the University of Southern California, is a postdoctoral fellow at the University of Pennsylvania and the director of justice and belonging at the university’s Stuart Weitzman School of Design.

The two connected on social media after Mr. Kenyatta, who had recently been named a delegate to the 2016 Democratic National Convention, landed on a list of L.G.B.T.Q. leaders to watch. Dr. Miller, who goes by Dr. Matt, was then completing his doctoral degree and reached out with what he called a “pretty platonic” message.

“I said, ‘Hey, I think you’re doing great things,’” Dr. Miller said. “‘It would be great to get to know you.’”

Mr. Kenyatta doubted that would happen for a couple of reasons.

One: His commitments to his native Philadelphia — where he served as co-chairman of a political action committee and was also on the boards of the city’s Fairmount Park and the local chapter of the National Organization for Women — were steadily eroding the possibility of a long-distance relationship.

And two: Mr. Kenyatta’s friend Nikkita Thompson (the one who had been skeptical of Dr. Miller’s Instagram account) nixed the idea of the two ever meeting, in an attempt to protect Mr. Kenyatta from repeating a past romantic mistake.

“I feel like catfishing was at an all-time high then,” explained Ms. Thompson. “Malcolm was looking at him through the lens of social media, where so much is fake.”

Mr. Kenyatta soon agreed he should back off. “I was going through a list of reasons in my head about why it could never work,” he said. “I was afraid that if I did talk to him, and there was this great personality to go with this beautiful person, I was going to catch feelings and there would be nothing I could do about it.”

But within a week, they were messaging again.

“Why not throw a little caution to the wind?” Mr. Kenyatta recalled thinking. “If it doesn’t work out, I can always block him.”

By May, they had taken their conversations to FaceTime. At first, Mr. Kenyatta said, “I was just very happy he was a real person.” (So was Ms. Thompson: “Dr. Matt was giving the real,” she conceded.) By summer, Mr. Kenyatta was getting the sense that something meaningful was taking shape.

“Matt was creative and smart,” he said, with interests spanning photography, film and culture. “In my head I had always wanted to date someone artsy-fartsy, where it was like, I don’t know what you’re saying, but it sounds wonderful.”

Born in Mountain View, Calif., Dr. Miller spent his childhood living in multiple Northern California towns with his parents, Gerald and Debra Miller, and six siblings. In addition to a Ph.D., he holds a master’s degree in city planning from M.I.T. and a bachelor’s degree in urban studies from Stanford University.

Dr. Miller’s grandparents, Dorothy and Kenneth Martin, inspired his journey through academia’s major league. “My grandfather was a janitor at Stanford hospital,” Dr. Miller said. “He said, ‘This place is for geniuses.’ That sparked a flame in me.” His grandmother’s background got him interested in urban planning. “She grew up in poverty in East Palo Alto and passed away prematurely. From a really early age, I wanted to find ways to address the issues she encountered.”

Mr. Kenyatta, a third generation North Philadelphian who still lives in the neighborhood (now with Dr. Miller), could relate. A grandson of the civil rights leader Muhammad Kenyatta, who died in 1992, Mr. Kenyatta’s mother, Kelly Kenyatta, was a health aide, and his father, also named Malcolm Kenyatta, was a social worker. Mr. Kenyatta was their only biological child, but his parents adopted his three siblings before they divorced in 2000.

It was shortly after their marriage ended that Mr. Kenyatta, on the cusp of his adolescence and already familiar with the concept of public service, was nudged closer to it by his mother.

“We had just moved to a new block after my parents’ divorce, and I was thinking, I hate it here,” he said. “It’s dirty. I remember coming home one day and really complaining about it in the kitchen. My mother was lighting a Newport cigarette on the stove. She said, ‘Boo, if you care so much, why don’t you do something about it?’” At 11, Mr. Kenyatta became a junior block captain, tasked with keeping the street clean.

He later enrolled at Temple University, where he earned a bachelor’s degree in 2012. The year before, Mr. Kenyatta’s father died of a brain hemorrhage after suffering an epileptic seizure while waiting for a Philadelphia bus. His mother died in 2017, of a stroke brought on by diabetes.

The year after his mother died, Mr. Kenyatta was elected to his current office representing a district that includes his native North Philadelphia neighborhood; he later earned a master’s degree in public communication from Drexel University.

Mr. Kenyatta and Dr. Miller initially planned to meet in person in November 2016, when Mr. Kenyatta was going to make a trip to Los Angeles. But Dr. Miller ultimately told him to cancel, because he was defending his dissertation proposal at the time. “I just didn’t know if I could be present for him in that state of mind,” Dr. Miller said.

In recompense, Dr. Miller flew to Philadelphia a few months later, and the two finally came face to face on Feb. 4, 2017.

When Dr. Miller arrived, Mr. Kenyatta was lovestruck seeing him at baggage claim. “I felt like I had known him a long time,” Mr. Kenyatta said. Before they spoke, they kissed. “That was the moment I fell in love with him,” he said.

Dr. Miller, who had never been to Philadelphia, was swept off his feet by the time he returned to L.A. Being with Mr. Kenyatta was “like soul food, not like candy,” said Dr. Miller, who moved in with Mr. Kenyatta in 2018, after he won the primary election for state representative, and was soon providing support in the trenches while getting a crash course in the city and its politics.

“I was in the background, being his timekeeper and making sure he was eating,” said Dr. Miller, who now serves on the Philadelphia Art Commission.

The following year, with the stress of the campaign behind him, Mr. Kenyatta started thinking of proposing. “It was clear to me this was something I wanted to do for the long haul,” he said. Dr. Miller felt that way, too. “In our moments of struggle, we had tended to each other and healed each other. I had never had anything like that,” he said.

They became engaged on a walk through the garden at Philadelphia’s Shofuso Japanese Cultural Center on July 4, 2020, an already emotional day for Mr. Kenyatta because the holiday marks the anniversary of his mother’s death. “But I’m all about, how can you find something positive in something that should be negative?” he said.

Dr. Miller’s acceptance of the ring Mr. Kenyatta designed with a friend and local jeweler, Henri David, became the antidote to his Independence Day grief.

On Feb. 5, Mr. Kenyatta and Dr. Miller were married at the Met Philadelphia, a concert hall in the district Mr. Kenyatta represents. On its stage, rose petals and candles lay scattered in front of 10 chairs that were filled by friends of the couple, all of whom were vaccinated. Covid and another hectic campaign season, they said, precluded anything much bigger. But they plan to host a larger reception in 2023.

Before the Rev. Leslie Callahan, a pastor at St. Paul’s Baptist Church, pronounced the two married, several guests stood for speeches. Though no family was present, Mr. Kenyatta’s sister, Fatima Kenyatta, wrote a blessing that Ms. Thompson read. “You know Mom is here, smiling and screaming and shouting about how proud she is,” Ms. Thompson said, as Mr. Kenyatta fought to contain tears.

In handwritten vows, Mr. Kenyatta, who wore a midnight blue jacket and dark trousers, called Dr. Miller his greatest gift. “I promise to hold you up and hold you down,” he said.

Dr. Miller, in a white suit jacket and dark trousers, promised to remind Mr. Kenyatta of his true north, North Philadelphia. “I vow to be not only your mirror, but your prism that reflects your light out in new colors,” he said.

When Feb. 5, 2022

Where The Met Philadelphia

Swept Up Mr. Kenyatta and Dr. Miller jumped the broom into married life, after a kiss onstage to mark the official start of their union. A first attempt didn’t go as planned; Dr. Miller accidentally kicked the broom. The second try was the charm.

Local and Low-key After the ceremony, the couple kept it local, of course. A photo session outside Philadelphia’s Bellevue Hotel was followed by a drink with their guests at Bob & Barbara’s Lounge, a bar nearby.

High Praise Following their wedding, Mr. Kenyatta and Dr. Miller received snail-mailed congratulations from the president. “Your marriage and the story of your love mean so much to so many — in Philadelphia and across our nation,” read a letter on White House stationery, signed simply, “Joe.” A separate letter of congratulations came from Hillary Clinton.