/* ============================================================
   Blaxk-C137 — Design System  (v4)
   Multi-page rebuild · 2026
   ------------------------------------------------------------
   Layers:  1 tokens · 2 reset · 3 layout · 4 components
            5 pages · 6 utilities · 7 responsive
   ============================================================ */

/* ============================================================
   1 — TOKENS
   ============================================================ */
:root {
  /* --- Surface ramp: near-black graphite, not flat black --- */
  --ink-900: #07070a;
  --ink-800: #0a0a0e;
  --ink-700: #0f0f14;
  --ink-600: #14141a;
  --ink-500: #1b1b22;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);

  /* --- Text --- */
  --text: #f2f2f4;
  --text-muted: #9d9daa;
  --text-dim: #6a6a76;

  /* --- Ember (primary accent, used sparingly) --- */
  --ember: #ff4d3d;
  --ember-soft: #ff7a5c;
  --ember-deep: #d92e1f;
  --ember-glow: rgba(255, 77, 61, 0.16);
  --ember-wash: rgba(255, 77, 61, 0.07);

  /* --- Secondary accents (used one per context, never together) --- */
  --amber: #f5a524;
  --teal: #2dd4bf;
  --violet: #a78bfa;
  --steel: #8aa0b8;
  --gold: #e0bb6b;
  --live: #34d399;

  /* --- Glass (only nav, docks, and hero chrome) --- */
  --glass: rgba(18, 18, 24, 0.62);
  --glass-line: rgba(255, 255, 255, 0.09);
  --blur: 18px;

  /* --- Grade --- */
  --grad-ember: linear-gradient(135deg, var(--ember) 0%, #ff8a3d 100%);
  --grad-text: linear-gradient(120deg, #fff 12%, #ffb4a6 58%, var(--ember) 100%);
  --grad-hair: linear-gradient(90deg, transparent, var(--line-strong), transparent);

  /* --- Type --- */
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --fs-display: clamp(2.5rem, 1.5rem + 3.6vw, 4.35rem);
  --fs-h1: clamp(2.1rem, 1.5rem + 2.6vw, 3.6rem);
  --fs-h2: clamp(1.65rem, 1.2rem + 1.9vw, 2.6rem);
  --fs-h3: clamp(1.15rem, 1rem + 0.7vw, 1.45rem);
  --fs-body: clamp(1rem, 0.96rem + 0.18vw, 1.075rem);
  --fs-sm: 0.9rem;
  --fs-xs: 0.78rem;

  /* --- Space --- */
  --s-1: 0.25rem; --s-2: 0.5rem;  --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.5rem; --s-6: 2rem;    --s-7: 3rem;    --s-8: 4rem;
  --s-9: 6rem;   --s-10: 8rem;

  /* --- Layout --- */
  --wrap: 1180px;
  --wrap-wide: 1340px;
  --nav-h: 72px;
  --r-sm: 8px; --r: 14px; --r-lg: 22px; --r-full: 999px;

  /* --- Motion --- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --z-base: 1; --z-sticky: 100; --z-nav: 200; --z-toast: 400;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: dark;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text);
  background: var(--ink-900);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 3px; }

::selection { background: rgba(255, 77, 61, 0.32); color: #fff; }

/* thin scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-900); }
::-webkit-scrollbar-thumb { background: #26262e; border-radius: 99px; border: 2px solid var(--ink-900); }
::-webkit-scrollbar-thumb:hover { background: #35353f; }

/* --- Page ambience: one grain + one glow, not four orbs --- */
.ambience {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
.ambience::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(760px 420px at 78% -8%, rgba(255, 77, 61, 0.13), transparent 62%),
    radial-gradient(680px 500px at 6% 12%, rgba(138, 160, 184, 0.07), transparent 66%),
    radial-gradient(900px 620px at 50% 108%, rgba(255, 122, 92, 0.07), transparent 70%);
}
.ambience::after {
  content: ""; position: absolute; inset: 0; opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.page { position: relative; z-index: var(--z-base); }

/* ============================================================
   3 — LAYOUT
   ============================================================ */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-wide { width: min(100% - 2.5rem, var(--wrap-wide)); margin-inline: auto; }

.section { padding: clamp(3.5rem, 6vw, 6.5rem) 0; position: relative; }
.section--tight { padding: clamp(2.5rem, 4vw, 4rem) 0; }
.hair { height: 1px; background: var(--grad-hair); border: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-size: var(--fs-xs);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ember-soft);
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.6;
}

.h-sec {
  font-family: var(--font-display);
  font-size: var(--fs-h2); line-height: 1.1;
  letter-spacing: -0.022em; font-weight: 600;
  margin-top: var(--s-3);
}
.h-sec + .lede { margin-top: var(--s-4); }
.lede { color: var(--text-muted); max-width: 62ch; font-size: 1.03rem; }

.sec-head { max-width: 74ch; margin-bottom: clamp(2rem, 3.6vw, 3.4rem); }
.sec-head--split {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: var(--s-5);
  max-width: none;
}
.sec-head--split > div { max-width: 62ch; }

/* ============================================================
   4 — COMPONENTS
   ============================================================ */

/* ---- 4.1 Floating dock nav (21st.dev "Floating Dock" pattern) ---- */
.nav-shell {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: var(--z-nav); width: min(100% - 1.5rem, 1080px);
}
.dock {
  display: flex; align-items: center; gap: var(--s-4);
  padding: 0.5rem 0.6rem 0.5rem 1.05rem;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-full);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.dock.is-stuck {
  background: rgba(12, 12, 17, 0.86);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 600;
  font-size: 1rem; letter-spacing: -0.015em; white-space: nowrap;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--grad-ember); color: #140604;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.78rem;
  box-shadow: 0 4px 14px rgba(255, 77, 61, 0.34);
}
.brand em { font-style: normal; color: var(--text-dim); font-weight: 400; font-size: 0.86em; }

.dock-links {
  display: flex; align-items: center; gap: 2px; margin-left: auto;
}
.dock-link {
  position: relative; padding: 0.5rem 0.9rem; border-radius: var(--r-full);
  font-size: 0.92rem; color: var(--text-muted);
  transition: color 0.25s var(--ease);
}
.dock-link:hover { color: var(--text); }
.dock-link[aria-current="page"] { color: var(--text); }
.dock-link[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; translate: -50% 0;
  width: 16px; height: 2px; border-radius: 2px; background: var(--ember);
  box-shadow: 0 0 10px var(--ember);
}
.dock-pill {
  position: absolute; z-index: -1; border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 0; transition: opacity 0.2s, transform 0.34s var(--ease), width 0.34s var(--ease), height 0.34s var(--ease);
}

.dock-cta { flex-shrink: 0; }
.dock-burger {
  display: none; width: 40px; height: 40px; margin-left: auto;
  border-radius: var(--r-full); border: 1px solid var(--line);
  place-items: center; gap: 4px;
}
.dock-burger span {
  display: block; width: 16px; height: 1.5px; background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.dock-burger[aria-expanded="true"] span:first-child { transform: translateY(2.75px) rotate(45deg); }
.dock-burger[aria-expanded="true"] span:last-child { transform: translateY(-2.75px) rotate(-45deg); }

/* mobile drawer */
.sheet {
  position: fixed; inset: 0; z-index: var(--z-sticky);
  background: rgba(6, 6, 9, 0.975);
  backdrop-filter: blur(26px) saturate(1.2); -webkit-backdrop-filter: blur(26px) saturate(1.2);
  display: grid; align-content: center; gap: var(--s-2);
  padding: var(--s-8) var(--s-6);
  opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.sheet.is-open { opacity: 1; visibility: visible; }
.sheet a {
  font-family: var(--font-display); font-size: clamp(1.8rem, 8vw, 2.6rem);
  font-weight: 500; letter-spacing: -0.03em; color: var(--text-muted);
  display: flex; align-items: baseline; gap: 0.7rem;
  padding: 0.35rem 0; transition: color 0.25s, translate 0.35s var(--ease);
}
.sheet a:hover, .sheet a[aria-current="page"] { color: var(--text); translate: 8px 0; }
.sheet a i { font-family: var(--font-mono); font-style: normal; font-size: 0.7rem; color: var(--ember); }
.sheet .sheet-foot {
  margin-top: var(--s-6); display: flex; gap: var(--s-4); flex-wrap: wrap;
  color: var(--text-dim); font-size: var(--fs-sm);
}

/* scroll progress (GSAP-driven scaleX) */
.scroll-bar {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  transform-origin: 0 50%; scale: 0 1; z-index: calc(var(--z-nav) + 1);
  background: var(--grad-ember); box-shadow: 0 0 12px rgba(255, 77, 61, 0.5);
}

/* ---- 4.2 Buttons ---- */
.btn {
  --btn-bg: var(--ink-600);
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: 0.55rem; padding: 0.72rem 1.3rem; border-radius: var(--r-full);
  font-size: 0.94rem; font-weight: 500; letter-spacing: -0.005em;
  border: 1px solid var(--line); background: var(--btn-bg); color: var(--text);
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s, box-shadow 0.3s;
  will-change: transform; white-space: nowrap;
}
.btn:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }

.btn--primary {
  background: var(--grad-ember); color: #180605; border-color: transparent;
  font-weight: 600; box-shadow: 0 8px 26px rgba(255, 77, 61, 0.3);
}
.btn--primary:hover { box-shadow: 0 12px 34px rgba(255, 77, 61, 0.44); }
.btn--ghost { background: transparent; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.04); }
.btn--sm { padding: 0.5rem 0.95rem; font-size: 0.85rem; }
.btn--wide { width: 100%; }

/* magnetic / spotlight sheen */
.btn--spotlight::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.18), transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.btn--spotlight:hover::before { opacity: 1; }

/* ---- 4.3 Panels & cards ---- */
.panel {
  background: linear-gradient(180deg, var(--ink-700), var(--ink-800));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  position: relative; overflow: hidden;
}
.panel--pad { padding: clamp(1.4rem, 2.4vw, 2.1rem); }

/* hairline top-glow used on feature panels */
.panel--lit::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 122, 92, 0.55), transparent);
}

/* spotlight-follow card (21st.dev card spotlight pattern) */
.card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--ink-700), var(--ink-800));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: border-color 0.35s var(--ease), transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  transition: opacity 0.4s var(--ease);
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 122, 92, 0.12), transparent 62%);
}
.card:hover { border-color: var(--glass-line); transform: translateY(-4px); box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45); }
.card:hover::before { opacity: 1; }

.tag {
  display: inline-block; padding: 0.2rem 0.6rem; border-radius: var(--r-full);
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.01em;
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line);
  color: var(--text-muted); white-space: nowrap;
}
.pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.32rem 0.75rem; border-radius: var(--r-full);
  font-size: var(--fs-xs); font-family: var(--font-mono); letter-spacing: 0.05em;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
}
.dot-live {
  width: 6px; height: 6px; border-radius: 50%; background: var(--live);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.16); animation: pulse 2.4s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: 0.45 } }

/* ============================================================
   5 — PAGES
   ============================================================ */

/* ---- 5.1 Hero ---- */
.hero { position: relative; padding-top: calc(var(--nav-h) + clamp(3rem, 8vw, 6.5rem)); padding-bottom: clamp(3rem, 6vw, 5rem); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero-status { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-5); }

.hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-display); line-height: 0.98; letter-spacing: -0.035em;
  margin-bottom: var(--s-5);
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .grad {
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-role {
  font-family: var(--font-mono); font-size: clamp(0.85rem, 2.4vw, 1rem);
  color: var(--ember-soft); letter-spacing: 0.02em; margin-bottom: var(--s-4);
  min-height: 1.5em;
}
.hero-role::before { content: "> "; color: var(--text-dim); }
.hero-copy { color: var(--text-muted); max-width: 54ch; margin-bottom: var(--s-6); }
.hero-copy strong { color: var(--text); font-weight: 600; }

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.hero-socials { display: flex; gap: var(--s-2); margin-top: var(--s-5); }
.ico-btn {
  width: 40px; height: 40px; border-radius: var(--r-full);
  display: grid; place-items: center; border: 1px solid var(--line);
  color: var(--text-muted); transition: color 0.25s, border-color 0.25s, transform 0.3s var(--ease), background 0.25s;
}
.ico-btn:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-2px); background: rgba(255, 255, 255, 0.04); }
.ico-btn svg { width: 18px; height: 18px; }

/* hero visual: 3D canvas frame */
.hero-stage {
  position: relative; aspect-ratio: 1 / 1; border-radius: var(--r-lg);
  border: 1px solid var(--line); overflow: hidden;
  background: radial-gradient(120% 120% at 70% 10%, #16161d 0%, #08080b 65%);
}
.hero-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-stage-fallback {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: var(--s-6);
  background:
    radial-gradient(60% 50% at 50% 40%, rgba(255, 77, 61, 0.14), transparent 70%),
    conic-gradient(from 200deg at 60% 40%, #14141a, #0b0b10, #17171f);
}
.hero-stage .stage-hud {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 0.7rem 0.95rem;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-3);
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-dim);
  background: linear-gradient(0deg, rgba(7,7,10,0.9), transparent);
  border-top: 1px solid var(--line);
}
.stage-hud b { color: var(--ember-soft); font-weight: 500; }
.stage-corner {
  position: absolute; width: 16px; height: 16px; border: 1px solid rgba(255,255,255,0.2);
}
.stage-corner.tl { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.stage-corner.tr { top: 12px; right: 12px; border-left: 0; border-bottom: 0; }
.stage-corner.bl { bottom: 12px; left: 12px; border-right: 0; border-top: 0; }
.stage-corner.br { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }

/* stats row */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--s-4); margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line); padding-top: var(--s-5);
}
.stat-num {
  font-family: var(--font-display); font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1;
}
.stat-num span { color: var(--ember); }
.stat-lbl { font-size: var(--fs-xs); color: var(--text-dim); font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 0.5rem; }

/* ---- 5.2 Marquee ---- */
.marquee {
  position: relative; overflow: hidden; border-block: 1px solid var(--line);
  padding: 0.95rem 0; margin-top: clamp(2.5rem, 5vw, 4rem);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; gap: 2.6rem; width: max-content; animation: drift 42s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes drift { to { transform: translateX(-50%); } }
.marquee-item {
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-dim);
  letter-spacing: 0.06em; display: inline-flex; align-items: center; gap: 0.6rem; white-space: nowrap;
}
.marquee-item::after { content: "◆"; font-size: 0.5rem; color: var(--ember); opacity: 0.5; }

/* ---- 5.3 Work grid ---- */
.filters {
  display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-6);
}
.filter {
  padding: 0.42rem 0.85rem; border-radius: var(--r-full); border: 1px solid var(--line);
  font-size: 0.84rem; color: var(--text-muted); background: transparent;
  transition: all 0.25s var(--ease); display: inline-flex; align-items: center; gap: 0.4rem;
}
.filter:hover { color: var(--text); border-color: var(--line-strong); }
.filter[aria-pressed="true"] {
  background: var(--ember-wash); border-color: rgba(255, 77, 61, 0.4); color: var(--ember-soft);
}
.filter i { font-style: normal; font-family: var(--font-mono); font-size: 0.7rem; opacity: 0.65; }

.work-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}
.work-card { display: flex; flex-direction: column; }
.work-card a.cover { display: block; position: relative; }

/* cover: real screenshot when we have one, procedural grade when we don't */
.cover {
  aspect-ratio: 16 / 10; overflow: hidden; position: relative;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(140deg, var(--ink-600), var(--ink-800));
}
.cover img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transition: transform 0.7s var(--ease), filter 0.5s var(--ease);
  filter: saturate(0.94) contrast(1.02);
}
.card:hover .cover img { transform: scale(1.045); filter: saturate(1.05) contrast(1.04); }
.cover--gen { display: grid; place-items: center; }
.cover--gen::before {
  content: ""; position: absolute; inset: 0; opacity: 0.9;
  background:
    radial-gradient(120% 90% at 22% 8%, var(--cg, rgba(255,77,61,0.22)), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255,255,255,0.028) 0 1px, transparent 1px 13px);
}
.cover--gen .cover-glyph {
  position: relative; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.9); text-shadow: 0 6px 30px rgba(0,0,0,0.6);
}
.cover--gen .cover-glyph small {
  display: block; font-family: var(--font-mono); font-size: 0.62rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.5);
  margin-top: 0.5rem; font-weight: 400;
}
.cover-badge {
  position: absolute; top: 0.7rem; left: 0.7rem; z-index: 2;
  padding: 0.22rem 0.6rem; border-radius: var(--r-full);
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em;
  background: rgba(7, 7, 10, 0.7); border: 1px solid var(--line);
  backdrop-filter: blur(8px); color: var(--text-muted); text-transform: uppercase;
}
.cover-badge.live { color: var(--live); border-color: rgba(52, 211, 153, 0.3); }

.work-body { padding: clamp(1.1rem, 2vw, 1.5rem); display: flex; flex-direction: column; gap: var(--s-3); flex: 1; }
.work-title {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 600;
  letter-spacing: -0.02em; display: flex; align-items: center; gap: 0.5rem;
}
.work-sub { font-size: var(--fs-sm); color: var(--text-muted); margin-top: -0.35rem; }
.work-desc { font-size: 0.93rem; color: var(--text-muted); }
.work-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding-top: var(--s-2); }
.work-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.work-link { font-size: 0.85rem; color: var(--ember-soft); display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.work-link svg { width: 14px; height: 14px; transition: translate 0.25s var(--ease); }
.work-link:hover svg { translate: 3px 0; }

/* compact list for the long tail */
.tail-list { border-top: 1px solid var(--line); }
.tail-row {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 2.2fr) auto;
  gap: var(--s-4); align-items: center;
  padding: 0.85rem 0.25rem; border-bottom: 1px solid var(--line);
  transition: background 0.3s, padding-left 0.3s var(--ease);
}
.tail-row:hover { background: rgba(255, 255, 255, 0.02); padding-left: 0.9rem; }
.tail-name { font-family: var(--font-display); font-weight: 500; display: flex; align-items: center; gap: 0.6rem; }
.tail-name a { color: inherit; text-decoration: none; }
.tail-name a:hover { color: var(--ember-soft); }
.tail-row:hover .tail-name a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ember); }
.tail-meta .work-link + .work-link { opacity: 0.72; }
.tail-name span { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-dim); }
.tail-desc { font-size: 0.88rem; color: var(--text-muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.tail-meta { display: flex; align-items: center; gap: var(--s-3); font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-dim); }

/* ---- 5.4 Bento (21st.dev bento pattern) ---- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(0.9rem, 1.6vw, 1.25rem); }
.bento > * { grid-column: span 2; }
.bento .b-2 { grid-column: span 2; }
.bento .b-3 { grid-column: span 3; }
.bento .b-4 { grid-column: span 4; }
.bento .b-6 { grid-column: span 6; }
.bento-card { padding: clamp(1.3rem, 2.2vw, 1.9rem); display: flex; flex-direction: column; gap: var(--s-3); }
.bento-card h3 { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; }
.bento-card p { color: var(--text-muted); font-size: 0.94rem; }
.bento-card ul { display: grid; gap: 0.5rem; margin-top: var(--s-2); }
.bento-card li { display: flex; gap: 0.6rem; font-size: 0.9rem; color: var(--text-muted); }
.bento-card li::before { content: "→"; color: var(--ember); flex-shrink: 0; font-family: var(--font-mono); font-size: 0.85rem; }
.bento-ico {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: var(--ember-soft);
}
.bento-ico svg { width: 19px; height: 19px; }
.bento-figure { margin-top: auto; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.bento-figure img { width: 100%; aspect-ratio: 16/9; object-fit: cover; object-position: top; }

/* ---- 5.5 Split feature ---- */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.split--media-rev { direction: rtl; }
.split--media-rev > * { direction: ltr; }
.split-media { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--ink-700); }
.split-media img { width: 100%; }

/* ---- 5.6 Capability rows (services) ---- */
.svc { border-top: 1px solid var(--line); }
.svc-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.25fr) auto;
  gap: clamp(1rem, 2.5vw, 2rem); align-items: start;
  padding: clamp(1.4rem, 3vw, 2.2rem) 0.25rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.35s var(--ease), padding-left 0.4s var(--ease);
}
.svc-row:hover { background: rgba(255, 255, 255, 0.018); padding-left: 0.9rem; }
.svc-num { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-dim); padding-top: 0.45rem; }
.svc-row h3 { font-family: var(--font-display); font-size: clamp(1.15rem, 1.6vw, 1.45rem); font-weight: 600; letter-spacing: -0.02em; }
.svc-row h3 + p { color: var(--text-muted); font-size: 0.92rem; margin-top: 0.5rem; }
.svc-list { display: grid; gap: 0.45rem; }
.svc-list li { font-size: 0.9rem; color: var(--text-muted); display: flex; gap: 0.55rem; }
.svc-list li::before { content: "—"; color: var(--ember); font-family: var(--font-mono); }
.svc-stack { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: flex-end; }

/* process steps (21st.dev stepper pattern) */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); counter-reset: step; }
.step { padding: clamp(1.2rem, 2vw, 1.7rem); position: relative; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--ember);
  letter-spacing: 0.1em;
}
.step h4 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; margin: 0.6rem 0 0.4rem; }
.step p { font-size: 0.9rem; color: var(--text-muted); }

/* ---- 5.7 Timeline (experience) ---- */
.timeline { position: relative; display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 1px;
  background: linear-gradient(180deg, transparent, var(--line-strong) 8%, var(--line-strong) 92%, transparent);
}
.tl-item { position: relative; padding-left: clamp(1.8rem, 4vw, 2.8rem); }
.tl-item::before {
  content: ""; position: absolute; left: 3px; top: 1.65rem; width: 11px; height: 11px;
  border-radius: 50%; background: var(--ink-800); border: 2px solid var(--ember);
  box-shadow: 0 0 0 4px rgba(255, 77, 61, 0.12);
}
.tl-date { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ember-soft); }
.tl-item h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; margin: 0.45rem 0 0.15rem; }
.tl-org { font-size: var(--fs-sm); color: var(--text-dim); }
.tl-item p { color: var(--text-muted); font-size: 0.93rem; margin-top: 0.6rem; }
.tl-win { display: grid; gap: 0.4rem; margin-top: 0.8rem; }
.tl-win li { font-size: 0.9rem; color: var(--text-muted); display: flex; gap: 0.55rem; }
.tl-win li::before { content: "▸"; color: var(--ember); font-size: 0.7rem; }

/* ---- 5.8 Skills ---- */
.skill-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.skill-row { display: grid; gap: 0.5rem; margin-bottom: 1.05rem; }
.skill-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); }
.skill-name { font-size: 0.93rem; font-weight: 500; }
.skill-lvl { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); }
.skill-track { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.skill-fill {
  height: 100%; border-radius: 99px; width: 0;
  background: linear-gradient(90deg, var(--ember-deep), var(--ember-soft));
  box-shadow: 0 0 12px rgba(255, 77, 61, 0.4);
}
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ---- 5.9 Certifications ---- */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(0.9rem, 1.6vw, 1.25rem); }
.cert { padding: 1.35rem; display: flex; flex-direction: column; gap: 0.6rem; min-height: 190px; }
.cert-issuer { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.cert h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; line-height: 1.28; letter-spacing: -0.015em; }
.cert-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); font-size: 0.82rem; }
.cert-foot a { color: var(--ember-soft); display: inline-flex; align-items: center; gap: 0.3rem; }
.cert-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- 5.10 Forms ---- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-4); }
.field { display: grid; gap: 0.45rem; }
.field label { font-size: 0.83rem; color: var(--text-muted); font-family: var(--font-mono); letter-spacing: 0.04em; }
.field label span { color: var(--ember); }
.input, .select, .textarea {
  width: 100%; padding: 0.78rem 0.95rem; border-radius: var(--r);
  background: rgba(255, 255, 255, 0.028); border: 1px solid var(--line);
  color: var(--text); font-size: 0.95rem; transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-dim); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: rgba(255, 77, 61, 0.5); background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 0 0 3px rgba(255, 77, 61, 0.11);
}
.textarea { resize: vertical; min-height: 140px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239d9daa' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.95rem center; padding-right: 2.4rem; }
.err { font-size: 0.78rem; color: #ff8a7a; min-height: 1em; }
.field.has-err .input, .field.has-err .textarea { border-color: rgba(255, 77, 61, 0.55); }

/* ---- 5.11 FAQ (accordion) ---- */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4); padding: 1.15rem 0.25rem; font-family: var(--font-display);
  font-size: 1.02rem; font-weight: 500; color: var(--text); transition: color 0.25s;
}
.faq-q:hover { color: var(--ember-soft); }
.faq-q i {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; font-style: normal; font-size: 0.9rem; color: var(--text-muted);
  transition: rotate 0.3s var(--ease), border-color 0.25s, color 0.25s;
}
.faq-q[aria-expanded="true"] i { rotate: 45deg; border-color: rgba(255,77,61,0.5); color: var(--ember); }
.faq-a { overflow: hidden; height: 0; }
.faq-a > div { padding: 0 0.25rem 1.2rem; color: var(--text-muted); font-size: 0.94rem; max-width: 78ch; }

/* ---- 5.12 CTA band ---- */
.cta-band {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.2rem, 4vw, 3rem);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: radial-gradient(120% 150% at 50% 0%, rgba(255, 77, 61, 0.13), transparent 62%), linear-gradient(180deg, var(--ink-700), var(--ink-800));
}
.cta-band h2 { font-family: var(--font-display); font-size: var(--fs-h1); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.cta-band p { color: var(--text-muted); margin: 1rem auto 1.8rem; max-width: 52ch; }
.cta-band .hero-actions { justify-content: center; }

/* ---- 5.13 Footer ---- */
.site-foot { border-top: 1px solid var(--line); margin-top: clamp(3rem, 6vw, 6rem); padding: clamp(2.5rem, 5vw, 4rem) 0 2rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
.foot-brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.9rem; max-width: 34ch; }
.foot-col h4 { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 1rem; }
.foot-col a, .foot-col li { display: block; font-size: 0.9rem; color: var(--text-muted); padding: 0.28rem 0; transition: color 0.2s, translate 0.25s var(--ease); }
.foot-col a:hover { color: var(--ember-soft); translate: 3px 0; }
.foot-bot {
  margin-top: clamp(2rem, 4vw, 3rem); padding-top: 1.5rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between; align-items: center;
  font-size: 0.82rem; color: var(--text-dim);
}
.foot-bot .mono { font-family: var(--font-mono); font-size: 0.75rem; }

/* ---- 5.14 Toast (21st.dev toast pattern) ---- */
.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: var(--z-toast); display: grid; gap: 0.6rem; width: min(360px, calc(100vw - 2rem)); }
.toast {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 0.9rem 1rem; border-radius: var(--r);
  background: rgba(14, 14, 19, 0.94); border: 1px solid var(--line-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  animation: toast-in 0.4s var(--ease);
}
.toast.out { animation: toast-out 0.3s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; translate: 0 14px; } }
@keyframes toast-out { to { opacity: 0; translate: 0 10px; } }
.toast-ico { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; color: var(--live); }
.toast.err .toast-ico { color: var(--ember); }
.toast b { display: block; font-size: 0.9rem; }
.toast p { font-size: 0.83rem; color: var(--text-muted); margin-top: 0.15rem; }
.toast button { margin-left: auto; color: var(--text-dim); font-size: 1.1rem; line-height: 1; }

/* ---- 5.15 404 ---- */
.err-page { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: var(--s-8) var(--s-5); }
.err-code {
  font-family: var(--font-mono); font-size: clamp(4rem, 18vw, 11rem); font-weight: 500;
  line-height: 0.9; letter-spacing: -0.05em;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.terminal {
  text-align: left; font-family: var(--font-mono); font-size: 0.82rem;
  background: rgba(10, 10, 14, 0.9); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1rem 1.1rem; margin: 1.8rem auto; max-width: 560px; color: var(--text-muted); line-height: 1.9;
}
.terminal .k { color: var(--ember-soft); }
.terminal .c { color: var(--text); }

/* ---- 5.16 Project detail ---- */
.pd-hero { padding-top: calc(var(--nav-h) + clamp(2.5rem, 6vw, 4.5rem)); }
.pd-title { font-family: var(--font-display); font-size: var(--fs-h1); font-weight: 600; letter-spacing: -0.03em; line-height: 1.03; margin: 0.8rem 0 1rem; }
.pd-sub { color: var(--text-muted); font-size: 1.06rem; max-width: 62ch; }
.pd-meta { display: flex; flex-wrap: wrap; gap: var(--s-5); margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.pd-meta div { display: grid; gap: 0.3rem; }
.pd-meta dt { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.pd-meta dd { font-size: 0.92rem; max-width: 66ch; }
.pd-meta > .pd-meta__wide { flex: 1 1 100%; }
.pd-meta__wide dd { font-size: 1.02rem; color: var(--text); }
.pd-shot { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); margin-top: clamp(2rem, 4vw, 3rem); background: var(--ink-700); }
.pd-shot img { width: 100%; }
.pd-cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.pd-cols h2 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 1rem; }
.pd-cols p { color: var(--text-muted); margin-bottom: 1rem; }
.pd-side { position: sticky; top: calc(var(--nav-h) + 1rem); display: grid; gap: var(--s-5); }

/* ---- 5.17 Prev/next ---- */
.pager { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-4); margin-top: clamp(2.5rem, 5vw, 4rem); }
.pager a { padding: 1.2rem 1.35rem; display: grid; gap: 0.35rem; }
.pager small { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.pager b { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; }
.pager .next { text-align: right; }

/* ============================================================
   6 — UTILITIES / MOTION PRIMITIVES
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.mt-4 { margin-top: var(--s-4); } .mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); } .mt-7 { margin-top: var(--s-7); }
.center { text-align: center; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; top: -100px; left: 1rem; z-index: 999; padding: 0.7rem 1rem;
  background: var(--ember); color: #170705; border-radius: var(--r); font-weight: 600;
  transition: top 0.25s var(--ease);
}
.skip:focus { top: 1rem; }

/* Scroll-reveal: the `motion` class is only added by site.js once GSAP is
   confirmed present, so content is never hidden when the CDN is unavailable. */
.motion .reveal { opacity: 0; }

.to-top {
  position: fixed; right: 1rem; bottom: 1rem; z-index: var(--z-sticky);
  width: 42px; height: 42px; border-radius: var(--r-full);
  display: grid; place-items: center; color: var(--text);
  background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(12px);
  opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s, transform 0.3s var(--ease);
}
.to-top.show { opacity: 1; visibility: visible; }
.to-top:hover { transform: translateY(-3px); border-color: var(--line-strong); }

/* ============================================================
   7 — RESPONSIVE
   ============================================================ */
@media (min-width: 1500px) { :root { --wrap: 1240px; --wrap-wide: 1420px; } }

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stage { max-width: 480px; }
  .pd-cols { grid-template-columns: 1fr; }
  .pd-side { position: static; }
  .bento > * { grid-column: span 3; }
  /* b-3 cards must span the full 6 cols here too, or the following rule
     (.bento > * { span 6 } at <=820px) loses to this one on specificity
     and leaves them at 3 columns = three 112px slivers on a phone. */
  .bento .b-3, .bento .b-4, .bento .b-6 { grid-column: span 6; }
  .svc-row { grid-template-columns: 44px minmax(0, 1fr); row-gap: 1rem; }
  .svc-stack { grid-column: 2; justify-content: flex-start; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  :root { --nav-h: 64px; }
  .dock-links, .dock-cta { display: none; }
  .dock-burger { display: grid; }
  .dock { justify-content: space-between; }
  .work-grid { grid-template-columns: 1fr; }
  .tail-row { grid-template-columns: 1fr; gap: 0.4rem; }
  .tail-desc { order: 3; }
  .bento > * { grid-column: span 6; }
}

@media (max-width: 560px) {
  .wrap, .wrap-wide { width: min(100% - 1.6rem, var(--wrap)); }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { flex: 1 1 auto; }
  .foot-grid { grid-template-columns: 1fr; }
  .toasts { right: 0.6rem; left: 0.6rem; width: auto; }
  .hero-stage .stage-hud { font-size: 0.6rem; }
}

/* print */
@media print {
  .nav-shell, .scroll-bar, .to-top, .toasts, .marquee, .hero-stage { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .panel { border-color: #ddd; }
}

/* ============================================================
   8 — PROBLEM-FIRST STORY BLOCKS
   ============================================================ */

/* card: the problem is the lead, not the feature list */
.prob {
  border-left: 2px solid rgba(255, 77, 61, 0.4);
  padding-left: 0.8rem;
  display: grid; gap: 0.3rem;
}
.prob-label {
  font-family: var(--font-mono); font-size: 0.63rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ember-soft);
}
.prob p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.55; }
.outcome-line {
  font-size: 0.85rem; color: var(--text-dim);
  display: flex; gap: 0.5rem; align-items: flex-start;
}
.outcome-line span { color: var(--live); flex-shrink: 0; }

/* detail page: the four-block story */
.story { display: grid; gap: clamp(1rem, 2vw, 1.5rem); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.story-block {
  padding: clamp(1.3rem, 2.2vw, 1.9rem);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--ink-700), var(--ink-800));
  display: grid; gap: 0.75rem; align-content: start;
  position: relative; overflow: hidden;
}
.story-block::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}
.story-tag {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-dim);
}
.story-text { font-size: clamp(0.97rem, 1.1vw, 1.06rem); line-height: 1.62; color: var(--text); }
.story-block--result {
  border-color: rgba(52, 211, 153, 0.28);
  background: linear-gradient(180deg, rgba(18, 34, 30, 0.55), var(--ink-800));
}
.story-block--result .story-tag { color: var(--live); }
.story-block--result::before { background: linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.45), transparent); }

.spec-list { display: grid; gap: 0.6rem; }
.spec-list li { display: flex; gap: 0.65rem; color: var(--text-muted); font-size: 0.94rem; }
.spec-list li > span:first-child { color: var(--ember); flex-shrink: 0; }

/* ============================================================
   9 — BACKGROUND ANIMATION + GLASSMORPHISM (restored & refined)
   ------------------------------------------------------------
   The original site had a circuit canvas, gradient orbs and
   glass cards. They're back — the orbs and canvas give the
   glass something real to refract, which is the whole point.
   ============================================================ */

/* ---- 9.1 Fixed background layer ---- */
.page-background {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}
.circuit-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0.55;
}
.gradient-orbs { position: absolute; inset: 0; }

.orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.34;
  will-change: transform;
}
.orb-1 {
  width: 52vw; height: 52vw; max-width: 780px; max-height: 780px;
  top: -16vw; right: -12vw;
  background: radial-gradient(circle, rgba(255, 77, 61, 0.6), transparent 70%);
  animation: orb-a 26s ease-in-out infinite;
}
.orb-2 {
  width: 46vw; height: 46vw; max-width: 680px; max-height: 680px;
  bottom: -16vw; left: -12vw;
  background: radial-gradient(circle, rgba(255, 138, 61, 0.45), transparent 70%);
  animation: orb-b 32s ease-in-out infinite;
}
.orb-3 {
  width: 38vw; height: 38vw; max-width: 560px; max-height: 560px;
  top: 34%; left: 50%;
  background: radial-gradient(circle, rgba(138, 160, 184, 0.34), transparent 70%);
  animation: orb-c 38s ease-in-out infinite;
}
@keyframes orb-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-5vw, 5vw, 0) scale(1.12); }
}
@keyframes orb-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); }
  50%      { transform: translate3d(7vw, -4vw, 0) scale(1); }
}
@keyframes orb-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-8vw, -6vw, 0) scale(1.16); }
}
@media (prefers-reduced-motion: reduce) {
  .orb { animation: none; }
}
@media (max-width: 700px) {
  .orb { filter: blur(58px); opacity: 0.26; }
  .circuit-bg { opacity: 0.38; }
}

/* ambience keeps only the grain now — the orbs handle the glow */
.ambience::before { background: none; }

/* ---- 9.2 Glass system ---- */
:root {
  --glass-fill: rgba(20, 20, 27, 0.52);
  --glass-fill-strong: rgba(16, 16, 22, 0.7);
  --glass-stroke: rgba(255, 255, 255, 0.10);
  --glass-stroke-hi: rgba(255, 255, 255, 0.16);
  --glass-blur: 18px;
  --glass-inner: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --glass-cast: 0 10px 34px rgba(0, 0, 0, 0.42);
}

.glass,
.card,
.panel,
.bento-card,
.story-block,
.cert,
.split-media,
.hero-stage,
.pd-shot,
.tail-row:hover,
.terminal {
  background: var(--glass-fill);
  border: 1px solid var(--glass-stroke);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(155%);
  backdrop-filter: blur(var(--glass-blur)) saturate(155%);
  box-shadow: var(--glass-inner), var(--glass-cast);
}

/* deeper frost for panels that hold a lot of text */
.panel, .story-block, .terminal {
  background: var(--glass-fill-strong);
}

/* hover: lift the stroke, not the fill */
.card:hover, .bento-card:hover {
  border-color: var(--glass-stroke-hi);
  box-shadow: var(--glass-inner), 0 22px 48px rgba(0, 0, 0, 0.5);
}

/* nav + drawer get a stronger frost so text stays legible over the canvas */
.dock {
  background: rgba(16, 16, 22, 0.55);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
}
.dock.is-stuck { background: rgba(14, 14, 19, 0.8); }

.ico-btn, .pill, .filter {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.035);
}

/* @supports fallback: solid surfaces where backdrop-filter is unsupported */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .card, .panel, .bento-card, .story-block, .cert, .split-media,
  .hero-stage, .pd-shot {
    background: var(--ink-700);
  }
  .dock { background: rgba(12, 12, 17, 0.94); }
}

/* mobile: lighter blur keeps scrolling smooth on cheaper phones */
@media (max-width: 700px) {
  :root { --glass-blur: 12px; }
}

/* ---- 9.3 Hero portrait card (your avatar, back where it belongs) ---- */
.hero-stage {
  aspect-ratio: 1 / 1.14;
  border-radius: var(--r-lg);
  padding: clamp(1rem, 2vw, 1.4rem);
  display: flex; flex-direction: column; gap: var(--s-4);
  position: relative; overflow: hidden;
}
.hero-stage canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}
/* keep the portrait + meta above the WebGL layer */
.portrait-wrap, .portrait-meta, .stage-hud, .hero-stage .stage-corner { position: relative; z-index: 2; }

.portrait-wrap {
  flex: 1; min-height: 0;
  display: grid; place-items: center;
  position: relative;
}
.portrait {
  width: min(74%, 260px); aspect-ratio: 1;
  object-fit: cover; object-position: 50% 22%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 6px rgba(255, 77, 61, 0.06);
  position: relative; z-index: 1;
}
/* the original had an animated ring — kept, with a conic sweep */
.portrait-ring {
  position: absolute; z-index: 0;
  width: min(80%, 284px); aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    rgba(255, 77, 61, 0) 0deg,
    rgba(255, 77, 61, 0.85) 60deg,
    rgba(255, 138, 61, 0.5) 130deg,
    rgba(255, 77, 61, 0) 220deg,
    rgba(255, 77, 61, 0) 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  animation: ring-spin 7s linear infinite;
}
@keyframes ring-spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) { .portrait-ring { animation: none; } }

.portrait-meta { text-align: center; position: relative; z-index: 2; }
.portrait-meta strong {
  font-family: var(--font-display); font-size: 1.06rem; font-weight: 600;
  letter-spacing: -0.015em; display: block;
}
.portrait-meta span {
  font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim);
}

.profile-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3); text-align: center;
  position: relative; z-index: 2;
  padding-top: var(--s-4); border-top: 1px solid var(--glass-stroke);
}
.profile-stats .stat-v {
  font-family: var(--font-display); font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 600; letter-spacing: -0.02em; line-height: 1;
}
.profile-stats .stat-v em { color: var(--ember); font-style: normal; }
.profile-stats .stat-k {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dim); margin-top: 0.4rem;
}

/* fallback badge — small, top-left, so it never collides with the portrait */
.hero-stage-fallback {
  position: absolute; inset: 0; z-index: 1;
  display: block; padding: 0; text-align: left;
  background: radial-gradient(70% 55% at 50% 38%, rgba(255, 77, 61, 0.13), transparent 72%);
  pointer-events: none;
}
.fallback-badge {
  position: absolute; top: 0.85rem; left: 0.9rem;
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dim);
  padding: 0.28rem 0.6rem; border-radius: var(--r-full);
  border: 1px solid var(--line); background: rgba(10, 10, 14, 0.5);
}

/* ============================================================
   10 — FIXES + BACKGROUND RESTORE (2026-10-16)
   ------------------------------------------------------------
   10.1 Mobile menu: the big display font was inheriting onto
        the sheet footer, blowing the email past the viewport.
   10.2 Service rows: on narrow screens the detail list was
        auto-placed into the 44px number column.
   10.3 Section glass panels, restored from the original build:
        every section sits on a frosted full-width pane with
        alternating opacity, so the animated background reads
        as depth behind the page instead of flat backdrop.
   ============================================================ */

/* ---- 10.1 Sheet footer must not inherit the display type ---- */
.sheet > a { /* was .sheet a — matched the footer links too */
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.sheet .sheet-foot a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  font-weight: 400;
  padding: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.sheet-foot { align-items: center; }

/* ---- 10.2 Service rows: keep every child in the text column ---- */
.svc-list, .svc-stack { grid-column: 2 / -1; }
.svc-stack { justify-content: flex-start; }
@media (max-width: 900px) {
  .svc-row { grid-template-columns: 2.6rem minmax(0, 1fr); }
  .svc-num { padding-top: 0.15rem; }
  .svc-list { margin-top: 0.9rem; }
}
@media (min-width: 901px) {
  .svc-list { grid-column: 3; margin-top: 0; }
  .svc-stack { grid-column: 4; justify-content: flex-end; }
}

/* ---- 10.3 Frosted section panels (original §6, restored) ---- */
:root {
  --section-blur: 34px;
  --section-glass-dark: rgba(9, 9, 12, 0.42);
  --section-glass-mid:  rgba(13, 13, 17, 0.30);
  --section-glass-warm: rgba(15, 12, 13, 0.36);
}
.section { background: transparent; }
.section::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  pointer-events: none;
  backdrop-filter: blur(var(--section-blur));
  -webkit-backdrop-filter: blur(var(--section-blur));
  border-top: 1px solid rgba(255, 255, 255, 0.028);
  border-bottom: 1px solid rgba(255, 255, 255, 0.028);
  box-shadow: inset 0 1px 0 rgba(255, 77, 61, 0.045);
}
/* alternate the panes so the page reads as stacked glass */
.section:nth-of-type(odd)::before  { background: var(--section-glass-dark); }
.section:nth-of-type(even)::before { background: var(--section-glass-mid); }
.section:nth-of-type(even) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02); }
.section--warm::before { background: var(--section-glass-warm) !important; }

/* falls back to a flat pane where backdrop-filter is unsupported */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .section::before { background: rgba(10, 10, 13, 0.72) !important; }
}
@media (max-width: 700px) {
  :root { --section-blur: 22px; }
  .section::before { border-top: none; border-bottom: none; }
}

/* ============================================================
   11 — HERO, REBUILT AROUND THE AVATAR (2026-10-16)
   ------------------------------------------------------------
   The slogan headline is gone. The avatar now occupies the
   centre of the hero where the display type used to sit, and
   everything else — name, role, bio, actions, stats, socials —
   stacks beneath it in a single centred column.
   ============================================================ */

.hero .wrap > .hero-center {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.hero-status { justify-content: center; margin-bottom: var(--s-6); }

/* the avatar slab: wider and shorter than the old side card */
.hero .hero-stage {
  width: min(100%, 560px);
  height: clamp(320px, 34vw, 412px);
  aspect-ratio: auto;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
  transform-style: preserve-3d;
  box-shadow: var(--glass-shadow), var(--glass-inset), 0 30px 90px rgba(255, 77, 61, 0.07);
}
.hero .portrait-wrap { align-items: center; }

/* halo behind the avatar, breathing */
.portrait-halo {
  position: absolute; z-index: 0;
  width: min(78%, 300px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 77, 61, 0.30), rgba(255, 138, 61, 0.10) 55%, transparent 72%);
  filter: blur(18px);
  animation: halo-pulse 5.5s ease-in-out infinite;
}
@keyframes halo-pulse {
  0%, 100% { transform: scale(1);    opacity: 0.75; }
  50%      { transform: scale(1.12); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .portrait-halo { animation: none; } }

.hero .portrait {
  width: min(66%, 232px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.6), 0 0 0 6px rgba(255, 77, 61, 0.07),
              0 0 44px rgba(255, 77, 61, 0.16);
}
.hero .portrait-ring { width: min(72%, 254px); }

/* the name is the headline now */
.hero .hero-name {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.3rem, 7.4vw, 5.1rem);
  line-height: 0.98; letter-spacing: -0.042em;
  margin-bottom: var(--s-4); max-width: 20ch;
  background: linear-gradient(180deg, #fff 30%, #ffd9cf 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .hero-role {
  font-size: clamp(0.82rem, 2.2vw, 0.98rem);
  margin-bottom: var(--s-5);
}
.hero .hero-role::before { display: none; }
.hero .hero-copy { max-width: 64ch; margin-inline: auto; margin-bottom: var(--s-6); }
.hero .hero-actions { justify-content: center; }
.hero .hero-socials { justify-content: center; margin-top: var(--s-6); }

/* stats become a single frosted strip under the actions */
.hero .stats {
  width: 100%; max-width: 720px; margin-inline: auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-3);
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: 1.15rem clamp(1rem, 3vw, 1.75rem);
  border-top: none;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border: 1px solid var(--glass-stroke);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  box-shadow: var(--glass-inset);
}
.hero .stat-num { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
.hero .stat-lbl { margin-top: 0.35rem; }

@media (max-width: 820px) {
  .hero .hero-stage { height: clamp(290px, 62vw, 380px); }
  .hero .portrait { width: min(58%, 190px); }
  .hero .portrait-ring { width: min(64%, 210px); }
  .hero .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4) var(--s-3); }
  .hero-status { margin-bottom: var(--s-5); }
}
@media (max-width: 420px) {
  .hero .stats { padding: 1rem; }
  .hero .stat-num { font-size: 1.4rem; }
  .hero .stat-lbl { font-size: 0.6rem; letter-spacing: 0.06em; }
}

/* ---- 11.1 Stage: explicit sizing so the avatar never collides ---- */
.hero .hero-stage { height: auto; min-height: 0; }
.hero .portrait-wrap {
  flex: none;
  height: 236px;
  width: 100%;
}
.hero .portrait { width: 232px; height: 232px; }
.hero .portrait-ring { width: 252px; height: 252px; }
.hero .portrait-halo { width: 286px; height: 286px; }
.hero .portrait-meta { margin-top: 0.9rem; }
/* keep the webgl strictly behind the avatar, whatever three.js injects */
.hero-stage canvas { z-index: 0 !important; }
.hero .portrait-wrap { z-index: 2; }
.hero-stage { isolation: isolate; }

@media (max-width: 820px) {
  .hero .portrait-wrap { height: 196px; }
  .hero .portrait { width: 188px; height: 188px; }
  .hero .portrait-ring { width: 206px; height: 206px; }
  .hero .portrait-halo { width: 232px; height: 232px; }
}

/* ============================================================
   12 — MOTION LAYER CHROME (fx.js)
   ============================================================ */

/* 3D tilt: the glare sheet sits above the card, under its content */
.fx-tilting {
  will-change: transform;
  transform-style: preserve-3d;
  transition: box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.fx-tilting:hover {
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 77, 61, 0.14),
              0 0 46px rgba(255, 77, 61, 0.10);
}
.fx-glare {
  position: absolute; inset: 0; z-index: 3;
  border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity 0.45s var(--ease);
  mix-blend-mode: screen;
}

/* split-text lines */
.fx-line, .fx-mask { will-change: transform; }

/* the cursor lamp */
.fx-cursor {
  position: fixed; top: 0; left: 0;
  width: 360px; height: 360px; margin: -180px 0 0 -180px;
  border-radius: 50%; pointer-events: none; z-index: 0;   /* behind .page, so it lights the background without tinting text */
  opacity: 0; transition: opacity 0.5s var(--ease);
  background: radial-gradient(circle, rgba(255, 77, 61, 0.11), rgba(255, 138, 61, 0.05) 42%, transparent 68%);
}
@media (max-width: 900px) { .fx-cursor { display: none; } }

/* page curtain — never intercepts a click */
.fx-curtain {
  position: fixed; inset: 0; z-index: var(--z-toast);
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 100%, rgba(255, 77, 61, 0.30), transparent 62%),
    linear-gradient(180deg, #0a0a0d, #131317 55%, #1a1012);
  transform: scaleY(1);
  transform-origin: 50% 0%;
}

/* 13 — CV button in the dock (hidden where the dock collapses) */
.dock-cv { white-space: nowrap; }
@media (max-width: 980px) { .dock-cv { display: none; } }

/* 14 — footer pane (the original frosted it too, at --section-glass-footer) */
:root { --section-glass-footer: rgba(8, 8, 10, 0.46); }
.site-foot, footer.site-foot, body > .page > footer {
  position: relative;
  background: transparent;
}
.site-foot::before, footer.site-foot::before, body > .page > footer::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  pointer-events: none;
  background: var(--section-glass-footer);
  backdrop-filter: blur(var(--section-blur));
  -webkit-backdrop-filter: blur(var(--section-blur));
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-foot::before, footer.site-foot::before, body > .page > footer::before {
    background: rgba(8, 8, 10, 0.9);
  }
}

/* ============================================================
   15 — THE WEB BACKGROUND, MADE VISIBLE EVERYWHERE
   ------------------------------------------------------------
   Round-2 mistake: the section panes carried a 34px backdrop
   blur across the full page width. A 1px node network blurred
   at 34px is smeared into a flat grey wash — which is exactly
   why the background "disappeared" everywhere except the hero.
   The panes keep their alternating tint and hairlines; the blur
   is gone, so the web stays sharp behind every section. Cards
   keep their own local glass blur, which is where frosting
   actually belongs.
   ============================================================ */

.section::before {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: inset 0 1px 0 rgba(255, 77, 61, 0.05);
}
.section:nth-of-type(odd)::before  { background: rgba(9, 9, 12, 0.24); }
.section:nth-of-type(even)::before { background: rgba(13, 13, 17, 0.13); }
.section--warm::before { background: rgba(15, 12, 13, 0.20) !important; }
.site-foot::before {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(8, 8, 10, 0.52);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .section::before { background: rgba(10, 10, 13, 0.5) !important; }
  .site-foot::before { background: rgba(8, 8, 10, 0.85); }
}

/* lift the network itself: stronger lines, brighter nodes, more of them */
:root { --web-strength: 1; }
.circuit-bg { opacity: 0.78; }
@media (max-width: 700px) { .circuit-bg { opacity: 0.6; } }

/* ============================================================
   16 — EMAIL IN THE NAVIGATION
   ------------------------------------------------------------
   A real email affordance in the dock (copies the address and
   reuses the existing toast), and a mobile menu footer where
   the address owns its own line instead of being squeezed
   against the CV and GitHub links.
   ============================================================ */

.dock-mail {
  flex: 0 0 auto;
  width: 40px; height: 40px;     /* matched to the CV + Hire me buttons */
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  color: var(--text-muted);
  display: grid; place-items: center;
  cursor: pointer;
  background: transparent;
  transition: color .25s, border-color .25s, background .25s, transform .3s var(--ease);
}
.dock-mail svg { width: 17px; height: 17px; }
.dock-mail:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255,255,255,.05); }
.dock-mail:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
@media (max-width: 1180px) { .dock-mail { display: none; } }   /* sheet carries it below this */

/* mobile sheet footer — the address gets the whole line */
.sheet .sheet-foot {
  display: block;
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  width: 100%;
}
.sheet .sheet-mail {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 3.6vw, 0.86rem);
  letter-spacing: 0.01em;
  font-weight: 400;
  padding: 0;
  color: var(--text);
  word-break: break-all;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.sheet .sheet-mail:hover { color: var(--ember-soft); }
.sheet .sheet-foot-row {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  margin-top: 0.85rem;
}
.sheet .sheet-foot-row a {
  font-family: var(--font-mono);
  font-size: clamp(0.68rem, 3.2vw, 0.78rem);
  font-weight: 400;
  padding: 0;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.sheet .sheet-foot-row a:hover { color: var(--text); border-color: var(--ember); translate: none; }


/* ============================================================
   17 — EMAIL TYPE, SMALLER ON MOBILE
   ------------------------------------------------------------
   The address was rendering too large in the mobile menu.

   Every rule below uses the SAME selector, so the only thing
   that decides the winner between them is source order — a
   taller selector list in the base rule cannot out-rank the
   media query. (An earlier attempt used a 3-class selector in
   the base rule, which silently beat the 2-class media query.)
   ============================================================ */

.sheet .sheet-foot .sheet-mail {
  font-size: 12px !important;
  line-height: 1.5 !important;
  letter-spacing: 0.005em !important;
  font-weight: 400 !important;
  padding: 0 !important;
}
@media (max-width: 700px) {
  .sheet .sheet-foot .sheet-mail { font-size: 11px !important; }
}
@media (max-width: 420px) {
  .sheet .sheet-foot .sheet-mail { font-size: 10px !important; }
}

/* the CV / GitHub row sits a step under that */
.sheet .sheet-foot .sheet-foot-row a { font-size: 11px !important; }
@media (max-width: 700px) {
  .sheet .sheet-foot .sheet-foot-row a { font-size: 10px !important; }
}

/* the big nav links come down a notch on small phones too */
@media (max-width: 420px) {
  .sheet > a { font-size: clamp(1.45rem, 7vw, 1.9rem); }
}

/* footer email on mobile */
@media (max-width: 700px) {
  .site-foot a[href^="mailto:"] { font-size: 12.5px; }
}

/* ============================================================
   18 — BENTO GRID, SINGLE COLUMN ON MOBILE
   ------------------------------------------------------------
   The "problems I take on" cards were collapsing into three
   112px slivers on phones: .bento .b-3 { grid-column: span 3 }
   (2 classes) out-ranked .bento > * { grid-column: span 6 }
   (a class plus a universal) inside the 820px query, so the
   stacking rule never applied to those three cards.

   These rules are written so specificity can't fight itself:
   every selector below is a single class on .bento-card, and
   nothing older out-ranks them.
   ============================================================ */

@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }          /* one real column */
  .bento .bento-card,
  .bento .b-2,
  .bento .b-3,
  .bento .b-4,
  .bento .b-6 { grid-column: 1 / -1 !important; }  /* every card, full width */
}

/* on a narrow phone the card should read like a stacked block, not a
   squeezed multi-column layout */
@media (max-width: 620px) {
  .bento-card { padding: 1.35rem 1.2rem; gap: 0.85rem; }
  .bento-card h3 { font-size: 1.16rem; line-height: 1.25; letter-spacing: -0.015em; }
  .bento-card p { font-size: 0.94rem; line-height: 1.6; }
  .bento-card ul { gap: 0.6rem; margin-top: 0.35rem; }
  .bento-card li { font-size: 0.9rem; line-height: 1.5; align-items: flex-start; }
  .bento-card li::before { margin-top: 0.1em; }
  .bento-ico { width: 36px; height: 36px; border-radius: 10px; }
  .bento-ico svg { width: 17px; height: 17px; }
  .bento-card .chips { margin-top: 0.35rem; }
}

/* 18.1 — the same specificity trap, one breakpoint up: .bento .b-2
   (two classes) was beating .bento > * inside the 1024px query, so
   the last three cards stayed at span 2 (317px) instead of two-up. */
@media (max-width: 1024px) and (min-width: 901px) {
  .bento .bento-card, .bento .b-2 { grid-column: span 3; }
  .bento .b-3, .bento .b-4, .bento .b-6 { grid-column: span 6; }
}
