/* Direction: a dark engineering console. One energised accent (copper-orange current),
   a cool signal blue used only for light in the 3D scene. Asymmetric editorial grid. */
:root {
  --bg: #0a0c11;
  --surface: #11141b;
  --surface-2: #161a23;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #ecebe6;
  --muted: #8e93a3;
  --accent: #ff7a2f;
  --accent-soft: rgba(255, 122, 47, .14);
  --signal: #5cc8ff;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(18px, 4vw, 64px);
  --radius: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); scroll-padding-top: 100px; }
section, .job, .card, .cert, .cap { scroll-margin-top: 100px; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--bg); color: var(--text);
  font: 400 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, canvas { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
::selection { background: var(--accent); color: #111; }
.wrap { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.accent { color: var(--accent); }

/* grain over everything */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .05; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- cursor glow ---------- */
.cursor-glow {
  position: fixed; top: 0; left: 0; width: 520px; height: 520px; border-radius: 50%; pointer-events: none; z-index: 1;
  background: radial-gradient(circle, rgba(255, 255, 255, .05), transparent 60%);
  transform: translate(-50%, -50%); opacity: 0; transition: opacity .4s;
}
@media (hover: hover) { body:hover .cursor-glow { opacity: 1; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 6px; padding: 6px;
  background: rgba(17, 20, 27, .6); border: 1px solid var(--line); border-radius: 999px;
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, .6);
}
.nav .logo {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--text); color: var(--bg); font: 800 15px var(--display); letter-spacing: -.03em;
}
.nav ul { display: flex; list-style: none; }
.nav ul a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  color: var(--muted); font-size: 14.5px; font-weight: 500; transition: color .25s, background .25s;
}
.nav ul a:hover { color: var(--text); }
.nav ul a[aria-current="true"] { color: var(--text); background: rgba(255, 255, 255, .07); }
.nav .cta {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--accent); color: #140a03; font-weight: 600; font-size: 14.5px; transition: transform .3s var(--ease), box-shadow .3s;
}
.menu-btn { display: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 500 14.5px var(--body); cursor: pointer; }
.nav .cta:hover { box-shadow: 0 0 0 6px var(--accent-soft); }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; padding-top: 150px; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::before { /* fallback + vignette */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(60% 50% at 60% 40%, rgba(255, 122, 47, .16), transparent 70%), radial-gradient(50% 40% at 30% 70%, rgba(92, 200, 255, .08), transparent 70%), var(--bg);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 12, 17, .55) 0%, transparent 25%, transparent 45%, rgba(10, 12, 17, .92) 88%, var(--bg) 100%);
}
.hud { position: absolute; inset: 96px var(--gutter) auto; display: flex; justify-content: space-between; gap: 16px; color: var(--muted); pointer-events: none; }
.hud > div { display: grid; gap: 6px; }
.hud .r { text-align: right; }
.hud b { color: var(--text); font-weight: 500; }
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 12px #3ddc84; animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: .35; } }

.hero-inner { width: 100%; padding-bottom: clamp(40px, 7vh, 88px); pointer-events: none; }
.hero-inner a, .hero-inner button { pointer-events: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(10, 12, 17, .5); backdrop-filter: blur(8px); margin-bottom: 24px; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.name {
  font-family: var(--display); font-weight: 700; font-variation-settings: "wdth" 82, "opsz" 96;
  font-size: clamp(60px, min(14vw, 22vh), 220px); line-height: .84; letter-spacing: -.05em;
  text-shadow: 0 10px 60px rgba(0, 0, 0, .5);
}
.name .row { display: block; overflow: hidden; padding-bottom: .04em; }
.name .row > span { display: inline-block; }
.name .outline { color: transparent; -webkit-text-stroke: 1.5px rgba(236, 235, 230, .85); }
.hero-bottom { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-top: 28px; }
.lede { max-width: 34ch; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; color: #c9cad0; text-wrap: balance; }
.lede strong { color: var(--text); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 26px;
  border-radius: 999px; font: 600 15.5px var(--body); cursor: pointer; border: 1px solid var(--line-strong);
  background: rgba(17, 20, 27, .55); color: var(--text); backdrop-filter: blur(10px); overflow: hidden;
  transition: border-color .3s, background .3s, transform .4s var(--ease), scale .12s ease-out;
}
.btn:hover { border-color: rgba(255, 255, 255, .35); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #140a03; }
.btn.primary:hover { box-shadow: 0 0 40px -6px var(--accent); }
.btn .arr { transition: transform .35s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.scroll-hint { position: absolute; right: var(--gutter); bottom: 28px; display: flex; align-items: center; gap: 10px; color: var(--muted); }
.scroll-hint span { width: 1px; height: 40px; background: linear-gradient(var(--text), transparent); animation: drip 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- ticker ---------- */
.ticker { border-block: 1px solid var(--line); padding-block: 22px; overflow: hidden; background: var(--surface); }
.ticker-track { display: flex; width: max-content; animation: tick 40s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { font: 500 clamp(26px, 3.4vw, 46px)/1 var(--display); font-variation-settings: "wdth" 80; letter-spacing: -.03em; white-space: nowrap; padding-right: .55em; }
.ticker-track span:nth-child(even) { color: var(--muted); opacity: .6; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
section { position: relative; padding-block: clamp(48px, 5vw, 80px); }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 32px; margin-bottom: clamp(32px, 4vw, 56px); align-items: end; }
.sec-head .mono { color: var(--muted); display: flex; align-items: center; gap: 12px; }
.sec-head .mono::before { content: ""; width: 28px; height: 1px; background: var(--line-strong); }
.sec-head h2 { font: 600 clamp(38px, 5.6vw, 84px)/1 var(--display); font-variation-settings: "wdth" 88, "opsz" 72; letter-spacing: -.04em; text-wrap: balance; }
.sec-head h2 em { font-style: normal; color: var(--accent); }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.split .w > span { display: inline-block; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 32px; }
.portrait {
  position: relative; aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(80% 60% at 50% 30%, rgba(255, 255, 255, .07), transparent 70%), var(--surface);
  display: grid; place-items: center;
}
.portrait .mono-initials { font: 800 clamp(80px, 12vw, 160px)/1 var(--display); font-variation-settings: "wdth" 75; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .35); }
.portrait .tag { position: absolute; left: 16px; bottom: 16px; right: 16px; display: flex; justify-content: space-between; color: var(--muted); }
.about-copy { display: grid; gap: 22px; max-width: 64ch; }
.about-copy .big { font: 400 clamp(22px, 2.3vw, 32px)/1.3 var(--display); font-variation-settings: "wdth" 100, "opsz" 32; letter-spacing: -.015em; color: var(--text); }
.about-copy p { color: #b9bbc4; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.stat { padding: 22px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font: 700 clamp(44px, 5vw, 72px)/.95 var(--display); font-variation-settings: "wdth" 78; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.stat b sup { font-size: .45em; color: var(--muted); vertical-align: top; margin-left: 2px; }
.stat span { color: var(--muted); font-size: 14.5px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.facts div { border-top: 1px solid var(--line-strong); padding-top: 12px; }
.facts dt { color: var(--muted); margin-bottom: 4px; }
.facts dd { font-weight: 500; font-size: 15.5px; }

/* ---------- work ---------- */
.feature {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0;
  border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); margin-bottom: 18px;
}
.feature-media { position: relative; min-height: 420px; overflow: hidden; }
.feature-media canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.feature:hover .feature-media canvas { transform: scale(1.04); }
.feature-body { padding: clamp(24px, 3vw, 44px); display: flex; flex-direction: column; gap: 18px; justify-content: center; }
.feature-body .mono { color: var(--muted); }
.feature-body h3 { font: 700 clamp(38px, 4.2vw, 64px)/.95 var(--display); font-variation-settings: "wdth" 80; letter-spacing: -.045em; }
.feature-body p { color: #b9bbc4; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.chips li { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 13.5px; color: #c9cad0; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; perspective: 1400px; }
.card {
  position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface);
  transform-style: preserve-3d; transition: transform .5s var(--ease), border-color .3s, box-shadow .5s; will-change: transform;
}
.card:hover { border-color: rgba(255, 255, 255, .22); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7); }
.card .media { aspect-ratio: 16/10; overflow: hidden; }
.card .media canvas { width: 100%; height: 100%; transition: transform .8s var(--ease); }
.card:hover .media canvas { transform: scale(1.05); }
.card .body { padding: 20px 22px 24px; display: grid; gap: 8px; transform: translateZ(30px); }
.card .meta { display: flex; justify-content: space-between; color: var(--muted); }
.card h3 { font: 600 24px/1.15 var(--display); font-variation-settings: "wdth" 92; letter-spacing: -.025em; }
.card p { color: var(--muted); font-size: 15px; line-height: 1.5; }
.card .glare { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(500px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .10), transparent 45%); }
.card:hover .glare { opacity: 1; }

/* ---------- experience timeline ---------- */
.timeline { position: relative; display: grid; gap: 18px; padding-left: 44px; }
.timeline .rail { position: absolute; left: 12px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.timeline .rail i { position: absolute; inset: 0; background: linear-gradient(var(--accent), #ffb37a); transform-origin: top; transform: scaleY(1); border-radius: 2px; box-shadow: 0 0 16px var(--accent); }
.job { position: relative; display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: border-color .3s, background .3s; }
.job:hover { border-color: var(--line-strong); background: var(--surface-2); }
.job::before { content: ""; position: absolute; left: -38px; top: 36px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); box-shadow: 0 0 14px var(--accent); }
.job .when { color: var(--text); }
.job .where { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.job h3 { font: 600 clamp(22px, 2.2vw, 30px)/1.15 var(--display); font-variation-settings: "wdth" 92; letter-spacing: -.025em; margin-bottom: 4px; }
.job ul { margin-top: 14px; display: grid; gap: 8px; list-style: none; color: #b9bbc4; font-size: 15.5px; }
.job li { padding-left: 18px; position: relative; }
.job li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 1px; background: var(--muted); }

/* ---------- capabilities ---------- */
.caps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.cap { padding: 28px; border-radius: var(--radius); background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); display: grid; gap: 14px; align-content: start; transition: transform .5s var(--ease), border-color .3s; }
.cap:hover { transform: translateY(-6px); border-color: rgba(255, 255, 255, .22); }
.cap svg { width: 44px; height: 44px; color: var(--text); opacity: .85; }
.cap h3 { font: 600 24px var(--display); letter-spacing: -.02em; }
.cap ul { list-style: none; display: grid; gap: 6px; color: var(--muted); font-size: 15px; }

/* ---------- credentials ---------- */
.certs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cert { position: relative; padding: 22px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 8px; align-content: start; overflow: hidden; transition: border-color .3s; }
.cert:hover { border-color: var(--line-strong); }
.cert.key { border-color: var(--line-strong); background: linear-gradient(160deg, rgba(255, 255, 255, .06), var(--surface) 60%); }
.cert .when { color: var(--muted); }
.cert h3 { font: 600 19px/1.25 var(--display); letter-spacing: -.015em; }
.cert p { color: var(--muted); font-size: 14px; }

/* ---------- contact ---------- */
.contact { text-align: left; overflow: hidden; }
.contact .orb { position: absolute; right: -10%; top: 10%; width: 60vw; max-width: 820px; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 40% 40%, rgba(255, 122, 47, .35), rgba(255, 122, 47, .05) 50%, transparent 70%); filter: blur(20px); }
.contact h2 { font: 700 clamp(56px, 11vw, 176px)/.88 var(--display); font-variation-settings: "wdth" 78, "opsz" 96; letter-spacing: -.055em; position: relative; }
.contact h2 .outline { color: transparent; -webkit-text-stroke: 1.5px var(--text); }
.contact p { color: #b9bbc4; max-width: 46ch; margin-top: 24px; font-size: 19px; position: relative; }
.contact .actions { justify-content: flex-start; margin-top: 36px; position: relative; }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 22px; position: relative; color: var(--muted); }
.toast { color: var(--text); }
.copy-btn { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); cursor: pointer; }
.copy-btn:hover { border-color: rgba(255, 255, 255, .35); }

footer { border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding-block: 28px; color: var(--muted); }
.signature { font: 800 clamp(60px, 18vw, 280px)/.8 var(--display); font-variation-settings: "wdth" 75; letter-spacing: -.06em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .12); padding-top: 40px; overflow: hidden; user-select: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .caps, .certs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .nav ul { display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; flex-direction: column; padding: 8px;
    background: rgba(17, 20, 27, .96); border: 1px solid var(--line); border-radius: 20px; backdrop-filter: blur(16px); }
  .nav.open ul { display: flex; }
  .nav ul a { width: 100%; padding: 0 18px; font-size: 16px; }
  .hero-bottom, .sec-head, .about, .feature { grid-template-columns: 1fr; }
  .actions { justify-content: flex-start; }
  .feature-media { min-height: 280px; }
  .job { grid-template-columns: 1fr; gap: 8px; }
  .portrait { aspect-ratio: 16/10; }
  .hud .r { display: none; }
}
@media (max-width: 600px) {
  .grid, .caps, .certs, .stats, .facts { grid-template-columns: 1fr; }
  .timeline { padding-left: 32px; }
  .job::before { left: -26px; }
  .timeline .rail { left: 6px; }
  .scroll-hint { display: none; }
}
@media (max-height: 820px) {
  .scroll-hint { display: none; }
  .hud { top: 84px; }
  .hud > div > span:last-child { display: none; }
}
@media (max-height: 640px) { .hud { display: none; } }
@media (prefers-reduced-motion: reduce) {
  /* no movement, but keep gentle cross-fades so state changes are still felt */
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important;
    transition-property: opacity, color, background-color, border-color, box-shadow !important; transition-duration: .2s !important; }
  .nav ul { transform: none !important; filter: none !important; }
}

/* ---------- multi-page: page headers ---------- */
.page-hero { position: relative; padding: 170px 0 clamp(48px, 7vw, 96px); overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(50% 70% at 85% 10%, rgba(255, 122, 47, .16), transparent 70%),
    radial-gradient(circle, rgba(255, 255, 255, .07) 1px, transparent 1.5px) 0 0 / 32px 32px;
  mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
}
.page-hero--tight { padding-bottom: 0; border-bottom: 0; }
.crumb { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); margin-bottom: 18px; transition: color .25s; }
.crumb:hover { color: var(--text); }
.page-hero .eyebrow { display: flex; width: fit-content; }
.page-title { font: 700 clamp(48px, 8.5vw, 132px)/.9 var(--display); font-variation-settings: "wdth" 80, "opsz" 96; letter-spacing: -.05em; max-width: 14ch; text-wrap: balance; }
.page-title em { font-style: normal; color: var(--accent); }
.page-lede { margin-top: 26px; max-width: 52ch; font-size: clamp(18px, 1.6vw, 22px); color: #c9cad0; }

/* ---------- home: summary ---------- */
.summary-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.summary-copy { display: grid; gap: 24px; }
.summary-copy .big { font: 400 clamp(22px, 2.3vw, 32px)/1.3 var(--display); font-variation-settings: "wdth" 100, "opsz" 32; letter-spacing: -.015em; }
.summary-grid .stats { grid-template-columns: 1fr; margin-top: 0; }
.more-link {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 28px; padding: 0 22px; width: fit-content;
  border: 1px solid var(--line-strong); border-radius: 999px; font-weight: 600; transition: border-color .3s, background .3s;
}
.more-link:hover { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .04); }
.more-link .arr, .next-link .arr, .xp-mini .arr { transition: transform .35s var(--ease); }
.more-link:hover .arr, .next-link:hover .arr, .xp-mini a:hover .arr { transform: translateX(5px); }

/* ---------- home: compact career list ---------- */
.xp-mini { list-style: none; border-top: 1px solid var(--line-strong); }
.xp-mini li { border-bottom: 1px solid var(--line); }
.xp-mini a { display: grid; grid-template-columns: 150px minmax(0, 1.1fr) minmax(0, 1fr) 24px; gap: 24px; align-items: center; padding: 24px 0; transition: padding .35s var(--ease); }
.xp-mini a:hover { padding-left: 12px; }
.xp-mini .when { color: var(--muted); }
.xp-mini .t { font: 600 clamp(20px, 2vw, 26px)/1.2 var(--display); letter-spacing: -.02em; }
.xp-mini .o { color: var(--muted); font-size: 15px; }
.xp-mini .arr { color: var(--muted); }

/* ---------- sub pages ---------- */
.edu-card { margin-top: 18px; padding: 28px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: linear-gradient(160deg, rgba(255, 255, 255, .05), var(--surface) 60%); display: grid; gap: 6px; }
.edu-card .mono { color: var(--muted); }
.edu-card h3 { font: 600 clamp(22px, 2.4vw, 30px)/1.15 var(--display); letter-spacing: -.02em; }
.edu-card p { color: var(--muted); }
.next-page { padding-block: 0 clamp(60px, 8vw, 110px); }
.next-link { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-top: 28px; border-top: 1px solid var(--line-strong); }
.next-link .mono { color: var(--muted); }
.next-title { font: 700 clamp(36px, 6vw, 88px)/.95 var(--display); font-variation-settings: "wdth" 80; letter-spacing: -.045em; transition: color .3s; }
.next-link:hover .next-title { color: var(--accent); }
.cta-band { border-top: 1px solid var(--line); }
.nav ul a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, .07); }

@media (max-width: 860px) {
  .summary-grid { grid-template-columns: 1fr; }
  .xp-mini a { grid-template-columns: 1fr 24px; gap: 4px 16px; }
  .xp-mini .when, .xp-mini .t, .xp-mini .o { grid-column: 1; }
  .xp-mini .arr { grid-column: 2; grid-row: 1 / span 3; }
  .page-hero { padding-top: 130px; }
}

/* home: a hairline between summary blocks so the tighter rhythm still reads as separate sections */
#summary ~ section { border-top: 1px solid var(--line); }

/* ---------- Apple-style interaction pass ---------- */
/* 1. Respond on press, instantly. `scale` is separate from `transform`, so it stacks with magnetic/tilt offsets. */
.btn:active, .more-link:active, .nav .cta:active, .nav .logo:active, .menu-btn:active, .copy-btn:active { scale: .96; }
.card:active, .xp-mini a:active, .next-link:active { scale: .985; }
.more-link { transition: border-color .3s, background .3s, scale .12s ease-out; }
.card { transition: transform .5s var(--ease), border-color .3s, box-shadow .5s, scale .12s ease-out; }
.xp-mini a { transition: padding .35s var(--ease), scale .12s ease-out; }

/* 3. Mobile menu materialises from the nav and leaves the same way it came */
@media (max-width: 860px) {
  .nav ul {
    display: flex; transform-origin: top center; pointer-events: none; visibility: hidden;
    opacity: 0; transform: translateY(-6px) scale(.96); filter: blur(6px);
    transition: opacity .2s ease, transform .3s var(--ease), filter .3s ease, visibility 0s linear .3s;
  }
  .nav.open ul {
    pointer-events: auto; visibility: visible; opacity: 1; transform: none; filter: none;
    transition: opacity .2s ease, transform .35s var(--ease), filter .3s ease, visibility 0s;
  }
}

/* 4. Respect reduced transparency and higher contrast */
@media (prefers-reduced-transparency: reduce) {
  .nav, .nav ul, .btn, .eyebrow { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: var(--surface); }
  .btn.primary { background: var(--accent); }
}
@media (prefers-contrast: more) {
  :root { --muted: #c3c6cf; --line: rgba(255, 255, 255, .3); --line-strong: rgba(255, 255, 255, .5); }
  .nav, .nav ul { background: var(--surface); backdrop-filter: none; }
}
