/*
 * Ebube Glory Ogbonda: the paper-sketch design of LexViz Explorer.
 * Sheets of paper on a dotted desk, tape on the corners, a red margin line, ink stamps, index-card buttons, pinned photos,
 * pencil routes and a gold arrow; Lexend for reading and Caveat for handwritten notes. Colours come from the variables below,
 * so the dark desk works everywhere.
 */

@font-face { font-family: 'Lexend'; font-weight: 400; font-display: swap; src: url('../fonts/Lexend-Regular.woff') format('woff'); }
@font-face { font-family: 'Lexend'; font-weight: 700; font-display: swap; src: url('../fonts/Lexend-Bold.woff') format('woff'); }
@font-face { font-family: 'Caveat'; font-weight: 700; font-display: swap; src: url('../fonts/Caveat-Bold.woff') format('woff'); }

:root {
  --desk: #efe8da;
  --desk-dot: rgba(91, 87, 80, 0.17);
  --paper: #fffdf8;
  --paper-2: #fbf7ee;
  --paper-edge: #e3d7bf;
  --shadow: 0 10px 24px rgba(59, 47, 30, 0.14), 0 2px 4px rgba(59, 47, 30, 0.08);
  --shadow-small: 0 4px 10px rgba(59, 47, 30, 0.14);
  --ink: #2b2a26;
  --lead: #514d45;
  --faint: #857d6e;
  --rule: #e9e1d0;
  --teal: #0f766e;
  --teal-strong: #0b4f4a;
  --teal-wash: #e3f1ee;
  --red: #b83224;
  --red-wash: #fbebe7;
  --gold: #f2c14e;
  --gold-edge: #5c4310;
  --tape: rgba(226, 211, 167, 0.78);
  --sticky: #fde99a;
  --sticky-ink: #3d3418;
  --font: 'Lexend', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --hand: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive;
  --radius: 6px;
  --wrap: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --desk: #1b1a17; --desk-dot: rgba(255, 255, 255, 0.07); --paper: #282622; --paper-2: #2e2b26; --paper-edge: #3d3933;
    --shadow: 0 10px 24px rgba(0, 0, 0, 0.45), 0 2px 4px rgba(0, 0, 0, 0.3); --shadow-small: 0 4px 10px rgba(0, 0, 0, 0.4);
    --ink: #f2ede3; --lead: #d3ccbf; --faint: #a39b8c; --rule: #3a3731;
    --teal: #3fb5a3; --teal-strong: #8fded1; --teal-wash: rgba(63, 181, 163, 0.14); --red: #ec7f6d; --red-wash: rgba(236, 127, 109, 0.12);
    --tape: rgba(226, 211, 167, 0.32); --sticky: #4b4226; --sticky-ink: #f6ecc8; color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --desk: #1b1a17; --desk-dot: rgba(255, 255, 255, 0.07); --paper: #282622; --paper-2: #2e2b26; --paper-edge: #3d3933;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.45), 0 2px 4px rgba(0, 0, 0, 0.3); --shadow-small: 0 4px 10px rgba(0, 0, 0, 0.4);
  --ink: #f2ede3; --lead: #d3ccbf; --faint: #a39b8c; --rule: #3a3731;
  --teal: #3fb5a3; --teal-strong: #8fded1; --teal-wash: rgba(63, 181, 163, 0.14); --red: #ec7f6d; --red-wash: rgba(236, 127, 109, 0.12);
  --tape: rgba(226, 211, 167, 0.32); --sticky: #4b4226; --sticky-ink: #f6ecc8; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--desk);
  background-image: radial-gradient(var(--desk-dot) 1.1px, transparent 1.3px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.68;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--teal-strong); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.18; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.25rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: 0.35em; }
strong { font-weight: 700; }
.hand { font-family: var(--hand); font-weight: 700; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; background: var(--paper); color: var(--ink); border: 2px solid var(--teal); border-radius: var(--radius); }
.skip-link:focus { top: 12px; }
.icon { width: 1.05em; height: 1.05em; flex: 0 0 auto; vertical-align: -0.15em; }

/* ---------- the sheet of paper ---------- */
.sheet {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 44px) clamp(20px, 4vw, 48px);
}
.sheet.margin { padding-left: clamp(36px, 6vw, 84px); }
.sheet.margin::after {
  content: ''; position: absolute; top: 10px; bottom: 10px; left: clamp(18px, 3.4vw, 46px);
  border-left: 1.5px solid var(--red); opacity: 0.35; pointer-events: none;
}
.sheet.tape::before, .tape-right::before {
  content: ''; position: absolute; top: -11px; width: 96px; height: 24px; background: var(--tape); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.sheet.tape::before { left: 34px; transform: rotate(-4deg); }
.tape-right { position: absolute; top: 0; right: 0; width: 0; height: 0; }
.tape-right::before { right: 30px; transform: rotate(4deg); }
.tilt-l { transform: rotate(-0.6deg); }
.tilt-r { transform: rotate(0.5deg); }
.ruled { background-image: linear-gradient(var(--rule) 1px, transparent 1px); background-size: 100% 2.1em; }

/* ---------- header: a strip of paper with notebook tabs ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--paper-edge); box-shadow: var(--shadow-small); }
.header-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; min-height: 70px; padding-top: 10px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; padding-bottom: 10px; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 42px; height: 42px; flex: 0 0 42px; }
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 1.02rem; }
.brand-copy small { font-family: var(--hand); font-weight: 700; font-size: 1.08rem; color: var(--teal); }
.tabs { display: flex; gap: 4px; align-items: flex-end; }
.tabs a {
  position: relative; display: block; padding: 9px 16px 10px; font-size: 0.95rem; color: var(--lead); text-decoration: none;
  border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0;
}
.tabs a:hover { color: var(--ink); background: var(--paper-2); border-color: var(--paper-edge); }
.tabs a[aria-current='page'] { color: var(--ink); font-weight: 700; background: var(--paper-2); border-color: var(--paper-edge); box-shadow: inset 0 3px 0 var(--teal); }
.header-actions { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; }
.icon-button {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; border: 1px solid var(--paper-edge);
  background: var(--paper-2); color: var(--ink); cursor: pointer;
}
.icon-button:hover { border-color: var(--teal); }
.theme-icon-moon { display: none; }
:root[data-theme='dark'] .theme-icon-sun { display: none; }
:root[data-theme='dark'] .theme-icon-moon { display: block; }
.menu-toggle { display: none; }
.menu-close-icon { display: none; }
.mobile-nav { display: none; }

/* ---------- buttons: index cards with a folded corner ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px 0 18px;
  font: 700 0.98rem var(--font); color: var(--ink); text-decoration: none; cursor: pointer;
  background: var(--paper); border: 1px solid var(--paper-edge); border-radius: 4px 4px 14px 4px;
  box-shadow: 0 2px 0 var(--paper-edge), var(--shadow-small); transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn::after {
  content: ''; position: absolute; right: -1px; bottom: -1px; width: 14px; height: 14px; border-radius: 0 0 12px 0;
  background: linear-gradient(135deg, transparent 50%, var(--paper-edge) 50%);
}
.btn:hover { color: var(--ink); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--paper-edge); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: 0 2px 0 var(--teal-strong), var(--shadow-small); }
.btn.primary::after { background: linear-gradient(135deg, transparent 50%, var(--teal-strong) 50%); }
.btn.primary:hover { color: #fff; }
:root[data-theme='dark'] .btn.primary { color: #10231f; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 0.9rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ---------- stamps, notes and tags ---------- */
.stamp {
  display: inline-block; padding: 4px 10px; font: 700 0.72rem/1.4 var(--font); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal); border: 2px solid currentColor; border-radius: 4px; transform: rotate(-2deg); opacity: 0.92;
}
.stamp.red { color: var(--red); }
.stamp.ink { color: var(--ink); }
.stamp.flat { transform: none; }
.eyebrow { display: block; font-family: var(--hand); font-weight: 700; font-size: 1.45rem; line-height: 1.1; color: var(--teal); margin-bottom: 6px; }
.eyebrow.red { color: var(--red); }
.sticky {
  position: relative; background: var(--sticky); color: var(--sticky-ink); padding: 18px 20px 16px; font-family: var(--hand);
  font-weight: 700; font-size: 1.32rem; line-height: 1.25; box-shadow: var(--shadow-small); transform: rotate(1.8deg);
}
.sticky::before { content: ''; position: absolute; top: -10px; left: 50%; width: 70px; height: 22px; margin-left: -35px; background: var(--tape); transform: rotate(-3deg); }
.sticky p { margin: 0 0 0.3em; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 12px 0 0; list-style: none; }
.tags li { margin: 0; padding: 2px 9px; font-size: 0.78rem; color: var(--lead); background: var(--paper-2); border: 1px solid var(--paper-edge); border-radius: 3px; }
.underline { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='10' viewBox='0 0 200 10'%3E%3Cpath d='M2 7 C 40 2, 80 9, 120 5 S 180 3, 198 6' fill='none' stroke='%23c0392b' stroke-width='2.4' stroke-linecap='round' opacity='.75'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 0 100%; background-size: 100% 0.32em; padding-bottom: 0.12em; }

/* ---------- page layout ---------- */
main { padding-bottom: 64px; }
.section { margin-top: clamp(40px, 7vw, 76px); }
.section-head { max-width: 760px; margin-bottom: 26px; }
.section-head p { color: var(--lead); }
.lead { font-size: 1.16rem; color: var(--lead); }
.measure { max-width: 72ch; }
.page-top { padding-top: clamp(28px, 5vw, 54px); }
.crumbs { font-size: 0.9rem; color: var(--faint); margin-bottom: 10px; }
.crumbs a { color: var(--faint); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 3vw, 32px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.6vw, 26px); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2.2vw, 22px); }

/* ---------- home: the hero sheet ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr); gap: clamp(24px, 4vw, 54px); align-items: start; }
.hero h1 { margin-bottom: 0.25em; }
.hero .role { font-size: 1.15rem; color: var(--lead); max-width: 34em; }
.hero-side { position: relative; padding-top: 6px; }
.polaroid {
  position: relative; background: #fffef9; padding: 12px 12px 46px; border: 1px solid #e6dcc7; box-shadow: var(--shadow); transform: rotate(2.2deg);
  max-width: 340px; margin-inline: auto;
}
.polaroid img { width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; object-position: 50% 30%; }
.polaroid figcaption { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-family: var(--hand); font-weight: 700; font-size: 1.3rem; color: #3a372f; }
.polaroid::before { content: ''; position: absolute; top: -12px; left: 50%; width: 90px; height: 24px; margin-left: -45px; background: var(--tape); transform: rotate(-3deg); }
.hero-side .sticky { position: relative; max-width: 290px; margin: -26px 0 0 auto; z-index: 2; }
.route-sketch { margin-top: 22px; width: 100%; height: auto; overflow: visible; }
.route-sketch .route { fill: none; stroke: var(--teal); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.route-sketch .later { fill: none; stroke: var(--faint); stroke-width: 2; stroke-dasharray: 5 7; }
.route-sketch .node { fill: var(--paper); stroke: var(--ink); stroke-width: 1.8; }
.route-sketch .node.done { fill: var(--teal); stroke: var(--teal-strong); }
.route-sketch .ring { fill: none; stroke: var(--red); stroke-width: 2.4; stroke-linecap: round; }
.route-sketch .label { font: 700 19px var(--hand); fill: var(--lead); }
.route-sketch .label.red { fill: var(--red); }
.route-sketch .arrow { fill: var(--gold); stroke: var(--gold-edge); stroke-width: 1.2; stroke-linejoin: round; }
.pencil { filter: url(#pencil); }

/* ---------- key figures: index cards ---------- */
.figures .card { text-align: left; }
.card {
  position: relative; background: var(--paper); border: 1px solid var(--paper-edge); border-radius: 4px; box-shadow: var(--shadow-small);
  padding: 18px 18px 16px;
}
.card.tab-teal { border-top: 5px solid var(--teal); }
.card.tab-red { border-top: 5px solid var(--red); }
.card.tab-gold { border-top: 5px solid var(--gold); }
.card.tab-ink { border-top: 5px solid var(--faint); }
.card .big { display: block; font-size: clamp(1.45rem, 2.6vw, 1.85rem); font-weight: 700; line-height: 1.1; margin-bottom: 8px; color: var(--ink); }
.card p { margin: 0; font-size: 0.95rem; color: var(--lead); line-height: 1.5; }
.card h3 { margin-bottom: 0.35em; }
.card:nth-child(odd) { transform: rotate(-0.5deg); }
.card:nth-child(even) { transform: rotate(0.45deg); }

/* ---------- pinned project cards ---------- */
.pinned { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--paper-edge); box-shadow: var(--shadow); padding: 14px 14px 20px; border-radius: 3px; }
.pinned:nth-child(odd) { transform: rotate(-0.8deg); }
.pinned:nth-child(even) { transform: rotate(0.7deg); }
.pinned::before {
  content: ''; position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f6a497 0 22%, #c0392b 26% 100%); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.35); z-index: 2;
}
.pinned .shot { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: var(--paper-2); border: 1px solid var(--paper-edge); }
.pinned .shot img, .pinned .shot svg { width: 100%; height: 100%; object-fit: cover; }
.pinned .body { padding: 14px 6px 0; display: flex; flex-direction: column; flex: 1; }
.pinned h3 { margin-bottom: 0.3em; }
.pinned .kicker { font-family: var(--hand); font-weight: 700; font-size: 1.2rem; color: var(--teal); line-height: 1; margin-bottom: 4px; }
.pinned p { color: var(--lead); font-size: 0.98rem; }
.pinned .more { margin-top: auto; padding-top: 10px; }

/* ---------- figures ---------- */
.figure { margin: 0; }
.figure img { width: 100%; }
.figure figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--faint); }
.figure.framed { background: var(--paper); border: 1px solid var(--paper-edge); box-shadow: var(--shadow-small); padding: 14px; border-radius: 4px; }
.sketch { width: 100%; height: auto; }
.sketch .ink { fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sketch .soft { fill: none; stroke: var(--faint); stroke-width: 1.3; stroke-linecap: round; }
.sketch .teal { fill: none; stroke: var(--teal); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sketch .red { fill: none; stroke: var(--red); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sketch .fill-teal { fill: var(--teal); stroke: var(--teal-strong); stroke-width: 1.4; }
.sketch .fill-red { fill: var(--red); stroke: var(--red); stroke-width: 1.4; }
.sketch .fill-paper { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; }
.sketch .fill-wash { fill: var(--teal-wash); stroke: none; }
.sketch .fill-gold { fill: var(--gold); stroke: var(--gold-edge); stroke-width: 1.2; }
.sketch text { font-family: var(--hand); font-weight: 700; fill: var(--lead); }
.sketch text.small { font-size: 15px; }
.sketch text.label { font-size: 18px; }
.sketch text.title { font-size: 21px; fill: var(--ink); }
.sketch text.lex { font-family: var(--font); font-weight: 700; font-size: 12px; letter-spacing: 0.1em; fill: var(--teal-strong); }

/* ---------- the research statement and quotations ---------- */
.statement { font-size: 1.14rem; line-height: 1.75; }
.clipping {
  position: relative; background: var(--paper-2); border: 1px solid var(--paper-edge); padding: 22px 24px 18px 26px; box-shadow: var(--shadow-small);
  transform: rotate(-0.4deg); border-left: 4px solid var(--red);
}
.clipping blockquote { margin: 0 0 10px; font-size: 1.05rem; line-height: 1.6; }
.clipping cite { display: block; font-style: normal; font-size: 0.88rem; color: var(--faint); }

/* ---------- steps on a route (research method, experience) ---------- */
.steps { list-style: none; padding: 0; margin: 0; position: relative; }
.steps::before { content: ''; position: absolute; left: 13px; top: 8px; bottom: 8px; border-left: 2.6px solid var(--teal); border-radius: 2px; }
.steps > li { position: relative; padding: 0 0 26px 48px; margin: 0; }
.steps > li::before {
  content: ''; position: absolute; left: 4px; top: 5px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--teal); border: 2px solid var(--teal-strong); box-sizing: border-box;
}
.steps > li.now::before { background: var(--red); border-color: var(--red); box-shadow: 0 0 0 5px var(--paper), 0 0 0 7.5px var(--red); }
.steps > li.later::before { background: var(--paper); border: 2px dashed var(--faint); }
.steps .when { display: block; font: 700 0.78rem var(--font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal-strong); }
.steps > li.now .when { color: var(--red); }
.steps h3 { margin: 2px 0 4px; font-size: 1.08rem; }
.steps .where { color: var(--faint); font-size: 0.92rem; margin-bottom: 4px; }
.steps p { margin: 0 0 4px; color: var(--lead); font-size: 0.98rem; }
.steps ul { margin: 6px 0 0; color: var(--lead); font-size: 0.96rem; }

/* ---------- publication list ---------- */
.pubs { list-style: none; padding: 0; margin: 0 0 20px; }
.pubs li { padding: 14px 0 14px 18px; border-bottom: 1px dashed var(--rule); margin: 0; position: relative; }
.pubs li::before { content: ''; position: absolute; left: 0; top: 22px; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.pubs .title { display: block; font-weight: 700; }
.pubs .meta { display: block; color: var(--lead); font-size: 0.95rem; }
.pubs .links a { display: inline-flex; align-items: center; gap: 5px; }
p.meta { color: var(--lead); font-size: 0.95rem; }
.pubs .links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; font-size: 0.92rem; }
.pub-group { margin-top: 26px; }
.pub-group h3 { display: flex; align-items: center; gap: 10px; }

/* ---------- facts table (case studies) ---------- */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
.facts dt { font: 700 0.78rem var(--font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal-strong); padding-top: 4px; }
.facts dd { margin: 0; color: var(--lead); }

/* ---------- contact ---------- */
.form { display: grid; gap: 16px; }
.field label { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; font: 400 1rem var(--font); color: var(--ink); background: var(--paper-2); border: 1px solid var(--paper-edge);
  border-bottom: 2px solid var(--faint); border-radius: 4px 4px 0 0; padding: 10px 12px;
}
.field textarea { min-height: 170px; resize: vertical; background-image: linear-gradient(var(--rule) 1px, transparent 1px); background-size: 100% 1.7em; line-height: 1.7em; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--teal); box-shadow: 0 3px 0 -1px var(--teal); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 14px 16px; border-radius: 4px; border-left: 4px solid var(--teal); background: var(--teal-wash); }
.notice.error { border-left-color: var(--red); background: var(--red-wash); }
.notice ul { margin: 6px 0 0; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.contact-list li { margin: 0; display: flex; gap: 10px; align-items: center; }

/* ---------- footer ---------- */
.site-footer { margin-top: 40px; padding: 34px 0 28px; background: var(--paper); border-top: 1px solid var(--paper-edge); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.footer-grid h2 { font-size: 1rem; margin-bottom: 8px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-grid a { color: var(--lead); text-decoration: none; }
.footer-grid a:hover { color: var(--teal); text-decoration: underline; }
.footer-note { color: var(--lead); font-size: 0.95rem; max-width: 32em; }
.footer-bottom { margin-top: 22px; padding-top: 14px; border-top: 1px dashed var(--rule); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 0.88rem; color: var(--faint); }
.footer-bottom a { color: var(--faint); }

/* ---------- motion: things come in once, and stay still with less motion ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.route-sketch .route, .route-sketch .ring { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.2s ease-in-out 0.3s forwards; }
.route-sketch .ring { animation-delay: 2.3s; animation-duration: 0.9s; }
.route-sketch .bob { animation: bob 1.6s ease-in-out infinite; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes bob { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .route-sketch .route, .route-sketch .ring { animation: none; stroke-dashoffset: 0; }
  .route-sketch .bob { animation: none; }
  .btn { transition: none; }
}

/* A process drawn as a route on wide screens; the same steps as a list on phones. */
.steps-figure { display: block; }
.steps-list { display: none; }

/* ---------- smaller screens ---------- */
@media (max-width: 760px) {
  .steps-figure { display: none; }
  .steps-list { display: block; }
  .route-sketch .label { font-size: 25px; }
}
@media (max-width: 980px) {
  .tabs { display: none; }
  .menu-toggle { display: inline-grid; }
  .header-inner { align-items: center; padding-top: 0; }
  .brand, .header-actions { padding-bottom: 0; }
  .site-header.menu-open .menu-open-icon { display: none; }
  .site-header.menu-open .menu-close-icon { display: block; }
  .site-header.menu-open .mobile-nav { display: grid; }
  .mobile-nav { gap: 2px; padding: 8px 16px 16px; border-top: 1px dashed var(--rule); }
  .mobile-nav a { padding: 10px 6px; color: var(--ink); text-decoration: none; font-weight: 700; border-bottom: 1px dashed var(--rule); }
  .mobile-nav a[aria-current='page'] { color: var(--teal); }
  .hero { grid-template-columns: 1fr; }
  .hero-side { max-width: 420px; margin-inline: auto; width: 100%; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .header-cv { display: none; }
  .brand-copy small { display: none; }
  .grid-2, .grid-3, .grid-4, .form-row, .footer-grid { grid-template-columns: 1fr; }
  .card:nth-child(odd), .card:nth-child(even), .pinned:nth-child(odd), .pinned:nth-child(even) { transform: none; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .sheet.margin { padding-left: 32px; }
  .sheet.margin::after { left: 16px; }
  .hero-side .sticky { margin-top: -18px; }
}
