/* ---------------------------------------------------------------
   Harsh Shah — Portfolio  ·  v.VI
   Self-as-system manual.  Cosmos · Code · Confidence.
   --------------------------------------------------------------- */

/* ===== Tokens ===== */
:root {
  color-scheme: dark light;

  /* Surfaces — deep but not pure black; warm whites in light */
  --bg:          #08090C;
  --bg-deep:     #050609;
  --surface:     #0E1014;
  --surface-2:   #13161B;
  --surface-3:   #1A1E26;
  --bg-glass:    rgba(8, 9, 12, 0.78);

  /* Ink — slightly warm white feels intentional, not sterile */
  --ink:         #F4F5F7;
  --ink-soft:    #B6BCC8;
  --ink-mute:    #6F7484;
  --ink-faint:   #3A3F4D;

  /* Lines — neutral whites, not blue-tinted (cleaner) */
  --rule:        rgba(244, 245, 247, 0.08);
  --rule-soft:   rgba(244, 245, 247, 0.04);
  --rule-strong: rgba(244, 245, 247, 0.16);

  /* Accent system */
  --accent:      #A0E5FF;       /* pale cosmic blue */
  --accent-warm: #FFB37A;       /* sodium amber, sparingly */
  --signal:      #5EE3A8;       /* status green */
  --danger:      #FF6B6B;
  --syntax-key:  #C9A8FF;       /* purple — reserved keyword */
  --syntax-num:  #FFD68A;       /* warm — number literal */
  --syntax-str:  #A0E5FF;       /* blue — string literal */
  --syntax-com:  #5C616E;       /* mute — comment */

  --accent-soft: color-mix(in oklab, var(--accent) 22%, transparent);
  --accent-glow: color-mix(in oklab, var(--accent) 50%, transparent);

  /* Typography  */
  --f-display: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  --f-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  /* Variable font weight — animated via JS / scroll velocity */
  --display-w: 350;
  --display-w-soft: 250;

  /* Motion */
  --ease:        cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-power:  cubic-bezier(0.7, 0, 0.3, 1);

  /* Layout */
  --pad-x: clamp(20px, 4vw, 56px);
  --max:   1280px;
  --max-narrow: 920px;
  --rail-w: 72px;
  --vh:    1vh;
  --full-h: calc(var(--vh) * 100);

  /* Effects */
  --shadow-soft: 0 1px 2px rgba(0,0,0,0.3), 0 20px 40px -20px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 0 1px var(--rule), 0 18px 60px -30px var(--accent-soft);
}

[data-theme="light"] {
  --bg:          #F2EFE8;
  --bg-deep:     #E9E4D8;
  --surface:     #FBF9F4;
  --surface-2:   #F5F2EA;
  --surface-3:   #EDE8DC;
  --bg-glass:    rgba(242, 239, 232, 0.82);

  --ink:         #0B0E14;
  --ink-soft:    #2C3242;
  --ink-mute:    #5C616E;
  --ink-faint:   #B8BBC4;

  --rule:        rgba(11, 14, 20, 0.10);
  --rule-soft:   rgba(11, 14, 20, 0.05);
  --rule-strong: rgba(11, 14, 20, 0.20);

  --accent:      #1A4D7E;
  --accent-warm: #B05A24;
  --signal:      #2D8F66;
  --syntax-key:  #6D3DC9;
  --syntax-num:  #A75810;
  --syntax-str:  #1A4D7E;
  --syntax-com:  #8B8F99;

  --shadow-soft: 0 1px 2px rgba(11,14,20,0.04), 0 20px 40px -20px rgba(11,14,20,0.14);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  font-feature-settings: "ss01", "cv11";
}

/* Lenis smooth-scroll required styles */
html.lenis, html.lenis body { height: auto; }
html.lenis-smooth { scroll-behavior: auto !important; }
html.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
html.lenis-stopped { overflow: clip; }
html.lenis-smooth iframe { pointer-events: none; }
html.lenis-active { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  transition: background .5s var(--ease), color .5s var(--ease), opacity .35s var(--ease);
}
body.is-booting { opacity: 0; }
body.is-loaded  { opacity: 1; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
em { font-style: normal; }
::selection { background: var(--accent); color: var(--bg); }

/* ===== Skip / a11y ===== */
.skip {
  position: fixed; top: 8px; left: 8px;
  padding: 8px 12px;
  background: var(--ink); color: var(--bg);
  border-radius: 4px;
  font-size: 13px; font-weight: 500;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease);
  z-index: 1000;
}
.skip:focus { transform: translateY(0); }

/* ===== Persistent scene canvas ===== */
.scene {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
}
.scene__canvas {
  width: 100%; height: 100%;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
body.scene-ready .scene__canvas { opacity: 1; }

/* Content sits ABOVE the cosmos scene */
main, .nav, .footer, .palette, .sheet, .mobile, .toast,
.reticle { position: relative; z-index: 2; }

/* Translucent panel backdrops for content sections so cosmos peeks
   through at edges/gaps without fighting readability. */
section { isolation: isolate; }
.trajectory, .artifacts, .profile, .stack, .caps, .dossier, .channels, .diversion {
  background: color-mix(in oklab, var(--bg) 88%, transparent);
}
.hero, .transmission { background: transparent; }
.footer { background: color-mix(in oklab, var(--bg) 92%, transparent); }

/* (boot sequence + HUD + constellation rail all removed for a calmer feel) */
@keyframes cursor-blink { 50% { opacity: 0; } }

/* ===== Cursor reticle ===== */
.reticle {
  position: fixed; top: 0; left: 0;
  width: 24px; height: 24px;
  margin: -12px 0 0 -12px;
  pointer-events: none;
  z-index: 60;
  opacity: 0;
}
.reticle.is-on { opacity: 1; }
.reticle__dot {
  position: absolute; left: 50%; top: 50%;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--accent);
  margin: -1.5px 0 0 -1.5px;
  opacity: .65;
}
.reticle__ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: .35;
  transition: transform .3s var(--ease-out), opacity .2s var(--ease);
}
.reticle.is-hover .reticle__ring { transform: scale(1.5); opacity: .65; }
.reticle.is-hover .reticle__dot  { opacity: 1; }

@media (hover: none), (pointer: coarse) {
  .reticle { display: none; }
}

/* ===== Helpers ===== */
.overline {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono);
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.overline .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--signal) 25%, transparent);
  animation: breathe 2.4s var(--ease) infinite;
}
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in oklab, var(--signal) 25%, transparent); }
  50%      { box-shadow: 0 0 0 6px color-mix(in oklab, var(--signal) 0%,  transparent); }
}
.overline .acc { color: var(--accent); }

kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  font-family: var(--f-mono); font-size: 10.5px; font-weight: 450;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  vertical-align: middle;
}

/* ===== Buttons ===== */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px;
  font-family: var(--f-display);
  font-variation-settings: "wght" 480;
  font-weight: 480;
  font-size: 13px;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  text-align: center;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
  overflow: hidden;
  isolation: isolate;
  text-transform: uppercase;
}
.btn--sm { padding: 12px 16px; font-size: 11.5px; }
@media (max-width: 600px) {
  .btn { padding: 14px 20px; font-size: 13px; min-height: 44px; }
  .btn--sm { padding: 12px 16px; font-size: 12px; min-height: 42px; }
}
.btn--primary {
  background: var(--accent);
  color: var(--bg-deep);
  border-color: var(--accent);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px -8px var(--accent-glow);
}
.btn--primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.4) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform .8s var(--ease-out);
  z-index: -1;
}
.btn--primary:hover::before { transform: translateX(110%); }
.btn--ghost {
  color: var(--ink);
  border-color: var(--rule-strong);
  background: transparent;
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn--link {
  padding: 4px 0;
  border-radius: 0;
  border-bottom: 1px solid var(--rule-strong);
  background: transparent;
  text-transform: none;
  letter-spacing: 0;
}
.btn--link:hover { border-color: var(--accent); color: var(--accent); }
.btn__arrow { display: inline-block; transition: transform .3s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 14px var(--pad-x);
  transition: padding .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  padding: 10px var(--pad-x);
  background: var(--bg-glass);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--rule);
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--f-mono);
  font-size: 13px;
}
.nav__brand-mark { display: inline-flex; color: var(--accent); }
.nav__brand-mark svg { animation: brand-spin 80s linear infinite; }
@keyframes brand-spin { to { transform: rotate(360deg); } }
.nav__brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav__brand-name { font-weight: 500; letter-spacing: -0.005em; }

.nav__links { display: flex; gap: 2px; font-size: 12px; }
.nav__links a {
  position: relative;
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 8px 12px;
  color: var(--ink-soft);
  font-family: var(--f-mono);
  letter-spacing: 0;
  border-radius: 2px;
  transition: color .2s var(--ease);
}
.nav__links a span { font-size: 9.5px; color: var(--ink-mute); }
.nav__links a:hover, .nav__links a.is-active { color: var(--accent); }
.nav__links a:hover span, .nav__links a.is-active span { color: var(--accent); opacity: .65; }
.nav__links a.is-active::after {
  content: "";
  position: absolute; left: 12px; right: 12px; bottom: 4px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.nav__utils { display: flex; align-items: center; gap: 8px; }
.nav__search {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 8px 7px 12px;
  font-size: 11.5px;
  font-family: var(--f-mono);
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--surface);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.nav__search:hover { border-color: var(--accent); color: var(--accent); }
.nav__search svg { opacity: .7; }
.nav__kbd { background: transparent; border: 1px solid var(--rule); }

.nav__theme {
  width: 34px; height: 34px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.nav__theme:hover { color: var(--accent); border-color: var(--accent); }
.nav__theme .icon-sun { display: none; }
[data-theme="light"] .nav__theme .icon-sun { display: block; }
[data-theme="light"] .nav__theme .icon-moon { display: none; }

.nav__menu {
  display: none;
  width: 34px; height: 34px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav__menu span { display: block; width: 14px; height: 1px; background: var(--ink); }

@media (max-width: 920px) {
  .nav__links { display: none; }
  .nav__search span, .nav__kbd { display: none; }
  .nav__menu { display: inline-flex; }
}

/* ===== Sections shared ===== */
main { position: relative; z-index: 2; }
section { position: relative; padding: 0 var(--pad-x); }

.section__head {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(96px, 14vw, 180px) 0 clamp(48px, 6vw, 80px);
  display: grid; gap: 18px;
}
.section__head--center { text-align: center; justify-items: center; }
.section__title {
  font-family: var(--f-display);
  font-variation-settings: "wght" 380;
  font-weight: 380;
  font-size: clamp(34px, 5.5vw, 64px);
  letter-spacing: -0.018em;
  line-height: 1.04;
  color: var(--ink);
}
.section__title em { color: var(--accent); font-style: normal; }
.section__sub {
  max-width: 60ch;
  font-size: 16.5px;
  color: var(--ink-soft);
  line-height: 1.65;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: var(--full-h);
  padding: 140px var(--pad-x) 120px;
  display: flex; flex-direction: column; justify-content: center;
  isolation: isolate;
}
@media (max-width: 600px) {
  .hero { padding: 110px var(--pad-x) 80px; }
}
.hero__inner {
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  position: relative;
}

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  margin-bottom: 28px;
}
.hero__eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--signal) 25%, transparent);
  animation: breathe 2.4s var(--ease) infinite;
}
.hero__role { color: var(--accent); }
.hero__cursor {
  display: none;
  width: 1px;
  height: 0.95em;
  margin-left: 2px;
  background: var(--accent);
  vertical-align: -1px;
  animation: cursor-blink 0.75s steps(2) infinite;
}
.hero__cursor.is-on { display: inline-block; }

.hero__headline {
  font-family: var(--f-display);
  font-variation-settings: "wght" var(--display-w, 380);
  font-weight: 380;
  font-size: clamp(44px, 9vw, 116px);
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--ink);
  margin: 0 0 28px;
}
.hero__headline .l1, .hero__headline .l2 { display: block; }
.hero__headline .l2 {
  color: var(--ink-mute);
  font-variation-settings: "wght" 260;
  font-weight: 260;
}
.hero__headline .acc { color: var(--accent); }
.hero__headline .scramble { display: inline-block; }

.hero__lede {
  max-width: 60ch;
  font-size: clamp(15px, 1.35vw, 17.5px);
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero__cta {
  display: flex; gap: 12px; flex-wrap: wrap;
}

.hero__scroll-cue {
  position: absolute;
  left: 0; bottom: -88px;
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  text-transform: uppercase;
  animation: scroll-bob 2.8s var(--ease-in-out) infinite;
}
.hero__scroll-line {
  position: relative;
  width: 36px; height: 1px;
  background: var(--rule-strong);
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 14px; height: 100%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
  animation: scroll-sweep 2.4s var(--ease-in-out) infinite;
}
.hero__scroll-cue > span:last-child {
  animation: scroll-pulse 2.8s var(--ease-in-out) infinite;
}
.hero__scroll-cue:hover { color: var(--accent); }
.hero__scroll-cue:hover .hero__scroll-line::after { animation-duration: 1.4s; }
@keyframes scroll-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}
@keyframes scroll-sweep {
  0%   { transform: translateX(-14px); opacity: 0; }
  18%  { opacity: 1; }
  82%  { opacity: 1; }
  100% { transform: translateX(36px); opacity: 0; }
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; color: var(--accent); }
}
@media (max-width: 760px) { .hero__scroll-cue { display: none; } }

/* ===== TRAJECTORY (vertical timeline) ===== */
.trajectory {
  max-width: var(--max);
  margin: 0 auto;
  padding-bottom: clamp(80px, 10vw, 140px);
}
.timeline {
  display: grid;
  border-top: 1px solid var(--rule);
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 220px; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom,
    transparent 0,
    var(--rule) 8%,
    var(--rule) 92%,
    transparent 100%);
  pointer-events: none;
}
.t-item {
  position: relative;
  display: grid;
  grid-template-columns: 220px 1fr 140px;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
  transition: background .25s var(--ease);
}
.t-item::before {
  content: "";
  position: absolute;
  left: 220px; top: 38px;
  transform: translateX(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-mute);
  border: 1px solid var(--bg);
  box-shadow: 0 0 0 1px var(--rule);
  transition: background .25s var(--ease), box-shadow .25s var(--ease);
  z-index: 1;
}
.t-item:hover::before {
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 12px var(--accent-glow);
}
.t-item:hover { background: color-mix(in oklab, var(--surface) 60%, transparent); }
.t-item__year {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  align-self: start;
  padding-top: 4px;
}
.t-item__body { padding-left: 16px; }
.t-item__role {
  font-family: var(--f-display);
  font-variation-settings: "wght" 480;
  font-weight: 480;
  font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: -0.012em;
  line-height: 1.15;
  margin-bottom: 4px;
}
.t-item__company {
  display: block;
  color: var(--ink-mute);
  font-family: var(--f-mono);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  margin-top: 4px;
}
.t-item__copy {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.65;
  max-width: 60ch;
  margin: 12px 0;
}
.t-item__tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--ink-mute);
}
.t-item__tags li {
  padding: 3px 9px;
  border: 1px solid var(--rule);
  border-radius: 999px;
}
.t-item__place {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  align-self: start;
  padding-top: 6px;
  text-align: right;
}
@media (max-width: 800px) {
  .timeline::before { left: 8px; }
  .t-item { grid-template-columns: 1fr; gap: 8px; padding: 20px 0 20px 28px; }
  .t-item::before { left: 8px; top: 28px; }
  .t-item__year, .t-item__place { padding: 0; text-align: left; }
  .t-item__body { padding-left: 0; }
}

/* ===== ARTIFACTS (Projects with instruments) ===== */
.artifacts {
  max-width: var(--max);
  margin: 0 auto;
  padding-bottom: clamp(80px, 10vw, 140px);
}
.artifact {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
  padding: clamp(32px, 5vw, 64px) 0;
  align-items: center;
}
.artifact:last-child { border-bottom: 1px solid var(--rule); }
.artifact__index {
  position: absolute;
  top: clamp(16px, 2vw, 28px);
  right: 0;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.artifact__copy {
  display: grid; gap: 16px;
  padding-right: clamp(20px, 4vw, 56px);
}
.artifact__kicker {
  font-family: var(--f-mono); font-size: 10.5px;
  color: var(--ink-mute);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.artifact__name {
  font-family: var(--f-display);
  font-variation-settings: "wght" 380;
  font-weight: 380;
  font-size: clamp(34px, 5vw, 60px);
  letter-spacing: -0.025em;
  line-height: 1.0;
}
.artifact__tagline {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
  max-width: 50ch;
}
.artifact__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
  font-family: var(--f-mono);
}
@media (max-width: 520px) {
  .artifact__meta { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
.artifact__meta > div { display: grid; gap: 4px; }
.artifact__meta dt {
  font-size: 9.5px; color: var(--ink-mute);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.artifact__meta dd {
  font-size: 16px;
  font-variation-settings: "wght" 420;
  font-weight: 420;
  color: var(--ink);
  font-feature-settings: "tnum";
}
.artifact__meta dd em { color: var(--accent); }
.artifact__actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

.artifact__instrument {
  position: relative;
  aspect-ratio: 4/3;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background:
    linear-gradient(135deg, var(--surface), var(--surface-2));
  overflow: hidden;
}
.artifact__instrument::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--rule-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule-soft) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.artifact__instrument canvas, .artifact__instrument svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.artifact__instrument-label {
  position: absolute;
  top: 12px; left: 12px;
  font-family: var(--f-mono); font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 2;
}
.artifact__instrument-label .acc { color: var(--accent); }

.artifact:nth-child(even) {
  grid-template-columns: 1.1fr 1fr;
}
.artifact:nth-child(even) .artifact__copy {
  order: 2; padding-right: 0; padding-left: clamp(20px, 4vw, 56px);
}
.artifact:nth-child(even) .artifact__instrument { order: 1; }

@media (max-width: 800px) {
  .artifact, .artifact:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .artifact__copy, .artifact:nth-child(even) .artifact__copy {
    padding: 0;
  }
  .artifact:nth-child(even) .artifact__copy { order: 1; }
  .artifact:nth-child(even) .artifact__instrument { order: 2; }
}

/* ===== PROFILE (terminal About) ===== */
.profile {
  max-width: var(--max);
  margin: 0 auto;
  padding-bottom: clamp(80px, 10vw, 140px);
}
.profile__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
  padding-top: clamp(96px, 14vw, 180px);
}
.profile__title {
  font-family: var(--f-display);
  font-variation-settings: "wght" 380;
  font-weight: 380;
  font-size: clamp(36px, 5.5vw, 64px);
  letter-spacing: -0.022em;
  line-height: 1.05;
  margin: 14px 0 28px;
  max-width: 18ch;
}
.profile__lede {
  font-size: clamp(18px, 1.6vw, 21px);
  color: var(--ink);
  line-height: 1.55;
  margin-bottom: 24px;
  font-variation-settings: "wght" 380;
  font-weight: 380;
}
.profile__copy { color: var(--ink-soft); margin-top: 16px; line-height: 1.7; font-size: 15.5px; }
.profile__copy a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); transition: border-color .2s; }
.profile__copy a:hover { border-color: var(--accent); }

/* ===== Constellation (about-me map) ===== */
.profile__constellation {
  position: relative;
  padding: 22px 22px 24px;
  border: 1px solid var(--rule);
  background: color-mix(in oklab, var(--surface) 86%, transparent);
  border-radius: 4px;
  display: grid;
  gap: 14px;
}
.const__head {
  display: flex; flex-wrap: wrap;
  align-items: baseline; justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--rule);
}
.const__sub {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  font-style: italic;
}
.const {
  width: 100%;
  height: auto;
  display: block;
  color: var(--ink-soft);
  overflow: hidden;
}
.const__lines {
  color: var(--accent);
  opacity: 0.16;
}
.const__star circle {
  fill: var(--ink-soft);
  transform-box: fill-box;
  transform-origin: center;
  transition: filter .25s var(--ease), transform .25s var(--ease);
  animation: const-twinkle 4s var(--ease-in-out) infinite;
}
.const__star text {
  font-family: var(--f-mono);
  font-size: 11px;
  fill: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  pointer-events: none;
  transition: fill .25s var(--ease);
}
.const__star:hover circle {
  filter: brightness(1.4) drop-shadow(0 0 6px currentColor);
  transform: scale(1.4);
}
.const__star:hover text { fill: var(--ink); }

/* Per-star color variants — each twinkles in its own hue */
.const__star--blue   circle { fill: var(--accent); }
.const__star--green  circle { fill: var(--signal); }
.const__star--amber  circle { fill: var(--accent-warm); }
.const__star--purple circle { fill: var(--syntax-key); }
.const__star--white  circle { fill: var(--ink); }
.const__star--yellow circle { fill: var(--syntax-num); }
.const__star--rose   circle { fill: #FFB7C5; }

/* Stagger animation phase + speed so they don't blink in unison */
.const__star--blue   circle { animation-delay: 0.2s; animation-duration: 3.6s; }
.const__star--green  circle { animation-delay: 1.4s; animation-duration: 4.4s; }
.const__star--amber  circle { animation-delay: 0.8s; animation-duration: 3.9s; }
.const__star--purple circle { animation-delay: 2.1s; animation-duration: 4.7s; }
.const__star--white  circle { animation-delay: 0.5s; animation-duration: 3.3s; }
.const__star--yellow circle { animation-delay: 1.7s; animation-duration: 4.1s; }
.const__star--rose   circle { animation-delay: 1.1s; animation-duration: 3.7s; }

/* Core star — distinguished by glow + pulse + accent label */
.const__star--core circle {
  fill: var(--accent);
  filter: drop-shadow(0 0 6px color-mix(in oklab, var(--accent) 60%, transparent));
  animation: const-pulse 2.6s var(--ease-in-out) infinite;
}
.const__star--core text {
  fill: var(--accent);
  font-weight: 500;
  letter-spacing: 0.06em;
}
.const__caption {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
  padding-top: 4px;
  border-top: 1px dashed var(--rule);
  padding-top: 14px;
  margin-top: 4px;
}
.const__caption em {
  color: var(--accent);
  font-style: italic;
}

@keyframes const-twinkle {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
@keyframes const-pulse {
  0%, 100% { transform: scale(1);    opacity: 0.85; }
  50%      { transform: scale(1.18); opacity: 1; }
}

@media (max-width: 920px) {
  .profile__inner { grid-template-columns: 1fr; }
  .profile__constellation { max-width: 480px; }
}

/* ===== STACK (Skills) — orbital classification ===== */
.stack {
  max-width: var(--max);
  margin: 0 auto;
  padding-bottom: clamp(80px, 10vw, 140px);
}
.stack__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 56px);
  align-items: stretch;
}
.stack__col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.stack__col > .overline { display: block; margin-bottom: 24px; }

.stack__groups {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 1fr;
  gap: 10px;
  flex: 1;
}
.stack__group {
  padding: 20px 22px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: color-mix(in oklab, var(--surface) 50%, transparent);
  transition: border-color .25s var(--ease), background .25s var(--ease);
  display: flex;
  flex-direction: column;
}
.stack__group:hover {
  border-color: var(--rule-strong);
  background: var(--surface);
}
.stack__group h4 {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.stack__group ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
}
.stack__group li {
  padding: 5px 11px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 999px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.stack__group li:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 920px) {
  .stack__grid { grid-template-columns: 1fr; }
  .stack__groups { grid-auto-rows: auto; }
}

/* ===== CAPABILITIES ===== */
.caps {
  max-width: var(--max);
  margin: 0 auto;
  padding-bottom: clamp(80px, 10vw, 140px);
}
.caps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cap {
  position: relative;
  padding: 32px 28px 28px;
  border: 1px solid var(--rule);
  background: var(--surface);
  border-radius: 2px;
  display: grid; gap: 14px;
  transition: border-color .25s var(--ease), transform .35s var(--ease);
}
.cap:hover { border-color: var(--rule-strong); transform: translateY(-3px); }
.cap__num {
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.cap h3 {
  font-family: var(--f-display);
  font-variation-settings: "wght" 480;
  font-weight: 480;
  font-size: 22px;
  letter-spacing: -0.012em;
}
.cap p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.6; }
.cap ul { display: grid; gap: 6px; padding-top: 12px; border-top: 1px dashed var(--rule); }
.cap ul li {
  position: relative; padding-left: 16px;
  color: var(--ink-soft); font-size: 13.5px;
}
.cap ul li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 6px; height: 1px; background: var(--accent);
}
@media (max-width: 800px) { .caps__grid { grid-template-columns: 1fr; } }

/* ===== DOSSIER (Resume) ===== */
.dossier {
  max-width: var(--max);
  margin: 0 auto;
  padding-bottom: clamp(80px, 10vw, 140px);
}
.dossier__inner { display: grid; gap: clamp(32px, 5vw, 56px); }
.dossier__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.dossier__block {
  padding: 24px;
  border: 1px solid var(--rule);
  background: var(--surface);
  border-radius: 2px;
  display: grid; gap: 14px;
}
.dossier__list { display: grid; gap: 12px; }
.dossier__list h4 {
  font-family: var(--f-display);
  font-variation-settings: "wght" 480;
  font-weight: 480;
  font-size: 15px;
}
.dossier__list p {
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--ink-mute);
  margin-top: 4px;
}
.dossier__cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; }
.dossier__note { font-family: var(--f-mono); font-size: 11px; color: var(--ink-mute); }
@media (max-width: 800px) { .dossier__grid { grid-template-columns: 1fr; } }

/* ===== TRANSMISSION (Contact) ===== */
.transmission {
  max-width: var(--max);
  margin: 0 auto;
  padding-bottom: clamp(80px, 10vw, 140px);
  position: relative;
}
.transmission__inner {
  display: grid; gap: 24px; justify-items: start;
  padding-top: clamp(80px, 10vw, 120px);
  max-width: 920px;
}
.transmission__title {
  font-family: var(--f-display);
  font-variation-settings: "wght" 380;
  font-weight: 380;
  font-size: clamp(40px, 7vw, 96px);
  letter-spacing: -0.03em;
  line-height: 0.96;
  margin-top: 4px;
}
.transmission__title em { color: var(--accent); font-style: normal; }

.transmission__email {
  position: relative;
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--f-display);
  font-variation-settings: "wght" 480;
  font-weight: 480;
  font-size: clamp(22px, 3.6vw, 38px);
  letter-spacing: -0.012em;
  color: var(--accent);
  padding: 8px 4px;
  margin: 16px 0 8px;
}
.transmission__email-text {
  background-image: linear-gradient(to right, var(--accent), var(--accent));
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .4s var(--ease);
}
.transmission__email:hover .transmission__email-text { background-size: 0% 1px; }
.transmission__email svg { transition: transform .3s var(--ease-out); }
.transmission__email:hover svg { transform: translate(4px, -4px); }

.transmission__note { max-width: 56ch; color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
.transmission__clock {
  display: inline-flex; gap: 16px; align-items: center;
  margin-top: 28px;
  color: var(--ink-mute);
  font-size: 13px;
}
.transmission__clock #clock { color: var(--accent); font-feature-settings: "tnum"; }

/* ===== CHANNELS (Links) ===== */
.channels { max-width: var(--max); margin: 0 auto; padding-bottom: clamp(80px, 10vw, 140px); }
.channels__grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.channel {
  position: relative;
  padding: 26px;
  border: 1px solid var(--rule);
  background: var(--surface);
  border-radius: 2px;
  display: grid; gap: 8px;
  transition: border-color .25s var(--ease), transform .3s var(--ease);
}
.channel:hover { border-color: var(--rule-strong); transform: translateY(-2px); }
.channel__top { display: flex; justify-content: space-between; align-items: center; }
.channel__host { font-family: var(--f-mono); font-size: 11px; color: var(--ink-mute); }
.channel__arrow {
  font-size: 16px; color: var(--ink-mute);
  transition: transform .3s var(--ease-out), color .2s var(--ease);
}
.channel:hover .channel__arrow { color: var(--accent); transform: translate(2px, -2px); }
.channel h3 {
  font-family: var(--f-display);
  font-variation-settings: "wght" 480;
  font-weight: 480;
  font-size: 20px;
  letter-spacing: -0.012em;
}
.channel p { color: var(--ink-soft); font-size: 13.5px; line-height: 1.55; }
.channel__handle { font-family: var(--f-mono); color: var(--ink-mute); font-size: 11px; margin-top: 4px; }
@media (max-width: 700px) { .channels__grid { grid-template-columns: 1fr; } }

/* ===== TYPING TEST ===== */
.diversion { max-width: var(--max); margin: 0 auto; padding-bottom: clamp(80px, 10vw, 140px); }
.type__card {
  position: relative;
  padding: clamp(24px, 3.5vw, 36px);
  border: 1px solid var(--rule);
  background: var(--surface);
  border-radius: 2px;
  display: grid; gap: 22px;
}
.type__diff { display: flex; gap: 4px; flex-wrap: wrap; }
.type__diff button {
  padding: 10px 14px;
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-mute);
  border: 1px solid var(--rule);
  border-radius: 2px;
  transition: all .2s var(--ease);
  min-height: 38px;
}
.type__diff button.is-active { color: var(--accent); border-color: var(--accent); background: color-mix(in oklab, var(--accent) 8%, transparent); }
.type__diff-note { font-size: 9.5px; opacity: .6; margin-left: 4px; }

.type__stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.type__stat { display: flex; flex-direction: column; gap: 4px; }
.type__stat-label { font-family: var(--f-mono); color: var(--ink-mute); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.type__stat-val {
  font-family: var(--f-display);
  font-variation-settings: "wght" 380;
  font-weight: 380;
  font-size: clamp(22px, 2.4vw, 28px);
  color: var(--accent);
  font-feature-settings: "tnum";
}
.type__stat-val em { font-size: 13px; color: var(--ink-mute); margin-left: 2px; }

.type__stage {
  position: relative;
  padding: 22px;
  background: var(--bg-deep);
  border: 1px solid var(--rule);
  border-radius: 2px;
  cursor: text;
  min-height: 132px;
  transition: border-color .25s var(--ease);
}
.type__stage.is-active { border-color: var(--accent); box-shadow: 0 0 24px -8px var(--accent-glow); }
.type__text {
  font-family: var(--f-mono);
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.7;
  color: var(--ink-mute);
  word-break: break-word;
}
.type__text .ch.is-ok { color: var(--ink); }
.type__text .ch.is-err {
  color: var(--danger);
  background: color-mix(in oklab, var(--danger) 14%, transparent);
}
.type__text .ch.is-current {
  color: var(--accent);
  background: color-mix(in oklab, var(--accent) 14%, transparent);
  animation: cursor-blink 1s steps(2) infinite;
}
.type__input {
  position: absolute; opacity: 0; pointer-events: none;
  inset: 0; border: 0; outline: 0;
}
.type__hint {
  margin-top: 14px;
  font-family: var(--f-mono); font-size: 10.5px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}
.type__result-inner {
  padding: 18px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--bg-deep);
}
.type__result-title {
  font-family: var(--f-display);
  font-variation-settings: "wght" 480;
  font-weight: 480;
  font-size: 22px;
  margin: 6px 0;
}
.type__result-copy { color: var(--ink-soft); }
.type__result-copy strong { color: var(--accent); }
.type__bar { margin-top: 14px; }
.type__bar-track {
  height: 3px;
  background: var(--rule);
  border-radius: 4px;
  overflow: hidden;
}
.type__bar-fill {
  height: 100%; width: 0;
  background: linear-gradient(to right, var(--accent), var(--accent-warm));
  transition: width .8s var(--ease-out);
}
.type__bar-ticks {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-family: var(--f-mono); color: var(--ink-mute);
  font-size: 9.5px;
}
.type__bar-label { font-family: var(--f-mono); color: var(--ink-mute); margin-top: 12px; font-size: 9.5px; }
.type__plug {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--rule);
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.type__plug a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
  transition: border-color .2s var(--ease);
  white-space: nowrap;
}
.type__plug a:hover { border-color: var(--accent); }
.type__plug-arrow {
  display: inline-block;
  margin-left: 2px;
  transition: transform .25s var(--ease-out);
}
.type__plug a:hover .type__plug-arrow { transform: translate(2px, -2px); }
.type__actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 700px) { .type__stats { grid-template-columns: repeat(2, 1fr); } }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--rule);
  padding: clamp(48px, 6vw, 80px) var(--pad-x) 32px;
  margin-top: 40px;
}
.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
}
.footer__col--brand .footer__brand {
  font-family: var(--f-display);
  font-variation-settings: "wght" 500;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.012em;
}
.footer__col--brand .footer__tag {
  color: var(--ink-soft); font-size: 14px; margin-top: 4px;
}
.footer__col .overline { margin-bottom: 14px; display: block; }
.footer__col ul { display: grid; gap: 8px; }
.footer__col a {
  color: var(--ink-soft);
  font-size: 14px;
  transition: color .2s var(--ease);
}
.footer__col a:hover { color: var(--accent); }

.footer__base {
  max-width: var(--max);
  margin: 40px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; gap: 16px;
  color: var(--ink-mute); font-size: 12px;
  flex-wrap: wrap;
}
.footer__base a:hover { color: var(--accent); }
@media (max-width: 760px) { .footer__inner { grid-template-columns: 1fr; gap: 28px; } }

/* ===== Palette / Sheet / Mobile ===== */
.palette, .sheet, .mobile {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: start center;
  padding: clamp(40px, 10vh, 120px) 16px;
}
.palette[hidden], .sheet[hidden], .mobile[hidden] { display: none; }

.palette__backdrop, .sheet__backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 6, 9, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
[data-theme="light"] .palette__backdrop,
[data-theme="light"] .sheet__backdrop { background: rgba(11, 14, 20, 0.4); }

.palette__panel {
  position: relative;
  width: 100%; max-width: 580px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.6);
}
.palette__input {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule);
}
.palette__input svg { opacity: .6; flex-shrink: 0; }
.palette__input input {
  flex: 1;
  border: 0; outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit; font-size: 15px;
}
.palette__list { max-height: 50vh; overflow-y: auto; padding: 4px; }
.palette__item {
  display: grid; grid-template-columns: 24px 1fr auto;
  gap: 12px; align-items: center;
  padding: 12px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .15s var(--ease);
  min-height: 48px;
}
.palette__item.is-active { background: color-mix(in oklab, var(--accent) 8%, transparent); }
.palette__item-icon {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-family: var(--f-mono); font-size: 13px;
  color: var(--accent);
}
.palette__item-text > div:first-child { font-size: 14px; color: var(--ink); }
.palette__item-sub { color: var(--ink-mute); font-size: 12px; margin-top: 2px; }
.palette__item-kbd {
  font-family: var(--f-mono); font-size: 10.5px;
  color: var(--ink-mute);
  padding: 2px 6px;
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.palette__empty { padding: 24px; color: var(--ink-mute); font-size: 14px; text-align: center; font-family: var(--f-mono); }
.palette__foot {
  display: flex; gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--rule);
  font-family: var(--f-mono);
  color: var(--ink-mute);
  font-size: 10px;
}
.palette__foot kbd { background: transparent; min-width: 18px; height: 18px; }

.sheet__panel {
  position: relative;
  width: 100%; max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}
.sheet__panel header {
  display: flex; justify-content: space-between; align-items: start;
  padding: 22px 24px;
  border-bottom: 1px solid var(--rule);
}
.sheet__panel header h3 {
  font-family: var(--f-display);
  font-variation-settings: "wght" 480;
  font-weight: 480;
  font-size: 22px;
  margin-top: 6px;
}
.sheet__close {
  width: 32px; height: 32px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-size: 18px;
  display: grid; place-items: center;
}
.sheet__close:hover { border-color: var(--accent); color: var(--accent); }
.sheet__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 24px; }
.sheet__grid dl { display: grid; gap: 10px; margin-top: 14px; }
.sheet__grid dl > div {
  display: grid; grid-template-columns: 80px 1fr;
  align-items: center;
}
.sheet__grid dt { display: flex; gap: 4px; }
.sheet__grid dd { color: var(--ink-soft); font-size: 13.5px; }
@media (max-width: 600px) { .sheet__grid { grid-template-columns: 1fr; } }

.mobile { padding: 0; align-items: stretch; }
.mobile__panel {
  position: relative; inset: 0;
  background: var(--bg-deep);
  display: flex; flex-direction: column;
  padding: 20px var(--pad-x) 32px;
  border: 0;
}
.mobile__panel header {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}
.mobile__brand { font-family: var(--f-display); font-variation-settings: "wght" 500; font-weight: 500; font-size: 16px; }
.mobile__close {
  width: 36px; height: 36px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-size: 22px;
  display: grid; place-items: center;
}
.mobile__panel nav { display: grid; gap: 4px; padding: 24px 0; flex: 1; align-content: start; }
.mobile__panel nav a {
  display: grid; grid-template-columns: 32px 1fr;
  align-items: baseline; gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--f-display);
  font-variation-settings: "wght" 420;
  font-weight: 420;
  font-size: 22px;
  letter-spacing: -0.015em;
  transition: color .2s var(--ease), padding-left .2s var(--ease);
}
.mobile__panel nav a span { font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-mute); }
.mobile__panel nav a:hover, .mobile__panel nav a:active { color: var(--accent); padding-left: 6px; }
.mobile__foot { display: grid; gap: 12px; padding-top: 24px; border-top: 1px solid var(--rule); }
.mobile__theme {
  padding: 12px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-size: 14px;
}
.mobile__foot a { font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-mute); }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 16px;
  background: var(--ink); color: var(--bg);
  border-radius: 2px;
  font-family: var(--f-mono); font-size: 12px;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  z-index: 200;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Reveal fallback ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.in-view { opacity: 1; transform: none; }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.1s !important;
  }
  .nav__brand-mark svg { animation: none; }
  .reveal { opacity: 1; transform: none; }
}

/* ===== Print ===== */
@media print {
  .nav, .reticle, .scene, .footer, .toast, .palette, .sheet, .mobile { display: none !important; }
  body { background: white; color: black; }
}
