The election of Donald Trump was a major shock to the left. It was not supposed to happen. It was not even supposed to be possible for it to happen. Many shuffle about their daily tasks suffused in gloom and pessimism. With Trump in the White House, and the Republicans in control of Congress and most states, surely little of the progressive agenda will remain in a few years. His brand of xenophobia and authoritarianism is on the ascent; the future looks bleak both for the country and a world torn by rising populism and threatened by climate change.

But despite recent setbacks, there are many excellent reasons for the left to be optimistic. The future is brighter — much brighter — than they think.

I mean this in two ways. First, there are trends that ought to hearten liberals — including the society-wide acceptance of same-sex marriage, now entrenched in the law by the Supreme Court, and the resistance to cutting new parts of the social safety net (including, so far, the main elements of the Affordable Care Act). We have made progress in recent years on issues involving basic social and economic justice — progress that seems unlikely to be reversed.

But I also believe that the left should be optimistic because optimism energizes people and wins elections. Social criticism has its place: We want to make society a better, fairer place, and pointing out flaws is an important first step. But criticism has its limits as a way to inspire social movements.

Here are seven reasons optimism beats pessimism every day of the week.

The gains of the left are sticky

Over time, the left has accomplished many things, from building out the social safety net to cleaning up the environment to protecting public health to securing equal rights for women, black people, and gay people. These and many other gains of the left have a very important thing in common: They are “sticky.” That’s a term borrowed from economics that means, simply, they will be hard to reverse. They provide benefits that people do not want to lose — and, what’s more, they shift norms of what is right and wrong.

Social Security and Medicare are great examples of policies that once seemed radical and now are simply a part of life. The Affordable Care Act’s core innovations may turn out that way, as well, despite the controversy that has dogged the program from its inception — and the declared intent of the current administration to eliminate it.

The ACA has provided benefits to millions who don’t want them taken away, and helped to establish the principle that every American has a right to health care, guaranteed by the government. That’s why the Republican attempt to radically downsize the program hit a buzzsaw. To be sure, Republicans will keep trying, and they’ll do some damage. But they will not be able to “repeal and replace” with a fundamentally less generous program.

Instead, it’s more likely that the ACA, either under that name or another, will get more generous over time. As conservative columnist Charles Krauthammer recently noted: “A broad national consensus is developing that health care is indeed a right. This is historically new. And it carries immense implications for the future. It suggests that we may be heading inexorably to a government-run, single-payer system.”

Krauthammer was despairing, but the left should be heartened by the observation. Indeed, at this point, Trump and the GOP have been reduced to hoping that if they neglect the ACA, it will collapse on its own — yet that doesn’t seem to be happening (knock wood). The very desperation of this “strategy” is a sign that Krauthammer may well be prescient about where American health care policy is headed.

We’ll see the same dynamic with the administration’s attempts to gut environmental regulations. Yes, Trump’s crew will do some damage, but the public will not accept actions that significantly reduce air and water quality. The benefits of a clean environment are deeply popular and the norm that the environment should be clean is well-established. There is no going back; clean air and water is another sticky reform of the left.

So it will go and so it has gone.

Science and technology are our friends

The left has a certain amount of faith in the conclusions of science (for example, on the basic facts of global warming), but a remarkable lack of faith when it comes to using technology — that is, applied science — to solve our problems. In fact, and unfortunately, a certain amount of techno-pessimism has gained currency on the left. This is strange, since almost everything people like about the modern world, including relatively high living standards, is traceable to the advance of technology.

This is also not an area where Trump’s politics are likely to slow progress significantly, though the proposed cuts to federal funding of research won’t help.

From smart phones, flat screen TVs, and the internet to air and auto travel to central heating and air conditioning to the medical devices and drugs that cure disease and extend life to electric lights and the mundane flush toilet — the list is endless — technology has made people’s lives both much better and much longer than ever before. The average person today is far, far better off than her counterpart in the past. As the Northwestern University economic historian Joel Mokyr puts it, the so-called good old days were old but they were not good.

And what do we have to thank for all these spectacular advances? It’s technology that has made possible the new goods, machines, medicine and so on that we consume, and that has fueled the economic growth that allows us to consume at such a high level. One would think, therefore, that the left would embrace techno-optimism: After all, if the goal is to improve people’s lives, rapid technological advance is surely something to promote enthusiastically.

Yet many on the left tend to regard technological change with dread rather than hope. They see technology as a force facilitating inequality rather than growth, destroying jobs, especially for manual workers, turning consumers into corporate pawns rather than information-savvy citizens and destroying the planet in the process. We are far, far away from the traditional left attitude that welcomed technological change as the handmaiden of abundance and increased leisure — or, for that matter, from the liberal optimism that permeated the culture of the 1950s and ’60s, the optimism that offered up tantalizing visions of flying cars and obedient robots.

The idea that we will face a jobless future seems to have particularly struck home. Martin Ford’s 2015 book, Rise of the Robots: Technology and the Threat of a Jobless Future, which predicts half of US workers will be replaced by robots in the next 20 years, was widely and respectfully reviewed in liberal outlets. Coming after a spell of high unemployment attributable to the Great Recession and then to inadequate stimulus and misguided austerity policies (especially in Europe) — none of which have anything to do with robots — this seems like a very odd thing for those on the left to worry about. It is especially odd when the history of technological advance is full of transformations that put workers out of jobs in one sector only to have more jobs created in others as demand for new products and services grow.

Continuing technological advance is unlikely to produce a future of no jobs. It will lead instead to a future of different and more highly skilled jobs. This is clearly the trend in the US economy, where the increasing share of jobs in offices and high-skill services (now almost two-thirds of employment) has replaced the declining share of jobs in industrial manual labor. Rather than bemoaning a chimerical disappearance of work, the left should seek to increase access to high-skill sectors of the economy, particularly in areas where the decline in low-skill industrial labor has significantly eroded the job base.

Consider also that if robots were really displacing workers at a great rate, we should be seeing very rapid productivity increases (fewer workers, larger output). But we’re not. In fact, productivity increases have been remarkably slow in recent years — 1.3 percent per year, just over a third of the rate in the late 1990s, when we had very strong employment growth and rising wages and incomes across the board.

And remember that productivity increases — through technological advances or other means — are something the left should welcome and strive for. They are the source of rising living standards for the broad population. Rising living standards, in turn, create a favorable environment for left advancement.

Globalization is a force for good

Many on the American left seem to miss this, but the world is getting to be a much better place. Since 1950, the proportion of the world’s citizens living in extreme poverty has declined from 72 percent to under 10 percent, while world life expectancy has increased from 48 years to 71. These remarkably positive changes have actually accelerated in the past 25 years, as globalization has intensified.

Richer, healthier countries are great for the individual citizens of these countries, of course, but they are also great for the values and priorities of the left. Richer countries tend to provide more services to their citizens, educate a larger share of their population, and do a better job honoring human rights. They’re also more democratic.

Of course, it is true that globalization has had some negative effects — for example, on manufacturing jobs in developed countries — but these are exaggerated. The decline of industrial employment is a very long-run trend that predates the sharp rise in globalization toward the end of the last century. If you plot the share of manufacturing jobs in overall US employment since 1948, there has been a steady decline from a high of about 35 percent to less than 9 percent today. This decline can be traced to rapidly rising productivity in the manufacturing sector — the same output could be produced with fewer workers — combined with shifts in demand toward services, reflecting a rise in consumer affluence.

Affluence (even of the American middle-class variety, not the Jeff Bezos variety) leaves more room in family budgets for non-necessities: 46 percent of consumption spending was on the basic necessities of food and clothing in 1947 compared with less than 18 percent today.

That’s why the left will do a lot more good by advancing effective policies on growth, employment, and fiscal policy than by standing in the way of globalization. This is true even when it comes to jobs in the manufacturing sector. Germany, for example, has in recent year done far better than the US in managing its manufacturing job loss by retraining manufacturing workers from import-competing industries and moving them into export-oriented manufacturing jobs.

In short, globalization is not the villain many on the left make it out to be. A richer world is ultimately a better world, both for its citizens and for the goals of the left. The sensible response is not to denounce globalization but to make it work for as large a share of the population as possible.

The clean energy revolution is underway

Perhaps no other subject generates as much angst on the left as global warming. That is not unreasonable: Climate change could do a stunning amount of economic and social damage and poses a serious threat to the future of the planet. If only we could replace dirty fossil fuel energy with clean energy from wind, solar, and other sources.

But wait! That’s already happening. In fact, we’re making dramatic progress in expanding the use of clean energy and dropping its price — which is the key to further expansion and eventually replacing dirty energy entirely.

In the past few years, even as fossil fuel prices have declined, world investments in clean energy, chiefly wind and solar, have reached levels that are double those for fossil fuel. Renewables now provide half of all new electric capacity worldwide. (And two-thirds in China, which has drastically cut its plans for new coal plants.) It’s increasingly common, at least in some countries and some regions of the United States, for clean energy to be cost-competitive with fossil fuels.

The rapidity with which clean energy is becoming cheaper and more available is underappreciated. The cost of solar has fallen to 1/150th of its 1970s level, and the amount of installed solar capacity worldwide has increased a staggering 115,000 times. These exponential trends are hard to properly assess, even for those whose business it is to do so. For example, Ramez Naam, a US technologist and proponent of clean energy, posited in 2011 that solar power was following a kind of Moore’s Law for energy. (Moore’s Law projected that microchips would double in efficiency every two years.) Such efficiency gains would allow solar energy systems, which had by then fallen to about $3 a watt, to drop to only 50 cents a watt by 2030. However, Naam noted in the spring of 2015 that he had been way too conservative: Solar power systems by early 2015 had already hit the 50 cent mark.

Wind power, which tends to be complementary to solar power (the former best at night, the latter during the day), has been following a similar, if less steep trajectory. And, critically, energy storage, an essential complement to these more intermittent sources of energy, is also rapidly dropping in price and becoming more efficient. The price and efficiency improvement rates for battery storage have actually been faster than the corresponding (already high) rates for wind and solar over the same periods.

Much of this progress will continue even under the unhelpful administration of Donald Trump. China has bolted to the front of clean energy development and seems willing to play a leadership role in pushing the fight against climate change forward, regardless of Trump’s attitude toward the 2015 Paris climate agreement.

Trump may strive to eliminate Obama’s Clean Power Plan, an effort that may take years, but the genie is already out of the bottle. Dozens of states, including the largest ones, are on track to meet the Clean Power Plan’s 2030 targets for switching from coal to natural gas and renewables. They are unlikely to be deterred by Trump’s actions, since energy utilities are largely regulated at the state level.

And most of all, the development, deployment, and cheapening of clean energy will continue whether Trump likes it or not because of rapid technological advance, a continuing stream of new investment, and evolving consumer preferences. Then, when the left gets back in power, it can press the accelerator on this progress by investing in clean energy research and infrastructure, and it can reinstate the Clean Power Plan and other regulations.

The left’s coalition is growing while the right’s is declining

Demography may not be destiny but it’s still hugely important. No matter what happened in the 2016 election, the fact that the Democrats’ coalition relies on growing groups while the GOP’s relies on declining ones is still a considerable advantage for Democrats. That advantage will only grow in coming years.

Naturally, that advantage does not, by itself, determine election outcomes, as we have recently seen. It was always the case that if a declining group in the GOP coalition — think white non-college voters — intensified its pro-Republican preferences enough, that would mathematically be enough to negate the pro-Democratic effects of demographic change. That is what happened in the 2016 presidential race (with an assist from the Electoral College, which gives extra weight to states with high concentrations of white non-college voters).

But live by the white non-college swing, die by the white non-college swing. The utter dependence of the GOP on this voter demographic means that they need to not only maintain their extraordinary 2016 levels of support among these voters, they need to drive that support ever higher in future elections, to neutralize continued growth in the Democrats’ coalition. That’s a tough assignment.

Consider how strong Democratic growth will be. The share of white non-college voters is dropping 3 points every presidential cycle, replaced by ever more minorities and college-educated voters. The growth of minorities is particularly striking. Right now, there are only four majority-minority states: California, Hawaii, New Mexico, and Texas. But the next two majority-minority states, Maryland and Nevada, should arrive in the next three years. After that, there should be four more in the 2020s: Arizona, Florida, Georgia, and New Jersey. In the 2030s, these states should be joined by Alaska, Louisiana, and New York — and in the 2040s by Connecticut, Delaware, Illinois, Mississippi, Oklahoma, and Virginia.

Live by the white non-college swing voter, die by the white non-college swing voter

But perhaps nothing illustrates the ongoing shift in the political terrain better than the differences between younger and older generations. Right now, according to Pew data, the millennial generation identifies with Democrats by 54 percent to 33 percent over Republicans and Generation X by 48 percent to 37 percent. By comparison, baby boomers were 44 percent to 44 percent and the silent generation (those born from 1928 to 1945) preferred Republicans by 48 percent to 44 percent.

Together, millennials and Gen X-ers accounted for 57 percent of eligible voters in 2016, an advantage that was tamped down by the relatively higher turnout of older generations. But by 2024, millennials and Gen X-ers, plus the emerging post-millennial generation, will constitute fully 68 percent of eligible voters. What’s more, the millennials and Gen X-ers will have aged into much higher turnout years. Silents, the most conservative generation by far, will be down to a mere 7 percent of eligibles.

So the GOP is really walking a tightrope as they fend off these demographic changes while trying to extract ever more votes from white non-college voters, particularly older ones. The job of the left is to push them off that tightrope. It shouldn’t be that hard, especially if Democrats can make even a small dent in the white non-college vote. Which brings us to…

Trump can’t solve people’s problems. The left can.

The left should have the courage of their convictions on this one. Trump certainly exploited voter anger and, yes, racism to get elected. But he also promised to solve people’s problems — with their health care, with their jobs, with their living standards, with their communities, with their children’s prospects. He won’t succeed. That’s a huge opening for the left, including among white non-college voters.

Nowhere is that opening greater than on the issue of growth that leads to better jobs and higher living standards. The Democratic Party is more or less united around a programmatic approach to the economy that could actually produce such growth — an approach some of us call “equitable growth.” It pushes back on inequality, seeing current high levels as an active detriment to growth, and seeks to combine support and opportunity for the broad middle class with investments to make the economy more productive.

This includes universal pre-K, free access to two years and some four-year colleges, paid family leave, subsidized child care, higher minimum wages, a commitment to full employment, and robust investments in infrastructure and scientific research, especially around clean energy.

The GOP, in contrast, now harbors a cacophony of different economic approaches, from pure libertarianism to Trump’s incoherent economic nationalism. Astonishingly, the one point of agreement of these approaches appears to be that inequality should be pushed even higher by increasing the flow of benefits to the rich. The idea that ratcheting up inequality will somehow lead to strong growth, better jobs, and higher living standards is substantively ludicrous — and not at all what Trump’s working-class supporters had in mind. When it doesn’t work, they will be upset.

How strong growth can be with a better approach is a matter of debate. Certainly, the 4 percent annual rate bandied about the Trump administration is fanciful. But, as Jason Furman, chair of Obama’s Council of Economic Advisors, recently pointed out in Vox, we should “do everything that [we] can for growth, because over time a few tenths of a percent really do matter” And of course, the point is not just to grow faster but to better distribute that growth. The left’s approach will do both.

The left should have confidence this approach is both feasible and important. In the end, solid growth with better distribution will both improve people’s lives and make it vastly easier for the left to attain its priorities. Conversely, Trump will be punished when he fails to deliver economic improvements for his voters. He is an unusual politician, but he has not repealed the basic laws of politics.

Finally, optimism is a better selling point than pessimism

It’s time for the left to realize that pessimism is an absolutely terrible selling point — and to downplay that aspect of left self-presentation. If things were terrible yesterday, are worse today, and are likely to get even worse tomorrow, this does not motivate the typical person to engage in heroic struggle to change the world. It is more likely to make them cautious, guarded, and determined to hold onto what little they have. To the extent the left wallows in a slough of despond about the state of the world, it only manages to undercut its ability to mobilize ordinary people.

Optimism, by contrast, mobilizes people. It allows people to raise their heads from the daily struggle for existence, envision something better, and believe it’s actually possible to get there. That makes the project of joining together with others to make positive change seem worth the effort it typically entails.

Many on the left insist that it is their job to highlight negative trends with as much theatricality as possible, since that is where the motivation for change will come from. But this confuses the motivations of left activists with the motivations of average citizens. It is absolutely true that most left activists are fundamentally motivated by what they see as wrong and unjust in contemporary social arrangements.

But this just isn’t the way most people work. The typical American generally adopts a bifurcated view of their situation that does not comport well with the relentless pessimism of many leftists. On the one hand, most Americans do tend to believe that many things have changed for the worse — that the economy has been doing poorly, that long-term trends have hurt security for average families, that leaders just don't get it. On the other hand, these very same Americans believe that they are holding up their end of the economic bargain, that they are working hard and doing right by their families, that their story is one of achievement against the odds, not pessimism and despair. Left pessimism appeals to one side of Americans’ outlook, completely missing the other.

The left should reject this approach. Leftists and liberals should promote instead a sense that positive change has been, is, and will continue to be possible. That will make it far easier to mobilize their fellow citizens.

Besides, look at it this way: It is basically impossible to out-pessimism Donald “American Carnage” Trump. It’s time to try something new.

Ruy Teixeira’s new book is The Optimistic Leftist: Why the 21st Century Will Be Better Than You Think. He is a senior fellow at the Center for American Progress.

The Big Idea is Vox’s home for smart discussion of the most important issues and ideas in politics, science, and culture — typically by outside contributors. If you have an idea for a piece, pitch us at thebigidea@vox.com.