Like many of the last century’s most compelling dramas, the Internet emerged out of anxieties about the bomb. An occasionally disputed history contends that plans for peer-to-peer computing began in 1957, following the launch of Sputnik; nervous about the Soviet Union’s technological—and especially nuclear—capabilities, President Dwight Eisenhower and his advisers created the Advanced Research Projects Agency, or ARPA (now DARPA), to oversee US defense technologies. In conjunction with university researchers and corporate R&D labs, ARPA was tasked with creating a computer network decentralized enough to withstand nuclear attack. In 1969, ARPA researchers transmitted their first successful message between two computers using an infrastructure called ARPANET; this network would become the Internet.

Mark Doten’s new novel, Trump Sky Alpha, is hyper-attuned to this history, but performs a clever reversal of its inaugurating anxieties. In the novel, it’s the collapse of the Internet that triggers nuclear destruction, rather than the other way around. Largely set in a post-apocalyptic near future, the novel’s precipitating event is a mysterious four-day global shutdown of the Web. In its sudden absence, a series of mostly unnamed violent conflicts erupt around the world; by the time the Internet flickers back on, a reactive President Trump is poised to enter the nuclear launch codes.

The president narrates this decision in a blustering address that bookends the novel, delivered to the United States from the eponymous Trump Sky Alpha, an enormous zeppelin that he pilots weekly between Trump Tower, the White House, and Mar-a-Lago. Unfolding in a rambling, Trumpian, free indirect discourse, these sections set up the crisis that grounds the rest of the novel and at the same time establish Doten as a virtuosic satirist.

Doten, an editor at Soho Press and the author of a previous novel, The Infernal, has published ventriloquizations of Trump and his associates before, and he’s mastered the craft. This is a Trump whose despotic mannerisms are just slightly bloated from reality, but the prose maximizes and luxuriates in his repulsiveness. Doten assembles a perverse thing of beauty from the cruel theater of the presidency, finding in Trump’s callous illogic and inflammatory syntax a surprising instrument for stylish and extremely funny sci-fi. In one scene, a group of Secret Service agents, trying from the White House roof to subdue the increasingly manic president, “plummet to their deaths like losers”; the bombs, when they fall, will be “phenomenal,” “terrific,” “the most beautiful thing I think I’ve ever built, bones flecked in gold and wrapped up in all kinds of slashing golden light.” When the catastrophe finally comes—“the big event, the one we’d been waiting for for the better part of a century”—it feels like a natural end point to the Internet’s 60-year history: the whole platform brought down by its most emblematically stupid and vicious user.

In some ways, this premise supposes an old-school vision of apocalypse—one in which doomsday occurs with satisfying neatness and speed, and for which individual blame can be assigned to a clear, antagonistic authority, as opposed to the messier and more diffuse global disasters that climate change will continue to accelerate. (“It was very fashionable for a lot of years how climate change was going to be our end and apocalypse, but all down the line, he’d kept saying: nukes,” one of Doten’s survivors recalls. “And nukes it was! Nukes to beat the band.”)

But Trump Sky Alpha is a systems novel in the truest sense, and Trump only its decoy head of state. The bulk of the story is set almost a year after the initial calamity; some 10 percent of the earth’s pre-apocalypse population survives, although no one knows the number for sure because the Internet is now permanently gone. Most survivors live, radiation-poisoned, in dour state-run facilities where they’re put to work cataloging photographs of the dead or scanning aerial footage collected by drone flying over the ruined landscape; some, we’re led to understand, live in informal encampments outside the purview of the state. But Doten isn’t hung up on establishing a post-catastrophic mise-en-scène. Instead, the majority of the text concerns the world that’s been lost—specifically the Internet and the civilization it shaped.

The novel’s protagonist is a former tech journalist named Rachel, who, grieving the deaths of her wife and daughter, ambivalently accepts a writing assignment from the soon-to-be-relaunched New York Times Magazine. (After the apocalypse, I was pleased to learn, journalism will limp along. Also, everyone is queer!) Her mission is to document “internet humor at the end of the world”—that is, the jokes and memes that users posted on social media as they realized that humanity, and with it the Internet, faced imminent collapse. In the process of this reportage, Rachel uncovers clues about the actors behind the Internet’s initial shutdown, eventually stumbling upon a hacktivist organization whose ideology unfolds obliquely across a patchwork of social-media detritus and online conspiracy theories, flashbacks, a dizzying 70-page polemic about the history of the Internet replete with citations of cybernetic theory, and a novel-within-the-novel about the Internet as a colonial power.

In Trump Sky Alpha’s middle sections, which follow Rachel through this formally kinetic detective hunt, Doten largely deviates from political satire, instead yoking together the paranoid, hard-boiled style of cyberpunk with the irreverent idiom of contemporary social media. This pairing functions in service of a text that’s as much a narrative as it is a work of speculative media theory, one invested in a rigorous critique of both the Internet’s contents—the text and images it circulates, the online communities it enables—and its physical form. In particular, the novel uncovers how the Internet has enabled US colonial power to reproduce itself, from the inequalities fostered by the Internet’s country code top-level domain system to its reliance on a network of fiber-optic cables that, as one character explains, “runs through countries.”

Doten is especially attentive to the physical impact of communications technologies on the Philippines, in which some of the novel-within-the-novel is set. One major character, a Filipino immigrant named Sebastian, points out that Manila was the site of both the final cable laid during the first global telegram, in 1903, and of the world’s first massive computer virus, nearly a century later; “for all of that time,” Sebastian says, “forces of global connection and disruption have been originating…through the islands, and that is why I say that the world as we know it today runs through or is disrupted in or by the Philippines.” And much of Rachel’s reportage, too, involves tracing the Internet’s development from a military-academic platform laden with cyber-utopian possibilities to its contemporary incarnation as an environmentally extractive, duopoly-controlled, possibly democracy-eroding infrastructure that in the final analysis is, as Sebastian explains, “a vast work of engineering, it’s objects in space, and people in different parts of the globe have vastly different experiences of the internet and vastly different amounts of political power when it comes to how the internet works.”

If this sounds a little didactic, that’s because the novel occasionally, self-consciously is. The Internet’s embodied architecture is well-trodden stuff within media studies, a subject that, as Doten writes, “could and [has] filled several books.” (Trump Sky Alpha tips its hat to a number of them; Rachel’s editor at the Times is named Galloway—a clear citation of the media theorist Alexander Galloway, whose influential 2004 monograph about the technical protocols that govern the Internet’s material operations looms large throughout the novel.) But it’s also a tough subject from which to mine narrative momentum, and in the rare moments when the novel drags, it’s here. Rachel’s tour through the ruins of cyberspace brings her into contact with a brain-damaged hacker named Birdcrash, who appears to have initiated the Internet’s shutoff out of a frustration with the Web’s totalizing power. In one extended scene, Birdcrash subjects Rachel to torture while delivering a freewheeling verbal manifesto about networked control. This is difficult to read, as much for the violence as for the cryptic and elliptical digressions about packet-switching, TCP/IP protocols, and a speculative post-human Internet distributed by birds.

It’s ultimately Birdcrash, not Trump, who is the real architect of Trump Sky Alpha’s plot, but because his polemic is missing the treacherous characterization that makes the fictional Trump so distinctive, some of these passages scan as less artful than overstuffed and a little belabored. It’s telling that, since the heyday of cyberpunk, few recent “Internet novels” have attempted to apprehend the political history of the Internet as the world’s foremost military and then commercial system; reading Trump Sky Alpha, it occurred to me that the Internet’s structuring logic might be too unwieldy to fully transpose onto the shape of literary fiction—even explosively, ambitiously weird literary fiction—altogether.

Fortunately, the Internet’s constitutive matter—its memes and social-media vernaculars—more readily avails itself to Doten as grounds for narrative movement. To report on her article, Rachel travels to the room where, as Doten writes, “the internet sits on ice.” At the center of a maze-like facility that bears a resemblance to the real-life Internet Archive, the California-based organization that houses a record of much of the Web and runs the Wayback Machine, the government keeps an archive of the pre-apocalypse Internet, right up until the moment of its obliteration. Rachel has been promised by her Times editor that, when she finishes reporting the story, she can visit the mass grave where her family has been buried. So, buoyed by grief, she wades into the online wreck. The breathless taxonomy of memes, tweets, GIFs, and Photoshopped images that she assembles reads like an apocalyptic spin on Angela Nagle’s much-maligned Kill All Normies—but where Nagle sifted through years of Reddit and 4chan posts to dubiously chart the formation of the alt-right, Doten’s imagined archive, by contrast, harnesses the despondent irreverence that’s emerged as the Internet’s house style to articulate a kind of Twitter eschatology.

Scrolling through the archived timeline of the Internet’s final hours, Rachel watches as users process their anxieties about the impending catastrophe via the sheriff meme and the distracted boyfriend; Pepe the Frog and large adult sons; callbacks to Gamergate, Pizzagate, red-pilling, and galaxy brains; puns about nuclear meltdown and “hot takes” and wearily cynical quips (“*universe to humans*: retire bitch”). Jonathan Chait’s final tweet is classic race-baiting sleaze; users blame the coming crisis on SJWs and ISIS. You wonder why all these people would forgo precious time with loved ones in order to circulate dumb memes.

In short, the Internet confronting imminent global annihilation looks, in Doten’s telling, a lot like the Internet the rest of the time, and perhaps the defining characteristic of this speculative timeline—besides its likely illegibility to all but the very online—is its uncanny realism. Doten’s real forte is voice, and the archive he constructs masterfully captures the weird, flippant cadence of Twitter humor. “Glad to see this continues to be a normal and very good website,” reads one imagined tweet. Or: “Tweet pegged to a screencap of sixty-nine dead in Peoria shopping mall bombing: *me as nukes melt my face*: ‘nii..ce.’”

This is bracingly good satire, so attentive to the subtleties of its object of caricature that it feels almost documentary. Surveying the archive, Rachel notes an ethical and aesthetic aporia that reads as bleakly diagnostic of the present-day Internet, “the fundamental inability to determine: stupid or evil. The sense that it was this, it was the structure of the internet, that had amplified the stupid and the evil, and at the same time flattened them, made them impossible to distinguish.” Rachel is clearly not wrong—but, as in his Trump soliloquies, Doten inhabits the stupid and the evil and then turns them inside out to produce something strangely moving. The memes and jokes that separately seem glib begin, taken together, to index an online public processing its grief and damage in the only terms available. As nuclear destruction descends, users scramble for the final dopamine rush of “last likes.” Facebook’s “mark yourself safe” feature becomes a sad joke. “There are tweets asking for, demanding interactions. I just need to know yr out here. Fave if your safe,” Rachel observes. “There are tweets for the missing, photos, names and ages, locations, the missing flood the timeline, then there are too many, people stop sharing the missing.”

“What did the internet feel like?” Rachel wonders near the novel’s start. “How to describe its loss?” It’s in answering these questions that Trump Sky Alpha is at its glum and caustic best: documenting not just the Internet’s materiality but also its feeling, the affects and attachments (stupid, evil, witty, presidential, tragic) that social media uniquely register. Only at the collapse of two timelines—one virtual, one world-historical—does the magnitude of that feeling become legible.