On a recent morning, Andrea Pereira was taking in the wonders of the Olympic renovations in Rio, riding a sleek new train downtown with her family to the gleaming new "Wonderful Port". And yet she felt bombarded by mixed feelings.
Her city - the pulsing, jubilant, unequal, crime-addled world champion of sunny celebrations - did seem prettier now that the summer Games were about to begin.
But the 40-year-old military police officer has spent three months worrying over late or partial pay cheques amid the state Government's budgetary fiascos. Her 16-year-old nephew won't be attending today's Opening Ceremonies because the family fears a terrorist attack. Teachers have been on strike. Violence is rising in the favelas. The nation's President has been ousted.
"They put makeup on the downtown. But that's not our reality," Pereira said. "We feel betrayed."
On October 9, 2009, when the International Olympic Committee selected Rio de Janeiro to host the 2016 Summer Games, confetti fell over a delirious crowd on Copacabana Beach and then-President Luiz Inacio Lula da Silva wept with joy. This was a country poised to knock on the First World's door, an economic powerhouse with boundless natural wealth, the leader of a peaceful region.
The ensuing years have wiped away the smiles.
"There was a moment of megalomaniacal euphoria," former President Fernando Henrique Cardoso said in an interview. "As if Brazil had already solved its problems, already belonged in the First World.
"Now we are in doubt: Are we really capable or not?"
Brazil's once-booming economy, fired up by commodity sales to China, spending by a rising working class and dreams of offshore oil wealth, has plummeted into recession and the country's political class - including Lula - has become embroiled in corruption scandals. His successor, Dilma Rousseff, has been suspended from the presidency and is awaiting an impeachment trial. Her successor, Michel Temer, is deeply unpopular; he has said he expects to be loudly booed when he shows up for the Games.
Rio also has not been able to keep many of its promises for the Olympics. Polluted bays and lagoons have not been cleaned; construction is over budget and sometimes slipshod.
Throw in wild cards - say, the 166,000 cases of the Zika virus in Brazil and fears of terrorism - and it is obvious that South America's first Olympics is coming at a very complicated moment.
Rio de Janeiro knows how to party on a monumental scale while throwing an international sporting event. The city hosted football's World Cup two years ago and the Pan American Games before that. Yet the mood is apprehensive, almost queasy. A recent poll found that nearly two out of three Brazilians expect the Olympics to bring more losses than benefits.
Soldiers wearing camouflage are posted at bridges, subway platforms and beaches.
Some of Rio's new makeup has been beautifully applied. The streets around the port along Guanabara Bay used to be dingy, with homeless people sleeping amid decrepit, graffiti-tagged warehouses. The Olympics have transformed that area into the "Porto Maravilha", its centrepiece a stunning plaza anchored by the Museum of Tomorrow with its soaring mechanical wings. An elevated highway was torn down to make room for a broad pedestrian boulevard that is lined with colourful murals and warehouses converted to house exhibits on Brazilian culture.
"It's really changed; it's beautiful," said Mayara Tenorio, a 24-year-old actress, as she watched her sister perform ballet in the plaza for passing tourists.
"I hope the Games will rebuild our patriotism and love for the country."
Although some infrastructure projects were delayed, the city's public transportation options improved, with the Government adding nearly 160km of bus rapid transit lines, an additional subway line and a new light-rail line. There are new saucer-shaped stadiums. The city's giant statue of the Olympic rings is located in Madureira Park on the poorer north side of the city, in an area that was a blighted lot.
Alexandre Costa, a 40-year-old who runs a restaurant, sat with his back against a tree in the park, eating ice cream and watching his daughters play. "This used to be a neighbourhood without good spots for families," he said. Now there are concerts, a skate park, fountains and outdoor restaurants.
At the same time, Costa said he has noticed a distinct drop-off in his business as unemployment has risen.
"The whole place feels unstable," he said.
Across town, an anti-Lula, anti-Rousseff protest was moving down the palm-lined street along Copacabana Beach. It looked small, a few thousand people, and also very Brazilian. How to judge the size? Was the woman in the cherry-coloured spandex with the giant promotional can of Red Bull strapped to her back a protester? Or the guy with the shaved chest and Speedo sauntering through the crowd?
The messages people carried, however, were serious: "We do not want communists in Brazil" and even "I love military intervention", referring to Brazil's two decades of military rule.
In 1970, Rousseff was jailed and tortured as a young woman for joining a Left-wing guerrilla movement opposed to the dictatorship.
"During the military regime, we didn't have this mess in Brazil," said Alvaro Arthur, a 66-year-old retired marine carrying a banner calling for a military takeover.
Although expressing a minority sentiment in the country, the protesters reflected a backlash against 15 years of leftist policies in which the Government spent heavily on social programmes to help the poor.
Neither Rousseff nor Lula planned to attend today's Opening Ceremonies. Rousseff's impeachment trial is expected to take place during the Games. For Lula, winning the Olympics crowned a remarkable run as a popular, two-term leader. During 2010, his last year in office, Brazil's gross domestic product grew by 7.5 per cent, the fastest rate in a quarter-century. Since then, he has been accused of obstructing an investigation into the corruption scandal at the state-run oil company, Petrobras, as well as benefiting from a real estate scheme.
Lula acknowledged that his expectations for this moment "were better" when he pursued the Games.
"Today, Brazil is living through difficult economic times, a political crisis, and an attempt to consolidate a parliamentary coup d'etat that threatens to reverse social rights won by the poorest and by workers," Lula wrote in response to questions from the Washington Post, using an expression - coup - that Rousseff's supporters use to describe her impeachment.
Nonetheless, he said, the Games are a time for celebration.
Others don't see it that way.
"I'm afraid of terrorism," taxi driver Elias Alves said as he wove through Rio. "Imagine the Islamic State blows up a train or something; it would be a disaster."
These types of fears used to have no place in Brazil, a country without a history of attacks by Islamist extremists. But authorities last month arrested a dozen people suspected of planning a terrorist attack during the Games.
Alexandre de Moraes, the Justice Minister, who oversees security, said in an interview that he was pleased with the intelligence work done by Brazil and dozens of other countries co-operating with his country.
"The probability of an act happening in Brazil, at the Olympics, is very small, according to all the international agencies," he said.
Still, he said, a lone wolf-style attack is possible.
Most residents seem to worry about more-pedestrian violence, such as the turf wars between rival drug gangs and police that have plagued the city for years. Behind the row of multimillion-dollar beachfront apartments and hotels in Copacabana, the steep hillside is crowded with shanties.
Unemployment is rising and food prices for basics such as milk and beans have shot up. And that means for many, they can't afford to attend the Games.
Alexandre Medina, a cook at a favela community centre, said he would have loved to see Olympic soccer in person, but that will remain a fantasy. "The Games are for those who have money," he said. "We're not invited to this party."