Democrats once worried that Barack Obama's winning presidential coalition had set them up for midterm election defeats. Conor Lamb's Pennsylvania win shows Donald Trump is solving their problem.

The problem arose from Obama's extraordinary strength among young and minority voters. They vote less often than older whites in midterm campaigns for Congress — which helped Republicans recapture the House in 2010 and the Senate in 2014.

But Trump has also shifted the electorate. The result leaves Republicans more dependent on less educated voters, especially men — who vote less often than the college graduates and women now flocking to Democrats.

Midterm campaigns often mobilize opponents of whoever sits in the White House. That's why the president's party has lost control of at least one chamber of Congress in the last three midterm elections.

As the least-popular first-term president in polling history, Trump has generated massive opposition. And the nature of that opposition, as Pennsylvania voters demonstrated once again, helps to maximize its electoral impact.

What catapulted candidate Trump to the presidency was his landslide against Hillary Clinton among white men and whites without college degrees. Among white women and college graduates, he won by lesser margins.

But his abrasive, chaotic White House tenure has changed those proportions.

A Gallup poll earlier this month showed that he remains popular among white men and whites without college degrees but by less imposing margins. White women now disapprove of his performance by 49 percent to 45 percent. Among college-educated white women, the negative verdict was overwhelming — 61 percent disapprove, 34 percent approve.

That shift let Lamb erase his deficit against Republican Rick Saccone in a nearly all-white district Trump won by 20 percentage points in 2016. A pre-election Monmouth University poll showed him leading by 15 points among women and 22 points among college graduates.

Republicans tried to lure them by touting the Trump tax cuts. It didn't work.

"The size of a tax cut is not that important to us," Caroline Horwitz of suburban Allegheny County told me. "We have two children starting in the public schools soon. We want them to be good."

The 32-year-old helped Lamb with canvassing, phone banks and yard signs because "I want to see fewer people like Trump in Washington." It was the first time she had ever volunteered in a campaign.

Such efforts proved just enough. Historical patterns suggested the middle-class suburbs of Democrat-friendly Allegheny County would represent about 42 percent of the total vote. It turned out to be 45 percent.

Another measure of surging Democratic turnout: Lamb's vote total was 79 percent of what Clinton received in 2016, while Saccone got 53 percent of Trump's total. That echoed earlier Trump-era special elections, which have swung toward Democrats by an average of 14 percentage points since 2016, according to the University of Virginia's Center for Politics.

"This is the year of the angry white college-educated woman, " said David Wasserman, an analyst of House elections at the Cook Political Report.

That makes Democrats current favorites to gain the 24 seats they need to win back the House this fall — an ominous prospect for Trump's presidency. Republicans hold 23 districts Trump lost in 2016, and 37 that he won by fewer than 10 percentage points.

In some places, subpar turnout still keeps Democrats from turning support into votes. Latinos and young voters remain much less likely to turn out than older whites.

Yet Trump's relentless focus on core supporters gives Democrats a chance to narrow those gaps.

As Pennsylvanians voted Tuesday, Trump traveled to California to examine prototypes of the wall he promises to build along the Mexican border. Democrats hope to mobilize Latinos around that and the Trump immigration crackdown that jeopardizes Obama-era protections for the so-called dreamers who were brought here illegally as children.

The day before, Trump released his plans for responding to the Parkland, Florida, school massacre. He abandoned his earlier pledge to buck the NRA.

On Wednesday, a month after the massacre, student activists demanding gun restrictions walked out of schools across the country. They plan a large scale "March For Our Lives" protest in Washington next week.

Protesters aim to pressure congressional Republicans on gun legislation — and drive young voters to the polls if they fail. A voter registration link on their website is marked "Vote for our Lives."