Elijah Johnson spent his entire childhood in foster care and then most of the last year homeless, sleeping in a series of rental cars.

But he finds himself in an unfamiliar place these days: feeling optimistic, looking forward to a Christmas he couldn’t have imagined a few months ago.

Johnson, 19, reenrolled in high school recently, then wrote an essay about his plight that attracted the attention of city officials, who helped Johnson and his “godbrother” Mark Holly find something that feels miraculous: a home of their own.

“It’s so good,” Johnson said. “So good to be able to take showers, and change — to be a person again, to sleep better.”

Johnson was small when the Philadelphia Department of Human Services deemed his mother unfit to care for him. He cycled through different houses, struggling.

“I got tired of going from placement to placement, making friendships with people, then having to leave after so many months,” he said.

Johnson eventually aged out of the foster-care system. With no safety net, he found himself living in rental cars with Holly, who also grew up in foster care and met Johnson through family and friends.

The pandemic has squeezed millions, but for the most vulnerable, it’s been excruciating. Things got more expensive for Johnson and Holly, and the pressure felt relentless, Holly said.

» READ MORE: 3 people, 200 square feet: Managing homelessness, remote school, and life in a pandemic

“I’d be making thousands a month, but I would only have $50 in my account,” said Holly, 31.

Life was difficult, confined to the car with the brothers trying to deliver food through GrubHub to afford food, clothes, a cell phone to share. Sleeping was uncomfortable, two grown men wedged into a sedan, turning on the car periodically for warmth, worrying about safety and lingering too long in one spot.

“We used to go to hotel rooms when we could afford them to try to keep us warm, keep us clean,” said Johnson. To get the wireless access Holly needed to complete his schoolwork — he’s a semester away from completing an associate’s degree in criminal justice at Community College of Philadelphia — they would sit in a parking lot. To charge their devices, they relied on the generosity of a woman who let them use her porch outlets.

Holly, who has dreams of becoming a lawyer, saw his grades slip after becoming homeless.

“I can’t work and drive the car and do my schoolwork at the same time,” Holly said. “Everything was so difficult.”

Johnson had attended Overbrook High, but school was chaotic, he said. He was smart, and wanted to go to college, but felt distracted by the things going on at home and by an atmosphere where students roamed the hallways, classmates got jumped.

“I focused as much as I could, got my work done as much as I could,” Johnson said, but eventually he dropped out as a junior. Finishing school was a goal, but obstacles kept coming up: One program wouldn’t admit him because Johnson doesn’t know his Social Security number, a problem that also keeps him from qualifying for other kinds of assistance that would be open to him otherwise.

A few months ago, he enrolled in Achievement House Cyber Charter, an Exton-based, fully virtual school funded through state taxpayer dollars, as all charters are. Being back in school has been a revelation, because of the structure and support he’s received, from a laptop and printer to a hot spot and school supplies, said Johnson.

Chris Botes, the school’s homeless liaison, said the school of 1,000 students has seen a spike in families experiencing homelessness: three in the last two weeks, 10 total.

“Families have been trying to keep it together, but it’s very hard,” Botes said.

When he met Johnson, it was November. He was wearing flip-flops.

“I gave him a sweatshirt, and he cried,” said Botes. “He is the easiest kid in the world to monitor. He calls me regularly, he’s doing good in his classes, he’s just delightful.”

Johnson wants to finish his junior year strong, graduate, and go to college. He’d like to be a doctor someday, he said.

In an essay, Johnson talked about his homelessness and what getting back on track academically has meant.

“It almost made me cry that I could have a second chance at my education and that this school is willing to help their students be successful in class and in life,” Johnson said.

Holly recently connected with a city official whom he met by chance at the gas station where he used to park, and she helped link up the brothers with housing. Johnson and Holly recently moved to an apartment of their own in University City.

For the holiday, the two will be working as long as there are deliveries to be made. Money is still tight, but they have hope.

“Our Christmas is looking good,” said Johnson. “We have a roof over us, we’re very thankful.”