I guess it's just fate that the Summer Olympics always coincides with the every-four-year insanity of the American presidential election. But over time, the white lines between sports and politics have clearly blurred -- especially since the late 1960s. The iconic image of track gold and silver medalists Tommie Smith and John Carlos giving the black-power salute in 1968 in Mexico City, and the ensuing uproar, dovetailed with the rise of a "law and order" candidate in Richard Nixon. In 1980, Jimmy Carter's decision to boycott Moscow over the USSR invasion of Afghanistan -- a move which hurt some of America's best young athletes as much as the Kremlin -- probably helped to cement the image of the 39th president as a Sunday-school sourpuss who didn't really get the national competitive spirit.

But no president understood how to get political mileage out of the Olympics like Ronald Reagan -- especially when he was running for re-election in 1984 and the Games came to his longtime home area of Los Angeles. Reagan's now legendary campaign theme was "Morning in America," and what better way to showcase the new American optimism that he was taking credit for than the glory of national domination in the sporting arena.

Here's how the New York Times covered the president's appearance at the opening ceremonies in 1984:

''You will be competing against athletes from many nations,'' he told them, ''But, most important, you are competing against yourself. All we expect is for you to do your very best, to push yourself just one more fraction of a second, one notch higher, one inch further. Each time you do that, you've created a magic moment of beauty and excellence in which all of us will share,'' the President said,

Mr. Reagan, whose aides denied that he had any intent to add politics to the roster of Olympic events, told the American team that ''there is a new patriotism spreading across our country.'' This echoed one of the themes of his re-election campaign, a theme that was repeated on the President's paid political radio broadcast today as Mr. Reagan praised the nation's youth. In hailing the Olympics in the broadcast, the President also spoke of ''New Patriotism'' and said that lately he could discern a new optimism and ''affection for the nation'' in the music of the young.

His own marathon event, the Presidential election, was alluded to when Mr. Reagan was asked as he toured the Olympic Village grounds whether he felt like a winner. ''No,'' the President replied, smiling. ''But I feel like I'm surrounded by winners. If it rubs off, then I'm a winner.''

It was a brilliant prediction about what was arguably the most brilliant U.S. presidential election strategy of the post-war era. Reagan won 49 states that November, the last true American landslide. Never mind that the epic gold medal haul by American athletes was heavily aided by a boycott by the Eastern bloc in revenge over Carter's move four years earlier. And few remembered that as a 1980 candidate Reagan had actually proposed scuttling the L.A. games and moving the Summer Olympics permanently to Athens. Not many even noted that Reagan's idea of "'affection for the nation' in the music of our young" was Bruce Springsteen's "Born in the USA," which was really about the unwelcoming landscape faced by a returning Vietnam vet.

The Gipper had a knack for skating through political minefields like that.

Flash forward 32 years, and it feels like the whole president-Olympics machinery has ground into reverse. The man who inherited, or maybe hijacked, the party of Ronald Reagan is Donald Trump, who has put all his chips on a "Midnight in America" strategy of how terrible everything is. "We need wins!" he frequently bellowed on the primary campaign trail. "We don't win anymore," he said at the first GOP debate. "We can't do anything right." He insisted that the "Chinese are cleaning our clock" and that the random evil-nation rival du jour -- Mexico or Japan or maybe Kazakhstan -- was outsmarting us. Last month, he told delegates in Cleveland he was accepting the Republican nod in "a moment of crisis for our nation."

Trump wouldn't have made it this far without tapping into something about the national zeitgeist; polls do show as many as 70 percent of the electorate thinks America is on the wrong track, even though anyone who's been to both Trump rallies and Bernie Sanders rallies this spring knows there's yuge disagreement within that 70 percent about what's actually wrong. But Trump completely lacks the ability that Reagan displayed as the stagflation and, yes, malaise of the 1970s came to end -- to understand that Americans yearn for a vision of something better. For that, we've turned instead to Rio.

I think this year's Olympics sneaked up on an unsuspecting populace. For months, all we heard about was zika, Brazil's corruption and unrest, and the threat of terrorism. In a weird way, the lack of anticipation has helped make the almost-too-perfect rising to the occasion by America's athletes exactly the vehicle for hope and pride that most people have found so lacking in the selection of our next president.

It's not just that American athletes are winning the most medals, perhaps aided -- shades of 1984 -- by a Russian doping scandal that kept some of its top athletes home. It's the way that they win -- the supernatural confidence and ease with which the red-cup-covered Michael Phelps adds to his gold-medal record, the magnetic spunk of swimming's Katie Ledecky, and the bold finger-wagging of her teammate Lilly King. It's American swagger but it's good swagger, deserved swagger -- nothing like the unchecked narcissism that dominated our screen for most of 2016.

The exclamation point is the remarkable women's gymnastics team led by individual gold medalist Simone Biles -- so dominant you will easily forget they also celebrate the kind of diversity that is America's best feature, not the bug that's described by the bitter and the disaffected back home. On social media where -- let's be honest -- 95 percent of the national conversation now takes place, daytime despair over the political outrage of the day turns into downright giddiness every night amid this avalanche of gold. I wouldn't go all Reagan and declare this "a new patriotism," but this Olympics has lit a torch for reminding Americans what's so good about American people.

This week has also laid bare what should have been clear a long time ago: That Donald Trump is dangerously unfit for the White House. But Rio has reminded us about something that might even be more politically harmful for Trump's November prospects: That his portrayal of the U.S. as a nation of losers who can't do anything right is utterly ridiculous. It's 180 degrees from what voters want to hear, and what we want to believe about our nation and ourselves. And there's still 10 more nights of this new American morning -- a sports sunrise that could be twilight for Trump's dark ambition.