4:11 p.m. EDT June 10, 2014

ROCINHA, Brazil — I didn’t know what to expect when I decided to spend a day inside the biggest slum in Brazil.

Known as a “favela,” Rocinha is a neighborhood of about 100,000 people that started as a small collection of squatters who kept building their shacks higher and higher along the side of a mountain in Rio de Janeiro. When I finally made my way to the top, past the open sewer ditches, past the tangles of wires that carry stolen electricity to power most homes, through the makeshift alleys and staircases littered with debris, I saw something I never could have imagined.

A doorway opened onto the roof of one of the homes, and I got a sweeping, jaw-dropping view of the coast, a postcard-worthy shot of the mountains descending into the sea. When Americans think of Brazil, this is the kind of scene they imagine – high-rise hotels sitting on wide beaches framed by lush, green mountains. That area is called São Conrado – one of the most expensive corners of Rio. England’s national soccer team will be staying in a hotel there during the World Cup, which begins Thursday.

Almost immediately, though, my eyes started drifting. The favela was all around me. The vast size of it finally started to sink in. The depressing condition of each of the self-constructed homes started coming into focus. The faded paint, the uneven rooftops, the garbage piled up on creaky decks.

And that’s what brought home for me Brazil’s staggering income inequality. All that separates the high-priced hotels of São Conrado and the haphazard homes of Rocinha is a four-lane road.

I have seen extreme poverty in many forms. From the slums of Port-au-Prince to rural towns in Mexico, from remote villages in Afghanistan to the middle of some American cities, I have seen the horrid conditions that billions of people are forced to endure every day. But never before had I seen that level of poverty in the literal shadow of such extreme wealth.

The residents of Rocinha say the proximity to such luxury doesn’t dampen their spirits or inspire them to improve their lives. They’ve got enough to worry about, with the sporadic violence that permeates their neighborhood, the difficulty they face keeping their kids safe and in school, and the struggle to find, and keep, jobs outside the favela.

Some have benefited from the economic boom experienced by the country over the past decade, when 40 million people rose into the middle class. People like Paulo Carlos, who owns a photo-printing shop and has saved up enough to buy a house in Maricá, a good retirement community east of Rio.

“I never thought I’d be able to get out,” he told me over dinner in Rocinha. “But in the last six, seven years, I realized I could.”

Many others aren’t so lucky. The country’s once-booming economy has fizzled and job creation has stalled, leaving the country’s poor struggling once more.

Ricardo Ramos first came to Rocinha when his mother dropped him off at a foster home when he was six months old. He started working at age 8 and slowly taught himself how to repair surfboards left behind on the beach by tourists and wealthy Brazilians. He now runs a small surf shop that sits at the intersection of Rocinha and São Conrado.

Ramos, 42, says few in Rocinha have seen any real benefit from the country’s economic expansion or the $11.3 billion spent on the World Cup.

“Brazil has always had the same problem,” he says. “Those who have can get more. Those who don’t, can’t.”

Looking at the line separating Rocinha from São Conrado, it’s hard to argue with him.