/* Redesign source of truth. All site styles live here. */

/* ---------- Self-hosted fonts (latin subset, woff2) ----------
   Sourced from Google Fonts. Inter & JetBrains Mono are variable
   fonts — same file serves all weights. See assets/fonts/. */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- F1.1 — Design tokens ---------- */
:root {
  /* Layout */
  --header-height: 64px;

  /* Palette */
  --color-bg: #000;
  --color-fg: #fff;
  --color-muted: #8a8a8a;
  --accent-1: #5a6a3a;
  --accent-2: #b8862a;
  --accent-3: #ff8469;
  --accent-gradient: linear-gradient(90deg, #5a6a3a 0%, #b8862a 50%, #ff8469 100%);

  /* Typography */
  --font-display: 'Inter', system-ui, sans-serif;
  --font-body: 'Manrope', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-display: clamp(3.5rem, 9vw, 8rem);
  --fs-mega: clamp(5rem, 14vw, 12rem);
  --fs-h1: clamp(36px, 6vw, 88px);
  --fs-h2: clamp(28px, 4vw, 56px);
  --fs-body: clamp(16px, 1.1vw, 18px);
  --fs-eyebrow: clamp(12px, 0.9vw, 14px);

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  --space-7: 9rem;

  /* Motion */
  --motion-fast: 200ms;
  --motion-base: 350ms;
  --motion-slow: 700ms;
  --ease-standard: cubic-bezier(.2,.7,.2,1);
}

/* M7 — apply token-driven body font/colors now that Inter/Manrope load */
body {
  font-family: var(--font-body);
  color: var(--color-fg);
  background: var(--color-bg);
}

html {
  scroll-padding-top: var(--header-height);
}

/* ---------- F1.2 — Global sticky header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  /* m6 — subtle scrim so the mark/burger stay legible over the bright orb */
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), transparent);
  pointer-events: none;
  font-family: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-header > * { pointer-events: auto; }

.site-mark {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-mark:hover,
.site-mark:focus { color: #fff; opacity: 0.8; }

/* v3.1 — Top-right vertical nav (visible at all viewports as of v4.1) */
.site-nav {
  position: fixed;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 1100;
  pointer-events: auto;
  font-family: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}
.site-nav li { margin: 0; position: relative; }
.site-nav a {
  display: inline-block;
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.15rem 0;
  transition: color var(--motion-fast) var(--ease-standard);
}
.site-nav a:hover,
.site-nav a:focus-visible { color: var(--color-fg); }
.site-nav a:focus-visible {
  outline: 1px solid var(--color-fg);
  outline-offset: 4px;
}
.site-nav .is-active a { color: var(--color-fg); }
/* Reserve arrow space on every link so .is-active toggles fade in/out
   without any layout shift. v4.3 will animate the arrow per scroll. */
.site-nav a::before {
  content: "→";
  display: inline-block;
  width: 1em;
  margin-right: 0.5rem;
  color: var(--color-fg);
  opacity: 0;
  transition: opacity var(--motion-base) var(--ease-standard);
}
.site-nav .is-active a::before { opacity: 1; }

@media (min-width: 768px) {
  .site-nav { top: var(--space-3); right: var(--space-4); }
  .site-nav a { font-size: 0.85rem; }
  .site-header { background: transparent; }
}

/* Hamburger button */
.burger {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.burger span {
  display: block;
  width: 26px;
  height: 1.5px;
  background: #fff;
  transition: transform 0.3s ease, opacity 0.2s ease;
  transform-origin: center;
}

.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(3.75px) rotate(45deg);
}
.burger[aria-expanded="true"] span:nth-child(2) {
  transform: translateY(-3.75px) rotate(-45deg);
}

.burger:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

/* ---------- F1.3 — Fullscreen overlay nav ---------- */
.overlay-nav {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6rem 1.5rem 2rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-2%);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s;
  font-family: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.overlay-nav[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0s;
}

.overlay-nav__links,
.overlay-nav__socials {
  list-style: none;
  margin: 0;
  padding: 0;
}

.overlay-nav__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
  margin-bottom: auto;
}

.overlay-nav__links li a {
  color: #fff;
  text-decoration: none;
  font-size: clamp(2.5rem, 9vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  display: inline-block;
  transition: color 0.2s ease, transform 0.3s ease;
}

.overlay-nav__links li a:hover,
.overlay-nav__links li a:focus {
  color: #8a8a8a;
}

.overlay-nav__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1.5rem;
}

.overlay-nav__socials li a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.overlay-nav__socials li a:hover,
.overlay-nav__socials li a:focus { color: #8a8a8a; }

/* Lock body scroll while overlay is open */
body.nav-open { overflow: hidden; }

@media (min-width: 768px) {
  .site-header { padding: 1.75rem 2.5rem; }
  .overlay-nav { padding: 8rem 2.5rem 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .overlay-nav,
  .overlay-nav[aria-hidden="false"],
  .burger span,
  .overlay-nav__links li a {
    transition: none;
  }
  .overlay-nav,
  .overlay-nav[aria-hidden="false"] {
    transform: none;
  }
}

/* ---------- F2.1–F2.4 — Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 1.5rem 6rem;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* v2.3 — WebGL hero canvas; sits behind the text and badge */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

/* v3.2 — Gentle edge fade overlay on the hero. Radial vignette pulls
   the corners and bottom toward black so the chrome surface centre
   reads as the focal point (matches the monopo screenshot). */
/* v4.2 — Soft top-corner vignette + strong fade-to-black at the bottom
   so the WebGL canvas dissolves seamlessly into the section below. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 65% 35%, transparent 0%, transparent 35%, rgba(0,0,0,0.45) 95%),
    linear-gradient(
      to bottom,
      transparent 0%,
      transparent 55%,
      rgba(0, 0, 0, 0.6) 78%,
      rgba(0, 0, 0, 0.92) 92%,
      #000 100%
    );
}

/* Once Three.js mounts successfully, fade out the CSS orb fallback */
.hero--canvas-on .hero__orb {
  opacity: 0;
  transition: opacity var(--motion-slow) var(--ease-standard);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .hero--canvas-on .hero__orb { transition: none; }
}

.hero__orb {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80vmin;
  height: 80vmin;
  border-radius: 50%;
  /* M2 — muted olive→amber→charcoal palette; reads as moody warm blob */
  background: radial-gradient(
    circle at 30% 30%,
    #5a6a3a 0%,
    #b8862a 45%,
    #2a2a2a 80%,
    rgba(0, 0, 0, 0) 100%
  );
  filter: blur(80px);
  transform: translate(-50%, -50%);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
  animation: hero-orb-drift 20s ease-in-out infinite;
  will-change: transform;
}

@keyframes hero-orb-drift {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
  }
  25% {
    transform: translate(-40%, -60%) scale(1.1);
  }
  50% {
    transform: translate(-55%, -45%) scale(0.95);
  }
  75% {
    transform: translate(-60%, -55%) scale(1.05);
  }
}

/* v6.2 — Hero title in JetBrains Mono with a typewriter caret.
   Single line, replace-in-place; min-width reserves enough space for
   the longest phrase ("Building with AI") to prevent layout shift. */
.hero__title {
  position: relative;
  z-index: 2;
  margin: 0;
  /* v7.2 — reverted to monopo-style sans (Inter via --font-display)
     while keeping the v6.2 typewriter behaviour. */
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.2vw, 4.5rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
  font-weight: 400;
  color: var(--color-fg);
  text-align: center;
  min-height: 1.3em;
  /* Inter is narrower than mono; 16ch is enough for "Building with AI" */
  min-width: min(90vw, 16ch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.hero__title__char {
  display: inline-block;
  white-space: nowrap;
}
.hero__title__caret {
  display: inline-block;
  margin-left: 0.06em;
  color: var(--color-fg);
  font-weight: 300;
  animation: hero-caret-blink 1.2s steps(1, end) infinite;
}
@keyframes hero-caret-blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__title__caret { animation: none; opacity: 0.6; }
}

/* v3.3 — SCROLL DOWN badge with static centre JHW mark.
   The wrapper does NOT rotate; the inner ring SVG rotates so the
   centre mark stays upright while the text spins around it. */
.hero__badge {
  position: absolute;
  left: var(--space-3);
  bottom: var(--space-4);
  width: 88px;
  height: 88px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.hero__badge__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  fill: #fff;
  font-family: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 19px;
  letter-spacing: 0.18em;
  animation: hero-badge-rotate 12s linear infinite;
  transform-origin: 50% 50%;
}

.hero__badge__mark {
  position: relative;
  z-index: 1;
  font-family: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--color-fg);
  text-transform: uppercase;
  pointer-events: none;
}

.hero__badge:hover .hero__badge__ring,
.hero__badge:focus .hero__badge__ring {
  animation-play-state: paused;
}

.hero__badge:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 6px;
  border-radius: 50%;
}

@keyframes hero-badge-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (min-width: 768px) {
  .hero {
    padding: 10rem 2.5rem 7rem;
  }
  /* v3.3 — keep the badge small at all viewports per the monopo
     screenshot. Earlier sizing pushed it to 140/160px which dwarfed
     the centre mark. */
  .hero__badge {
    width: 96px;
    height: 96px;
    left: 2.5rem;
    bottom: 2.5rem;
  }
}

@media (min-width: 1200px) {
  .hero__badge {
    width: 104px;
    height: 104px;
  }
  .hero__badge__ring { font-size: 20px; }
  .hero__badge__mark { font-size: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__orb,
  .hero__badge {
    animation: none;
  }
}

/* ---------- F3.1–F3.3 — Selected projects ---------- */
.selected-projects {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  font-family: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-fg);
}

.eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 var(--space-2);
}

/* B2 — render the arrow as a pseudo-element instead of inline glyph */
.eyebrow::before,
.eyebrow--with-arrow::before {
  content: "\2192";
  display: inline-block;
  margin-right: 0.5em;
  font-size: 12px;
  color: var(--color-muted);
}

/* B3 — scoped overrides so Massively h2/h3 specificity can't bleed in */
.selected-projects p.eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}
.selected-projects .project-card__title {
  font-size: var(--fs-h2);
  font-weight: 500;
  margin: 0;
  line-height: 1.05;
}
.tooling .tooling__eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
  color: var(--color-muted);
}
.tooling .tooling__list {
  font-size: var(--fs-h2);
  font-weight: 500;
  line-height: 1.2;
  margin: var(--space-3) 0 var(--space-5);
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: transform var(--motion-base) var(--ease-standard);
  will-change: transform;
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-card__media {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: #111;
  line-height: 0;
}

.project-card__media img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--motion-slow) var(--ease-standard);
}

.project-card:hover .project-card__media img {
  transform: scale(1.02);
}

.project-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 0 var(--space-1);
}

.project-card__date {
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.project-card__title {
  font-size: var(--fs-h2);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--color-fg);
}

.project-card__title a {
  color: inherit;
  text-decoration: none;
  background-image: var(--accent-gradient);
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--motion-base) var(--ease-standard);
}

.project-card__title a:hover,
.project-card__title a:focus {
  background-size: 100% 2px;
}

.project-card__meta {
  margin: 0;
  font-size: var(--fs-eyebrow);
  color: var(--color-muted);
  letter-spacing: 0.02em;
}

.project-card__actions {
  list-style: none;
  margin: var(--space-2) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.btn-pill {
  --pill-border: rgba(255, 255, 255, 0.4);
  display: inline-block;
  padding: 0.7em 1.6em;
  border-radius: 999px;
  background: transparent;
  color: var(--color-fg);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  position: relative;
  border: 1px solid var(--pill-border);
  transition: color var(--motion-base) var(--ease-standard),
              border-color var(--motion-base) var(--ease-standard),
              background var(--motion-base) var(--ease-standard);
}

.btn-pill:hover,
.btn-pill:focus-visible {
  border-color: transparent;
  background:
    linear-gradient(#000, #000) padding-box,
    var(--accent-gradient) border-box;
  border: 1px solid transparent;
  color: var(--color-fg);
}

.btn-pill:focus-visible {
  outline: 2px solid var(--color-fg);
  outline-offset: 4px;
}

@media (min-width: 900px) {
  .selected-projects {
    padding: var(--space-7) var(--space-4);
    gap: var(--space-6);
  }
  .project-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: var(--space-5);
  }
  .project-card:nth-of-type(odd) .project-card__media {
    order: 1;
  }
  .project-card:nth-of-type(even) .project-card__media {
    order: 2;
  }
  .project-card__body {
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-card__media img,
  .project-card__title a,
  .btn-pill {
    transition: none;
  }
  .project-card:hover {
    transform: none;
  }
  .project-card:hover .project-card__media img {
    transform: none;
  }
}

/* ---------- F1.4 — Reveal utility ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--motion-slow) var(--ease-standard),
              transform var(--motion-slow) var(--ease-standard);
}

[data-reveal].is-inview {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- F3.4 — Tooling strip ---------- */
.tooling {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-3);
  color: var(--color-fg);
}

.tooling__eyebrow {
  margin: 0;
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-muted);
}

.tooling__list {
  margin: 0;
  font-size: var(--fs-h2);
  line-height: 1.2;
  font-weight: 500;
  color: var(--color-fg);
  max-width: 18ch;
}

.btn-pill--gradient {
  margin-top: var(--space-3);
  border-color: transparent;
  background: var(--accent-gradient);
  color: var(--color-fg);
}

.btn-pill--gradient:hover,
.btn-pill--gradient:focus-visible {
  border: 1px solid transparent;
  background: var(--accent-gradient);
  color: var(--color-fg);
  filter: brightness(1.08);
}

@media (min-width: 900px) {
  .tooling {
    padding: var(--space-7) var(--space-4);
    gap: var(--space-4);
  }
  .tooling__list {
    max-width: none;
  }
}

/* ---------- F4.2 — Full manifesto (index.html + profile.html) ---------- */
.manifesto {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-7) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  font-family: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-fg);
}

.manifesto__title {
  margin: 0 0 var(--space-3);
  font-size: var(--fs-display);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 500;
  color: var(--color-fg);
  max-width: 14ch;
}

.manifesto__title em {
  font-style: italic;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.manifesto__item {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
}

.manifesto__label {
  margin: 0;
  font-size: var(--fs-eyebrow);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 500;
}

.manifesto__body {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--color-fg);
  max-width: 60ch;
  background: linear-gradient(180deg, var(--color-fg) 0%, var(--color-fg) 50%, var(--color-muted) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .manifesto__body {
    background: none;
    color: var(--color-fg);
    -webkit-text-fill-color: var(--color-fg);
  }
}

.manifesto-line {
  display: block;
  width: 100%;
  height: 1px;
  overflow: visible;
  margin-top: var(--space-3);
  color: var(--color-muted);
  opacity: 0.5;
}

.manifesto-line line {
  stroke: currentColor;
  stroke-width: 1;
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset var(--motion-slow) var(--ease-standard);
}

.manifesto-line.is-drawn line {
  stroke-dashoffset: 0;
}

@media (min-width: 768px) {
  .manifesto__item {
    display: grid;
    grid-template-columns: 1fr 2fr;
    column-gap: var(--space-5);
    row-gap: var(--space-3);
    align-items: start;
  }
  .manifesto__label {
    grid-column: 1;
    grid-row: 1;
  }
  .manifesto__body {
    grid-column: 2;
    grid-row: 1;
  }
  .manifesto-line {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (min-width: 900px) {
  .manifesto {
    padding: var(--space-7) var(--space-4);
    gap: var(--space-6);
  }
}

@media (prefers-reduced-motion: reduce) {
  .manifesto-line line {
    stroke-dashoffset: 0;
    transition: none;
  }
}

/* ---------- F4.3 — Member card (profile.html) ---------- */
.member-intro {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-7) var(--space-3) var(--space-6);
  font-family: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-fg);
}

.member-intro .eyebrow {
  margin: 0 0 var(--space-3);
}

.member-intro h2 {
  margin: 0;
  font-size: var(--fs-h1);
  line-height: 1.0;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--color-fg);
  max-width: 18ch;
}

.member-intro__title {
  margin: 0;
  /* v5.2 — shrunk from --fs-display so it sits closer to the
     monopo "Tokyo-born / Creative Studio" proportions */
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: 500;
  color: var(--color-fg);
  max-width: none;
}

.member-intro__title em {
  font-style: italic;
}

.member-intro__title .indent {
  display: inline-block;
  margin-left: 1.5em;
}

/* v5.1 — member card sized like a monopo team-member card: portrait
   constrained to a small column on the left, footer + bio sit
   alongside on desktop, stack on mobile. */
.member {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-3) var(--space-7);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-family: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-fg);
}

.member__portrait {
  margin: 0;
  width: 100%;
  max-width: 280px;
}

.member__portrait img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  /* v6.1 — layered drop shadow lifts the portrait off the dark bg */
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.5),
    0 8px 16px rgba(0, 0, 0, 0.35);
}

.member__footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-3);
  max-width: 280px;
}

.member__name {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-weight: 500;
  color: var(--color-fg);
}

.member__expand {
  -webkit-appearance: none;
  appearance: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--color-fg);
  background: transparent;
  color: var(--color-fg);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: inherit;
  transition: transform var(--motion-fast) var(--ease-standard),
              background var(--motion-fast) var(--ease-standard),
              color var(--motion-fast) var(--ease-standard);
}

.member__expand > * {
  transition: transform var(--motion-fast) var(--ease-standard);
  display: inline-block;
}

/* Treat the button text-node via inner rotation: rotate the whole button content. */
.member__expand {
  position: relative;
}

.member__expand::before {
  content: "";
}

.member__expand[aria-expanded="true"] {
  transform: rotate(45deg);
}

.member__expand:hover,
.member__expand:focus-visible {
  background: var(--color-fg);
  color: var(--color-bg);
}

.member__expand:focus-visible {
  outline: 2px solid var(--color-fg);
  outline-offset: 4px;
}

.member__bio {
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--color-fg);
  max-width: 65ch;
  padding-top: var(--space-3);
}

.member__bio p { margin: 0 0 var(--space-2); }
.member__bio p:last-child { margin-bottom: 0; }
.member__bio a {
  color: var(--color-fg);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.member__bio a:hover { opacity: 0.7; }

.member__bio-lede {
  margin-bottom: var(--space-3) !important;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  color: var(--color-fg);
}

.member__section-title {
  margin: var(--space-4) 0 var(--space-2);
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-muted);
  font-weight: 500;
}

.member__entry {
  margin: 0 0 var(--space-3);
  padding: 0;
}
.member__entry:last-of-type { margin-bottom: var(--space-2); }

.member__entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1);
  margin: 0 0 0.15rem;
}
.member__entry-head h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-fg);
  letter-spacing: -0.005em;
}
.member__entry-date {
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.08em;
  color: var(--color-muted);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.member__entry-org {
  margin: 0 0 var(--space-1);
  color: var(--color-muted);
  font-size: 0.9rem;
}
.member__entry ul {
  margin: var(--space-1) 0 0;
  padding-left: 1.1rem;
  color: var(--color-fg);
}
.member__entry ul li {
  margin: 0 0 0.35rem;
  line-height: 1.55;
}

.member__more {
  margin: var(--space-3) 0 0;
  font-size: 0.95rem;
  color: var(--color-muted);
}

@media (min-width: 768px) {
  .member {
    max-width: 720px;
  }
}

@media (min-width: 900px) {
  .member-intro {
    padding: var(--space-7) var(--space-4) var(--space-6);
  }
  .member {
    padding: 0 var(--space-4) var(--space-7);
  }
}

@media (prefers-reduced-motion: reduce) {
  .member__expand,
  .member__expand > * {
    transition: none;
  }
}

/* ---------- F5.1 — Contact section ---------- */
.contact {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-7) var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  font-family: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-fg);
  background: var(--color-bg);
}

.contact__title {
  margin: 0;
  font-size: var(--fs-h1);
  line-height: 1.0;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--color-fg);
}

.contact__eyebrow {
  margin: 0;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 500;
}

/* v9.1 — fallback for JS-disabled visitors. Same gradient text as
   the live link so the section still reads cleanly. */
.contact__email-fallback {
  display: block;
  margin: var(--space-3) 0;
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--color-fg);
  opacity: 0.85;
  user-select: text;
}

.contact__email {
  margin: var(--space-3) 0;
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 500;
  text-decoration: none;
  background: var(--accent-gradient);
  background-size: 200% auto;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline-block;
  word-break: break-word;
  transition: background-position var(--motion-slow) var(--ease-standard);
}

.contact__email:hover,
.contact__email:focus-visible {
  background-position: 100% 50%;
}

.contact__email:focus-visible {
  outline: 2px solid var(--color-fg);
  outline-offset: 6px;
  border-radius: 4px;
}

.contact__location {
  margin: var(--space-3) 0 0;
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--color-fg);
}

.contact__location span {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-1);
}

@media (min-width: 900px) {
  .contact {
    padding: var(--space-7) var(--space-4);
    gap: var(--space-4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact__email {
    transition: none;
  }
  .contact__email:hover,
  .contact__email:focus-visible {
    background-position: 0% 50%;
  }
}

/* ---------- F5.2 — Site footer ---------- */
.site-footer {
  background: var(--color-bg);
  color: var(--color-fg);
  border-top: 1px solid rgba(138, 138, 138, 0.25);
  padding: var(--space-5) var(--space-3);
  font-family: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "eyebrow scroll"
    "socials scroll"
    "copyright copyright";
  column-gap: var(--space-4);
  row-gap: var(--space-4);
  align-items: start;
}

.site-footer__eyebrow {
  grid-area: eyebrow;
  margin: 0;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 500;
}

.site-footer__socials {
  grid-area: socials;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.site-footer__socials li a {
  color: var(--color-fg);
  text-decoration: none;
  font-size: var(--fs-h2);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  display: inline-block;
  background-image: var(--accent-gradient);
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--motion-base) var(--ease-standard);
}

.site-footer__socials li a span {
  color: var(--color-muted);
  margin-left: 0.25em;
  font-size: 0.7em;
}

.site-footer__socials li a:hover,
.site-footer__socials li a:focus-visible {
  background-size: 100% 2px;
}

.btn-to-top {
  grid-area: scroll;
  -webkit-appearance: none;
  appearance: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--color-fg);
  background: transparent;
  color: var(--color-fg);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: inherit;
  justify-self: end;
  transition: background var(--motion-base) var(--ease-standard),
              color var(--motion-base) var(--ease-standard),
              transform var(--motion-base) var(--ease-standard);
}

.btn-to-top:hover,
.btn-to-top:focus-visible {
  background: var(--color-fg);
  color: var(--color-bg);
  transform: translateY(-2px);
}

.btn-to-top:focus-visible {
  outline: 2px solid var(--color-fg);
  outline-offset: 4px;
}

.site-footer__copyright {
  grid-area: copyright;
  margin: 0;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  border-top: 1px solid rgba(138, 138, 138, 0.15);
  padding-top: var(--space-3);
}

@media (min-width: 900px) {
  .site-footer {
    padding: var(--space-5) var(--space-4);
  }
  .site-footer__socials {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-to-top,
  .site-footer__socials li a {
    transition: none;
  }
  .btn-to-top:hover,
  .btn-to-top:focus-visible {
    transform: none;
  }
}

/* ---------- F6.1 / F6.2 — Project detail pages ---------- */
.project-page__hero {
  max-width: 80ch;
  margin: 0 auto;
  padding: var(--space-7) var(--space-3) var(--space-5);
  font-family: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-fg);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.project-page__hero .eyebrow { margin: 0; }

.project-page__title {
  margin: 0;
  font-size: var(--fs-display);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 500;
  color: var(--color-fg);
}

.project-page__meta {
  margin: var(--space-3) 0 0;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 500;
}

.project-page__media {
  max-width: 80ch;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.project-page__media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  background: #111;
}

.project-page__body {
  max-width: 60ch;
  margin: 0 auto;
  padding: var(--space-6) var(--space-3);
  font-family: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-fg);
  font-size: var(--fs-body);
  line-height: 1.7;
}

.project-page__body > * + * { margin-top: var(--space-3); }

.project-page__lede {
  font-size: 1.25em;
  line-height: 1.55;
  color: var(--color-fg);
  margin: 0 0 var(--space-4);
}

.project-page__body h2 {
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--color-fg);
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
}

.project-page__body h3 {
  font-size: calc(var(--fs-body) * 1.4);
  line-height: 1.2;
  font-weight: 500;
  color: var(--color-fg);
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.project-page__body h4 {
  font-size: calc(var(--fs-body) * 1.1);
  font-weight: 500;
  color: var(--color-fg);
  margin-top: var(--space-3);
  margin-bottom: var(--space-1);
}

.project-page__body p {
  margin: 0 0 var(--space-3);
  color: rgba(255, 255, 255, 0.85);
}

.project-page__body ul,
.project-page__body ol {
  margin: 0 0 var(--space-3);
  padding-left: 1.4em;
  color: rgba(255, 255, 255, 0.85);
}

.project-page__body li {
  margin-bottom: 0.5em;
  line-height: 1.6;
}

.project-page__body a {
  color: var(--color-fg);
  text-decoration: none;
  background-image: var(--accent-gradient);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--motion-base) var(--ease-standard);
}

.project-page__body a:hover,
.project-page__body a:focus-visible {
  background-size: 100% 2px;
}

.project-page__body img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  margin: var(--space-3) 0;
}

.project-page__body .caption {
  font-size: 0.9em;
  color: var(--color-muted);
  text-align: center;
  margin-top: 0.25rem;
  margin-bottom: var(--space-3);
  font-style: italic;
}

.project-page__body hr,
.project-page__body .section-divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: var(--space-5) 0;
}

.project-page__body code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.project-page__body pre {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: var(--space-2);
  overflow-x: auto;
  font-size: 0.85em;
  line-height: 1.5;
}

.project-page__body pre code {
  background: transparent;
  padding: 0;
}

/* v6.3 — ASCII architecture diagrams. Tighter line-height + explicit
   monospace so the box-drawing characters connect cleanly. */
.project-page__body pre.ascii-diagram {
  line-height: 1.15;
  font-size: 0.7rem;
  letter-spacing: 0;
}
.project-page__body pre.ascii-diagram code {
  font-family: var(--font-mono);
  white-space: pre;
  display: block;
  color: var(--color-fg);
}

.project-page__body .table-wrapper {
  overflow-x: auto;
  margin: var(--space-3) 0;
}

.project-page__body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
}

.project-page__body th,
.project-page__body td {
  text-align: left;
  padding: 0.6em 0.8em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

.project-page__body th {
  color: var(--color-fg);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.project-page__body .math-wrap {
  overflow-x: auto;
  padding: var(--space-2) 0;
}

.project-page__pager {
  max-width: 80ch;
  margin: 0 auto;
  padding: var(--space-5) var(--space-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.project-page__pager a {
  font-size: clamp(20px, 2.4vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--color-fg);
  text-decoration: none;
  background-image: var(--accent-gradient);
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--motion-base) var(--ease-standard);
}

.project-page__pager a:hover,
.project-page__pager a:focus-visible {
  background-size: 100% 2px;
}

@media (min-width: 900px) {
  .project-page__hero {
    padding: var(--space-7) var(--space-4) var(--space-5);
  }
  .project-page__media {
    padding: 0 var(--space-4);
  }
  .project-page__body {
    padding: var(--space-6) var(--space-3);
  }
  .project-page__pager {
    padding: var(--space-5) var(--space-4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-page__body a,
  .project-page__pager a {
    transition: none;
  }
}

/* ---------- F6.3 — Page transitions (feature-flagged via data-page-transitions) ---------- */
body[data-page-transitions].is-leaving,
body[data-page-transitions].is-entering {
  opacity: 0;
  transition: opacity var(--motion-base) var(--ease-standard);
}

body[data-page-transitions] {
  opacity: 1;
  transition: opacity var(--motion-base) var(--ease-standard);
}

@media (prefers-reduced-motion: reduce) {
  body[data-page-transitions].is-leaving,
  body[data-page-transitions].is-entering,
  body[data-page-transitions] {
    transition: none;
    opacity: 1;
  }
}

/* ---------- ChaptiveAI feature list (moved from inline <style>) ---------- */
.project-page__body ol.numbered-list {
  list-style: none;
  counter-reset: feature-counter;
  padding-left: 0;
}
.project-page__body ol.numbered-list > li {
  counter-increment: feature-counter;
  margin-bottom: 1.5rem;
}
.project-page__body ol.numbered-list > li::before {
  content: counter(feature-counter) ") ";
}
.project-page__body .feature-media {
  margin-top: 1rem;
}

/* ---- Hugging Face live-demo embed (project pages) ---------------------- */
.hf-embed {
  max-width: 80ch;
  margin: 0 auto;
  padding: var(--space-5) var(--space-3) var(--space-3);
}
.hf-embed .eyebrow {
  margin-bottom: var(--space-2);
}
.hf-embed__frame {
  position: relative;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  background: #111;
}
.hf-embed__frame iframe {
  display: block;
  width: 100%;
  height: 720px;
  border: 0;
}
.hf-embed__fallback {
  margin-top: var(--space-2);
  font-size: var(--fs-eyebrow);
  color: var(--color-muted);
}
@media (max-width: 736px) {
  .hf-embed__frame iframe { height: 560px; }
}

/* ---- Inline math (no MathJax — pure HTML/Unicode) ----------------------- */
.project-page__body var {
  font-family: 'JetBrains Mono', 'Cambria Math', Cambria, serif;
  font-style: italic;
}
.project-page__body sub,
.project-page__body sup {
  font-size: 0.75em;
  line-height: 0;
}
.project-page__body .math-display,
.project-page__body .math-wrap {
  margin: var(--space-3) 0;
  padding: var(--space-2) var(--space-3);
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid var(--color-muted);
  font-family: 'Cambria Math', Cambria, 'Times New Roman', serif;
  line-height: 1.8;
  overflow-x: auto;
}

/* ---- v3.3 — Vanilla cursor dot ----------------------------------------- */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  mix-blend-mode: difference;
  transition: opacity var(--motion-fast) var(--ease-standard),
              width var(--motion-fast) var(--ease-standard),
              height var(--motion-fast) var(--ease-standard);
  will-change: transform;
}
.cursor-dot--visible { opacity: 0.85; }
.cursor-dot--pressed { width: 6px; height: 6px; }

/* Touch-only / no-hover devices: never paint the dot. The JS already
   skips creation but this is a defensive layer in case markup is
   ever pre-rendered. */
@media (hover: none) {
  .cursor-dot { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor-dot { display: none; }
}

/* ---- v4.1 — Profile / passion section on home -------------------------- */
.passion {
  max-width: 60ch;
  margin: 0 auto;
  padding: var(--space-7) var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  font-family: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.passion__portrait {
  margin: 0;
  width: 100%;
  max-width: 240px;
}
.passion__portrait img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  /* v6.1 — same layered drop shadow as the profile portrait */
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.5),
    0 8px 16px rgba(0, 0, 0, 0.35);
}
.passion__body {
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.55;
  color: var(--color-fg);
  font-weight: 400;
}
@media (min-width: 900px) {
  .passion {
    padding: var(--space-7) var(--space-4);
    gap: var(--space-4);
  }
}

/* ---- v7.3 — Bidirectional scroll-fill text reveal --------------------- */
/* The full-element variant ("line") — toggles grey ↔ white based on
   intersection. Slower transition for a softer monopo-style fade. */
[data-fill="line"] {
  color: rgba(255, 255, 255, 0.28);
  transition: color 900ms var(--ease-standard);
}
[data-fill="line"].is-revealed { color: var(--color-fg); }

/* Per-word variant. Each <span class="fw"> reverts to grey when the
   user scrolls back up past it (the JS uses toggle, not unobserve).
   --i is the word's 0-based index, set by JS. The transition-delay
   formula gives a left-to-right cascade: word 0 starts immediately,
   word 1 ~50ms later, word 2 ~100ms later, capped so very long
   paragraphs don't stretch the cascade past ~1.2s. */
[data-fill="words"] .fw {
  color: rgba(255, 255, 255, 0.28);
  display: inline;
  transition: color 700ms var(--ease-standard);
  /* Calc clamps the per-word delay so prose doesn't take forever to
     finish revealing. min(--i * 50ms, 1200ms). */
  transition-delay: min(calc(var(--i, 0) * 45ms), 1200ms);
}
[data-fill="words"] .fw.is-revealed { color: var(--color-fg); }

/* v9.2 — the reduced-motion override on [data-fill] is intentionally
   removed. The grey ↔ white transition is colour-only (no movement
   of any kind) and conveys reading progress, so it sits well within
   the WCAG carve-out for essential motion. The previous override
   was forcing all words to stay white on every mobile browser whose
   OS had reduced-motion enabled (often via Low Power Mode) — making
   the effect look broken. Cf. v8.1 + v9.2 commit messages. */
