When your good study habits go down the drain and your textbooks start to look as though they're written in runes, don't panic. Instead, take some yoga breaths and begin mentally preparing yourself for a late-night study sesh. And then promptly get thee to a coffee shop that has free Wi-Fi.

University District

While the University District is worse off without Trabant (RIP) and its dirty, spicy chai lattes, it still has plenty of tasty and, more importantly, caffeinated offerings for the night owls and insomniacs among us. Wander just off of University of Washington's main campus to Sureshot Espresso (4505 University Way NE), a haven for metalheads and crust-punks where you can order an extra-caffeinated white coffee. If the Finnish black metal is too much for you, make the trek to Cafe Racer (5828 Roosevelt Way NE) on the border of Ravenna and the U-District. The quirky cafe-bar hybrid is a great place to refuel with freshly made greasy-spoon foods. (Shout-out to kitchen master Len!) Order their absurdly delicious tuna melt and a coffee, which can be ordered spiked if you're having One of Those Nights™. The night winds down at 2 a.m.

Capitol Hill

Seattle Central and Seattle University students have a surprisingly short list of late-night coffee offerings. But it’s all about quality, not quantity, right? Swing by Espresso Vivace (532 Broadway E) for the best coffee in town that’ll warm you to your bones. As it approaches closing time at 11 p.m., Vivace might not have much by way of food, but they have baristas who will leave you in peace and free Wifi. What else do you need? If you want your coffee served by Miss Americano, Cookie Couture, or Khloe5X, members of drag queen troupe Halfway Haus, look no further than Caffe Vita (1005 E Pike St.). When you need a distraction from your homework, take your drink and peruse the strange art on their walls until 11 p.m. Kaladi Brothers (517 E Pike St.) is another great option if you’re stomping up Pike Street. This queer-friendly space is open until 10 p.m. most nights, making it the perfect place to go after a late-night lecture. And, if you're truly desperate or living off the Starbucks gift cards your relatives gave you for the holidays (I've been there), there are a handful of Starbucks stores (1124 Pike St., 1600 E Olive Way) opened until 11 p.m. on the Hill.

North Seattle

There aren't a lot of options for evening coffee fixes on the North End, but North Seattle College students can take a breather at Chocolati (8319 Greenwood Ave N) after a late-night lab. Indulge yourself with a fancy hot chocolate (or a mocha for the coffee fiends). Until 9 p.m., you can tuck into a booth, pop in your headphones, crack open your psychology textbook, and drown the day's stresses with a lavender-infused cocoa. Jewel Box Cafe (321 NE Thornton Pl), just across the street from Northgate Mall, is a swank-ish place to spread out your research materials or curl up in a burgundy velvet chair with Dante's Inferno (in front of a fireplace, no less). Stressed students can hang out and eat their weight in panini and Nutella crepes until 11 p.m. Bonus: They serve bubble tea.

South Seattle

South Seattle College students should flock to C&P Coffee Company (5612 California Ave SW). But don't get too lost in thought staring out of the sitting room's big windows: This West Seattle spot stays open only until 8 p.m. during the school week.