/* Abrar Zahin portfolio v3 - Julian.d-inspired, blue monochrome.
   Theme: dark, locked. Shape system: pill buttons, 24px cards.
   .tint shifts the legacy lime-accent renders to blue via hue-rotate. */

@font-face { font-family: 'Anton'; src: url('../fonts/anton-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Archivo Black'; src: url('../fonts/archivo-black.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('../fonts/archivo-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Gantari'; src: url('../fonts/gantari-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Gantari'; src: url('../fonts/gantari-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Gantari'; src: url('../fonts/gantari-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('../fonts/geist-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --bg: #0A0C10;
  --bg-2: #0D1017;
  --card: #12161F;
  --bone: #E9EEF5;
  --muted: #93A0B4;
  --line: rgba(233, 238, 245, 0.1);
  --blue: #3B82F6;
  --display: 'Archivo Black', 'Arial Black', sans-serif;
  --condensed: 'Anton', 'Arial Narrow', sans-serif;
  --wide: 'Archivo', 'Arial', sans-serif;
  --body: 'Gantari', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--bone);
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* Legacy lime-accent renders re-toned blue */
.tint { filter: hue-rotate(145deg) saturate(1.05); }

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.loader-line {
  font-family: var(--wide); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; font-size: clamp(1rem, 2.4vw, 1.6rem);
  color: var(--bone);
}
html:not(.js) .loader, html:not(.motion-ok) .loader { display: none; }

/* ---------- grain ---------- */
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- scroll progress ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 96; pointer-events: none; }
.progress span {
  display: block; height: 100%; background: var(--blue); opacity: 0.9;
  transform: scaleX(0); transform-origin: left center; will-change: transform;
}

/* cursor dot removed: fixed mix-blend-mode:difference recomposited the whole
   viewport against scrolling content every frame (scroll-jank source). */

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px clamp(20px, 3.5vw, 52px);
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.logo {
  font-family: var(--body); font-weight: 700; font-size: 1.3rem;
  letter-spacing: -0.02em; text-decoration: none; color: var(--bone);
}
.logo .reg { font-size: 0.6em; vertical-align: super; font-weight: 500; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  text-decoration: none; font-size: 1rem; font-weight: 500; color: var(--bone);
  opacity: 0.9; transition: opacity 0.25s;
}
.nav-links a:hover { opacity: 1; }

/* ---------- hero (Julian.d composition) ---------- */
.hero {
  position: relative; min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  overflow: hidden; padding: 96px 20px 64px;
}
.hero-bg { position: absolute; inset: -10%; z-index: 0; }
/* Blur on each blob (not the parent): a moving/scaling child inside a blurred
   parent forces the parent's blur to re-render every frame. Per-blob blur is
   rasterized once and the transform just moves the cached layer. */
.blob { position: absolute; border-radius: 50%; will-change: transform; filter: blur(52px); }
.blob-a { width: 40vw; height: 30vw; top: 12%; left: 8%; background: rgba(37, 99, 235, 0.10); }
.blob-b { width: 34vw; height: 28vw; bottom: 4%; right: 6%; background: rgba(56, 130, 246, 0.07); }
@media (prefers-reduced-motion: no-preference) {
  html.motion-ok .blob-a { animation: drift-a 18s ease-in-out infinite alternate; }
  html.motion-ok .blob-b { animation: drift-b 22s ease-in-out infinite alternate; }
}
@keyframes drift-a { to { transform: translate(8vw, 6vh) scale(1.12); } }
@keyframes drift-b { to { transform: translate(-7vw, -5vh) scale(0.92); } }

.hero-stage {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  width: 100%;
}
.hero-portrait {
  position: relative;
  width: clamp(240px, 30vw, 400px);
}
.hero-portrait > img:not(.hero-sign) {
  position: relative; z-index: 2;
  width: 100%; height: auto;
  border-radius: 9999px;
  /* Soft edge mask fades the portrait into the dark page (no hard box). */
  -webkit-mask-image: radial-gradient(ellipse 76% 84% at 50% 46%, #000 58%, transparent 90%);
  mask-image: radial-gradient(ellipse 76% 84% at 50% 46%, #000 58%, transparent 90%);
  /* Default: stylized blue duotone. Resolves to full natural color on hover. */
  filter: grayscale(1) sepia(1) hue-rotate(178deg) saturate(2.6) brightness(0.98) contrast(1.08);
  transition: filter 0.7s var(--ease);
}
.hero-portrait:hover > img:not(.hero-sign) {
  filter: grayscale(0) sepia(0) hue-rotate(0deg) saturate(1.02) brightness(1.02) contrast(1.02);
}
/* Touch devices have no hover: show full color by default. */
@media (hover: none) {
  .hero-portrait > img:not(.hero-sign) {
    filter: grayscale(0) sepia(0) hue-rotate(0deg) saturate(1.02) brightness(1.02) contrast(1.02);
  }
}
.hero-sign {
  position: absolute; z-index: 2;
  right: -52%; top: 24%;
  width: 62%;
  transform: rotate(-6deg);
  filter: drop-shadow(0 0 18px rgba(59, 130, 246, 0.35));
  opacity: 0.95;
  pointer-events: none;
}
.hero-name {
  position: relative; z-index: 3;
  margin-top: clamp(-90px, -9vw, -48px);
  font-family: var(--display); font-weight: 400;
  font-size: clamp(3.6rem, 11.5vw, 10rem);
  line-height: 0.92; text-align: center;
  letter-spacing: -0.02em;
  color: var(--bone);
  text-shadow: 0 10px 60px rgba(4, 6, 12, 0.65);
}
.hero-name .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.04em; }
.hero-name .line-inner { display: inline-block; }
.hero-tag {
  position: relative; z-index: 3;
  margin-top: 18px; text-align: center;
  color: var(--bone); font-size: 1.02rem;
}
.hero-tag.sub { margin-top: 6px; color: var(--muted); font-size: 0.95rem; max-width: 52ch; }
.hero-meta {
  position: absolute; z-index: 3;
  left: 0; right: 0; bottom: 30px;
  display: flex; justify-content: space-between;
  padding: 0 clamp(20px, 3.5vw, 52px);
}
.mono {
  font-family: var(--mono); font-size: 0.8rem;
  letter-spacing: 0.18em; color: var(--muted);
}

/* ---------- about / statement ---------- */
.about { position: relative; background: var(--bg-2); padding: clamp(96px, 13vw, 180px) clamp(20px, 6vw, 96px); }
.about-punch { font-weight: 700; color: var(--bone) !important; opacity: 1 !important; font-size: 1.05em; }
.statement {
  font-family: var(--wide); font-weight: 700;
  font-size: clamp(2.2rem, 6.2vw, 5.4rem);
  line-height: 1.02; letter-spacing: 0.01em;
  text-transform: uppercase; color: var(--bone);
  max-width: 1200px;
}
.st-line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.st-inner { display: inline-block; }

.about-grid {
  display: grid; grid-template-columns: 1.5fr 1fr;
  gap: clamp(40px, 6vw, 110px);
  max-width: 1200px; margin-top: clamp(48px, 6vw, 88px);
}
.about-copy p { color: var(--bone); opacity: 0.92; max-width: 56ch; }
.about-copy p + p { margin-top: 22px; }
.tool-group + .tool-group { margin-top: 34px; }
.tool-group h3 {
  font-family: var(--wide); font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.02em; margin-bottom: 8px;
}
.tool-group p { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- editorial photo pair ---------- */
.photo-row {
  display: grid; grid-template-columns: 1fr 1.7fr;
  gap: clamp(20px, 3vw, 44px);
  margin-top: clamp(56px, 7vw, 110px);
  align-items: start;
}
.photo-row figure {
  margin: 0; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line);
}
.photo-a { aspect-ratio: 4 / 5; }
.photo-b { aspect-ratio: 3 / 2; margin-top: clamp(36px, 6vw, 90px); }
.photo-row img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 720px) {
  .photo-row { grid-template-columns: 1fr; }
  .photo-b { margin-top: 0; }
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden; padding: 26px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.marquee-track { display: flex; width: max-content; }
html.motion-ok .marquee-track { animation: marquee 30s linear infinite; }
.marquee-group { display: flex; flex-shrink: 0; }
.marquee-group span {
  font-family: var(--wide); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; font-size: 0.95rem; color: var(--muted);
  padding: 0 34px; white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(-50%); } }
html:not(.motion-ok) .marquee-track { flex-wrap: wrap; width: auto; justify-content: center; }
html:not(.motion-ok) .marquee-group:last-child { display: none; }

/* ---------- big section headers ---------- */
.big-head { text-align: center; padding: 0 20px; }
.big-title {
  font-family: var(--condensed); font-weight: 400;
  font-size: clamp(3.4rem, 11vw, 9.5rem);
  line-height: 1; color: var(--bone);
  overflow: hidden; display: block;
}
.bt-inner { display: inline-block; }
.big-caption {
  font-family: var(--body); font-weight: 500;
  font-size: 0.85rem; letter-spacing: 0.14em;
  color: var(--muted); max-width: 52ch;
  margin: 20px auto 0;
}

/* ---------- projects ---------- */
.work { position: relative; background: var(--bg); padding: clamp(96px, 13vw, 180px) 0 40px; }
.cards { margin-top: clamp(48px, 7vw, 110px); display: grid; gap: clamp(28px, 4vw, 56px); padding: 0 clamp(16px, 3vw, 40px); perspective: 1600px; perspective-origin: 50% 50%; }
.project-card {
  position: relative;
  width: min(1150px, 100%); margin: 0 auto;
  display: grid; grid-template-columns: 1.08fr 1fr; align-items: center;
  gap: clamp(28px, 4.5vw, 72px);
  background: var(--card); border: 1px solid var(--line);
  border-radius: 24px; padding: clamp(24px, 4vw, 56px);
}
/* Solid veil the stack scrub fades in (via --veil) while the next card slides
   over this one. The card itself NEVER goes translucent: stacked translucent
   cards let the text underneath bleed through and read as gray soup. */
.stack .project-card::before {
  content: ''; position: absolute; inset: -1px; border-radius: 24px;
  background: var(--bg); opacity: var(--veil, 0);
  z-index: 3; pointer-events: none;
}
.project-card::after {
  content: ''; position: absolute; inset: 0; border-radius: 24px;
  background: radial-gradient(640px circle at var(--mx, 50%) var(--my, 50%), rgba(96, 150, 246, 0.09), transparent 45%);
  opacity: 0; transition: opacity 0.4s; pointer-events: none;
}
.project-card:hover::after { opacity: 1; }
.project-card.is-flipped .project-media { order: 2; }
.project-media { border-radius: 16px; overflow: hidden; aspect-ratio: 3 / 2; }
.project-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.project-card:hover .project-media img { transform: scale(1.05); }
.card-kicker {
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.project-body h3 {
  font-family: var(--wide); font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  letter-spacing: 0.01em; line-height: 1.05;
}
.project-body p:not(.card-kicker) { color: var(--muted); margin-top: 18px; max-width: 46ch; }
.project-body .card-kicker { margin-top: 0; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 26px; }
.tags li {
  font-family: var(--wide); font-weight: 700; font-size: 0.82rem;
  letter-spacing: 0.1em; color: var(--bone);
}
@media (max-width: 860px) {
  .project-card { grid-template-columns: 1fr; gap: 22px; }
  .project-card.is-flipped .project-media { order: 0; }
}

/* ---------- rules ---------- */
.rules { background: var(--bg-2); padding: clamp(96px, 13vw, 180px) clamp(20px, 6vw, 96px); }
.rules-list { max-width: 900px; margin: clamp(48px, 6vw, 96px) auto 0; }
.rule-row { border-top: 1px solid var(--line); padding: clamp(28px, 4vw, 44px) 0; }
.rule-row:last-child { border-bottom: 1px solid var(--line); }
.rule-row h3 {
  font-family: var(--wide); font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.3rem); letter-spacing: 0.01em;
  transition: transform 0.4s var(--ease);
}
.rule-row:hover h3 { transform: translateX(12px); }
.rule-row p { color: var(--muted); margin-top: 10px; max-width: 58ch; }

/* ---------- investing ---------- */
.invest { background: var(--bg); padding: clamp(96px, 13vw, 180px) clamp(20px, 6vw, 96px); }
.invest-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  max-width: 1000px; margin: clamp(48px, 6vw, 96px) auto 0;
}
.invest-block {
  border: 1px solid var(--line); border-radius: 24px;
  background: var(--card);
  padding: clamp(28px, 3.5vw, 48px);
}
.invest-block h3 {
  font-family: var(--wide); font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
}
.invest-block p { color: var(--muted); margin-top: 12px; }
@media (max-width: 720px) { .invest-grid { grid-template-columns: 1fr; } }

/* ---------- on X / stats ---------- */
.onx { background: var(--bg-2); padding: clamp(96px, 13vw, 180px) clamp(20px, 6vw, 96px); text-align: center; }
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 64px);
  max-width: 1000px; margin: clamp(48px, 6vw, 96px) auto 0;
}
.stat-num {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1; color: var(--bone);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  margin-top: 10px; color: var(--muted);
  font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.post-card {
  display: flex; flex-direction: column; gap: 14px;
  width: clamp(280px, 24vw, 340px); height: 540px;
  flex-shrink: 0; margin-right: clamp(16px, 2vw, 26px);
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: clamp(20px, 2vw, 26px);
  text-decoration: none;
  transition: transform 0.35s var(--ease), border-color 0.35s;
}
.post-card:hover { transform: translateY(-6px); border-color: rgba(96, 150, 246, 0.45); }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-head img { border-radius: 50%; }
.post-media {
  display: block; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line);
  flex: 1; min-height: 0;
}
.post-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  transition: transform 0.6s var(--ease);
}
.post-card:hover .post-media img { transform: scale(1.05); }
.post-card > p {
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-head strong { display: block; font-size: 0.9rem; line-height: 1.2; }
.post-head em { display: block; font-style: normal; font-size: 0.8rem; color: var(--muted); }
.post-x {
  margin-left: auto; font-style: normal; font-family: var(--display);
  font-size: 1rem; color: var(--muted);
}
.post-card p { color: var(--bone); opacity: 0.92; font-size: 0.95rem; line-height: 1.55; }
.post-meta {
  margin-top: auto; font-family: var(--mono);
  font-size: 0.7rem; letter-spacing: 0.14em; color: var(--muted);
}
.onx-actions {
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
  margin-top: clamp(40px, 5vw, 72px);
}
.pill-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--body); font-weight: 600; font-size: 0.88rem;
  letter-spacing: 0.08em; text-decoration: none;
  color: var(--bone); background: transparent;
  border: 1px solid rgba(233, 238, 245, 0.3); border-radius: 999px;
  padding: 14px 26px; white-space: nowrap;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.pill-btn:hover { border-color: var(--bone); transform: translateY(-2px); }
.pill-btn:active { transform: scale(0.97); }
.pill-solid { background: var(--bone); color: var(--bg); border-color: var(--bone); }
.pill-solid:hover { background: #fff; }
@media (max-width: 720px) { .stats { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Discord server sneak peek ---------- */
.server { background: var(--bg); padding: clamp(96px, 13vw, 180px) clamp(20px, 6vw, 96px); text-align: center; }
.dc-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 28px);
  max-width: 1150px; margin: clamp(48px, 6vw, 88px) auto 0;
  text-align: left;
}
.dc-card {
  background: #1A1D25; border: 1px solid var(--line);
  border-radius: 16px; padding: clamp(20px, 2.2vw, 28px);
  transition: transform 0.35s var(--ease), border-color 0.35s;
}
.dc-card:hover { transform: translateY(-6px); border-color: rgba(96, 150, 246, 0.45); }
.dc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dc-head img { border-radius: 50%; }
.dc-name { color: #57F287; font-weight: 700; font-size: 0.95rem; }
.dc-time { font-size: 0.68rem; }
.dc-card h3 { font-family: var(--body); font-weight: 700; font-size: 1.05rem; line-height: 1.35; }
.dc-card p { color: var(--muted); font-size: 0.93rem; line-height: 1.55; margin-top: 10px; }
.review-slider { position: relative; max-width: 720px; margin: clamp(40px, 5vw, 64px) auto 0; }
.review-slide p { font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.6; color: var(--bone); }
.review-slide cite { display: block; margin-top: 14px; font-style: normal; font-size: 0.85rem; color: var(--muted); letter-spacing: 0.06em; }
html:not(.motion-ok) .review-slide + .review-slide { margin-top: 32px; }
.server .onx-actions { margin-top: clamp(36px, 4vw, 56px); }
.dc-note { margin-top: 18px; color: var(--muted); font-size: 0.9rem; }
@media (max-width: 900px) { .dc-grid { grid-template-columns: 1fr; } }

/* ---------- Editions-style aura glows ---------- */
.invest, .onx, .server { position: relative; overflow: hidden; }

/* ---------- floating icon props: layered wrap(parallax) > float(bob) > box(hover) ---------- */
.section-props, .hero-props {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
}
.icon-prop-wrap { position: absolute; pointer-events: none; }
.icon-prop-float { display: block; pointer-events: none; }

/* Continuous motion via CSS keyframes = compositor thread, keeps the main
   thread free during scroll (JS-driven infinite tweens caused scroll jank). */
@keyframes prop-bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-11px) rotate(2deg); } }
@keyframes prop-spin { to { transform: rotate(360deg); } }
html.motion-ok .icon-prop-float { animation: prop-bob 3s ease-in-out infinite; }
html.motion-ok .hero-props .icon-prop-float:nth-child(odd),
html.motion-ok .section-props .icon-prop-float:nth-child(odd) { animation-duration: 3.6s; animation-delay: -0.8s; }
html.motion-ok .icon-prop-wrap:nth-child(3n) .icon-prop-float { animation-duration: 2.7s; animation-delay: -1.4s; }
html.motion-ok .icon-prop-wrap:nth-child(4n) .icon-prop-float { animation-duration: 4.1s; animation-delay: -2.1s; }
html.motion-ok .icon-prop-float.spin { animation: prop-spin 24s linear infinite; }
.icon-prop {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.16), rgba(233, 238, 245, 0.05));
  border: 1px solid rgba(233, 238, 245, 0.16);
  box-shadow: 0 14px 34px rgba(3, 6, 14, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--bone);
  pointer-events: auto; cursor: default;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.icon-prop:hover {
  transform: scale(1.14);
  box-shadow: 0 18px 40px rgba(3, 6, 14, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0 0 1px rgba(96, 150, 246, 0.4);
}
.icon-prop.ambient { opacity: 0.4; }
.prop-sm { width: 38px; height: 38px; border-radius: 12px; }
.prop-md { width: 54px; height: 54px; border-radius: 16px; }
.prop-lg { width: 72px; height: 72px; border-radius: 20px; }
.prop-sm .icon { width: 17px; height: 17px; }
.prop-md .icon { width: 25px; height: 25px; }
.prop-lg .icon { width: 32px; height: 32px; }
/* Shrink via width/height, not a transform: GSAP already animates the
   translate/rotate/scale properties on these elements directly, so a CSS
   `transform` rule here would never take effect. */
@media (max-width: 760px) {
  .prop-sm { width: 28px; height: 28px; border-radius: 9px; }
  .prop-md { width: 38px; height: 38px; border-radius: 11px; }
  .prop-lg { width: 48px; height: 48px; border-radius: 14px; }
  .prop-sm .icon { width: 13px; height: 13px; }
  .prop-md .icon { width: 17px; height: 17px; }
  .prop-lg .icon { width: 22px; height: 22px; }
  /* Section-body props have no safe whitespace in a narrow text column and
     were overlapping paragraphs. Keep only the hero props (they sit in the
     empty space around the portrait) on mobile. */
  .section-props { display: none; }
}
.server > * { position: relative; }
.aura {
  position: absolute; border-radius: 50%;
  filter: blur(100px); pointer-events: none;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.22), rgba(37, 99, 235, 0.05) 70%);
}
.aura-l { width: 46vw; height: 46vw; left: -18vw; top: -10vw; }
.aura-r { width: 52vw; height: 52vw; right: -20vw; bottom: -16vw; }
html.motion-ok .aura { animation: aura-pulse 9s ease-in-out infinite alternate; }
@keyframes aura-pulse {
  from { transform: scale(0.9); opacity: 0.7; }
  to { transform: scale(1.15); opacity: 1; }
}
.invest > *, .onx > * { position: relative; }

/* Statement lines: gradient light sweep (Editions shimmer) */
html.motion-ok .st-inner {
  background: linear-gradient(110deg, var(--bone) 42%, #9CC4FF 50%, var(--bone) 58%);
  background-size: 240% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shine 7s linear infinite;
}
@keyframes shine { from { background-position: 120% 0; } to { background-position: -120% 0; } }
html.motion-ok .stat-num .count {
  text-shadow: 0 0 34px rgba(59, 130, 246, 0.45);
}

/* ---------- outro (LET'S WORK TOGETHER over portrait) ---------- */
.outro {
  position: relative;
  background: var(--bg);
  min-height: 92dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: clamp(90px, 12vw, 160px) 20px 60px;
  overflow: hidden;
}
.outro-stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 100%;
}
.outro-portrait {
  width: clamp(220px, 26vw, 360px); height: auto;
  border-radius: 9999px;
  /* Soft mask instead of mix-blend-mode: blend forces a full recomposite
     against the scrolling content every frame (scroll-jank source). */
  -webkit-mask-image: radial-gradient(ellipse 78% 86% at 50% 46%, #000 56%, transparent 90%);
  mask-image: radial-gradient(ellipse 78% 86% at 50% 46%, #000 56%, transparent 90%);
}
.outro-title {
  position: absolute; z-index: 2;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.8rem, 9.5vw, 8.5rem);
  line-height: 0.98; text-align: center;
  letter-spacing: -0.02em; color: var(--bone);
  width: 100%;
  text-shadow: 0 10px 60px rgba(4, 6, 12, 0.55);
}
.outro-title a { text-decoration: none; color: inherit; }
.outro-title .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.04em; }
.outro-title .line-inner {
  display: inline-block;
  -webkit-text-stroke: 2px transparent;
  transition: color 0.5s var(--ease), -webkit-text-stroke-color 0.5s var(--ease);
}
/* Hover: solid fill drains to a bone outline (and the portrait behind lights
   up via the sibling rule below): a clear "this is a button" moment. */
.outro-title a:hover .line-inner {
  color: transparent;
  -webkit-text-stroke-color: var(--bone);
}
.outro-portrait { transition: filter 0.7s var(--ease); }
.outro-stage:hover .outro-portrait { filter: brightness(1.22) saturate(1.12); }

/* Rotating orbit badge: email CTA circling a launch arrow (pure CSS spin) */
.orbit-badge {
  position: absolute; z-index: 3;
  right: clamp(2%, 6vw, 12%); top: 0;
  width: clamp(96px, 11vw, 148px); height: clamp(96px, 11vw, 148px);
  color: var(--bone); text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  /* Solid disc backing: keeps the circling text readable over anything */
  background: rgba(13, 16, 23, 0.92);
  border: 1px solid var(--line); border-radius: 50%;
  box-shadow: 0 18px 50px rgba(4, 6, 12, 0.55);
  transition: color 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.orbit-badge:hover { border-color: rgba(59, 130, 246, 0.5); }
.orbit-badge:hover { color: var(--blue); transform: scale(1.07); }
.orbit-badge > svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; }
html.motion-ok .orbit-badge > svg:first-child { animation: orbit-spin 16s linear infinite; }
.orbit-text {
  fill: currentColor; font-family: var(--mono);
  font-size: 10.6px; letter-spacing: 2.1px; text-transform: uppercase;
}
.orbit-arrow { position: relative; transition: transform 0.4s var(--ease); }
.orbit-badge:hover .orbit-arrow { transform: translate(3px, -3px); }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) { .orbit-badge { display: none; } }

/* Mono ticker band across the outro top (reuses the marquee keyframes) */
.outro-band {
  position: absolute; top: 0; left: 0; right: 0; z-index: 1;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 12px 0; overflow: hidden;
}
.ob-track { display: flex; width: max-content; }
html.motion-ok .ob-track { animation: marquee 30s linear infinite; }
.ob-group { display: flex; flex-shrink: 0; align-items: center; }
.ob-group span {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.22em;
  color: var(--muted); padding: 0 18px; white-space: nowrap;
}
html:not(.motion-ok) .ob-group:last-child { display: none; }

.outro-actions {
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
  margin-top: 30px;
}

.outro-cv { margin-top: clamp(40px, 6vh, 72px); color: var(--muted); text-align: center; }
.outro-cv a { color: var(--bone); text-decoration-color: var(--blue); text-underline-offset: 4px; }

/* ---------- footer ---------- */
.footer {
  position: relative;
  overflow: hidden; /* the drifting hairline glint would otherwise poke past the right edge */
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 32px; flex-wrap: wrap;
  padding: 36px clamp(20px, 3.5vw, 52px) 30px;
}
/* Top hairline: a blue glint drifts along it (1px strip, negligible paint) */
.footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--line);
}
.footer::after {
  content: ''; position: absolute; top: 0; left: 0; height: 1px; width: 18%;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  opacity: 0.9;
}
html.motion-ok .footer::after { animation: hairline-drift 7s ease-in-out infinite alternate; }
@keyframes hairline-drift { from { transform: translateX(-30%); } to { transform: translateX(490%); } }

.footer-left .logo { font-size: 1.2rem; }
.footer-left p { color: var(--muted); font-size: 0.85rem; margin-top: 10px; }
.footer-status {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.13em;
  color: var(--muted);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #34D399; flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
}
html.motion-ok .status-dot { animation: dot-pulse 2.6s ease-out infinite; }
@keyframes dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.footer-right { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.footer-nav, .footer-social { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a {
  position: relative;
  text-decoration: none; color: var(--bone); font-size: 0.95rem; font-weight: 500;
  opacity: 0.9; transition: opacity 0.25s;
}
.footer-nav a::after {
  content: ''; position: absolute; left: 0; bottom: -4px; height: 1px; width: 100%;
  background: var(--blue);
  transform: scaleX(0); transform-origin: right center;
  transition: transform 0.4s var(--ease);
}
.footer-nav a:hover { opacity: 1; }
.footer-nav a:hover::after { transform: scaleX(1); transform-origin: left center; }
.footer-social a, .footer-social .discord {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em;
  color: var(--muted); text-decoration: none;
  transition: color 0.25s, transform 0.35s var(--ease);
}
.footer-social a:hover { color: var(--bone); transform: translateY(-3px); }
.to-top {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 0; margin: -13px 0; /* 44px+ tap target without moving layout */
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em;
  color: var(--muted); text-decoration: none;
  transition: color 0.3s;
}
.to-top svg { transition: transform 0.4s var(--ease); }
.to-top:hover { color: var(--bone); }
.to-top:hover svg { transform: translateY(-4px); }
@media (max-width: 720px) {
  .footer { flex-direction: column; align-items: flex-start; }
  .footer-right { align-items: flex-start; }
}

/* ---------- responsive hero ---------- */
@media (max-width: 640px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 0.9rem; }
  .hero-sign { right: -20%; top: 2%; bottom: auto; width: 42%; z-index: 4; transform: rotate(-8deg); }
  .hero-meta { bottom: 20px; }
  .mono { font-size: 0.68rem; }
}

/* ---------- brand icon sprite ---------- */
.icon { width: 1em; height: 1em; display: inline-block; fill: currentColor; flex-shrink: 0; }

.mq-icon {
  width: 1.05em; height: 1.05em; margin-right: 9px;
  color: var(--muted); opacity: 0.85; vertical-align: -0.18em;
}
.marquee-group span { display: inline-flex; align-items: center; }

.tool-group h3 { display: flex; align-items: center; gap: 8px; }
.tool-group h3 .icon { width: 22px; height: 22px; color: var(--blue); opacity: 0.9; }

.tag-icon { width: 13px; height: 13px; margin-right: 6px; color: var(--bone); opacity: 0.75; vertical-align: -0.05em; }
.tags li { display: inline-flex; align-items: center; }

.invest-block h3 { display: flex; align-items: center; gap: 9px; }
.invest-block h3 .icon { width: 22px; height: 22px; color: var(--blue); opacity: 0.9; }

.social-icon { width: 15px; height: 15px; margin-right: 7px; vertical-align: -0.15em; }
.footer-social a, .footer-social .discord { display: inline-flex; align-items: center; }

.btn-icon { width: 15px; height: 15px; margin-right: 8px; vertical-align: -0.1em; }
.pill-btn { display: inline-flex; align-items: center; }

/* ---------- char-split spans (added by JS) ---------- */
/* No will-change here: char reveal is a brief one-time transform. Keeping
   will-change on 100+ spans created 140 permanent GPU layers = scroll jank. */
.ch { display: inline-block; }

/* ---------- sparkle motif (GetLayers-style 4-point star) ---------- */
.sparkle { position: absolute; display: block; fill: currentColor; color: var(--bone); pointer-events: none; }
.sparkle-loader {
  position: static; width: 46px; height: 46px; margin-bottom: 22px; color: var(--blue);
  filter: drop-shadow(0 0 14px rgba(59, 130, 246, 0.6));
}
html.motion-ok .sparkle-loader { animation: sparkle-pulse 2.4s ease-in-out infinite; }
.sparkle-outro {
  width: clamp(38px, 5vw, 64px); height: clamp(38px, 5vw, 64px);
  top: 14%; left: 16%; z-index: 1; opacity: 0.9;
  filter: drop-shadow(0 0 16px rgba(233, 238, 245, 0.35));
}
html.motion-ok .sparkle-outro { animation: sparkle-spin 14s linear infinite; }
@keyframes sparkle-pulse { 0%, 100% { transform: rotate(0deg) scale(0.82); opacity: 0.72; } 50% { transform: rotate(180deg) scale(1.15); opacity: 1; } }
@keyframes sparkle-spin { to { transform: rotate(360deg); } }

.outro > .outro-stage, .outro > .outro-cv, .outro > .outro-actions { position: relative; z-index: 2; }
@media (max-width: 760px) { .sparkle-outro { display: none; } }

/* ---------- Selected Work: sticky card-stack (Cards Almanac) ---------- */
.cards.stack {
  display: block; max-width: 1150px; margin: clamp(48px, 7vw, 110px) auto 0;
  padding: 0 clamp(16px, 3vw, 40px); perspective: 2200px;
}
.stack .project-card {
  position: sticky; top: 13vh;
  width: 100%; margin: 0 auto 46vh;
  transform-origin: center 12%;
}
.stack .project-card:last-child { margin-bottom: 0; }
.card-index {
  display: block; font-family: var(--mono); font-size: 0.8rem;
  letter-spacing: 0.2em; color: var(--blue); margin-bottom: 12px;
}
.card-index i { color: var(--muted); font-style: normal; }
@media (max-width: 860px) {
  .stack .project-card { position: static; margin-bottom: 22px; }
}

/* ---------- X posts: 3D coverflow (slider-spectra) ---------- */
.cf-stage {
  position: relative; height: clamp(470px, 64vh, 600px);
  margin-top: clamp(48px, 6vw, 88px); perspective: 1900px;
  overflow: hidden;
}
.cf-track { position: absolute; inset: 0; transform-style: preserve-3d; }
.cf-stage .post-card {
  position: absolute; left: 50%; top: 50%;
  width: clamp(258px, 23vw, 318px); height: clamp(430px, 58vh, 500px);
  margin: 0; flex-shrink: 0;
  transition: transform 0.7s var(--ease), opacity 0.6s var(--ease), border-color 0.4s;
  backface-visibility: hidden;
}
.cf-stage .post-card.cf-active { border-color: rgba(96, 150, 246, 0.5); box-shadow: 0 30px 80px rgba(3, 6, 14, 0.6); }
.cf-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 60;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(18, 22, 31, 0.9); border: 1px solid var(--line);
  color: var(--bone); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background-color 0.25s, transform 0.25s var(--ease);
}
.cf-prev { left: clamp(6px, 3vw, 56px); }
.cf-next { right: clamp(6px, 3vw, 56px); }
.cf-nav:hover { background: var(--blue); transform: translateY(-50%) scale(1.08); }
html:not(.js) .cf-stage { height: auto; perspective: none; }
html:not(.js) .cf-track { position: static; display: flex; gap: 20px; overflow-x: auto; }
html:not(.js) .cf-stage .post-card { position: relative; left: auto; top: auto; transform: none; }
html:not(.js) .cf-nav { display: none; }

/* ---------- the journey: Roadmap Ascent (sticky rail, robust) ---------- */
.journey { position: relative; overflow: clip; background: var(--bg-2); padding: clamp(96px, 13vw, 180px) clamp(20px, 6vw, 96px) clamp(60px, 8vw, 120px); }
.journey > * { position: relative; }
.rm { position: relative; }
.rm-grid { display: grid; grid-template-columns: 150px 1fr; gap: clamp(30px, 5vw, 92px); max-width: 1040px; margin: clamp(24px, 3vw, 48px) auto 0; }

/* left: sticky date rail with a node that glides to the active milestone */
.rm-spine { position: relative; }
.rm-spine-inner { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; }
.rm-rail { position: relative; width: 100%; height: 62vh; }
.rm-line, .rm-progress { position: absolute; right: 5px; top: 0; bottom: 0; width: 2px; border-radius: 2px; }
.rm-line { background: var(--line); }
.rm-progress { background: linear-gradient(var(--blue), rgba(59, 130, 246, 0.35)); transform-origin: top center; transform: scaleY(0); transition: transform 0.6s var(--ease); }
.rm-ticks { position: absolute; inset: 0; list-style: none; display: flex; flex-direction: column; justify-content: space-between; margin: 0; padding: 0; }
.rm-ticks li { display: flex; align-items: center; justify-content: flex-end; gap: 12px; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; color: var(--muted); transition: color 0.45s var(--ease); }
.rm-ticks li em { font-style: normal; }
.rm-tick-dot { width: 9px; height: 9px; border-radius: 50%; background: #26314a; box-shadow: 0 0 0 3px var(--bg-2); margin-right: -0.5px; transition: background 0.45s var(--ease), box-shadow 0.45s var(--ease); flex-shrink: 0; }
.rm-ticks li.is-lit { color: var(--bone); }
.rm-ticks li.is-lit .rm-tick-dot { background: var(--blue); box-shadow: 0 0 0 3px var(--bg-2), 0 0 12px rgba(59, 130, 246, 0.8); }
.rm-node {
  position: absolute; right: -9px; top: -9px; z-index: 3;
  width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.18), 0 0 24px rgba(59, 130, 246, 0.85);
  transition: transform 0.6s var(--ease); will-change: transform;
}

/* right: milestone steps scroll past; the centered one is active (bright) */
.rm-track { position: relative; }
.rm-step {
  min-height: 82vh; display: flex; flex-direction: column; justify-content: center;
  opacity: 0.42; transition: opacity 0.5s var(--ease);
}
.rm-step.is-active { opacity: 1; }
.rm-step:first-child { min-height: 62vh; }
.rm-step:last-child { min-height: 62vh; }
.rm-badge {
  display: inline-block; align-self: flex-start; font-family: var(--mono); font-size: 0.66rem;
  letter-spacing: 0.2em; color: var(--blue); border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 999px; padding: 5px 12px; margin-bottom: 18px;
}
.rm-step h3 { font-family: var(--wide); font-weight: 700; font-size: clamp(1.6rem, 3.4vw, 2.6rem); letter-spacing: 0.01em; line-height: 1.06; }
.rm-step p { color: var(--muted); margin-top: 12px; max-width: 52ch; }
.rm-metric { margin-top: clamp(20px, 3vw, 34px); }
.rm-num { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(3rem, 8vw, 6rem); line-height: 0.9; color: var(--bone); font-variant-numeric: tabular-nums; }
.rm-mlabel { display: block; margin-top: 10px; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

@media (max-width: 760px) {
  .rm-grid { grid-template-columns: 1fr; }
  .rm-spine { display: none; }
  /* The big spine is hidden on mobile; a slim rail + lit dot per step keeps
     the roadmap identity instead of collapsing into a plain text list. */
  .rm-step {
    min-height: 0; opacity: 1 !important; padding: 0 0 44px 22px;
    position: relative; border-left: 1px solid var(--line);
  }
  .rm-step::before {
    content: ''; position: absolute; left: -5px; top: 4px;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--blue); box-shadow: 0 0 12px rgba(59, 130, 246, 0.65);
  }
  .rm-step:last-child { border-left-color: transparent; }
  .rm-step:first-child, .rm-step:last-child { min-height: 0; }
  .rm-num { font-size: clamp(2.8rem, 13vw, 4rem); }
}

/* ---------- animation initial states (JS + motion only) ---------- */
html.js.motion-ok .hero-name .line-inner,
html.js.motion-ok .st-inner,
html.js.motion-ok .bt-inner,
html.js.motion-ok .outro-title .line-inner { transform: translateY(112%); }
html.js.motion-ok .hero-portrait { opacity: 0; }
html.js.motion-ok .hero-sign { opacity: 0; }
html.js.motion-ok [data-intro] { opacity: 0; transform: translateY(20px); }
html.js.motion-ok [data-reveal] { opacity: 0; transform: translateY(34px) scale(0.97); }
/* stack cards stay visible; the stack scrub only dims a card once the next covers it */

/* ---------- playbooks (article pages) ---------- */
.pb-main { max-width: 780px; margin: 0 auto; padding: clamp(120px, 16vh, 170px) 22px 60px; }
.pb-crumb { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; color: var(--muted); }
.pb-crumb a { color: var(--muted); text-decoration: none; }
.pb-crumb a:hover { color: var(--bone); }
.pb-kicker { margin-top: 26px; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.2em; color: var(--blue); text-transform: uppercase; }
.pb-title { margin-top: 14px; font-family: var(--condensed); font-weight: 400; font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.02; color: var(--bone); }
.pb-dek { margin-top: 18px; font-size: 1.16rem; line-height: 1.6; color: var(--muted); }
.pb-meta {
  display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 26px; padding: 14px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--muted);
}
.pb-body { margin-top: 8px; }
.pb-body h2 {
  margin: 2.4em 0 0.6em; font-family: var(--wide); font-weight: 700;
  font-size: clamp(1.45rem, 3vw, 1.9rem); line-height: 1.15; color: var(--bone);
}
.pb-body h3 { margin: 1.8em 0 0.5em; font-family: var(--wide); font-weight: 700; font-size: 1.12rem; color: var(--bone); }
.pb-body p { margin: 1em 0; color: #C4CEDC; }
.pb-body ul, .pb-body ol { margin: 1em 0 1em 1.3em; color: #C4CEDC; }
.pb-body li { margin: 0.45em 0; }
.pb-body strong { color: var(--bone); }
.pb-body a { color: var(--bone); text-decoration-color: var(--blue); text-underline-offset: 3px; }
.pb-callout {
  margin: 1.6em 0; padding: 18px 22px; background: var(--card);
  border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 14px;
}
.pb-callout p { margin: 0; color: var(--bone); }
.pb-table-wrap { overflow-x: auto; margin: 1.6em 0; }
.pb-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.pb-table th {
  text-align: left; font-family: var(--mono); font-weight: 400; font-size: 0.68rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line);
}
.pb-table td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); color: #C4CEDC; vertical-align: top; }
.pb-table td:first-child { color: var(--bone); font-weight: 600; }
.pb-cta {
  margin-top: 60px; padding: clamp(28px, 5vw, 44px); text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
}
.pb-cta h2 { font-family: var(--wide); font-weight: 700; font-size: clamp(1.4rem, 3vw, 1.8rem); }
.pb-cta p { color: var(--muted); margin-top: 10px; }
.pb-cta .onx-actions { margin-top: 24px; }
.pb-next { margin-top: 48px; }
.pb-next h2 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; }
/* playbook index cards */
.pbi-list { display: grid; gap: 18px; margin-top: 40px; }
.pbi-card {
  display: block; padding: clamp(22px, 4vw, 34px); background: var(--card);
  border: 1px solid var(--line); border-radius: 20px; text-decoration: none;
  transition: transform 0.35s var(--ease), border-color 0.35s;
}
.pbi-card:hover { transform: translateY(-4px); border-color: rgba(96, 150, 246, 0.45); }
.pbi-card .pbi-k { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.18em; color: var(--blue); }
.pbi-card h2 { margin-top: 10px; font-family: var(--wide); font-weight: 700; font-size: clamp(1.3rem, 2.6vw, 1.7rem); line-height: 1.15; color: var(--bone); }
.pbi-card p { margin-top: 10px; color: var(--muted); }
.pbi-card .pbi-m { margin-top: 16px; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; color: var(--muted); }
.dc-link { display: inline-block; margin-top: 14px; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; color: var(--blue); text-decoration: none; }
.dc-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- email capture ---------- */
.capture {
  max-width: 640px; margin: 60px auto 0; padding: clamp(28px, 5vw, 44px);
  background: var(--card); border: 1px solid var(--line); border-radius: 24px; text-align: center;
}
.capture h2 { font-family: var(--wide); font-weight: 700; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.capture p { color: var(--muted); margin-top: 10px; }
.capture-form { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; justify-content: center; }
.capture-form input[type=email] {
  flex: 1; min-width: 220px; padding: 15px 18px; font: inherit; font-size: 0.98rem;
  color: var(--bone); background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
}
.capture-form input[type=email]:focus { outline: none; border-color: var(--blue); }
.capture-form .hp { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.capture-note { margin-top: 14px; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; color: var(--muted); }
.capture-msg { margin-top: 16px; font-weight: 600; min-height: 1.2em; }
.capture-msg.ok { color: #34D399; }
.capture-msg.err { color: #F87171; }

/* ---------- about page ---------- */
.about-page .pb-body p { font-size: 1.08rem; }
.about-lede { font-size: clamp(1.2rem, 2.6vw, 1.5rem) !important; color: var(--bone) !important; line-height: 1.5; }
.about-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; margin: 2.4em 0; }
.about-stat { padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.about-stat b { display: block; font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--bone); line-height: 1; }
.about-stat span { display: block; margin-top: 8px; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* ---------- testimonials page ---------- */
.tm-grid { display: grid; gap: 20px; margin-top: 40px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.tm-card { padding: clamp(24px, 3.5vw, 34px); background: var(--card); border: 1px solid var(--line); border-radius: 20px; }
.tm-stars { color: var(--blue); font-size: 1rem; letter-spacing: 2px; }
.tm-card blockquote { margin: 14px 0 0; font-size: 1.06rem; line-height: 1.55; color: var(--bone); }
.tm-card cite { display: block; margin-top: 16px; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--muted); font-style: normal; }

/* ---------- playbook hero + inline images ---------- */
.pb-hero { margin: clamp(24px, 4vw, 40px) 0 8px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 3 / 2; background: var(--card); }
.pb-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-figure { margin: 2.2em 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.pb-figure img { width: 100%; height: auto; display: block; }
.pb-figure figcaption { padding: 12px 18px; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- page transitions (View Transitions API, cross-document) ---------- */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vt-out 0.32s var(--ease) both; }
  ::view-transition-new(root) { animation: vt-in 0.42s var(--ease) both; }
}
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- results / proof wall ---------- */
.proof-grid { columns: 3 260px; column-gap: 18px; margin-top: 40px; }
.proof-item { break-inside: avoid; margin-bottom: 18px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--card); position: relative; }
.proof-item img { width: 100%; height: auto; display: block; transition: transform 0.5s var(--ease); }
.proof-item:hover img { transform: scale(1.03); }
.proof-cap { padding: 12px 16px; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--line); }
.proof-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin: 36px 0; }
.proof-stat { padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; text-align: center; }
.proof-stat b { display: block; font-family: var(--display); font-size: clamp(1.7rem, 4vw, 2.5rem); color: var(--bone); line-height: 1; }
.proof-stat span { display: block; margin-top: 8px; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* ---------- now / uses shared list ---------- */
.now-block { margin: 2em 0; padding-left: 20px; border-left: 2px solid var(--line); }
.now-block h2 { border: 0; }
.uses-group { margin: 2.2em 0; }
.uses-group h2 { font-family: var(--wide); font-weight: 700; font-size: 1.25rem; margin-bottom: 0.4em; }
.uses-list { list-style: none; display: grid; gap: 2px; }
.uses-list li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.uses-list b { color: var(--bone); min-width: 150px; font-weight: 600; }
.uses-list span { color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 0 auto; padding: clamp(70px, 10vw, 120px) 22px; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; color: var(--bone); font-family: var(--wide); font-weight: 700; font-size: clamp(1.05rem, 2.4vw, 1.35rem); padding: 24px 40px 24px 0; position: relative; }
.faq-q::after { content: '+'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 1.5rem; color: var(--blue); transition: transform 0.3s var(--ease); }
.faq-item.open .faq-q::after { transform: translateY(-50%) rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); }
.faq-item.open .faq-a { max-height: 320px; }
.faq-a p { color: var(--muted); padding: 0 0 24px; max-width: 64ch; }

/* ---------- playbook search + tags ---------- */
.pb-search-bar { position: relative; max-width: 480px; margin-top: clamp(32px, 5vw, 52px); }
.pb-search-bar::before {
  content: ''; position: absolute; left: 20px; top: 50%; width: 16px; height: 16px;
  transform: translateY(-50%); pointer-events: none; opacity: 0.55;
  background: currentColor; color: var(--muted);
  -webkit-mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E");
  mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E");
}
.pb-search {
  width: 100%; padding: 15px 20px 15px 48px; font: inherit; font-size: 0.98rem;
  color: var(--bone); background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 14px; transition: border-color 0.25s, background 0.25s;
}
.pb-search::placeholder { color: var(--muted); }
.pb-search:focus { outline: none; border-color: rgba(59, 130, 246, 0.55); background: var(--card); }
.pb-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.pb-tag {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); background: transparent; border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 16px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.pb-tag:hover { color: var(--bone); border-color: rgba(59, 130, 246, 0.4); }
.pb-tag.active { color: #fff; background: var(--blue); border-color: var(--blue); }
.pbi-card[hidden] { display: none; }
.pb-noresults { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; padding: 32px 0; display: none; text-align: center; }


/* ---------- interactive tools ---------- */
.tool-wrap { max-width: 620px; margin: clamp(32px, 5vw, 48px) 0 0; }
.tool-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: clamp(24px, 4vw, 38px); }
.tool-field { margin-bottom: 20px; }
.tool-field:last-of-type { margin-bottom: 0; }
.tool-field label { display: block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.tool-input-wrap { position: relative; }
.tool-input-wrap .pfx { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1rem; pointer-events: none; }
.tool-input { width: 100%; padding: 15px 18px; font: inherit; font-size: 1.05rem; color: var(--bone); background: var(--bg-2); border: 1px solid var(--line); border-radius: 13px; transition: border-color 0.25s; -moz-appearance: textfield; }
.tool-input.has-pfx { padding-left: 34px; }
.tool-input::-webkit-outer-spin-button, .tool-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tool-input:focus { outline: none; border-color: rgba(59, 130, 246, 0.55); }
.tool-hint { font-family: var(--body); font-size: 0.78rem; color: var(--muted); margin-top: 7px; text-transform: none; letter-spacing: 0; }
.tool-result { margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--line); }
.tool-result-label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.tool-result-value { font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 8vw, 4rem); line-height: 1; color: var(--bone); margin-top: 8px; font-variant-numeric: tabular-nums; }
.tool-verdict { margin-top: 18px; padding: 15px 18px; border-radius: 13px; font-weight: 600; line-height: 1.45; border: 1px solid var(--line); }
.tool-verdict.ok { background: rgba(52, 211, 153, 0.09); border-color: rgba(52, 211, 153, 0.35); color: #6EE7B7; }
.tool-verdict.warn { background: rgba(245, 200, 66, 0.08); border-color: rgba(245, 200, 66, 0.3); color: #FCD34D; }
.tool-verdict.bad { background: rgba(248, 113, 113, 0.09); border-color: rgba(248, 113, 113, 0.35); color: #FCA5A5; }
.tool-subrow { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 16px; }
.tool-sub { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em; color: var(--muted); }
.tool-sub b { color: var(--bone); font-weight: 600; }
.tool-plan { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 0.92rem; }
.tool-plan th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.tool-plan td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--line); color: #C4CEDC; vertical-align: top; }
.tool-plan td:first-child { color: var(--blue); font-family: var(--mono); font-size: 0.72rem; white-space: nowrap; }
.tool-plan td b { color: var(--bone); }



/* ---------- custom cursor: arrow + trailing name pill (OriginKit port) ---------- */
.uc-layer { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }
html.uc-on, html.uc-on * { cursor: none !important; }
.uc-arrow, .uc-pill { position: fixed; top: 0; left: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s; will-change: transform; }
html.uc-on .uc-arrow, html.uc-on .uc-pill { opacity: 1; }
html.uc-on.uc-out .uc-arrow, html.uc-on.uc-out .uc-pill { opacity: 0; }
.uc-arrow { z-index: 2; transform-origin: 0 0; filter: drop-shadow(0 3px 8px rgba(4,6,12,0.5)); }
.uc-arrow svg { display: block; }
.uc-pill { z-index: 1; transform-origin: 0% 50%; background: var(--blue); border-radius: 999px; padding: 4px 11px; box-shadow: 0 6px 18px rgba(4,6,12,0.4); }
.uc-name { font-family: var(--body); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.01em; color: #fff; white-space: nowrap; }
html.uc-on.uc-hover .uc-pill { background: var(--bone); }
html.uc-on.uc-hover .uc-name { color: var(--bg); }
@media (hover: none), (pointer: coarse) { .uc-layer { display: none; } }

/* ---------- hover footer (OriginKit TextHoverEffect + FooterBackgroundGradient, faithful) ---------- */
.hf { position: relative; overflow: hidden; margin: clamp(16px, 2.4vw, 34px);
  border-radius: clamp(20px, 2.4vw, 28px); background: #0c0e13;
  border: 1px solid rgba(255,255,255,0.07); isolation: isolate; }
.hf-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(125% 125% at 50% 8%, rgba(15,15,17,0.5) 48%, rgba(60,162,250,0.22) 100%); }
.hf-inner { position: relative; z-index: 3; max-width: 1200px; margin: 0 auto;
  padding: clamp(40px,5vw,72px) clamp(24px,4vw,60px) 0; }
.hf-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.35fr;
  gap: clamp(28px,3.4vw,52px); padding-bottom: clamp(30px,4vw,46px); }
.hf-brandline { display: flex; align-items: center; gap: 10px; }
.hf-heart { color: var(--blue); font-size: 1.7rem; line-height: 1; }
.hf-name { color: var(--bone); font-family: var(--wide); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.01em; }
.hf-brand p { color: var(--muted); font-size: 0.92rem; margin-top: 14px; max-width: 38ch; line-height: 1.65; }
.hf-col h4 { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.hf-col ul { list-style: none; display: grid; gap: 13px; }
.hf-col a, .hf-contact a, .hf-contact span { color: var(--bone); opacity: 0.82; text-decoration: none; font-size: 0.95rem; transition: color 0.25s, opacity 0.25s; }
.hf-col a:hover, .hf-contact a:hover { opacity: 1; color: var(--blue); }
.hf-live { position: relative; display: inline-flex; width: max-content; }
.hf-pulse { position: absolute; top: 1px; right: -13px; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: hf-pulse 1.9s ease-out infinite; }
@keyframes hf-pulse { 0% { box-shadow: 0 0 0 0 rgba(60,162,250,0.55);} 70% { box-shadow: 0 0 0 8px rgba(60,162,250,0);} 100% { box-shadow: 0 0 0 0 rgba(60,162,250,0);} }
.hf-contact li { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; color: var(--muted); }
.hf-contact svg { color: var(--blue); flex-shrink: 0; }
.hf-rule { border: none; border-top: 1px solid rgba(255,255,255,0.09); margin: 0; }
.hf-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; padding: 22px 0; }
.hf-social { display: flex; gap: 20px; }
.hf-social a { color: var(--muted); transition: color 0.25s, transform 0.3s var(--ease); display: inline-flex; }
.hf-social a:hover { color: var(--blue); transform: translateY(-3px); }
.hf-copy { color: var(--muted); font-size: 0.82rem; }
.hf-wordmark-wrap { position: relative; z-index: 1; width: 100%; overflow: hidden;
  height: clamp(94px, 14vw, 180px); margin-top: clamp(-28px,-3.4vw,-66px);
  display: flex; align-items: center; justify-content: center; }
.hf-wordmark { width: 100%; height: clamp(150px, 22vw, 300px); display: block; }
.hf-base-text, .hf-stroke-text, .hf-reveal-text { font-family: var(--display); font-size: 78px; }
.hf-base-text { fill: transparent; stroke: rgba(233,238,245,0.18); stroke-width: 0.5px; opacity: 0; transition: opacity 0.4s; }
.hf-wordmark.hf-hovered .hf-base-text { opacity: 0.5; }
.hf-stroke-text { fill: transparent; stroke: rgba(60,162,250,0.6); stroke-width: 0.7px; stroke-dasharray: 1300; stroke-dashoffset: 1300; }
html.motion-ok .hf-stroke-text { animation: hf-draw 4s var(--ease) forwards; }
@keyframes hf-draw { to { stroke-dashoffset: 0; } }
.hf-reveal-text { fill: transparent; stroke-width: 1.1px; }
@media (max-width: 900px) { .hf-grid { grid-template-columns: 1fr 1fr; } .hf-brand { grid-column: 1 / -1; } }
@media (max-width: 540px) { .hf-grid { grid-template-columns: 1fr; } .hf-wordmark-wrap { height: clamp(64px, 18vw, 104px);} }

/* ---------- OriginKit "Infinite Text Passage" (ZoomTextTunnel) on the statement ---------- */
.st-fallback { display: block; }
.statement .itp { position: relative; display: block; width: 100%;
  height: clamp(180px, 32vh, 320px); overflow: hidden; }
.statement .itp[hidden] { display: none; }
.statement .itp-measure { visibility: hidden; white-space: pre; display: inline-block; }
.statement .itp-slot { position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; white-space: pre;
  color: var(--bone); transform-origin: center center;
  will-change: transform, opacity; backface-visibility: hidden; opacity: 0; }
@media (max-width: 640px) { .statement .itp { height: clamp(120px, 26vh, 200px); } }

/* ============================================================
   LIGHT THEME — palette: 3C493F / 7E8D85 / B3BFB8 (coolors).
   Sage-green monochrome. Tints derived from #B3BFB8 for the page
   surfaces so body text keeps AA contrast against #3C493F ink.
   ============================================================ */
html.light {
  color-scheme: light;
  --bg: #DFE5E1;      /* light sage paper (tint of B3BFB8) */
  --bg-2: #D0D9D3;
  --card: #EDF1EE;
  --bone: #3C493F;    /* palette dark green = ink / primary fg */
  --muted: #5E6D64;   /* between 3C493F and 7E8D85, kept readable */
  --line: rgba(60, 73, 63, 0.20);
  --blue: #4A6152;    /* accent shifts into the green family */
}
html.light body { background: var(--bg); color: var(--bone); }
html.light .dc-card { background: #F4F7F5; }
html.light .rm-tick-dot { background: #B3BFB8; box-shadow: 0 0 0 3px var(--bg-2); }
html.light .pb-body p, html.light .pb-body ul, html.light .pb-body ol,
html.light .pb-table td, html.light .tool-plan td { color: #46534A; }
html.light .pill-solid:hover { background: #3C493F; color: #EDF1EE; }
html.light .blob-a { background: rgba(60, 73, 63, 0.10); }
html.light .blob-b { background: rgba(126, 141, 133, 0.14); }
html.light .hf { background: #EDF1EE; border-color: rgba(60, 73, 63, 0.14); }
html.light .hf-bg { background: radial-gradient(125% 125% at 50% 8%, rgba(255,255,255,0.45) 44%, rgba(126,141,133,0.34) 100%); }
html.light .hf-rule { border-top-color: rgba(60, 73, 63, 0.16); }
html.light .hf-base-text { stroke: rgba(60, 73, 63, 0.30); }
html.light .hf-stroke-text { stroke: rgba(74, 97, 82, 0.65); }
html.light .hero-name { text-shadow: 0 8px 44px rgba(60, 73, 63, 0.12); }
html.light ::selection { background: #3C493F; color: #EDF1EE; }

/* ---------- curtain theme toggle button + overlay ---------- */
.tt-curtain { position: fixed; inset: 0; transform-origin: top; transform: scaleY(0);
  z-index: 9997; pointer-events: none; will-change: transform; }
.tt-btn { width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--bone); color: var(--bg);
  box-shadow: 0 0 0 1.5px var(--line);
  z-index: 60; outline: none; -webkit-tap-highlight-color: transparent; flex-shrink: 0;
  transition: background 0.3s ease, color 0.3s ease, transform 0.16s ease, box-shadow 0.3s ease; }
.tt-btn:hover { transform: scale(1.1); }
.tt-btn:active { transform: scale(0.96); }
.tt-floating { position: fixed; right: clamp(16px,2.4vw,26px); bottom: clamp(16px,2.4vw,26px);
  width: 44px; height: 44px; z-index: 9999; box-shadow: 0 0 0 1.5px var(--line), 0 8px 26px rgba(0,0,0,0.28); }
#navThemeToggle { display: inline-flex; align-items: center; pointer-events: auto; margin-left: 22px; }
.nav { gap: 8px; }
@media (prefers-reduced-motion: reduce) { .tt-curtain { display: none; } }

/* light-mode polish: the hero-name's dark glow becomes a grey smudge on paper */
html.light .hero-name { text-shadow: 0 8px 44px rgba(20, 24, 32, 0.10); }
html.light .hf-base-text { stroke: rgba(20, 24, 32, 0.28); }

/* ---------- "Accordion 05" — numbered rows, hiding titles ---------- */
.about-lists.acc { display: block; border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-h { margin: 0; font-weight: inherit; }
.acc-trigger { display: flex; align-items: flex-start; gap: clamp(12px, 1.6vw, 22px);
  width: 100%; padding: clamp(10px, 1.4vw, 16px) 0; background: none; border: none;
  text-align: left; cursor: pointer; color: inherit; font: inherit; }
.acc-num { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em;
  color: var(--muted); padding-top: 0.55em; flex-shrink: 0; transition: color 0.4s var(--ease); }
.acc-title { display: flex; align-items: center; gap: 0.34em; flex-wrap: wrap;
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(1.55rem, 4.6vw, 3.4rem); line-height: 1.02; letter-spacing: -0.015em;
  color: var(--bone); opacity: 0.22;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }
.acc-trigger:hover .acc-title { opacity: 0.45; }
.acc-item.is-open .acc-title { opacity: 1; }
.acc-item.is-open .acc-num { color: var(--blue); }
.acc-title .icon { width: 0.72em; height: 0.72em; flex-shrink: 0; color: var(--blue);
  opacity: 0; transition: opacity 0.45s var(--ease); }
.acc-item.is-open .acc-title .icon { opacity: 1; }
.acc-panel { height: 0; overflow: hidden; }
.acc-panel-in { padding: 0 0 clamp(18px, 2.4vw, 28px) 0;
  margin-left: calc(0.7rem + clamp(12px, 1.6vw, 22px)); max-width: 62ch; }
.acc-panel-in p { color: var(--muted); font-size: clamp(0.98rem, 1.15vw, 1.1rem); line-height: 1.7; margin: 0; }
html:not(.js) .acc-panel { height: auto; }
html:not(.js) .acc-title { opacity: 1; }
@media (max-width: 760px) { .acc-title { font-size: clamp(1.3rem, 7vw, 2rem); } }

/* the accordion needs full bleed: stack the about grid so giant titles hold one line */
.about-grid-stack { grid-template-columns: 1fr; gap: clamp(34px, 4.5vw, 64px); }
.about-grid-stack .about-copy { max-width: 72ch; }

/* ============================================================
   LIGHT MODE PASS 2 — kill every dark-backdrop assumption.
   Blue glows, dark smear shadows, invisible hairlines, dark discs
   and the blue-tinted renders all get sage/forest equivalents.
   Dark theme is untouched: every rule here is scoped to html.light.
   ============================================================ */

/* --- blue glows -> gone or forest-green (stat counters, journey, signature) --- */
html.light.motion-ok .stat-num .count { text-shadow: none; }
html.light.motion-ok .st-inner {
  background: linear-gradient(110deg, var(--bone) 42%, #6E8577 50%, var(--bone) 58%);
  background-size: 240% 100%; -webkit-background-clip: text; background-clip: text;
}
html.light .hero-sign { filter: drop-shadow(0 6px 16px rgba(60, 73, 63, 0.22)); opacity: 0.9; }
html.light .sparkle-loader { filter: drop-shadow(0 0 12px rgba(74, 97, 82, 0.45)); }

/* --- journey rail: no blue halos --- */
html.light .rm-progress { background: linear-gradient(var(--blue), rgba(74, 97, 82, 0.30)); }
html.light .rm-line { background: rgba(60, 73, 63, 0.18); }
html.light .rm-tick-dot { background: #AAB6AE; box-shadow: 0 0 0 3px var(--bg); }
html.light .rm-ticks li.is-lit .rm-tick-dot { background: var(--blue); box-shadow: 0 0 0 3px var(--bg); }
html.light .rm-node {
  background: var(--bone); color: #EDF1EE;
  box-shadow: 0 0 0 5px rgba(60, 73, 63, 0.10), 0 6px 16px rgba(60, 73, 63, 0.28);
}
html.light .rm-step::before { background: var(--blue) !important; box-shadow: none !important; }

/* --- X-post cards: real contrast + a shadow that isn't a dark smear --- */
html.light .post-card {
  background: #FFFFFF; border-color: rgba(60, 73, 63, 0.16);
  box-shadow: 0 2px 6px rgba(60, 73, 63, 0.06);
}
html.light .post-card:hover { border-color: rgba(74, 97, 82, 0.5); }
html.light .cf-stage .post-card.cf-active {
  border-color: rgba(74, 97, 82, 0.45);
  box-shadow: 0 18px 44px rgba(60, 73, 63, 0.16), 0 2px 8px rgba(60, 73, 63, 0.08);
}
html.light .post-card p, html.light .post-card > p { color: #2F3A33; opacity: 1; }

/* --- carousel arrows: solid forest disc, light glyph --- */
html.light .cf-nav {
  background: var(--bone); color: #EDF1EE; border-color: transparent;
  box-shadow: 0 4px 14px rgba(60, 73, 63, 0.24);
}
html.light .cf-nav:hover { background: #2F3A33; }

/* --- pill buttons: the hairline was bone-alpha = invisible on paper --- */
html.light .pill-btn { border-color: rgba(60, 73, 63, 0.38); }
html.light .pill-btn:hover { border-color: var(--bone); background: rgba(60, 73, 63, 0.06); }
html.light .pill-solid { background: var(--bone); color: #EDF1EE; border-color: var(--bone); }
html.light .pill-solid:hover { background: #2F3A33; color: #EDF1EE; }

/* --- floating glass prop tiles --- */
html.light .icon-prop {
  background: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(179,191,184,0.42));
  border-color: rgba(60, 73, 63, 0.14);
  box-shadow: 0 6px 18px rgba(60, 73, 63, 0.12), inset 0 1px 0 rgba(255,255,255,0.9);
  color: var(--bone);
}
html.light .icon-prop:hover {
  box-shadow: 0 10px 26px rgba(60, 73, 63, 0.18), inset 0 1px 0 rgba(255,255,255,0.9), 0 0 0 1px rgba(74, 97, 82, 0.35);
}
html.light .icon-prop.ambient { opacity: 0.55; }

/* --- OUTRO: the vignette assumed a black page; make it a deliberate oval --- */
html.light .outro-portrait {
  -webkit-mask-image: radial-gradient(ellipse 74% 82% at 50% 46%, #000 88%, transparent 99%);
  mask-image: radial-gradient(ellipse 74% 82% at 50% 46%, #000 88%, transparent 99%);
  opacity: 1;
}
html.light .outro-title { text-shadow: 0 2px 18px rgba(223, 229, 225, 0.9); }
html.light .orbit-badge {
  background: var(--bone); color: #EDF1EE; border-color: transparent;
  box-shadow: 0 10px 30px rgba(60, 73, 63, 0.26);
}
html.light .orbit-badge:hover { background: #2F3A33; }
html.light .outro-band { color: var(--muted); }

/* --- dark AI renders: re-tint the accent from blue to sage + lift the blacks
       so they read as deliberate dark-glass product shots, not holes --- */
html.light .tint { filter: hue-rotate(88deg) saturate(0.72) brightness(1.1) contrast(0.94); }
html.light .card-media, html.light .project-card img, html.light .pb-hero {
  border: 1px solid rgba(60, 73, 63, 0.16);
}
html.light .pb-hero img, html.light .card-media img {
  filter: brightness(1.06) contrast(0.95) saturate(0.9);
}

/* outro: on paper the portrait becomes a soft watermark so the headline
   reads cleanly across it (on dark it stays a full-strength focal image) */
html.light .outro-portrait { opacity: 0.5; }
html.light .outro-title {
  text-shadow: 0 0 26px rgba(223,229,225,0.95), 0 0 10px rgba(223,229,225,0.9);
}
html.light .ob-track, html.light .outro-band { color: var(--muted); opacity: 0.85; }

/* --- light: the blue aura glows and the blue-lit outro portrait both fight
       the sage palette. Aura goes sage; the portrait becomes a monochrome
       sage watermark so the forest-green headline reads cleanly across it. --- */
html.light .aura {
  background: radial-gradient(circle, rgba(126, 141, 133, 0.28), rgba(60, 73, 63, 0.06) 70%);
}
html.light .outro-portrait {
  opacity: 0.28;
  filter: grayscale(1) sepia(0.42) hue-rotate(58deg) saturate(0.75) brightness(1.12) contrast(0.92);
}
html.light .outro-title { text-shadow: none; }
html.light .sparkle { color: var(--blue); filter: drop-shadow(0 2px 6px rgba(60,73,63,0.18)); opacity: 0.5; }

/* swapped-in light renders are already sage: no re-tint, no lift */
html.light img.is-light-variant,
html.light .pb-hero img.is-light-variant,
html.light .card-media img.is-light-variant { filter: none; }

/* GSAP owns the portrait's inline `opacity` (main.js fromTo), so a CSS opacity
   rule can never win — fade it inside the filter chain instead. Hover state
   must be re-stated or it reverts to the dark-theme brightness/saturate. */
html.light .outro-portrait {
  filter: grayscale(1) sepia(0.42) hue-rotate(58deg) saturate(0.72) brightness(1.14) contrast(0.92) opacity(0.30);
}
html.light .outro-stage:hover .outro-portrait {
  filter: grayscale(1) sepia(0.42) hue-rotate(58deg) saturate(0.85) brightness(1.18) contrast(0.94) opacity(0.42);
}

/* --- light: the hero portrait's blue look is a CSS duotone (hue-rotate 178deg),
       not the photo. Retune it into the sage family. Hover still resolves to the
       true photo, so the :hover rule must be re-stated at higher specificity. --- */
html.light .hero-portrait > img:not(.hero-sign) {
  filter: grayscale(1) sepia(0.5) hue-rotate(62deg) saturate(1.05) brightness(1.06) contrast(1.04);
}
html.light .hero-portrait:hover > img:not(.hero-sign) {
  filter: grayscale(0) sepia(0) hue-rotate(0deg) saturate(1.02) brightness(1.02) contrast(1.02);
}
/* the signature PNG is pure white — invisible on paper; ink it instead */
html.light .hero-sign {
  filter: brightness(0) drop-shadow(0 2px 10px rgba(255, 255, 255, 0.6));
  opacity: 0.82;
}

/* ---------- scroll-aware glass header (21st header-2 pattern) ---------- */
.nav {
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease),
              padding 0.4s var(--ease), -webkit-backdrop-filter 0.4s, backdrop-filter 0.4s;
}
.nav.is-stuck {
  background-color: rgba(10, 12, 16, 0.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  border-bottom-color: rgba(233, 238, 245, 0.10);
  padding-top: 15px; padding-bottom: 15px;
}
html.light .nav.is-stuck {
  background-color: rgba(223, 229, 225, 0.66);
  border-bottom-color: rgba(60, 73, 63, 0.14);
}
/* no backdrop-filter support: fall back to a solid-enough bar */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav.is-stuck { background-color: rgba(10, 12, 16, 0.92); }
  html.light .nav.is-stuck { background-color: rgba(223, 229, 225, 0.94); }
}
@media (prefers-reduced-motion: reduce) { .nav { transition: none; } }

/* ============================================================
   LIGHT MODE PASS 3 — remaining hardcoded blues + the neon
   greens/ambers/reds. Every accent moves into the sage/forest
   family; status colours darken enough to stay legible on paper.
   ============================================================ */
/* blue accents that were still leaking through */
html.light .rm-badge { border-color: rgba(74, 97, 82, 0.45); color: var(--blue); }
html.light .dc-card:hover,
html.light .pbi-card:hover { border-color: rgba(74, 97, 82, 0.45); }
html.light .orbit-badge:hover { border-color: rgba(74, 97, 82, 0.5); }
html.light .pb-search:focus,
html.light .tool-input:focus { border-color: rgba(74, 97, 82, 0.6); }
html.light .pb-tag:hover { color: var(--bone); border-color: rgba(74, 97, 82, 0.45); }
html.light .project-card::after {
  background: radial-gradient(640px circle at var(--mx, 50%) var(--my, 50%), rgba(74, 97, 82, 0.10), transparent 45%);
}
html.light .hf-pulse { animation: hf-pulse-light 1.9s ease-out infinite; }
@keyframes hf-pulse-light {
  0%   { box-shadow: 0 0 0 0 rgba(74, 97, 82, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(74, 97, 82, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 97, 82, 0); }
}

/* neon status colours -> deep, legible equivalents on paper */
html.light .dc-name { color: #2F6B4F; }
html.light .status-dot { background: #1E7A54; box-shadow: 0 0 0 0 rgba(30, 122, 84, 0.45); }
html.light .capture-msg.ok { color: #1E7A54; }
html.light .capture-msg.err { color: #B3261E; }
html.light .tool-verdict.ok   { background: rgba(30, 122, 84, 0.10);  border-color: rgba(30, 122, 84, 0.35);  color: #17603F; }
html.light .tool-verdict.warn { background: rgba(154, 107, 0, 0.10);  border-color: rgba(154, 107, 0, 0.32);  color: #7A5400; }
html.light .tool-verdict.bad  { background: rgba(179, 38, 30, 0.09);  border-color: rgba(179, 38, 30, 0.32);  color: #9B2119; }

/* ============================================================
   LIGHT MODE PASS 4 — defects found by the full-site sweep.
   ============================================================ */
/* CRITICAL: the custom cursor arrow is injected with fill="#E9EEF5" (dark --bone).
   On sage that is ~1.1:1 — invisible — and html.uc-on suppresses the native
   pointer, so a light-mode desktop visitor had NO cursor at all. A CSS `fill`
   outranks the SVG presentation attribute, so no JS change is needed. */
html.light .uc-arrow path { fill: #3C493F; stroke: rgba(237, 241, 238, 0.6); stroke-width: 1.1; }
html.light .uc-arrow { filter: drop-shadow(0 2px 6px rgba(60, 73, 63, 0.28)); }
html.light .uc-pill { box-shadow: 0 6px 18px rgba(60, 73, 63, 0.22); }

/* journey milestones: 0.42 was tuned against black; on sage it lands ~1.95:1 */
html.light .rm-step { opacity: 0.65; }
html.light .rm-step.is-active { opacity: 1; }
html.light .rm-step p { color: #46534A; }

/* playbook body links were bone + blue underline */
html.light .pb-body a { color: #2F6B4F; text-decoration-color: rgba(47, 107, 79, 0.6); }
html.light .pb-body a:hover { color: #1E7A54; text-decoration-color: #1E7A54; }

/* dark text on a light page reads thin with antialiased smoothing */
html.light body { -webkit-font-smoothing: subpixel-antialiased; -moz-osx-font-smoothing: auto; }

/* touch devices get the true photo (the base (hover:none) rule loses to the
   light duotone on specificity, which stranded phone users in a green cast) */
@media (hover: none) {
  html.light .hero-portrait > img:not(.hero-sign) {
    filter: grayscale(0) sepia(0) hue-rotate(0deg) saturate(1.02) brightness(1.02) contrast(1.02);
  }
}
