/* Devam Shah portfolio — shared styles (hub + project pages)
   Three themes, picked at random on each load (see the inline script in <head>):
   ember = warm dark · ivory = warm light · duo = dark frame with ivory sections. */

/* ---------- Tokens: dark (default / ember) ---------- */
:root {
  --bg: #16110F;
  --bg-2: #1C1512;
  --surface: #221A16;
  --line: #3A2C24;
  --text: #F3EBDD;
  --muted: #BFB3A3;
  --gold: #C9A24A;      /* primary accent */
  --saffron: #E0A526;   /* hover + small highlights */
  --oxblood: #8E2F2A;   /* dividers, tags, borders */
  --coral: #E06A4E;     /* CTAs, orb core */
  --copper: #C77B3F;    /* secondary accent, markers */
  --alert: #C2453D;     /* large "wrong number" text on dark */
  --on-coral: #16110F;
  --on-tag: #F3EBDD;
  --dot-1: var(--coral); --dot-2: var(--gold); --dot-3: var(--copper); --dot-4: var(--saffron);
  --grid-dot: rgba(243, 235, 221, 0.09);
  --orb-opacity: 0.5;

  --font-head: "Boska", Georgia, "Times New Roman", serif;
  --font-body: "General Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-accent: var(--font-head); /* italic accent words in headings */
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 1160px;
  --radius: 16px;
}

/* ---------- Tokens: light (ivory everywhere, or duo's light sections) ---------- */
[data-theme="ivory"],
[data-theme="duo"] .duo-light {
  --bg: #FAF6EE;
  --bg-2: #F3ECDF;
  --surface: #FFFFFF;
  --line: #E8DDCB;
  --text: #2A1F1A;
  --muted: #6B5D52;
  --gold: #8A6A1F;
  --saffron: #A87410;
  --coral: #B4432A;
  --copper: #9A5524;
  --alert: #8E2F2A;
  --on-coral: #FFFFFF;
  --dot-4: var(--oxblood);
  --grid-dot: rgba(42, 31, 26, 0.1);
  --orb-opacity: 0.3;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
section, .site-header, .site-footer { background: var(--bg); color: var(--text); }
img, canvas, svg { max-width: 100%; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--saffron); }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 500; line-height: 1.08; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
h2 em, h1 em { font-family: var(--font-accent); font-style: italic; font-weight: 400; color: var(--gold); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--copper); margin: 0 0 0.85rem; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0.5rem; background: var(--coral); color: var(--on-coral); padding: 0.5rem 1rem; border-radius: 8px; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 0.5rem; }

/* ---------- Header + theme switch ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 62px; }
.brand { font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--coral); }
.site-nav { display: flex; gap: 1.25rem; overflow-x: auto; scrollbar-width: none; margin-left: auto; min-width: 0; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; padding: 0.5rem 0.15rem; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.theme-switch { display: flex; gap: 0.2rem; padding: 0.2rem; border: 1px solid var(--line); border-radius: 999px; flex-shrink: 0; }
.theme-switch button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: none; cursor: pointer; display: grid; place-items: center; padding: 0; }
.theme-switch button span { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(127, 110, 95, 0.6); }
.theme-switch button[aria-pressed="true"] { background: var(--surface); box-shadow: inset 0 0 0 1px var(--coral); }
.sw-ember { background: linear-gradient(135deg, #16110F 50%, #E06A4E 50%); }
.sw-ivory { background: linear-gradient(135deg, #FAF6EE 50%, #B4432A 50%); }
.sw-duo { background: linear-gradient(135deg, #16110F 50%, #FAF6EE 50%); }
@media (max-width: 640px) { .site-header .wrap { gap: 0.6rem; } .brand { font-size: 1.15rem; } .site-nav { gap: 0.85rem; } .site-nav a { font-size: 0.88rem; } .theme-switch button { width: 26px; height: 26px; } .theme-switch button span { width: 14px; height: 14px; } }

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.5rem; border-radius: 999px; font-weight: 600; text-decoration: none; border: 1px solid var(--coral); background: var(--coral); color: var(--on-coral); transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s; }
.btn:hover { background: var(--saffron); border-color: var(--saffron); color: var(--on-coral); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn-ghost:hover { background: transparent; color: var(--saffron); border-color: var(--saffron); }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

/* ---------- Hero: Scatter wordmark + orb ---------- */
.hero { position: relative; min-height: calc(100svh - 62px); display: grid; align-content: center; padding-block: 3rem 4rem; overflow: hidden; isolation: isolate; }
.orb { position: absolute; z-index: -2; width: min(95vmin, 820px); aspect-ratio: 1; right: -12%; top: 50%; translate: 0 -50%; border-radius: 50%;
  background: radial-gradient(circle, var(--coral) 0%, var(--copper) 32%, var(--gold) 52%, transparent 70%);
  filter: blur(48px); opacity: var(--orb-opacity); animation: breathe 9s ease-in-out infinite alternate; pointer-events: none; }
@keyframes breathe { from { transform: scale(0.92) rotate(0deg); } to { transform: scale(1.06) rotate(25deg); } }
@media (max-width: 760px) { .orb { right: -40%; top: 30%; } }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-copy { pointer-events: none; }
.hero-copy a { pointer-events: auto; }
.wordmark-space { height: clamp(140px, 28vw, 290px); }
.readout { display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; font: 0.78rem var(--font-mono); color: var(--muted); letter-spacing: 0.06em; margin-top: 1rem; }
.readout b { color: var(--gold); font-weight: 500; }
.hero h1 { font-size: clamp(2rem, 4.8vw, 3.5rem); margin: 1.5rem 0 0.9rem; max-width: 20ch; }
.hero .tagline { color: var(--muted); font-size: 1.12rem; max-width: 38rem; margin-bottom: 1.25rem; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; font: 0.8rem var(--font-mono); color: var(--muted); margin: 0 0 1.75rem; padding: 0; list-style: none; }
.hero .meta li::before { content: "● "; color: var(--coral); }

/* ---------- Highlights ---------- */
.highlights { border-block: 1px solid var(--line); background: var(--bg-2); }
.highlights ul { list-style: none; margin: 0; padding: 1.75rem 0; display: grid; gap: 1.5rem 1.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.highlights li { padding-left: 1rem; border-left: 2px solid var(--copper); font-size: 0.97rem; color: var(--muted); }
.highlights strong { display: block; font-family: var(--font-head); font-size: 1.2rem; color: var(--text); margin-bottom: 0.15rem; font-weight: 500; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 9vw, 6rem); border-top: 1px solid var(--line); }
.section-alt { background: var(--bg-2); }
section[id] { scroll-margin-top: 70px; }
.section-head { max-width: 44rem; margin-bottom: 2.25rem; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.subhead { font-family: var(--font-head); font-size: 1.6rem; margin: 3.5rem 0 1.25rem; }

/* Reveal on scroll (added by JS only, so content shows without JS) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 1rem 3rem; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 1.6fr; } }
.about-grid .prose p { color: var(--muted); }
.about-grid .prose p.lead { color: var(--text); font-family: var(--font-head); font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.35; }

/* ---------- How I work (pipeline) ---------- */
.flow { display: grid; grid-template-columns: 1fr 56px 1fr 56px 1fr; align-items: center; }
.col { display: grid; gap: 1rem; }
.node { position: relative; padding: 1.1rem 1.2rem 1.1rem 1.4rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.node::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent); }
.node .k { display: block; font: 500 0.7rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.node b { display: block; font: 500 1.35rem/1.2 var(--font-head); margin: 0.3rem 0; overflow-wrap: anywhere; }
.node b.handles { font-size: 1.1rem; }
.node small { display: block; color: var(--muted); font-size: 0.92rem; line-height: 1.45; }
.node .tag { display: inline-block; margin-top: 0.55rem; font: 500 0.68rem var(--font-mono); padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--oxblood); color: var(--on-tag); }
.node.live::after { content: ""; position: absolute; top: 1rem; right: 1rem; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); animation: ping 1.8s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(224, 106, 78, 0.6); } 70%, 100% { box-shadow: 0 0 0 10px rgba(224, 106, 78, 0); } }
.a1 { --accent: var(--coral); } .a2 { --accent: var(--gold); } .a3 { --accent: var(--copper); } .a4 { --accent: var(--dot-4); }
.link { position: relative; height: 2px; background: var(--line); margin: 0 6px; overflow: hidden; }
.link::after { content: ""; position: absolute; top: -2px; left: -30%; width: 30%; height: 6px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--coral), var(--gold)); animation: flowx 1.6s linear infinite; }
.link.l2::after { animation-delay: -0.8s; background: linear-gradient(90deg, transparent, var(--copper), var(--saffron)); }
@keyframes flowx { to { left: 100%; } }
@keyframes flowy { to { top: 100%; } }
@media (max-width: 860px) {
  .flow { grid-template-columns: 1fr; }
  .link { width: 2px; height: 44px; margin: 6px auto; }
  .link::after { top: -30%; left: -2px; width: 6px; height: 30%; background: linear-gradient(180deg, transparent, var(--coral), var(--gold)); animation-name: flowy; }
  .link.l2::after { background: linear-gradient(180deg, transparent, var(--copper), var(--saffron)); }
}
.sprint { margin-top: 2.5rem; padding: 1.25rem; border-radius: var(--radius); border: 1px dashed var(--line); }
.sprint-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; align-items: baseline; margin-bottom: 1rem; }
.sprint-head b { font: 500 1.3rem var(--font-head); }
.sprint-head span { font: 0.78rem var(--font-mono); color: var(--muted); }
.board { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.lane { min-height: 4.5rem; padding: 0.55rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font: 500 0.68rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ticket { position: absolute; top: 2.1rem; left: 0.6rem; width: calc(33.333% - 1.6rem); padding: 0.4rem 0.6rem; border-radius: 7px; font: 600 0.78rem var(--font-body); background: var(--coral); color: var(--on-coral); animation: move 9s ease-in-out infinite; }
@keyframes move { 0%, 20% { left: 0.6rem; } 35%, 55% { left: calc(33.333% + 0.6rem); } 70%, 95% { left: calc(66.666% + 0.6rem); opacity: 1; } 100% { left: calc(66.666% + 0.6rem); opacity: 0; } }

/* ---------- Leakage scene ---------- */
.leak { min-height: 90svh; display: grid; place-items: center; text-align: center; border-top: 2px solid var(--oxblood); padding-block: 4rem; }
.num { font: 500 clamp(5rem, 22vw, 15rem)/1 var(--font-head); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; position: relative; display: inline-block; margin: 1rem 0;
  background: linear-gradient(120deg, var(--coral), var(--copper) 45%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.num.bad { background: none; color: var(--alert); animation: glitch 0.5s steps(2) 2; }
.num.bad::after { content: ""; position: absolute; left: -3%; right: -3%; top: 52%; height: 0.05em; background: currentColor; transform: scaleX(0); transform-origin: left; animation: strike 0.5s 0.6s forwards ease-out; }
@keyframes glitch { 0% { transform: translate(0); text-shadow: 3px 0 var(--gold); } 50% { transform: translate(-4px, 2px); text-shadow: -3px 0 var(--coral); } 100% { transform: translate(3px, -1px); } }
@keyframes strike { to { transform: scaleX(1); } }
.caption { min-height: 4.5rem; font: italic 400 clamp(1.4rem, 3.5vw, 2.1rem)/1.2 var(--font-head); max-width: 30ch; margin: 0 auto; }
.caption small { display: block; font: 0.98rem var(--font-body); font-style: normal; color: var(--muted); margin-top: 0.6rem; }
.replay { margin-top: 1.5rem; font: 500 0.8rem var(--font-mono); background: none; border: 1px solid var(--gold); color: var(--gold); padding: 0.6rem 1.2rem; border-radius: 999px; cursor: pointer; }
.replay:hover { color: var(--saffron); border-color: var(--saffron); }

/* ---------- Filter chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.75rem; padding: 0; list-style: none; }
.chip { font: 0.8rem var(--font-mono); letter-spacing: 0.04em; padding: 0.5rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; min-height: 40px; }
.chip:hover { border-color: var(--copper); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--coral); border-color: var(--coral); color: var(--on-coral); font-weight: 500; }

/* ---------- Bento grid / notebook-cell cards ---------- */
.grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid-featured { grid-template-columns: repeat(6, 1fr); }
.grid-featured .card { grid-column: span 2; }
.grid-featured .card:nth-child(1), .grid-featured .card:nth-child(4) { grid-column: span 3; }
@media (max-width: 900px) { .grid-featured { grid-template-columns: repeat(2, 1fr); } .grid-featured .card, .grid-featured .card:nth-child(n) { grid-column: span 1; } .grid-featured .card:nth-child(1) { grid-column: span 2; } }
@media (max-width: 600px) { .grid-featured { grid-template-columns: 1fr; } .grid-featured .card:nth-child(n) { grid-column: span 1; } }

.card { position: relative; display: flex; flex-direction: column; gap: 0.6rem; padding: 1.4rem 1.5rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(90deg, var(--coral), var(--copper), var(--gold)); transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease; }
.card:hover, .card:focus-within { border-color: var(--copper); transform: translateY(-3px); box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.45); }
.card:hover::before, .card:focus-within::before { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { .card, .card::before { transition: none; } .card:hover { transform: none; } }
.card[hidden] { display: none; }
.cell-no { font: 0.75rem var(--font-mono); color: var(--copper); margin: 0; }
.cell-no span { color: var(--muted); }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card h3 a:focus-visible { outline: none; }
.card:focus-within { outline: 2px solid var(--coral); outline-offset: 3px; }
.card p { color: var(--muted); font-size: 0.97rem; margin: 0; }
.card .metric { margin-top: 0.4rem; padding: 0.7rem 0.9rem; border-left: 3px solid var(--coral); background: color-mix(in srgb, var(--coral) 10%, transparent); color: var(--text); font-size: 0.93rem; border-radius: 0 8px 8px 0; }
.card .metric strong { font-family: var(--font-head); font-size: 1.35rem; color: var(--gold); margin-right: 0.35rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; margin: 0.4rem 0 0; }
.tags li { font: 0.72rem var(--font-mono); padding: 0.2rem 0.55rem; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }
.card-foot { margin-top: auto; padding-top: 0.9rem; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.card-foot .open { color: var(--coral); font-weight: 600; }
.card-foot .repo { position: relative; z-index: 2; color: var(--muted); font: 0.8rem var(--font-mono); padding: 0.4rem 0; }
.card-foot .repo:hover { color: var(--text); }
.badge { display: inline-block; font: 0.7rem var(--font-mono); padding: 0.18rem 0.6rem; border-radius: 999px; background: var(--oxblood); color: var(--on-tag); }
.badge.badge-muted { background: transparent; border: 1px solid var(--muted); color: var(--muted); }

/* ---------- Experience timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.5rem; border-left: 2px solid var(--line); display: grid; gap: 2.25rem; max-width: 52rem; }
.timeline > li { position: relative; }
.timeline > li::before { content: ""; position: absolute; left: calc(-1.5rem - 7px); top: 0.35rem; width: 12px; height: 12px; border-radius: 50%; background: var(--bg-2); border: 3px solid var(--copper); }
.timeline .when { font: 0.8rem var(--font-mono); color: var(--copper); margin: 0 0 0.3rem; }
.timeline h3 { font-size: 1.4rem; }
.timeline .at { color: var(--muted); font-weight: 400; }
.timeline .where { font-size: 0.92rem; color: var(--muted); margin: 0.25rem 0 0; }
.timeline ul { margin: 0.75rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.timeline ul li { margin-bottom: 0.35rem; }
.timeline ul li::marker { color: var(--coral); }

/* ---------- Skills ---------- */
.legend { list-style: none; padding: 0; margin: 0 0 1.75rem; display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; font-size: 0.9rem; color: var(--muted); }
.lvl { display: inline-block; font: 500 0.68rem var(--font-mono); letter-spacing: 0.04em; padding: 0.15rem 0.55rem; border-radius: 999px; vertical-align: middle; margin-right: 0.3rem; }
.lvl-core { background: var(--coral); color: var(--on-coral); }
.lvl-project { border: 1px solid var(--gold); color: var(--gold); }
.lvl-working { border: 1px dashed var(--muted); color: var(--muted); }
.glass { padding: 1.4rem; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(150deg, color-mix(in srgb, var(--text) 6%, var(--surface)), var(--surface)); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent); }
.glass h3 { font-size: 1.15rem; margin-bottom: 0.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; justify-content: space-between; }
.glass h3 .lvl { margin: 0; }
.skill-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.soft-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.soft-grid li { padding: 1.1rem 1.2rem; border-top: 3px solid var(--copper); background: var(--surface); border-radius: 0 0 12px 12px; color: var(--muted); font-size: 0.95rem; }
.soft-grid li:nth-child(3n+2) { border-top-color: var(--coral); }
.soft-grid li:nth-child(3n) { border-top-color: var(--gold); }
.soft-grid strong { display: block; color: var(--text); font: 500 1.08rem var(--font-head); margin-bottom: 0.2rem; }

/* ---------- Credentials ---------- */
.cred-grid { display: grid; gap: 2rem; }
@media (min-width: 900px) { .cred-grid { grid-template-columns: 1fr 1.4fr; } }
.cred-head { font: 500 0.8rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--copper); margin-bottom: 1rem; }
.cred-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.cred-list li { display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cred-list strong { font: 500 1.1rem var(--font-head); }
.cred-list .muted { font-size: 0.92rem; }

/* ---------- Writing ---------- */
.write-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.write-list { list-style: none; padding: 0; margin: 0.5rem 0 1rem; display: grid; gap: 0.8rem; }
.write-list li { font-family: var(--font-head); font-size: 1.05rem; line-height: 1.35; }
.write-list small { display: block; font: 0.85rem var(--font-body); color: var(--muted); margin: 0.15rem 0 0.3rem; }
.glass .more { font-size: 0.92rem; font-weight: 600; }

/* ---------- Ventures ---------- */
.venture { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem; padding: clamp(1.4rem, 3vw, 2.2rem); border-radius: var(--radius); border: 1px solid var(--oxblood); background: radial-gradient(120% 160% at 100% 0%, color-mix(in srgb, var(--coral) 22%, transparent), transparent 60%), var(--surface); }
.venture > div { max-width: 40rem; }
.venture h3 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.venture-tag { font: italic 400 1.25rem var(--font-head); color: var(--coral); margin: 0.4rem 0 0.8rem; }

/* ---------- Roadmap ---------- */
.rm-progress { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.75rem; max-width: 40rem; }
.rm-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.rm-bar span { display: block; height: 100%; width: var(--pct, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--coral), var(--copper), var(--gold)); transition: width 1.2s ease; }
.rm-count { margin: 0; font: 0.8rem var(--font-mono); color: var(--muted); white-space: nowrap; }
.rm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.rm-item { padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.rm-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.rm-status { font: 500 0.68rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 0.18rem 0.6rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.rm-when { font: 0.72rem var(--font-mono); color: var(--muted); }
.rm-title { margin: 0 0 0.3rem; font: 500 1.12rem/1.35 var(--font-head); }
.rm-detail { margin: 0; color: var(--muted); font-size: 0.93rem; }
.rm-done { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.rm-done .rm-status { background: var(--oxblood); border-color: var(--oxblood); color: var(--on-tag); }
.rm-done .rm-status::before { content: "✓ "; }
.rm-done .rm-title { color: var(--muted); }
.rm-done s { text-decoration: none; background: linear-gradient(var(--coral), var(--coral)) no-repeat 0 58% / 0% 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size 0.9s ease; }
.rm-in .rm-done s { background-size: 100% 2px; }
.rm-in .rm-done:nth-child(2) s { transition-delay: 0.2s; }
.rm-in .rm-done:nth-child(3) s { transition-delay: 0.4s; }
.rm-in .rm-done:nth-child(4) s { transition-delay: 0.6s; }
.rm-in .rm-done:nth-child(n+5) s { transition-delay: 0.8s; }
.rm-doing { border-color: var(--coral); }
.rm-doing .rm-status { background: var(--coral); border-color: var(--coral); color: var(--on-coral); }
.rm-next .rm-status { border-color: var(--gold); color: var(--gold); }
.rm-planned .rm-status { border-style: dashed; }
@media (prefers-reduced-motion: reduce) {
  .rm-done s { background-size: 100% 2px; transition: none; }
  .rm-bar span { transition: none; }
}

/* ---------- Links / contact ---------- */
.link-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.link-list a, .link-list .ph { display: block; height: 100%; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); background: var(--surface); }
.link-list a:hover { border-color: var(--coral); }
.link-list small { display: block; font: 0.75rem var(--font-mono); color: var(--muted); margin-top: 0.15rem; }
.todo { display: inline-block; font: 0.75rem var(--font-mono); padding: 0.12rem 0.5rem; border: 1px dashed var(--copper); border-radius: 6px; color: var(--copper); }

.site-footer { padding-block: 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; }

/* ---------- Project pages ---------- */
.crumb { font: 0.82rem var(--font-mono); padding-top: 2rem; margin: 0; }
.crumb a { color: var(--muted); }
.project-hero { padding-block: 1.5rem 3rem; }
.project-hero .inner { max-width: 52rem; }
.project-hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin-bottom: 1rem; }
.project-hero .lede { font-size: 1.2rem; color: var(--muted); }
.key-result { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.75rem 1rem; margin: 1.5rem 0; padding: 1.1rem 1.4rem; border-left: 4px solid var(--coral); background: color-mix(in srgb, var(--coral) 10%, transparent); border-radius: 0 var(--radius) var(--radius) 0; }
.key-result strong { font: 500 clamp(2rem, 5vw, 2.8rem)/1 var(--font-head); background: linear-gradient(120deg, var(--coral), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.project-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; align-items: center; margin-top: 1.25rem; font: 0.8rem var(--font-mono); color: var(--muted); }
.project-body { padding-block: 3rem 4rem; border-top: 2px solid var(--oxblood); }
.demo { margin-bottom: 2rem; border: 1px solid var(--copper); border-radius: var(--radius); background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 55%), var(--surface); padding: clamp(1.25rem, 3vw, 2rem); }
.demo h2 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.demo-slot { min-height: 12rem; margin-top: 1rem; display: grid; place-items: center; text-align: center; padding: 1.5rem; border: 1px dashed var(--copper); border-radius: 10px; color: var(--muted); }
.demo-slot iframe { width: 100%; min-height: 560px; border: 0; border-radius: 10px; }
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.7rem; margin: 2.5rem 0 1rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.55rem; }
.prose li::marker { color: var(--coral); }
.sub-list { list-style: none; padding: 0 !important; display: grid; gap: 0.9rem; }
.sub-list li { padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin: 0; }
.sub-list strong { display: block; font: 500 1.1rem var(--font-head); }

@media (prefers-reduced-motion: reduce) {
  .orb, .link::after, .ticket, .node.live::after, .num.bad { animation: none !important; }
}

/* =====================================================================
   v3: short home page, centered hero, inner pages, site-wide footer CTA
   ===================================================================== */

/* Centered hero */
.hero-c { text-align: center; }
.hero-c .hero-copy { display: flex; flex-direction: column; align-items: center; }
.hero-c .readout { justify-content: center; }
.hero-c h1 { margin-inline: auto; max-width: 18ch; font-size: clamp(2.1rem, 5vw, 3.6rem); }
.hero-c h1 em { font-weight: 400; }
.hero-c .tagline { margin-inline: auto; max-width: 32rem; }
.hero-c .btn-row { justify-content: center; }
.hero-c .orb { right: auto; left: 50%; translate: -50% -50%; }
.scroll-cue { margin-top: 2.5rem; font: 0.72rem var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); text-decoration: none; display: inline-flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.scroll-cue::after { content: ""; width: 1px; height: 34px; background: linear-gradient(var(--coral), transparent); animation: cue 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* Proof strip: four animated numbers */
.proof { border-block: 1px solid var(--line); background: var(--bg-2); }
.proof ul { list-style: none; margin: 0; padding: 2rem 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
@media (max-width: 760px) { .proof ul { grid-template-columns: repeat(2, 1fr); } }
.proof b { display: block; font: 500 clamp(2.2rem, 5vw, 3.4rem)/1 var(--font-head); letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--coral), var(--copper) 50%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.proof span { display: block; margin-top: 0.45rem; font-size: 0.9rem; color: var(--muted); }

/* Section heads that sit centered */
.head-c { text-align: center; margin-inline: auto; }
.head-c p { margin-inline: auto; max-width: 34rem; }
.more-link { display: flex; justify-content: center; margin-top: 2rem; }

/* Home: compact "How I work" chips row */
.stack-row { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; max-width: 56rem; }
.stack-row li { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1.1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 0.95rem; }
.stack-row li b { font: 500 1.05rem var(--font-head); }
.stack-row li small { color: var(--muted); font-size: 0.82rem; }
.stack-row li i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent, var(--coral)); flex-shrink: 0; }
.stack-row li.live i { animation: ping 1.8s infinite; }

/* Compact leak scene on the home page */
.leak.leak-sm { min-height: 0; padding-block: clamp(3.5rem, 9vw, 6rem); }
.leak-sm .num { font-size: clamp(4.5rem, 17vw, 11rem); margin: 0.5rem 0; }

/* Inner page header */
.page-hero { padding-block: clamp(3.5rem, 9vw, 6rem) clamp(2rem, 5vw, 3rem); text-align: center; }
.page-hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
.page-hero p { color: var(--muted); max-width: 34rem; margin: 1rem auto 0; font-size: 1.1rem; }
.jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 1.75rem; padding: 0; list-style: none; }
.jump a { display: inline-block; padding: 0.45rem 0.95rem; border: 1px solid var(--line); border-radius: 999px; font: 0.78rem var(--font-mono); color: var(--muted); text-decoration: none; }
.jump a:hover { color: var(--text); border-color: var(--coral); }

/* Site-wide footer with contact CTA */
.site-footer { padding-block: clamp(3rem, 8vw, 5rem) 2rem; border-top: 2px solid var(--oxblood); }
.site-footer .wrap { display: block; }
.foot-cta { text-align: center; margin-bottom: 2.5rem; }
.foot-cta h2 { font-size: clamp(2.2rem, 6vw, 4rem); }
.foot-cta p { color: var(--muted); margin: 0.75rem auto 1.5rem; }
.foot-links { list-style: none; padding: 0; margin: 0 0 2.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem; }
.foot-links a { color: var(--text); text-decoration: none; font-weight: 500; }
.foot-links a:hover { color: var(--coral); }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; font-size: 0.85rem; color: var(--muted); padding-top: 1.5rem; border-top: 1px solid var(--line); }
.site-nav a.nav-cta { color: var(--coral); font-weight: 600; }

@media (prefers-reduced-motion: reduce) { .scroll-cue::after, .stack-row li.live i { animation: none; } }

.grid-home { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
/* Boska is light at small sizes: give small headings its bold cut */
h3, .stack-row li b, .soft-grid strong, .cred-list strong, .rm-title, .write-list li, .sub-list strong, .highlights strong, .sprint-head b, .node b { font-weight: 700; }
.card .metric strong { font-weight: 700; }
@media (max-width: 480px) {
  .site-nav a.nav-cta { display: none; } /* contact lives in every page's footer */
  .brand { font-size: 1.05rem; }
  .site-nav { gap: 0.75rem; }
  .theme-switch button { width: 24px; height: 24px; }
}


/* ---------- Type systems, picked at random on each load (data-type on <html>) ---------- */
[data-type="a"] { --font-head: "Clash Display", system-ui, sans-serif; --font-body: "Satoshi", system-ui, sans-serif; --font-accent: "Clash Display", system-ui, sans-serif; }
[data-type="b"] { --font-head: "Boska", Georgia, serif; --font-body: "General Sans", system-ui, sans-serif; --font-accent: "Boska", Georgia, serif; }
[data-type="c"] { --font-head: "Syne", system-ui, sans-serif; --font-body: "Manrope", system-ui, sans-serif; --font-accent: "Syne", system-ui, sans-serif; }
[data-type="d"] { --font-head: "Cabinet Grotesk", system-ui, sans-serif; --font-body: "Satoshi", system-ui, sans-serif; --font-accent: "Zodiak", Georgia, serif; }
/* Sans display faces read better upright: keep the gold accent, drop the italic */
[data-type="a"] h1 em, [data-type="a"] h2 em, [data-type="c"] h1 em, [data-type="c"] h2 em { font-style: normal; }

.type-switch { flex-shrink: 0; height: 32px; min-width: 40px; padding: 0 0.6rem; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--text); font: 600 0.9rem var(--font-head); cursor: pointer; }
.type-switch:hover { border-color: var(--coral); color: var(--coral); }
@media (max-width: 480px) { .type-switch { height: 28px; min-width: 34px; padding: 0 0.45rem; font-size: 0.8rem; } }
@media (max-width: 480px) {
  /* Two-row header on phones: brand + controls on top, nav centred below */
  .site-header .wrap { flex-wrap: wrap; row-gap: 0; padding-block: 0.35rem; }
  .site-nav { order: 3; width: 100%; margin-left: 0; justify-content: center; gap: 1.5rem; }
  .type-switch { margin-left: auto; }
}

/* Stacked wordmark (DEVAM / SHAH) on every screen: height tracks width so the dots scale evenly */
.hero-c .wordmark-space { height: clamp(150px, min(44vw, 32svh), 330px); max-width: 680px; margin-inline: auto; }

/* ---------- Responsive polish ---------- */
/* Phones: keep the name, promise and both buttons above the fold */
@media (max-width: 480px) {
  .hero { min-height: 0; padding-block: 1.5rem 2.5rem; }
  .hero .eyebrow { font-size: 0.68rem; letter-spacing: 0.1em; margin-bottom: 0.6rem; }
  .readout { font-size: 0.68rem; margin-top: 0.4rem; gap: 0.2rem 1rem; }
  .hero-c h1 { font-size: clamp(1.7rem, 8.2vw, 2.2rem); margin: 1rem auto 0.6rem; }
  .hero .tagline { font-size: 0.98rem; margin-bottom: 1.1rem; }
  .hero-c .btn-row { flex-wrap: nowrap; }
  .hero-c .btn { padding: 0.75rem 1.15rem; font-size: 0.95rem; }
  .scroll-cue { display: none; }
}
/* Short screens (small phones, landscape): drop the scroll cue and tighten */
@media (max-height: 700px) {
  .hero { min-height: 0; padding-block: 1.25rem 2rem; }
  .scroll-cue { display: none; }
}
/* Tablets: a touch more room for the wordmark */
@media (min-width: 600px) and (max-width: 1024px) {
  .hero-c .wordmark-space { height: clamp(180px, min(40vw, 32svh), 330px); }
}
/* Comfortable tap targets for small text links */
.crumb a, .glass .more, .more-link a:not(.btn), .prose a, .foot-links a { display: inline-block; padding-block: 0.35rem; }
@media (max-height: 600px) { .hero-c .wordmark-space { height: 120px; } .readout { display: none; } }
