As I write this -- about 4 a.m. -- Donald Trump is soon to wake and begin tweeting inanities designed to obscure an inelegant truth: He lost the midterm election, bad. And it’s likely to get worse.

At this writing, it appears that the president’s Republican party lost as many as 37 seats in the House of Representatives, with a lot of the West Coast still to be heard from, losing the popular vote by a projected nine percentage points. It lost seven governorships with two (Georgia and Connecticut) still pending.

Republicans gained a few Senate seats, with combined margins in Arizona and Montana of about 25,000 votes, and took seats in Indiana and Missouri that haven’t been in doubt in years unless a Republican said something dumb about rape, which GOP nominees remarkably did in both states in 2012, letting Democrats win then.

Worse, the cobbled-together coalition of states that let Trump squeak to his Electoral College win disappeared — and showed signs of collapsing altogether by 2020.

This is not what you’ll hear from a president who routinely, and falsely, claims his Electoral College win was historically large. He won 306 electoral votes in 2016 by winning stunning, narrow victories in Wisconsin, Michigan and Pennsylvania, with a total of 36 electoral votes. That’s exactly the 36 votes he won over and above the 270 he needed to win.

All three states elected Democratic governors Tuesday, two of them handily. (Tony Evers squeaked to a win over Republican incumbent Scott Walker in Wisconsin, as expected). All three re-elected Democratic senators.

Ohio, an industrial state that Trump won big, easily re-elected a Democratic senator and elected a GOP governor, in a mild upset, who’s much closer, ideologically and temperamentally, to outgoing Gov. John Kasich, who openly loathes Trump. Pennsylvania flipped three suburban House seats to Democrats.

And Iowa, which swung hard to Trump on the backs of older voters in 2016 after supporting Democrats for president every election since 1984 except one, turned out two GOP House incumbents. The only Iowa Republican in the next House will be Steve King, the noted bigot and ogler of European neo-Nazi parties.

All that leaves Trump six votes short of a coalition even if he hangs on to Ohio. He’s down to 246 if he doesn’t. And it gets worse.

Trump’s political challenge has always been that he’s attempting to build a coalition all but exclusively of yesterday’s men. (Yes, I do mean men). And that only got worse yesterday.

In state after state, Republicans did even worse than Trump did in 2016 in the suburbs, and made up part of the difference by doing even better in rural areas and some exurbs. Problem is, suburbs are where population, wealth and power are growing in America.

And with Trump likely to spend the next two years acting just as divisively as in the last two, he’s not likely to get a lot more popular with the educated folks, especially white women, among whom he got clobbered Tuesday.

Dismiss, if you want, all the suburban House seats lost in California, New Jersey and New York as coming from states Trump won’t contest in 2020 anyway,

But Republicans should be super-afraid of the three seats they lost in Virginia — not just the one in Washington’s suburbs they knew they would lose, but the one in a military district including Virginia Beach and the one around Richmond where only four years ago ex-House Minority Leader Eric Cantor lost a primary challenge from his right.

Those have been core GOP areas — but the logic of suburbanization, complete with a rising percentage of the female white college graduates who disapprove of Trump by wide margins, and especially of immigrants, means they are getting more important and more dangerous to the GOP.

And Trump should be terrified that Democrat Stacey Abrams won 56% of Gwinnett County, with 920,000 people the largest suburban county in Georgia, in the state’s still-undecided governor’s race. Gwinnett rarely if ever voted Democratic for president before Hillary Clinton, who won 51%, and has grown by 115,000 people since 2010. Nearby Cobb County,with 755,000 people and Newt Gingrich’s old geographic base, gave Abrams almost 54%.

The area appears to have split its two House seats, both now represented by Republicans, though both races are very close. Demographically, the districts won’t be close for long.

The president should be petrified that Beto O’Rourke’s unsuccessful Senate bid in Texas delivered enough turnout to topple veteran House Republicans in suburban Houston and Dallas. Trump won Texas by nine points. Last night, Sen. Ted Cruz won re-election by two and a half.

Arguing with demographic change is like arguing with gravity. Even for a president who disputes climate change, another inconvenient bit of science, it ain’t gonna work.

Trump is incapable of recognizing that he needs to stop alienating the suburbs — by demonizing immigrants, trying to cut health insurance, disrespecting women and redistributing income to the rich. Chances are outstanding he will keep doing exactly what lost his party the House. And Trump will lose in 2020.