:root {
  /* Palette: Royal Blue and Sapphire frame the page; Swan Wing, Shellstone
     and Quicksand are the paper, text and gold accents laid on top. */
  --royal: #112250;
  --sapphire: #3c507d;
  --quicksand: #e0c58f;
  --swan: #f5f0e9;
  --shell: #d9cbc2;

  --bg: #121628;          /* midnight navy */
  --bg-soft: #191b38;     /* deep indigo */
  --paper: #232846;       /* night-blue cards on the page itself */
  --ink: var(--swan);
  --ink-2: var(--shell);
  --line: rgba(245, 240, 233, 0.16);
  --grid: rgba(245, 240, 233, 0.05);
  --grid-size: 40px;
  --sky-haze: rgba(30, 29, 64, 0.9);
  --card: #232846;
  --accent: var(--swan);
  --on-accent: var(--royal);
  --highlight: var(--quicksand);   /* hovers, underlines, selection */
  --highlight-soft: var(--shell);
  --gold: var(--quicksand);
  --mat: #fffdf9;                  /* photo and certificate mats */

  /* Folder colours: dusky night papers */
  --f-about: #40395f;            /* twilight violet */
  --f-academics: #344763;        /* night blue */
  --f-projects: #514363;         /* plum dusk */
  --f-activities: #3d484f;       /* slate */
  --f-mix: 100%;
  --shadow: 0 1px 2px rgba(4, 6, 22, .4), 0 10px 24px rgba(4, 6, 22, .45);

  --display: "General Sans", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --script: "Caveat", cursive;

  --radius: 22px;
  --gutter: clamp(16px, 4vw, 52px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px),
    radial-gradient(1100px 760px at 88% 0, rgba(102, 90, 138, .2), transparent 70%),
    radial-gradient(900px 900px at 0 1400px, rgba(120, 134, 168, .08), transparent 70%),
    linear-gradient(180deg, #101426 0, #171a36 1100px, #141832 2600px, var(--bg));
  background-size: var(--grid-size) var(--grid-size), var(--grid-size) var(--grid-size), auto, auto, auto;
  background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat;
  color: var(--ink-2);
  font: 400 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  transition: background .4s var(--ease), color .4s var(--ease);
  overflow-x: hidden;
}
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-family: var(--display); font-weight: 500; }
p { margin: 0; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 55%, var(--highlight)); }
::selection { background: rgba(224, 197, 143, .4); color: inherit; }
img { max-width: 100%; display: block; }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; text-transform: uppercase; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: clamp(18px, 3vw, 40px);
  padding: 18px var(--gutter);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-mark {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--display); font-weight: 600; letter-spacing: .02em;
}
.brand-name { font-family: var(--display); font-size: 20px; font-weight: 500; }
.brand-name::after { content: "*"; }
.nav { display: flex; gap: clamp(16px, 2.6vw, 36px); }
.nav a {
  position: relative; text-decoration: none; font-size: 15px; font-weight: 500;
  color: var(--ink-2); padding: 6px 0; transition: color .25s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--highlight); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav a:hover, .nav a.active { color: var(--ink); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.menu-toggle { display: none; }

/* ---------- Layout ---------- */
main { padding: 0 var(--gutter); max-width: 1320px; margin: 0 auto; }
.lead { font-size: clamp(21px, 2.2vw, 26px); line-height: 1.45; color: var(--ink); font-family: var(--display); font-weight: 400; }
.prose p + p { margin-top: 1em; }
.section-title {
  font-size: clamp(48px, 8vw, 104px);
  line-height: 1.05; letter-spacing: -0.03em;
  margin: 18px 0 clamp(28px, 4vw, 44px);
}

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(56px, 8vw, 96px); position: relative; }
.hero > :not(.hero-sky) { position: relative; z-index: 1; }

/* 3D night sky (sky.js). Hidden until the scene has rendered, so a failed
   load leaves the hero exactly as it was. */
.hero-sky {
  position: absolute; z-index: 0; right: 0; top: clamp(8px, 3.5vw, 56px);
  width: min(36vw, 540px); aspect-ratio: 1;
  pointer-events: none; opacity: 0; transition: opacity 1.8s var(--ease) .4s;
}
.hero-sky.is-ready { opacity: 1; }
.hero-sky::before {
  content: ""; position: absolute; inset: 2%; border-radius: 50%;
  background: radial-gradient(closest-side, var(--sky-haze) 0%, color-mix(in srgb, var(--sky-haze) 88%, transparent) 50%, color-mix(in srgb, var(--sky-haze) 30%, transparent) 80%, transparent 100%);
}
.hero-sky canvas { position: relative; display: block; width: 100%; height: 100%; }
.eyebrow { color: var(--ink); margin-bottom: 24px; }
.hero-title {
  font-size: clamp(60px, 12.5vw, 176px);
  line-height: .96; font-weight: 500; letter-spacing: -0.045em;
}
.hero-title .word { display: inline-block; white-space: nowrap; }
.hero-title .ch { display: inline-block; }
.js .hero-title .ch {
  opacity: 0; transform: translateY(.35em) rotate(4deg);
  animation: ch-in .9s var(--ease) forwards;
  animation-delay: calc(var(--i) * 45ms + 120ms);
}
@keyframes ch-in { to { opacity: 1; transform: none; } }

.hero-lead { max-width: 600px; margin-top: 32px; font-size: clamp(18px, 1.7vw, 21px); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 28px; color: var(--ink-2); }
.hero-stats strong { color: var(--ink); font-weight: 500; margin-right: 4px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 36px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 26px; border-radius: 100px;
  font-weight: 500; text-decoration: none;
  transition: transform .3s var(--ease), background .3s, color .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--accent); color: var(--on-accent); }
.btn-solid:hover { background: var(--highlight-soft); }
.btn-line { border: 1px solid var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--highlight); border-color: var(--highlight); color: var(--royal); }
.signature {
  font-family: var(--script); font-weight: 500; color: var(--gold);
  font-size: 34px; line-height: 1; margin-left: 10px; transform: rotate(-4deg);
}
.signature-lg { font-size: clamp(44px, 6vw, 64px); margin: 48px 0 0; display: inline-block; }

/* ---------- Folders ---------- */
.folders { scroll-margin-top: 84px; }
.tabs {
  display: flex; align-items: flex-end; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  --tab-bg: color-mix(in srgb, var(--f) 86%, var(--bg));
  flex: none; display: inline-flex; align-items: baseline; gap: 10px;
  padding: 14px 22px 16px; margin-top: 10px;
  border: 0; border-radius: 16px 16px 0 0; cursor: pointer;
  background: var(--tab-bg); color: color-mix(in srgb, var(--ink) 80%, var(--f));
  font: 500 17px/1 var(--display);
  transform: translateY(8px);
  transition: transform .35s var(--ease), background .35s, color .25s;
}
.tab .mono { font-size: 12px; }
.tab:hover { transform: translateY(2px); color: var(--ink); }
.tab[aria-selected="true"] {
  --tab-bg: color-mix(in srgb, var(--f) var(--f-mix), var(--bg));
  color: var(--ink); transform: none; margin-top: 0; padding-top: 20px;
}
.tab:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }

/* Folder surfaces (and figures on project pages): cards are a deeper shade of the folder */
.panel, .figure {
  --ink-2: color-mix(in srgb, var(--ink) 76%, var(--f));
  --line: color-mix(in srgb, var(--ink) 18%, transparent);
  --paper: color-mix(in srgb, var(--f) 70%, #0d1022);
  --bg-soft: color-mix(in srgb, var(--f) 55%, #0d1022);
}
.panel {
  position: relative;
  background: color-mix(in srgb, var(--f) var(--f-mix), var(--bg));
  color: var(--ink-2);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 64px) clamp(36px, 5vw, 72px);
  box-shadow: var(--shadow);
  animation: panel-in .55s var(--ease);
}
/* Chrome focuses the panel on #hash loads; the tab already shows focus */
.panel:focus { outline: none; }
@keyframes panel-in { from { opacity: 0; transform: translateY(14px); } }

.panel-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(28px, 4vw, 48px); }
.panel-num { color: var(--ink); }
.panel-title { font-size: clamp(42px, 6.5vw, 88px); line-height: 1.02; letter-spacing: -0.035em; }

/* ---------- Desk: tilted index cards ---------- */
.desk {
  list-style: none; padding: 0; margin: 0 0 clamp(40px, 6vw, 72px);
  display: flex; flex-wrap: wrap; gap: clamp(14px, 2vw, 24px); align-items: flex-start;
}
.note {
  position: relative; width: clamp(150px, 17vw, 196px); min-height: 150px;
  display: flex; flex-direction: column; gap: 4px;
  padding: 22px 18px 18px; border-radius: 6px;
  background: var(--paper); box-shadow: var(--shadow);
  transform: rotate(var(--r, 0deg));
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.note::before {
  /* strip of tape */
  content: ""; position: absolute; top: -9px; left: 50%; width: 54px; height: 18px;
  transform: translateX(-50%) rotate(-3deg);
  background: color-mix(in srgb, var(--shell) 38%, transparent);
  border-radius: 2px; opacity: .9;
}
.note:hover { transform: rotate(0deg) translateY(-6px) scale(1.03); z-index: 2; }
.note .mono { font-size: 11px; color: var(--ink-2); }
.note strong { font-family: var(--display); font-weight: 500; font-size: clamp(28px, 3vw, 38px); line-height: 1.1; color: var(--ink); letter-spacing: -0.02em; }
/* longer words, e.g. "Languages", would overflow the note at full size */
.note-long strong { font-size: clamp(22px, 2.2vw, 27px); }
.note em { font-style: normal; font-size: 14px; line-height: 1.4; margin-top: auto; }

.note.photo { padding: 10px 10px 12px; width: clamp(180px, 22vw, 250px); }
.note.photo .mono { padding-top: 10px; }
.photo-placeholder {
  aspect-ratio: 4 / 5; display: grid; place-items: center;
  border-radius: 3px; font-size: 14px; color: var(--ink-2);
  background:
    radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--f) 60%, transparent), transparent 65%),
    var(--bg-soft);
}
.note.photo img { width: 100%; height: auto; border-radius: 3px; }


.note.photo a { display: block; }

/* ---------- Certificates ---------- */
.pdf-link {
  display: inline-block; margin-top: 8px;
  font: 500 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .02em;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid currentColor;
}
.pdf-link:hover { border-bottom-style: dashed; }
.cert-thumb {
  display: inline-block; width: clamp(130px, 13vw, 168px); margin-top: 14px; padding: 5px;
  background: var(--mat); border-radius: 4px; box-shadow: var(--shadow);
  transform: rotate(var(--r, -2deg));
  transition: transform .45s var(--ease);
}
.cert-thumb img { width: 100%; height: auto; }
.cert-thumb:hover { transform: rotate(0deg) scale(1.05); }
.cert-thumbs { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; }
.cert-thumb.is-photo { width: clamp(150px, 15vw, 196px); padding: 6px 6px 20px; }
.cert-thumb.is-stage { width: clamp(200px, 20vw, 260px); }
.cert-thumb.is-portrait { width: clamp(84px, 8vw, 104px); }
.stage-intro { margin: 0 0 22px; font-size: 16px; }

.piles-intro { margin: -28px 0 22px; font-size: 16px; }
.piles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.pile {
  border-radius: 16px; padding: 14px 16px 18px;
  background: color-mix(in srgb, var(--paper) 50%, transparent);
}
.pile summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.pile summary::-webkit-details-marker { display: none; }
.pile summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 10px; }
.stack { position: relative; display: block; aspect-ratio: 4 / 3; margin: 14px 18px 22px; }
.stack img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  background: var(--mat); padding: 4px; border-radius: 3px; box-shadow: var(--shadow);
  transition: transform .5s var(--ease);
}
.stack img:nth-child(1) { transform: rotate(-7deg) translate(-5%, 3%); }
.stack img:nth-child(2) { transform: rotate(5deg) translate(5%, -2%); }
.stack img:nth-child(3) { transform: rotate(-1deg); }
.pile summary:hover .stack img:nth-child(1) { transform: rotate(-12deg) translate(-12%, 4%); }
.pile summary:hover .stack img:nth-child(2) { transform: rotate(10deg) translate(12%, -3%); }
.pile-text { display: flex; flex-direction: column; gap: 4px; }
.pile-text .mono { font-size: 11px; color: var(--ink-2); }
.pile-text strong { font: 500 24px/1.2 var(--display); color: var(--ink); }
.pile-note { font-size: 14.5px; line-height: 1.45; }
.pile-toggle { margin-top: 6px; color: var(--ink) !important; }
.pile-toggle::after { content: "Open pile ↓"; }
.pile[open] .pile-toggle::after { content: "Close ↑"; }
.pile[open] { grid-column: 1 / -1; }
.pile[open] summary { flex-direction: row; align-items: center; gap: 12px; }
.pile[open] .stack { flex: none; width: 150px; margin: 10px 26px 14px 14px; }
.pile-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 22px 18px;
  margin-top: 14px; padding-top: 18px; border-top: 1px solid var(--line);
}
.pile-grid a { display: block; text-decoration: none; color: var(--ink-2); }
.pile-grid img {
  width: 100%; height: auto; padding: 4px; background: var(--mat); border-radius: 3px;
  box-shadow: var(--shadow); transition: transform .35s var(--ease);
}
.pile-grid a:hover img { transform: translateY(-4px) rotate(-1deg); }
.pile-grid span { display: block; margin-top: 8px; font-size: 13.5px; line-height: 1.4; }
.pile-grid a:hover span { color: var(--ink); }

/* ---------- About ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 60px); }

/* ---------- Rows (timeline) ---------- */
.sub-label { color: var(--ink); margin: 0 0 18px; font-weight: 500; }
.rows { border-top: 1px solid var(--line); margin-bottom: 64px; }
.rows:last-child { margin-bottom: 0; }
.row {
  display: grid; grid-template-columns: 140px 1fr 1fr; gap: 24px;
  padding: 32px 0; border-bottom: 1px solid var(--line);
}
.row-date { color: var(--ink); padding-top: 6px; }
.row-main h4 { font-size: clamp(21px, 2vw, 26px); line-height: 1.25; }
.row-meta { font-size: 15px; margin-top: 6px; text-decoration: underline; text-underline-offset: 3px; }
.row-desc { font-size: 17px; }
.grade { font-weight: 600; color: var(--ink); margin-right: 6px; }
.grade-line { margin-top: 10px; }
.bands {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.bands li { display: flex; flex-direction: column; }
.bands strong { font-family: var(--display); font-size: 26px; font-weight: 500; color: var(--ink); line-height: 1.2; }
.bands span { font-size: 14px; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card {
  background: var(--paper); border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: transform .5s var(--ease);
}
.card:hover { transform: translateY(-6px); }
.card-outline { background: transparent; box-shadow: none; border: 1px dashed color-mix(in srgb, var(--ink) 35%, transparent); }
.card-media {
  aspect-ratio: 4 / 3; display: grid; place-items: center;
  color: var(--ink); font: 400 64px/1 var(--display);
}
.card-link { text-decoration: none; color: inherit; }
.card-link:hover .text-link { text-decoration: underline; text-underline-offset: 4px; }
.media-soul { background: linear-gradient(160deg, var(--sapphire), var(--royal)); }
.media-soul img {
  width: 42%; height: auto; aspect-ratio: 1; border-radius: 22.5%;
  box-shadow: 0 12px 30px rgba(5, 12, 34, .4);
  transition: transform .5s var(--ease);
}
.card-link:hover .media-soul img { transform: scale(1.05) rotate(-2deg); }
.media-attn { background: color-mix(in srgb, var(--f-academics) var(--f-mix), var(--bg)); }
.media-attn .attn { width: 46%; transition: transform .5s var(--ease); }
.card-link:hover .media-attn .attn { transform: scale(1.05) rotate(-2deg); }
/* schematic attention heatmap: faint cells in ink, the sink column in accent */
.attn rect { fill: var(--ink); }
.attn rect.sink { fill: var(--gold); }
.media-echo { background: linear-gradient(160deg, color-mix(in srgb, var(--f-projects) 30%, var(--paper)), var(--paper)); }
.media-echo .echo { width: 58%; transition: transform .5s var(--ease); }
.card-link:hover .media-echo .echo { transform: scale(1.04); }
.echo rect { fill: var(--ink); }
.echo rect.on { fill: var(--gold); }
.echo text { font: 500 11px var(--mono); fill: var(--ink); opacity: .6; text-transform: uppercase; }
.media-melon { background: color-mix(in srgb, var(--f-about) var(--f-mix), var(--bg)); }
.media-melon .plates { width: 58%; transition: transform .5s var(--ease); }
.card-link:hover .media-melon .plates { transform: scale(1.04); }
/* schematic grid of agar plates: the most suitable temperature per melon in accent */
.plates circle { fill: none; stroke: var(--ink); stroke-opacity: .45; stroke-width: 1.5; }
.plates circle.best { fill: var(--gold); stroke: none; }
.plates text { font: 500 11px var(--mono); fill: var(--ink); opacity: .6; text-anchor: middle; }
.media-b { background: linear-gradient(140deg, var(--royal), var(--sapphire)); color: var(--swan); }
.media-c { background: linear-gradient(140deg, var(--shell), var(--quicksand)); color: var(--royal); }
.card-text { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-kicker { font-size: 11px; }
.card-text h3 { font-size: 24px; line-height: 1.25; }
.text-link { margin-top: auto; padding-top: 10px; font-weight: 500; color: var(--ink); text-decoration: none; }
.text-link:hover { text-decoration: underline; text-decoration-color: var(--highlight); text-underline-offset: 4px; }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.skills div { border-top: 1px solid var(--line); padding-top: 20px; }
.skills h4 { font-size: 20px; margin-bottom: 8px; }

/* ---------- Contact ---------- */
.contact { padding: clamp(100px, 13vw, 170px) 0 0; max-width: 900px; }
.big-link {
  display: inline-block; margin-top: 36px;
  font: 400 clamp(24px, 4vw, 48px)/1.2 var(--display); color: var(--ink);
  text-decoration: none; border-bottom: 1px solid var(--ink);
  overflow-wrap: anywhere;
}
.socials { list-style: none; padding: 0; margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 28px; }
.socials a { font-weight: 500; color: var(--ink); text-decoration: none; }
.socials a:hover { text-decoration: underline; text-decoration-color: var(--highlight); text-underline-offset: 4px; }

/* ---------- Footer & to-top ---------- */
.site-footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: clamp(80px, 12vw, 150px);
  padding: 28px var(--gutter); border-top: 1px solid var(--line);
  font-size: 12px;
}
.site-footer a { color: var(--ink); }
.to-top {
  position: fixed; right: var(--gutter); bottom: 28px; z-index: 15;
  width: 50px; height: 50px; border-radius: 14px;
  display: grid; place-items: center; text-decoration: none;
  background: var(--paper); box-shadow: var(--shadow); color: var(--ink); font-size: 20px;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .35s, transform .35s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .hero-title .ch { opacity: 1; transform: none; animation: none; }
  .hero-sky { transition: none; }
  .panel { animation: none; }
  .note, .note:hover { transform: none; transition: none; }
  .tab { transition: none; }
  .cert-thumb, .cert-thumb:hover, .stack img, .pile-grid img { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .site-header { padding: 14px var(--gutter); gap: 16px; }
  .menu-toggle {
    display: grid; gap: 6px; width: 40px; height: 40px; place-content: center;
    background: none; border: 0; cursor: pointer;
  }
  .menu-toggle span { width: 22px; height: 1.5px; background: var(--ink); transition: transform .3s; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .nav {
    position: fixed; inset: 70px 0 auto 0; flex-direction: column; gap: 4px;
    padding: 12px var(--gutter) 28px; background: var(--bg);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .3s, transform .3s var(--ease);
  }
  .nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { font-size: 22px; padding: 10px 0; }
  .nav a::after { display: none; }

  /* bleed the tab strip to the screen edge so it can scroll sideways */
  .tabs { margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); }
  .tab { padding: 12px 16px 14px; font-size: 16px; }
  .tab[aria-selected="true"] { padding-top: 18px; }
  .panel { border-radius: 0 16px 16px 16px; }

  .two-col, .cards, .skills { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; gap: 10px; padding: 26px 0; }
  .bands { grid-template-columns: repeat(2, 1fr); }
  .piles { grid-template-columns: 1fr; }
  .pile[open] .stack { width: 96px; margin: 8px 16px 10px 8px; }
  .pile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .desk { gap: 16px 12px; }
  .note { width: calc(50% - 6px); min-height: 130px; padding: 18px 14px 14px; }
  .note.photo { width: calc(50% - 6px); }
  .signature { margin-left: 4px; }
}
@media (max-width: 700px) {
  .hero-sky { width: min(31vw, 132px); top: -6px; }
}
