/*
Theme Name: AlaskAcross
Theme URI: https://alaskacross.com
Author: Mike Fisher
Author URI: https://alaskacross.com
Description: A custom WordPress theme for AlaskAcross.com. Expedition Archive aesthetic — archival typography, topo-line textures, and a restrained wilderness palette designed to let the event map and data take center stage.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alaskacross
Tags: custom, expedition, wilderness, minimal, responsive, map
*/

/* =========================================
   CSS CUSTOM PROPERTIES
   ========================================= */
:root {
  /* Palette — muted expedition tones */
  --color-ink:          #1E2420;   /* near-black, forest ink */
  --color-slate:        #3A4A3E;   /* dark spruce green-gray */
  --color-spruce:       #4A6741;   /* muted forest green */
  --color-spruce-light: #5E8254;   /* lighter spruce for hover */
  --color-parchment:    #F2EFE6;   /* aged paper background */
  --color-parchment-dk: #E8E4D8;   /* slightly darker parchment for contrast */
  --color-rust:         #8B4A2B;   /* faded rust/ochre accent */
  --color-rust-light:   #A85E3A;   /* lighter rust for hover */
  --color-mist:         #7A8A7E;   /* muted sage gray for meta text */
  --color-contour:      #C8C2B0;   /* topo line color */
  --color-border:       #D4CFBF;   /* subtle separator */
  --color-white:        #FFFFFF;

  /* Typography */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body:    'Source Sans 3', 'Helvetica Neue', system-ui, sans-serif;
  --font-mono:    'Courier New', 'Courier', monospace;

  /* Type scale */
  --size-xs:   0.75rem;    /* 12px */
  --size-sm:   0.8125rem;  /* 13px */
  --size-base: 1rem;       /* 16px */
  --size-md:   1.0625rem;  /* 17px */
  --size-lg:   1.1875rem;  /* 19px */
  --size-xl:   1.4375rem;  /* 23px */
  --size-2xl:  1.8125rem;  /* 29px */
  --size-3xl:  2.375rem;   /* 38px */
  --size-4xl:  3.125rem;   /* 50px */

  /* Layout */
  --max-width:     1040px;
  --header-height: 68px;
  --radius:        2px;    /* deliberately small — archival feel */
  --transition:    180ms ease;
  
  /* Field grid - added as replacement of "topo" wavy lines */
  --field-grid:
    linear-gradient(
        rgba(0,0,0,0.035) 1px,
        transparent 1px
    ),
    linear-gradient(
        90deg,
        rgba(0,0,0,0.035) 1px,
        transparent 1px
    );

  /* Topo line SVG — inline, no external image */
  /*
  --topo-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='300'%3E%3Cpath d='M-20,60 Q40,30 100,55 Q160,80 220,50 Q280,20 340,48 Q400,75 460,55' fill='none' stroke='%23C8C2B0' stroke-width='0.8' opacity='0.5'/%3E%3Cpath d='M-20,90 Q50,65 110,88 Q170,112 230,82 Q290,52 350,78 Q410,104 470,85' fill='none' stroke='%23C8C2B0' stroke-width='0.8' opacity='0.5'/%3E%3Cpath d='M-20,120 Q60,100 120,118 Q180,138 240,112 Q300,86 360,108 Q420,130 480,115' fill='none' stroke='%23C8C2B0' stroke-width='0.8' opacity='0.45'/%3E%3Cpath d='M-20,150 Q70,135 130,148 Q190,162 250,142 Q310,122 370,138 Q430,155 490,145' fill='none' stroke='%23C8C2B0' stroke-width='0.8' opacity='0.45'/%3E%3Cpath d='M-20,178 Q80,168 140,178 Q200,188 260,172 Q320,156 380,168 Q440,180 500,175' fill='none' stroke='%23C8C2B0' stroke-width='0.7' opacity='0.4'/%3E%3Cpath d='M-20,205 Q90,198 150,205 Q210,212 270,200 Q330,188 390,198 Q450,208 510,204' fill='none' stroke='%23C8C2B0' stroke-width='0.7' opacity='0.4'/%3E%3Cpath d='M-20,230 Q100,225 160,230 Q220,235 280,226 Q340,217 400,226 Q460,235 520,232' fill='none' stroke='%23C8C2B0' stroke-width='0.6' opacity='0.35'/%3E%3Cpath d='M-20,252 Q110,249 170,253 Q230,257 290,250 Q350,243 410,250 Q470,258 530,256' fill='none' stroke='%23C8C2B0' stroke-width='0.6' opacity='0.35'/%3E%3Cpath d='M-20,272 Q120,270 180,273 Q240,276 300,271 Q360,266 420,272 Q480,278 540,276' fill='none' stroke='%23C8C2B0' stroke-width='0.5' opacity='0.3'/%3E%3C/svg%3E");
  */
}

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: var(--size-md);
  line-height: 1.72;
  color: var(--color-ink);
  background-color: var(--color-parchment);
  /* Topo contour lines across full page background */
  /* background-image: var(--topo-svg);
  background-repeat: repeat;
  background-size: 400px 300px; */
   background-image:
        linear-gradient(
            90deg,
            transparent 79px,
            rgba(130,60,60,0.10) 79px,
            rgba(130,60,60,0.10) 81px,
            transparent 81px
        ),
        var(--field-grid);

    background-size:
        100% 100%,
        32px 32px;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-spruce);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-spruce-light);
}

a:focus-visible {
  outline: 2px solid var(--color-rust);
  outline-offset: 3px;
  border-radius: 2px;
}

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-slate);
  margin-bottom: 0.65em;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--size-3xl); }
h2 { font-size: var(--size-2xl); }
h3 { font-size: var(--size-xl);  }
h4 { font-size: var(--size-lg);  }
h5 { font-size: var(--size-base); font-weight: 700; }
h6 { font-size: var(--size-sm);  font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

p {
  margin-bottom: 1.3em;
}

p:last-child {
  margin-bottom: 0;
}

ul, ol {
  padding-left: 1.5em;
  margin-bottom: 1.3em;
}

li {
  margin-bottom: 0.35em;
}

blockquote {
  border-left: 2px solid var(--color-rust);
  padding: 0.75em 1.5em;
  margin: 2em 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--size-lg);
  color: var(--color-slate);
}

blockquote cite {
  display: block;
  margin-top: 0.5em;
  font-size: var(--size-sm);
  font-style: normal;
  font-family: var(--font-body);
  color: var(--color-mist);
  letter-spacing: 0.04em;
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5em 0;
}

strong { font-weight: 600; }
em     { font-style: italic; }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

code {
  background: var(--color-parchment-dk);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.1em 0.4em;
}

pre {
  background: var(--color-parchment-dk);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25em 1.5em;
  overflow-x: auto;
  margin-bottom: 1.3em;
}

pre code {
  background: none;
  border: none;
  padding: 0;
}

/* =========================================
   LAYOUT
   ========================================= */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.75rem;
}

.container--wide {
  max-width: 1200px;
}

/* =========================================
   HEADER
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-height);
  background-color: var(--color-slate);
  /* Parchment topo lines bleed subtly into the header */
  /* background-image: var(--topo-svg);
  background-size: 400px 300px;
  background-repeat: repeat; */
  /* Rust accent bottom rule — the signature element */
  border-bottom: 2px solid var(--color-rust);
}

.site-header .container {
  max-width: 1200px;
  min-height: var(--header-height);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* =========================================
   SITE BRANDING
   ========================================= */
.site-branding {
  display: flex;
  align-items: baseline;
  gap: 0;
  flex-shrink: 1;
  min-width: 0;
  line-height: 1;
}

.site-title {
  font-family: var(--font-display);
  font-size: var(--size-xl);
  font-weight: 700;
  color: var(--color-parchment);
  letter-spacing: -0.01em;
  line-height: 1;
  /* Subtle rust underline on hover */
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}

a.site-title:hover {
  color: var(--color-parchment);
  border-bottom-color: var(--color-rust);
}

span.site-title {
  /* On front page — not a link */
  color: var(--color-parchment);
}

/* Small coordinate-style tagline beneath site name */
.site-tagline {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  color: rgba(242, 239, 230, 0.45);
  letter-spacing: 0.08em;
  line-height: 1.3;
  margin-top: 0.3rem;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: break-word;
}

.site-description {
  display: none;
}

.site-name-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* =========================================
   PRIMARY NAVIGATION
   ========================================= */
.nav-primary {
  display: flex;
  align-items: center;
}

.nav-primary ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-primary li {
  position: relative;
  margin: 0;
}

.nav-primary a {
  display: block;
  padding: 0.45rem 1rem;
  font-family: var(--font-body);
  font-size: var(--size-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 239, 230, 0.75);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.nav-primary a:hover {
  color: var(--color-parchment);
  border-bottom-color: var(--color-rust);
}

.nav-primary .current-menu-item > a,
.nav-primary .current-page-ancestor > a {
  color: var(--color-parchment);
  border-bottom-color: var(--color-rust);
}

/* Dropdown sub-menus */
.nav-primary .sub-menu {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 180px;
  background: var(--color-slate);
  border: 1px solid rgba(255,255,255,0.08);
  border-top: 2px solid var(--color-rust);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 200;
}

.nav-primary li:hover > .sub-menu,
.nav-primary li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-primary .sub-menu a {
  color: rgba(242, 239, 230, 0.75);
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: var(--size-xs);
  letter-spacing: 0.08em;
}

.nav-primary .sub-menu a:hover {
  color: var(--color-parchment);
  background: rgba(255,255,255,0.06);
  border-bottom-color: transparent;
}

.nav-primary .sub-menu li:last-child a {
  border-bottom: none;
}

/* Dropdown caret */
.nav-primary .menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  margin-left: 5px;
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 3px solid currentColor;
  vertical-align: middle;
  opacity: 0.6;
}

/* =========================================
   HAMBURGER / MOBILE NAV TOGGLE
   ========================================= */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-parchment);
  border-radius: var(--radius);
  transition: background var(--transition);
  flex-shrink: 0;
  margin-left: auto;
}

.nav-toggle:hover {
  background: rgba(255,255,255,0.08);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  margin: 6px 0;
  transition: transform var(--transition), opacity var(--transition);
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(13.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-13.5px) rotate(-45deg);
}

/* =========================================
   SITE BANNER (optional custom header image)
   ========================================= */
.site-banner {
  width: 100%;
  overflow: hidden;
  max-height: 320px;
  position: relative;
}

.site-banner img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: center;
}

/* =========================================
   MAIN CONTENT AREA
   ========================================= */
.site-content {
  flex: 1;
}

.site-main {
  padding: 3.5rem 0 4.5rem;
}

/* =========================================
   ENTRY HEADERS — posts show title, pages do not
   ========================================= */

/* Default: hide entry headers */
.entry-header {
  display: none;
}

/* Show on single posts */
.single-post .entry-header,
.blog .entry-header {
  display: block;
}

/* Single post header styling */
.single-article .entry-header {
  display: block;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.single-article .entry-title {
  font-size: var(--size-3xl);
  color: var(--color-slate);
  margin-bottom: 0.5em;
}

/* Post list card headers (on the Posts page / index) */
.post-card .entry-header {
  display: block;
  margin-bottom: 0.75rem;
}

.post-card .entry-title {
  font-size: var(--size-xl);
  margin-bottom: 0.2em;
}

.post-card .entry-title a {
  color: var(--color-slate);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.post-card .entry-title a:hover {
  color: var(--color-spruce);
  border-bottom-color: var(--color-rust);
}

/* Pages: never show the page title */
.page-article .entry-header {
  display: none;
}

/* Page-header block (archive/search headings) */
.page-header {
  margin-bottom: 3rem;
}

.page-header .page-title {
  font-size: var(--size-2xl);
  color: var(--color-slate);
}

/* =========================================
   ENTRY META
   ========================================= */
.entry-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.entry-date {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.07em;
  color: var(--color-mist);
  text-transform: uppercase;
}

.entry-tags {
  font-size: var(--size-xs);
  color: var(--color-mist);
  letter-spacing: 0.04em;
}

.entry-tags a {
  color: var(--color-rust);
}

.entry-tags a:hover {
  color: var(--color-rust-light);
}

/* =========================================
   ENTRY CONTENT
   ========================================= */
.entry-content {
  max-width: 100%;
}

.entry-content > * + * {
  margin-top: 1.3em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 2.25em;
}

/* Inline rule under content headings — field-notebook style */
.entry-content h2 {
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--color-border);
}

/* Alignments */
.alignleft  { float: left;  margin: 0.5em 1.5em 1em 0; }
.alignright { float: right; margin: 0.5em 0 1em 1.5em; }
.aligncenter { margin: 1.5em auto; }

.alignwide {
  margin-left: -2rem;
  margin-right: -2rem;
}

.alignfull {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
}

/* =========================================
   POST CARDS (Posts index)
   ========================================= */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-card {
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--color-border);
  position: relative;
}

.post-card:first-child {
  border-top: 1px solid var(--color-border);
}

.post-card .entry-summary {
  color: var(--color-ink);
  margin-top: 0.75rem;
  font-size: var(--size-base);
  line-height: 1.7;
}

.post-card .entry-footer {
  margin-top: 1.25rem;
}

/* Thumbnail (if present) */
.post-card .entry-thumbnail {
  margin-bottom: 1rem;
}

.post-card .entry-thumbnail img {
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

/* =========================================
   SINGLE POST NAVIGATION
   ========================================= */
.entry-footer .post-navigation {
  margin-top: 0;
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  margin-top: 3rem;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
  flex: 1;
}

.post-navigation .nav-next {
  text-align: right;
}

.post-navigation a {
  font-family: var(--font-body);
  font-size: var(--size-sm);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-mist);
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.post-navigation a:hover {
  color: var(--color-spruce);
  border-bottom-color: var(--color-rust);
}

/* =========================================
   PAGINATION
   ========================================= */
.navigation.pagination {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.navigation.pagination .nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.navigation.pagination .page-numbers {
  display: inline-block;
  padding: 0.4em 0.75em;
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.06em;
  color: var(--color-mist);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-transform: uppercase;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.navigation.pagination .page-numbers:hover,
.navigation.pagination .page-numbers.current {
  background: var(--color-slate);
  color: var(--color-parchment);
  border-color: var(--color-slate);
}

/* =========================================
   FRONT PAGE
   ========================================= */
.front-page-article .entry-header {
  display: none;
}

.front-page-article .entry-content {
  width: 100%;
}

/* =========================================
   ABOUT PAGE & STATIC PAGES
   ========================================= */
.page-article .entry-content {
  max-width: 740px;
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background-color: var(--color-slate);
  background-image: var(--topo-svg);
  background-size: 400px 300px;
  background-repeat: repeat;
  color: rgba(242, 239, 230, 0.5);
  padding: 2rem 0;
  font-size: var(--size-xs);
  letter-spacing: 0.04em;
  border-top: 2px solid var(--color-rust);
}

.site-footer .container {
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Monospaced coordinate-style footer text */
.footer-credits {
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.footer-credits a {
  color: rgba(242, 239, 230, 0.6);
}

.footer-credits a:hover {
  color: var(--color-parchment);
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-nav a {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(242, 239, 230, 0.5);
}

.footer-nav a:hover {
  color: var(--color-parchment);
}

/* =========================================
   BUTTONS
   ========================================= */
.btn,
button[type="submit"],
input[type="submit"] {
  display: inline-block;
  padding: 0.55em 1.25em;
  font-family: var(--font-body);
  font-size: var(--size-sm);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: var(--color-spruce);
  color: var(--color-parchment);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
}

.btn:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  background: var(--color-spruce-light);
  color: var(--color-parchment);
}

.btn--outline {
  background: transparent;
  color: var(--color-spruce);
  border: 1px solid var(--color-spruce);
}

.btn--outline:hover {
  background: var(--color-spruce);
  color: var(--color-parchment);
}

/* Read more link — text style, not button */
.read-more {
  font-family: var(--font-body);
  font-size: var(--size-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-rust);
  background: none;
  border: none;
  padding: 0;
  border-bottom: 1px solid var(--color-rust);
  border-radius: 0;
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition);
}

.read-more:hover {
  color: var(--color-rust-light);
  background: none;
  border-bottom-color: var(--color-rust-light);
}

/* =========================================
   FORMS
   ========================================= */
input[type="text"],
input[type="email"],
input[type="search"],
textarea {
  width: 100%;
  padding: 0.6em 0.875em;
  font-family: var(--font-body);
  font-size: var(--size-base);
  color: var(--color-ink);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-spruce);
  box-shadow: 0 0 0 3px rgba(74, 103, 65, 0.15);
}

/* =========================================
   SEARCH
   ========================================= */
.search-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.search-form input[type="search"] {
  flex: 1;
}

/* =========================================
   404
   ========================================= */
.error-404 .page-content {
  text-align: center;
  padding: 5rem 0;
}

.error-404 .error-code {
  font-family: var(--font-display);
  font-size: 6rem;
  font-weight: 700;
  color: var(--color-contour);
  line-height: 1;
  margin-bottom: 0.25em;
  letter-spacing: -0.04em;
}

.error-404 h1 {
  font-size: var(--size-2xl);
  margin-bottom: 0.75em;
}

/* =========================================
   SKIP LINK (ACCESSIBILITY)
   ========================================= */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-rust);
  color: var(--color-parchment);
  padding: 0.5em 1em;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
  font-size: var(--size-sm);
  z-index: 9999;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 0;
}

/* =========================================
   SCREEN READER TEXT
   ========================================= */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal;
}

/* =========================================
   RESPONSIVE — TABLET
   ========================================= */
@media (max-width: 900px) {
  :root {
    --header-height: 62px;
  }

  h1 { font-size: var(--size-2xl); }
  h2 { font-size: var(--size-xl); }
  h3 { font-size: var(--size-lg); }

  .single-article .entry-title {
    font-size: var(--size-2xl);
  }

  .site-main {
    padding: 2.5rem 0 3.5rem;
  }
}

/* =========================================
   RESPONSIVE — MOBILE
   ========================================= */
@media (max-width: 640px) {

  :root {
    --header-height: 58px;
  }

  h1 { font-size: var(--size-xl); }

  .container {
    padding: 0 1.125rem;
  }

  /* Show hamburger, hide nav */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .nav-primary {
    display: none;
    position: fixed;
    top: var(--header-height-actual, var(--header-height));
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-slate);
    background-image: var(--topo-svg);
    background-size: 400px 300px;
    padding: 1.5rem 1.125rem;
    overflow-y: auto;
    z-index: 99;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-primary.is-open {
    display: flex;
  }

  .nav-primary ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }

  .nav-primary li {
    width: 100%;
  }

  .nav-primary a {
    font-size: var(--size-lg);
    padding: 1rem 0.25rem;
    color: rgba(242, 239, 230, 0.82);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    letter-spacing: 0.06em;
    width: 100%;
  }

  .nav-primary a:hover {
    color: var(--color-parchment);
    background: none;
    border-bottom-color: var(--color-rust);
  }

  .nav-primary .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-top: none;
    background: rgba(255,255,255,0.04);
    padding-left: 1rem;
    display: none;
  }

  .nav-primary .menu-item-has-children.is-open > .sub-menu {
    display: block;
  }

  .nav-primary .sub-menu a {
    color: rgba(242, 239, 230, 0.65);
    font-size: var(--size-base);
    padding: 0.7rem 0.25rem;
    letter-spacing: 0.06em;
  }

  .nav-primary .menu-item-has-children > a::after {
    float: right;
    margin-top: 0.6rem;
  }

  .site-main {
    padding: 1.75rem 0 2.75rem;
  }

  .post-card {
    padding: 1.75rem 0;
  }

  .post-navigation {
    flex-direction: column;
    gap: 1rem;
  }

  .post-navigation .nav-next {
    text-align: left;
  }

  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* =========================================
   REDUCED MOTION
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* =========================================
   PRINT
   ========================================= */
@media print {
  .site-header,
  .site-footer,
  .nav-toggle {
    display: none;
  }

  body {
    background: white;
    color: black;
    background-image: none;
  }

  a {
    color: black;
    text-decoration: underline;
  }
}
