/* ============================================================
   MANU AI Solutions — instrument-grade light theme
   Palette derived from fMRI activation overlays:
   neutral anatomical ground, hot signal, cool counterpoint.
   ============================================================ */

:root {
  --paper: #f6f5f2;
  --paper-2: #ffffff;
  --paper-3: #edebe5;
  --ink: #14161a;
  --ink-2: #4b5058;
  --ink-3: #8b8f97;
  --rule: rgba(20,22,26,0.13);
  --rule-strong: rgba(20,22,26,0.26);
  --hot: #d6421f;
  --hot-soft: #fbeee9;
  --cool: #0f6e78;
  --cool-soft: #e6f1f2;

  --maxw: 1240px;
  --gutter: 32px;

  --display: "Cabinet Grotesk", "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --ease: cubic-bezier(.22,.85,.28,1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection { background: var(--hot); color: var(--paper-2); }

:focus-visible {
  outline: 2px solid var(--hot);
  outline-offset: 3px;
}

/* ---------- shared primitives ---------- */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.mono {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

/* Section label: § 02 / PROJECTS */
.slug {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: 18px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--rule);
}
.slug b {
  font-weight: 500;
  color: var(--hot);
  font-variant-numeric: tabular-nums;
}
.slug span { color: var(--ink); }
.slug .slug-rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.022em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

.h-xl { font-size: clamp(2.9rem, 7.4vw, 5.6rem); }
.h-lg { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
.h-md { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -0.018em; }

.accent { color: var(--hot); }

/* ---------- scroll progress ---------- */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--hot);
  z-index: 100;
  transition: width 0.08s linear;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.scrolled {
  border-bottom-color: var(--rule);
  background: color-mix(in srgb, var(--paper) 96%, transparent);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  gap: 40px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-right: auto;
}
.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: block;
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-mark .ring { transition: transform 0.5s var(--ease); transform-origin: 20px 20px; }
.brand:hover .ring-1 { transform: rotate(9deg); }
.brand:hover .ring-2 { transform: rotate(-7deg); }

.brand-text {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand-text i {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.19em;
  color: var(--ink-3);
  margin-top: 3px;
}

.nav-links {
  display: flex;
  gap: 30px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.nav-links a { position: relative; padding: 4px 0; transition: color 0.2s var(--ease); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1.5px;
  background: var(--hot);
  transition: width 0.28s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.is-current { color: var(--ink); }
.nav-links a.is-current::after { width: 100%; background: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px; height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  height: 1.5px; width: 100%;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--rule);
  background: var(--paper);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 17px var(--gutter);
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.btn svg { width: 14px; height: 14px; transition: transform 0.32s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

/* wipe fill on hover */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.36s var(--ease);
  z-index: -1;
}
.btn:hover::before { transform: scaleY(1); }
.btn > * { position: relative; z-index: 1; }

.btn-primary {
  background: var(--hot);
  color: var(--paper-2);
  border-color: var(--hot);
}
.btn-primary:hover { border-color: var(--ink); }

.btn-line {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}
.btn-line:hover { color: var(--paper); border-color: var(--ink); }

.btn-sm { padding: 11px 18px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}

#field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  mask-image:
    linear-gradient(to right, transparent 4%, rgba(0,0,0,0.30) 30%, #000 62%),
    linear-gradient(to bottom, #000 62%, transparent 97%);
  -webkit-mask-image:
    linear-gradient(to right, transparent 4%, rgba(0,0,0,0.30) 30%, #000 62%),
    linear-gradient(to bottom, #000 62%, transparent 97%);
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(96px, 15vh, 168px) var(--gutter) 0;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 34px;
}
.kicker .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--hot);
  flex-shrink: 0;
  animation: ping 2.6s var(--ease) infinite;
}
@keyframes ping {
  0%, 100% { box-shadow: 0 0 0 0 rgba(214,66,31,0.42); }
  60% { box-shadow: 0 0 0 8px rgba(214,66,31,0); }
}

.hero h1 { max-width: 15ch; margin-bottom: 34px; }

.lede {
  font-size: clamp(1.02rem, 1.35vw, 1.18rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 52ch;
  margin: 0 0 42px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: clamp(80px, 12vh, 128px);
}

/* instrument readout strip */
.readout {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
}
.readout-cell {
  padding: 26px 0 30px;
  border-right: 1px solid var(--rule);
  padding-right: 24px;
}
.readout-cell:first-child { padding-left: 0; }
.readout-cell:last-child { border-right: none; }
.readout-val {
  display: block;
  font-family: var(--display);
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
}
.readout-key {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- sections ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(80px, 11vw, 130px) var(--gutter);
}
.section.tight { padding-top: clamp(56px, 7vw, 84px); }

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.statement {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.15vw, 1.72rem);
  line-height: 1.32;
  letter-spacing: -0.016em;
  color: var(--ink);
  margin: 0 0 26px;
  text-wrap: pretty;
}
.statement em {
  font-style: normal;
  color: var(--hot);
}

.about-body {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0;
  max-width: 56ch;
}
.about-body + .about-body { margin-top: 16px; }
.about-body strong { color: var(--ink); font-weight: 700; }

.principles { border-top: 1px solid var(--rule); }
.principle {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  transition: padding-left 0.3s var(--ease);
}
.principle:hover { padding-left: 8px; }
.principle-n {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s var(--ease);
}
.principle:hover .principle-n { color: var(--hot); }
.principle h3 { font-size: 15.5px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 5px; }
.principle p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.6; }

/* ---------- project index ---------- */
.index { border-top: 1px solid var(--rule-strong); }

.index-row {
  display: grid;
  grid-template-columns: 46px 46px minmax(0, 1fr) minmax(0, 1.05fr) 108px 30px;
  gap: 24px;
  align-items: center;
  padding: 28px 14px 28px 6px;
  border-bottom: 1px solid var(--rule);
  position: relative;
  transition: background 0.34s var(--ease), padding-left 0.34s var(--ease);
}
.index-row::before {
  content: "";
  position: absolute;
  left: 0; top: -1px; bottom: -1px;
  width: 2px;
  background: var(--hot);
  transform: scaleY(0);
  transition: transform 0.34s var(--ease);
}
.index-row:hover { background: var(--paper-2); padding-left: 20px; }
.index-row:hover::before { transform: scaleY(1); }

.index-n {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  transition: color 0.3s var(--ease);
}
.index-row:hover .index-n { color: var(--hot); }

.index-icon {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  color: var(--ink-2);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.index-icon svg { width: 21px; height: 21px; }
.index-row:hover .index-icon {
  color: var(--hot);
  border-color: color-mix(in srgb, var(--hot) 40%, transparent);
  background: var(--hot-soft);
}

.index-title {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.017em;
  line-height: 1.15;
  margin: 0;
}
.index-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}
.index-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.index-arrow {
  color: var(--ink-3);
  display: grid;
  place-items: center;
  transition: color 0.3s var(--ease), transform 0.34s var(--ease);
}
.index-arrow svg { width: 18px; height: 18px; }
.index-row:hover .index-arrow { color: var(--hot); transform: translateX(6px); }

/* status chip — squared, instrument-like */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 2px;
  white-space: nowrap;
  width: fit-content;
}
.chip::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.chip-progress { color: #9a5205; background: #fdf1e0; border: 1px solid #f0d5ad; }
.chip-partner { color: var(--cool); background: var(--cool-soft); border: 1px solid color-mix(in srgb, var(--cool) 26%, transparent); }

/* ---------- stack grid ---------- */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.stack-cell {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  position: relative;
  transition: background 0.28s var(--ease), color 0.28s var(--ease);
}
.stack-cell::after {
  content: attr(data-n);
  position: absolute;
  top: 8px; right: 10px;
  font-size: 9px;
  color: var(--ink-3);
  opacity: 0;
  transition: opacity 0.28s var(--ease);
}
.stack-cell:hover { background: var(--hot-soft); color: var(--hot); }
.stack-cell:hover::after { opacity: 1; }

/* ---------- contact ---------- */
.contact {
  border-top: 1px solid var(--rule-strong);
  background: var(--paper-3);
}
.contact-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 116px) var(--gutter);
}
.contact h2 { max-width: 16ch; margin-bottom: 22px; }
.contact-lede {
  font-size: 16px;
  color: var(--ink-2);
  max-width: 46ch;
  margin: 0 0 44px;
}

.mail-link {
  display: inline-flex;
  align-items: baseline;
  gap: 16px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.35rem, 3.6vw, 2.7rem);
  letter-spacing: -0.028em;
  line-height: 1.1;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), gap 0.3s var(--ease);
  word-break: break-word;
}
.mail-link svg { width: 0.62em; height: 0.62em; flex-shrink: 0; transition: transform 0.34s var(--ease); }
.mail-link:hover { color: var(--hot); border-color: var(--hot); gap: 24px; }
.mail-link:hover svg { transform: translate(4px, -4px); }

.contact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  margin-top: 46px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.meta-item { display: flex; flex-direction: column; gap: 6px; }
.meta-key {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.meta-val { font-size: 14.5px; color: var(--ink); transition: color 0.24s var(--ease); }
a.meta-val:hover { color: var(--hot); }

.socials { display: flex; gap: 10px; margin-top: 40px; }
.social {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  color: var(--ink-2);
  transition: color 0.28s var(--ease), background 0.28s var(--ease), border-color 0.28s var(--ease), transform 0.28s var(--ease);
}
.social svg { width: 17px; height: 17px; }
.social:hover {
  color: var(--paper-2);
  background: var(--ink);
  border-color: var(--ink);
  transform: translateY(-3px);
}

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--rule); background: var(--paper-3); }
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.footer-inner a:hover { color: var(--hot); }

/* ---------- sub-page header ---------- */
.page-head {
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}
.page-head-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 11vh, 118px) var(--gutter) clamp(52px, 7vh, 76px);
  position: relative;
  z-index: 1;
}
.page-head h1 { max-width: 18ch; margin-bottom: 26px; }
.page-head .lede { margin-bottom: 0; max-width: 62ch; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 34px;
  transition: color 0.24s var(--ease), gap 0.24s var(--ease);
}
.back-link:hover { color: var(--hot); gap: 14px; }
.back-link svg { width: 14px; height: 14px; }

/* ---------- partner card ---------- */
.partner {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 40px;
  align-items: start;
  padding: 44px 0;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
}
.partner-photo {
  width: 132px;
  height: 132px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--paper-3);
  position: relative;
  filter: grayscale(1) contrast(1.04);
  transition: filter 0.5s var(--ease);
}
.partner-photo:hover { filter: grayscale(0) contrast(1); }
.partner-photo img { width: 100%; height: 100%; object-fit: cover; }

.partner h3 {
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.partner-role {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--hot);
  margin: 0 0 20px;
}
.partner-bio {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0 0 14px;
  max-width: 66ch;
}
.partner-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.partner-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: 9px 14px;
  transition: color 0.26s var(--ease), background 0.26s var(--ease), border-color 0.26s var(--ease);
}
.partner-links a:hover { color: var(--paper-2); background: var(--ink); border-color: var(--ink); }
.partner-links svg { width: 13px; height: 13px; }

/* ---------- project detail ---------- */
.detail-head {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 26px;
}
.detail-icon {
  width: 66px; height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule-strong);
  background: var(--paper-2);
  color: var(--hot);
  flex-shrink: 0;
}
.detail-icon svg { width: 30px; height: 30px; }

.block { padding: 46px 0; border-top: 1px solid var(--rule); }
.block:first-of-type { border-top: 1px solid var(--rule-strong); }
.block-grid {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 40px;
  align-items: start;
}
.block-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 4px;
}

/* progress track */
.track { display: flex; max-width: 560px; }
.stage {
  flex: 1;
  position: relative;
  padding-top: 22px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.stage::before {
  content: "";
  position: absolute;
  top: 5px; left: 0; right: 0;
  height: 1px;
  background: var(--rule-strong);
}
.stage::after {
  content: "";
  position: absolute;
  top: 1px; left: 0;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--rule-strong);
}
.stage.done { color: var(--ink-2); }
.stage.done::before { background: var(--cool); }
.stage.done::after { background: var(--cool); border-color: var(--cool); }
.stage.current { color: var(--hot); }
.stage.current::after {
  background: var(--hot);
  border-color: var(--hot);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--hot) 18%, transparent);
}
.stage.current::before {
  background: linear-gradient(to right, var(--cool) 0%, var(--hot) 0%);
}

.collab-tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cool);
  border: 1px solid color-mix(in srgb, var(--cool) 30%, transparent);
  background: var(--cool-soft);
  border-radius: 2px;
  padding: 9px 14px;
  margin-top: 24px;
  transition: transform 0.26s var(--ease);
}
.collab-tag:hover { transform: translateX(4px); }
.collab-tag svg { width: 13px; height: 13px; }

/* ---------- reveal ---------- */
.rise {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.rise.in { opacity: 1; transform: none; }

.hero-inner .kicker,
.hero-inner h1,
.hero-inner .lede,
.hero-inner .hero-actions,
.readout {
  animation: rise 0.9s var(--ease) both;
}
.hero-inner h1 { animation-delay: 0.06s; }
.hero-inner .lede { animation-delay: 0.14s; }
.hero-inner .hero-actions { animation-delay: 0.22s; }
.readout { animation-delay: 0.3s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .index-row { grid-template-columns: 40px 44px minmax(0,1fr) 106px 26px; }
  .index-tags { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .block-grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 780px) {
  :root { --gutter: 20px; }
  .nav-links { display: none; }

  /* 34px was under the comfortable touch minimum */
  .nav-toggle { display: flex; width: 44px; height: 44px; margin-right: -6px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand { padding: 5px 0; }

  .hero-inner { padding-top: 84px; }
  .hero h1 { max-width: none; }

  /* full-width buttons read as deliberate once they wrap */
  .hero-actions { gap: 10px; }
  .hero-actions .btn { width: 100%; }

  .readout { grid-template-columns: 1fr; }
  .readout-cell {
    border-right: none;
    border-bottom: 1px solid var(--rule);
    padding: 18px 0;
    display: flex;
    align-items: baseline;
    gap: 16px;
  }
  .readout-cell:last-child { border-bottom: none; }
  .readout-val { margin-bottom: 0; min-width: 90px; }

  .index-row { grid-template-columns: 34px minmax(0,1fr) 26px; gap: 6px 14px; padding: 22px 4px; }
  .index-icon, .index-desc { display: none; }
  .index-row .chip { grid-column: 2; }
  /* Keep the arrow centred against both stacked rows. `1 / -1` resolves
     against the explicit grid, which has no rows here, so span instead. */
  .index-row .index-arrow { grid-column: 3; grid-row: 1 / span 2; align-self: center; }

  .partner { grid-template-columns: 1fr; gap: 26px; }
  .partner-photo { width: 104px; height: 104px; }

  .mail-link { font-size: 1.22rem; padding-top: 6px; padding-bottom: 20px; gap: 12px; }
  .contact-meta { gap: 4px 32px; }
  .meta-item { padding: 4px 0; }
  a.meta-val { display: inline-block; padding: 11px 0; }
  .footer-inner { gap: 12px; }
  .footer-inner a { padding: 6px 0; }

  /* The horizontal reveal collapses to a right-edge smudge on a narrow
     screen — fade vertically instead so the field reads as an
     intentional band behind the lower half of the hero. */
  #field {
    opacity: 0.5;
    mask-image: linear-gradient(to bottom, transparent 6%, rgba(0,0,0,0.28) 40%, rgba(0,0,0,0.8) 74%, transparent 99%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 6%, rgba(0,0,0,0.28) 40%, rgba(0,0,0,0.8) 74%, transparent 99%);
    mask-composite: add;
    -webkit-mask-composite: source-over;
  }
}

@media (max-width: 420px) {
  .h-xl { font-size: clamp(2.4rem, 11vw, 3rem); }
  .slug { gap: 8px; flex-wrap: wrap; }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .rise { opacity: 1; transform: none; }
}
