:root {
  --paper: #f5f1e8;
  --paper-deep: #ece4d5;
  --surface: rgba(255, 253, 248, 0.78);
  --surface-solid: #fffdf8;
  --ink: #171713;
  --muted: #69665e;
  --faint: #918c80;
  --line: rgba(23, 23, 19, 0.13);
  --line-strong: rgba(23, 23, 19, 0.24);
  --gold: #8e621c;
  --gold-bright: #b98432;
  --gold-soft: rgba(142, 98, 28, 0.13);
  --night: #11110f;
  --green: #41634d;
  --shadow: 0 24px 80px rgba(47, 39, 24, 0.09);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #10100e;
  --paper-deep: #171612;
  --surface: rgba(28, 27, 23, 0.78);
  --surface-solid: #1b1a16;
  --ink: #f3efe5;
  --muted: #aaa59a;
  --faint: #777268;
  --line: rgba(243, 239, 229, 0.12);
  --line-strong: rgba(243, 239, 229, 0.22);
  --gold: #d0a45a;
  --gold-bright: #e2bd7d;
  --gold-soft: rgba(208, 164, 90, 0.12);
  --night: #f3efe5;
  --green: #88a88f;
  --shadow: 0 30px 100px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 108px;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% -10%, var(--gold-soft), transparent 34rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  content: "";
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.75'/%3E%3C/svg%3E");
}

body.menu-open {
  overflow: hidden;
}

::selection {
  background: var(--gold);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: -0.04em;
  line-height: 1.02;
}

h1 {
  margin-bottom: 28px;
  font-size: clamp(3.4rem, 8vw, 7.8rem);
  font-weight: 650;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.25rem, 4.8vw, 4.7rem);
  font-weight: 620;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: 620;
}

.container {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.narrow {
  width: min(820px, 100%);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1100;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  padding: 14px 0;
  background: color-mix(in srgb, var(--paper) 76%, transparent);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(22px) saturate(145%);
  transition: border-color 240ms ease, padding 240ms ease;
}

.site-header.scrolled {
  border-color: var(--line);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 50px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.brand-copy {
  display: grid;
  line-height: 1.08;
}

.brand-copy strong {
  font-size: 0.88rem;
  font-weight: 650;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.69rem;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.025);
}

.site-nav a {
  position: relative;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 560;
  transition: color 180ms ease, background 180ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.icon-button,
.menu-button {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease;
}

.icon-button:hover,
.menu-button:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.theme-glyph {
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

.menu-button {
  display: none;
}

.menu-lines,
.menu-lines::before {
  display: block;
  width: 15px;
  height: 1px;
  background: currentColor;
  content: "";
  transition: transform 240ms var(--ease);
}

.menu-lines::before {
  transform: translateY(5px);
}

.menu-button[aria-expanded="true"] .menu-lines {
  transform: rotate(45deg) translateY(2px);
}

.menu-button[aria-expanded="true"] .menu-lines::before {
  transform: rotate(-90deg);
}

.button {
  --button-bg: var(--ink);
  --button-color: var(--paper);
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 19px;
  border: 1px solid var(--button-bg);
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-color);
  font-size: 0.84rem;
  font-weight: 620;
  letter-spacing: -0.01em;
  cursor: pointer;
  will-change: transform;
  transition: box-shadow 220ms ease, background 220ms ease, color 220ms ease;
}

.button:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.13);
}

.button.secondary {
  --button-bg: transparent;
  --button-color: var(--ink);
  border-color: var(--line-strong);
}

.button.secondary:hover {
  background: var(--surface-solid);
}

.button.small {
  min-height: 40px;
  padding-inline: 15px;
  font-size: 0.76rem;
}

.arrow {
  display: inline-block;
  transition: transform 180ms var(--ease);
}

a:hover .arrow,
button:hover .arrow {
  transform: translate(2px, -2px);
}

.page-hero {
  padding: clamp(72px, 11vw, 150px) 0 clamp(70px, 9vw, 120px);
}

.home-hero {
  min-height: min(880px, calc(100vh - 78px));
  display: grid;
  align-items: center;
  padding: clamp(70px, 10vw, 130px) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  align-items: center;
  gap: clamp(50px, 8vw, 120px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 28px;
  height: 1px;
  background: currentColor;
  content: "";
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .line > span {
  display: block;
  transform: translateY(112%);
  animation: title-in 950ms var(--ease) forwards;
}

.hero-title .line:nth-child(2) > span {
  animation-delay: 90ms;
}

@keyframes title-in {
  to { transform: translateY(0); }
}

.hero-lede,
.page-lede {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.7vw, 1.42rem);
  letter-spacing: -0.022em;
  line-height: 1.5;
}

.hero-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 34px;
}

.hero-footnote {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-top: 30px;
  color: var(--faint);
  font-size: 0.75rem;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 14%, transparent);
}

.system-visual {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    radial-gradient(circle at var(--px, 50%) var(--py, 50%), var(--gold-soft), transparent 34%),
    var(--surface);
  background-size: 42px 42px, 42px 42px, auto, auto;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.system-visual::before,
.system-visual::after {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "";
}

.system-visual::before {
  inset: 16% 12%;
  animation: orbit-pulse 7s ease-in-out infinite;
}

.system-visual::after {
  inset: 28% 25%;
  border-style: dashed;
  animation: slow-spin 24s linear infinite;
}

@keyframes orbit-pulse {
  0%, 100% { transform: scale(1); opacity: 0.58; }
  50% { transform: scale(1.025); opacity: 1; }
}

@keyframes slow-spin {
  to { transform: rotate(360deg); }
}

.system-core {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: var(--surface-solid);
  color: var(--gold);
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 16px var(--gold-soft);
}

.system-core strong {
  font-size: 2.4rem;
  line-height: 1;
}

.system-core span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.system-node {
  position: absolute;
  z-index: 3;
  width: 142px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-solid) 90%, transparent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: transform 350ms var(--ease), border-color 250ms ease;
}

.system-node:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
}

.system-node strong,
.system-node span {
  display: block;
}

.system-node strong {
  font-size: 0.78rem;
}

.system-node span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.65rem;
}

.node-a { top: 12%; left: 8%; }
.node-b { top: 16%; right: 7%; }
.node-c { bottom: 11%; left: 15%; }
.node-d { right: 9%; bottom: 13%; }

.system-trace {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  color: var(--gold);
}

.system-trace path {
  fill: none;
  stroke: currentColor;
  stroke-dasharray: 3 8;
  stroke-width: 1;
  opacity: 0.52;
  animation: trace-shift 10s linear infinite;
}

@keyframes trace-shift {
  to { stroke-dashoffset: -110; }
}

.section {
  padding: clamp(84px, 11vw, 150px) 0;
}

.section-compact {
  padding: clamp(60px, 8vw, 100px) 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: clamp(34px, 6vw, 70px);
}

.section-head p {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
}

.section-number {
  display: block;
  margin-bottom: 15px;
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-block: 1px solid var(--line);
}

.proof-item {
  min-width: 0;
  padding: 30px 22px;
  border-right: 1px solid var(--line);
}

.proof-item:first-child {
  padding-left: 0;
}

.proof-item:last-child {
  padding-right: 0;
  border-right: 0;
}

.proof-value {
  display: block;
  margin-bottom: 7px;
  font-size: clamp(2rem, 3.2vw, 3.4rem);
  font-weight: 630;
  letter-spacing: -0.055em;
  line-height: 1;
}

.proof-label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.work-card,
.content-card,
.role-card,
.project-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 50%), var(--gold-soft), transparent 34%),
    var(--surface);
  box-shadow: 0 12px 46px rgba(0, 0, 0, 0.025);
}

.work-card {
  min-height: 470px;
  display: flex;
  grid-column: span 6;
  flex-direction: column;
  padding: clamp(24px, 4vw, 42px);
  transition: transform 350ms var(--ease), border-color 250ms ease, box-shadow 350ms ease;
}

.work-card.wide {
  grid-column: span 7;
}

.work-card.narrow-card {
  grid-column: span 5;
}

.work-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-index {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.work-card p {
  max-width: 580px;
  color: var(--muted);
}

.work-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 28px;
  font-size: 0.8rem;
  font-weight: 650;
}

.technical-visual {
  position: relative;
  min-height: 170px;
  margin: 10px 0 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 24px 24px;
}

.battery-sketch {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 42px 34px;
}

.battery-sketch span {
  min-height: 84px;
  border: 1px solid var(--gold);
  border-radius: 7px;
  background: var(--gold-soft);
  animation: cell-charge 3.6s ease-in-out infinite;
}

.battery-sketch span:nth-child(2) { animation-delay: 120ms; }
.battery-sketch span:nth-child(3) { animation-delay: 240ms; }
.battery-sketch span:nth-child(4) { animation-delay: 360ms; }
.battery-sketch span:nth-child(5) { animation-delay: 480ms; }
.battery-sketch span:nth-child(6) { animation-delay: 600ms; }

@keyframes cell-charge {
  0%, 100% { opacity: 0.34; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

.flow-sketch svg,
.wing-sketch svg,
.research-sketch svg {
  width: 100%;
  height: 170px;
  color: var(--gold);
}

.flow-line {
  fill: none;
  stroke: currentColor;
  stroke-dasharray: 6 10;
  stroke-width: 2;
  animation: trace-shift 5s linear infinite;
}

.sketch-shape {
  fill: var(--gold-soft);
  stroke: currentColor;
  stroke-width: 1.4;
}

.experience-list {
  border-top: 1px solid var(--line);
}

.experience-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) minmax(220px, 0.7fr) 40px;
  align-items: center;
  gap: 24px;
  min-height: 116px;
  border-bottom: 1px solid var(--line);
  transition: background 220ms ease, padding 220ms ease;
}

.experience-row:hover {
  padding-inline: 18px;
  background: var(--surface);
}

.experience-row time,
.experience-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.experience-row h3 {
  margin: 0;
}

.row-arrow {
  color: var(--gold);
  font-size: 1.2rem;
}

.cta-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(42px, 8vw, 94px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--ink);
  color: var(--paper);
}

.cta-panel::after {
  position: absolute;
  top: -45%;
  right: -10%;
  width: 42%;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--gold-bright) 45%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 55px color-mix(in srgb, var(--gold-bright) 7%, transparent), 0 0 0 110px color-mix(in srgb, var(--gold-bright) 4%, transparent);
  content: "";
}

.cta-panel h2,
.cta-panel p,
.cta-panel .hero-actions-row {
  position: relative;
  z-index: 1;
}

.cta-panel p {
  max-width: 600px;
  color: color-mix(in srgb, var(--paper) 68%, transparent);
}

.cta-panel .button {
  --button-bg: var(--paper);
  --button-color: var(--ink);
}

.cta-panel .button.secondary {
  --button-bg: transparent;
  --button-color: var(--paper);
  border-color: color-mix(in srgb, var(--paper) 28%, transparent);
}

.page-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.5fr);
  align-items: end;
  gap: 60px;
}

.page-intro h1 {
  margin-bottom: 0;
}

.page-intro .page-lede {
  margin-bottom: 10px;
}

.index-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
}

.index-nav a,
.filter-button {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.index-nav a:hover,
.filter-button:hover,
.filter-button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.role-stack {
  display: grid;
  gap: 22px;
}

.role-card {
  display: grid;
  grid-template-columns: minmax(230px, 0.44fr) minmax(0, 1fr);
  gap: clamp(30px, 7vw, 96px);
  padding: clamp(30px, 5vw, 62px);
}

.role-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gold);
  content: "";
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 550ms var(--ease);
}

.role-card.in-view::before {
  transform: scaleY(1);
}

.role-meta {
  align-self: start;
}

.role-meta time,
.role-location,
.role-label {
  display: block;
  color: var(--muted);
  font-size: 0.73rem;
}

.role-meta h2 {
  margin: 20px 0 10px;
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.role-title {
  color: var(--gold);
  font-size: 0.83rem;
  font-weight: 650;
}

.role-outcome {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 28px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.role-outcome strong {
  font-size: clamp(2rem, 3vw, 3.1rem);
  font-weight: 630;
  letter-spacing: -0.05em;
}

.role-outcome span {
  max-width: 240px;
  color: var(--muted);
  font-size: 0.76rem;
}

.fact-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fact-list li {
  position: relative;
  padding: 14px 0 14px 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.fact-list li:last-child {
  border-bottom: 0;
}

.fact-list li::before {
  position: absolute;
  top: 24px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 26px;
}

.tag {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.66rem;
}

.role-history {
  display: grid;
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.role-entry {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.role-entry:last-child {
  border-bottom: 0;
}

.role-entry time {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.role-entry h3 {
  margin-bottom: 7px;
  font-size: 1.08rem;
  letter-spacing: -0.025em;
}

.role-entry p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.earlier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.earlier-card {
  min-height: 250px;
  padding: 28px;
}

.earlier-card time {
  display: block;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.7rem;
}

.earlier-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.project-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.project-count {
  color: var(--muted);
  font-size: 0.74rem;
}

.project-list {
  display: grid;
  gap: 22px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(360px, 1.14fr);
  min-height: 520px;
  transition: opacity 240ms ease, transform 350ms var(--ease);
}

.project-card[hidden] {
  display: none;
}

.project-copy {
  display: flex;
  flex-direction: column;
  padding: clamp(30px, 5vw, 58px);
}

.project-copy h2 {
  margin-bottom: 18px;
  font-size: clamp(2.25rem, 4vw, 4.3rem);
}

.project-copy > p {
  color: var(--muted);
}

.project-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: auto;
  padding-top: 34px;
}

.project-fact {
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.project-fact span,
.project-fact strong {
  display: block;
}

.project-fact span {
  margin-bottom: 5px;
  color: var(--faint);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-fact strong {
  font-size: 0.82rem;
  font-weight: 600;
}

.project-visual {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--paper-deep);
  background-size: 36px 36px;
}

.project-visual .visual-label {
  position: absolute;
  top: 22px;
  left: 24px;
  z-index: 2;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.battery-pack {
  position: absolute;
  inset: 20% 12%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 9px;
  padding: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: perspective(800px) rotateX(58deg) rotateZ(-16deg);
}

.battery-pack span {
  border: 1px solid var(--gold);
  border-radius: 7px;
  background: linear-gradient(to top, var(--gold-soft) var(--charge, 70%), transparent var(--charge, 70%));
  animation: battery-charge 3s ease-in-out infinite alternate;
}

.battery-pack span:nth-child(2n) { animation-delay: -1.1s; }
.battery-pack span:nth-child(3n) { animation-delay: -2s; }

@keyframes battery-charge {
  from { --charge: 25%; opacity: 0.6; }
  to { --charge: 88%; opacity: 1; }
}

@property --charge {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 70%;
}

.loop-diagram,
.wing-diagram,
.aero-diagram,
.process-diagram {
  position: absolute;
  inset: 12%;
  width: 76%;
  height: 76%;
  color: var(--gold);
}

.loop-diagram path,
.wing-diagram path,
.aero-diagram path,
.process-diagram path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.loop-diagram .moving,
.aero-diagram .moving,
.process-diagram .moving {
  stroke-dasharray: 7 12;
  animation: trace-shift 4s linear infinite;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.content-card {
  grid-column: span 6;
  padding: clamp(28px, 4vw, 46px);
}

.content-card.wide {
  grid-column: span 8;
}

.content-card.slim {
  grid-column: span 4;
}

.content-card p {
  color: var(--muted);
}

.education-lockup {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
}

.education-lockup .proof-value {
  color: var(--gold);
}

.skill-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.skill-group h3 {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.skill-group ul {
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.8rem;
  list-style: none;
}

.skill-group li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.contact-links {
  display: grid;
  margin-top: 28px;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}

.contact-link span:first-child {
  color: var(--muted);
}

.site-footer {
  padding: 35px 0 42px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 0.72rem;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a:hover {
  color: var(--ink);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 720ms var(--ease), transform 720ms var(--ease);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }

.spark-canvas {
  position: fixed;
  inset: 0;
  z-index: 1600;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.back-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 800;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms var(--ease);
}

.back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 260ms;
}

@media (max-width: 1040px) {
  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    position: fixed;
    top: 74px;
    right: 24px;
    left: 24px;
    display: grid;
    padding: 12px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
    pointer-events: none;
    transition: opacity 220ms ease, transform 300ms var(--ease);
  }

  .site-nav.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .site-nav a {
    padding: 13px 15px;
    border-radius: 12px;
    font-size: 0.9rem;
  }

  .header-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .menu-button {
    display: grid;
  }

  .header-resume {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .system-visual {
    min-height: 470px;
  }

  .proof-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .proof-item:nth-child(3) {
    border-right: 0;
  }

  .proof-item:nth-child(n+4) {
    border-top: 1px solid var(--line);
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-visual {
    min-height: 420px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 800px) {
  .container {
    width: min(100% - 32px, 1240px);
  }

  h1 {
    font-size: clamp(3.25rem, 15vw, 5.6rem);
  }

  .page-intro,
  .role-card {
    grid-template-columns: 1fr;
  }

  .page-intro {
    align-items: start;
    gap: 28px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .work-card,
  .work-card.wide,
  .work-card.narrow-card,
  .content-card,
  .content-card.wide,
  .content-card.slim {
    grid-column: 1 / -1;
  }

  .experience-row {
    grid-template-columns: 110px minmax(0, 1fr) 30px;
    gap: 16px;
  }

  .experience-row p {
    display: none;
  }

  .skill-columns {
    grid-template-columns: 1fr;
  }

  .earlier-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .brand-copy span {
    display: none;
  }

  .home-hero {
    min-height: auto;
  }

  .system-visual {
    min-height: 400px;
  }

  .system-core {
    width: 106px;
    height: 106px;
  }

  .system-node {
    width: 118px;
    padding: 10px 11px;
  }

  .node-a { top: 8%; left: 5%; }
  .node-b { top: 11%; right: 5%; }
  .node-c { bottom: 8%; left: 8%; }
  .node-d { right: 6%; bottom: 9%; }

  .proof-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .proof-item,
  .proof-item:first-child,
  .proof-item:last-child {
    padding: 22px 14px;
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }

  .proof-item:nth-child(odd) {
    padding-left: 0;
  }

  .proof-item:nth-child(even) {
    padding-right: 0;
    border-right: 0;
  }

  .proof-item:first-child,
  .proof-item:nth-child(2) {
    border-top: 0;
  }

  .proof-item:last-child {
    grid-column: 1 / -1;
    border-right: 0;
  }

  .experience-row {
    grid-template-columns: 1fr 28px;
    min-height: 98px;
  }

  .experience-row time {
    grid-column: 1;
  }

  .experience-row h3 {
    grid-column: 1;
  }

  .experience-row .row-arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .project-toolbar,
  .footer-inner,
  .education-lockup {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-facts {
    grid-template-columns: 1fr;
  }

  .role-entry {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .project-visual {
    min-height: 320px;
  }

  .footer-inner {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
