/* Graphite instrument case: near-black ground, bone ink, one muted glass-green accent. */
:root {
  --bg: #0a0a0b;
  --bg-2: #111113;
  --bg-3: #18181b;
  --bg-4: #202024;
  --ink: #ededea;
  --muted: #9c9ea3;
  --accent: #9ed8c3;
  --line: rgb(237 237 234 / 0.12);
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Geist", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
:root { --header-h: 72px; }
[id] { scroll-margin-top: var(--header-h); }
.chapter { scroll-margin-top: 0; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; padding: 0.6rem 1rem; background: var(--accent); color: var(--bg); }
.skip:focus { left: 1rem; top: 1rem; }
.wrap {
  max-width: 1360px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* header */
.header {
  position: fixed; z-index: 50; top: 0; left: 0; right: 0;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem;
  padding: calc(0.9rem + env(safe-area-inset-top, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)) 0.9rem max(var(--gutter), env(safe-area-inset-left, 0px));
  background: linear-gradient(to bottom, rgb(10 10 11 / 0.85), rgb(10 10 11 / 0));
}
.progress { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--line); }
.progress span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.mark { line-height: 0; }
.mark img { height: 22px; width: auto; }
.chapters { display: flex; justify-content: center; gap: 0.25rem; }
.chapters a {
  flex: 0 0 auto; white-space: nowrap;
  padding: 0.55rem 0.8rem; color: var(--muted); text-decoration: none;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.chapters a:hover, .chapters a[aria-current="step"] { color: var(--ink); }
.chapters a[aria-current="step"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.45em; }
.navcta {
  padding: 0.65rem 1rem; border: 1px solid var(--accent); color: var(--accent); text-decoration: none;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  background: rgb(10 10 11 / 0.6); transition: background 0.2s, color 0.2s;
}
.navcta { display: inline-flex; align-items: center; justify-content: center; justify-self: end; white-space: nowrap; text-indent: 0.12em; }
@media (hover: hover) { .navcta:hover { background: var(--accent); color: var(--bg); } }
.navcta:active { transform: translateY(1px); }

/* journey */
.journey { position: relative; background: var(--bg); }
.stage { position: sticky; top: 0; height: 100dvh; overflow: hidden; background: var(--bg); }
.stage picture, .stage__poster, .stage__video { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage__poster, .stage__video { object-fit: cover; object-position: 60% 50%; display: block; }
.stage__video { opacity: 0; transition: opacity 0.4s ease; }
.stage__video.is-painted { opacity: 1; }
.stage__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgb(10 10 11 / 0.75) 0%, rgb(10 10 11 / 0.15) 55%, rgb(10 10 11 / 0) 100%); }
.story { position: relative; z-index: 2; margin-top: -100dvh; }
.chapter {
  min-height: 130dvh; display: flex; align-items: flex-start;
  padding: 0 max(var(--gutter), env(safe-area-inset-right, 0px)) 0 max(var(--gutter), env(safe-area-inset-left, 0px));
}
.chapter:last-child { min-height: 100dvh; }
.chapter__copy { position: sticky; top: 0; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; width: min(44rem, 54vw); padding-block: 6rem 4rem; }
.chapter--right { justify-content: flex-end; }
.chapter__kicker { margin: 0 0 1rem; color: var(--accent); font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; }
.chapter__title {
  max-width: 12ch; margin: 0; font-family: var(--display); font-stretch: 125%; font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 5.4rem); line-height: 0.95; letter-spacing: -0.03em; text-wrap: balance;
}
#intro .chapter__title { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes rise { from { transform: translateY(0.3em); } to { transform: none; } }
.chapter__body { max-width: 40ch; margin: 1.5rem 0 0; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.18rem); line-height: 1.55; }
.chapter__tags { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.chapter__tags li { padding: 0.45rem 0.7rem; border: 1px solid var(--line); font-family: var(--mono); font-size: 0.75rem; background: rgb(10 10 11 / 0.5); }
.chapter__actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1.5rem; margin-top: 2rem; }
.herolink {
  display: inline-flex; gap: 0.6rem; padding-bottom: 0.2rem; border-bottom: 1px solid var(--accent);
  color: var(--accent); font-size: 1.05rem; font-weight: 500; text-decoration: none;
}
.herolink span { transition: transform 0.25s; }
.herolink:hover span { transform: translateX(0.35rem); }
.heroalt { color: var(--muted); text-decoration: none; }
.heroalt:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.3em; }

/* marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--line); }
.marquee__track { display: flex; width: max-content; animation: marquee 50s linear infinite; }
.marquee__list { display: flex; align-items: center; gap: 2.75rem; margin: 0; padding: 1.35rem 1.375rem; list-style: none; }
.marquee__list li {
  display: flex; align-items: center; gap: 2.75rem; white-space: nowrap;
  font-family: var(--display); font-stretch: 125%; font-weight: 500; font-size: clamp(0.95rem, 1.4vw, 1.2rem);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.marquee__list li::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* now */
.now { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 36vw); gap: clamp(2rem, 5vw, 5rem); }
.now__role { min-width: 0; padding-block: clamp(4rem, 8vw, 7rem); padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); }
.role__when { margin: 0 0 0.9rem; color: var(--muted); font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; }
.role__title {
  max-width: 20ch; margin: 0; font-family: var(--display); font-stretch: 125%; font-weight: 500;
  font-size: clamp(1.5rem, 2.8vw, 2.5rem); line-height: 1.1; letter-spacing: 0.03em; text-transform: uppercase; text-wrap: balance;
}
.role__org { margin: 0.6rem 0 1.5rem; color: var(--accent); font-weight: 500; }
.bullets { display: grid; gap: 0.7rem; max-width: 64ch; margin: 0; padding: 0; list-style: none; color: var(--muted); font-family: var(--mono); font-size: 0.88rem; line-height: 1.6; }
.bullets li { position: relative; padding-left: 1.4rem; }
.bullets li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.now__plate { position: relative; min-height: 34rem; margin: 0; overflow: hidden; }
.now__plate img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* pipeline */
.pipe { padding-block: clamp(5rem, 10vw, 9rem); background: var(--bg-2); }
.eyebrow { margin: 0 0 1.25rem; color: var(--accent); font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; }
.pipe__title { margin: 0 0 clamp(3rem, 6vw, 5rem); font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: clamp(2.3rem, 6vw, 6rem); line-height: 0.98; letter-spacing: -0.03em; text-wrap: balance; }
.steps { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.step { position: relative; min-width: 0; padding: 1.75rem 1.1rem 0.5rem; border-left: 1px solid var(--line); }
.step:first-child { border-left: 0; padding-left: 0; }
.step img { display: block; width: 34px; height: 34px; }
.step__num { display: block; margin-top: 1.25rem; color: var(--muted); font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.1em; }
.step h3 { margin: 0.4rem 0 0.6rem; font-size: 1.15rem; font-weight: 500; }
.step p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.5; }
.step--gate::before { content: ""; position: absolute; top: -0.55rem; left: 1.1rem; width: 9px; height: 9px; background: var(--accent); transform: rotate(45deg); }
.step--gate h3 { color: var(--accent); }
.legend { display: flex; align-items: center; gap: 0.75rem; margin: 3rem 0 0; color: var(--muted); font-family: var(--mono); font-size: 0.78rem; }
.legend::before { content: ""; width: 9px; height: 9px; background: var(--accent); transform: rotate(45deg); }

/* experience */
.xp { position: relative; overflow: hidden; padding-block: clamp(5rem, 9vw, 8rem); }
.xp__numeral {
  position: absolute; top: 50%; right: -1vw; transform: translateY(-50%); color: var(--bg-3);
  font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: clamp(12rem, 30vw, 28rem);
  line-height: 0.8; letter-spacing: -0.05em; pointer-events: none; user-select: none;
}
.xp__inner { position: relative; }
.xp__heading { margin: 0 0 1.5rem; color: var(--muted); font-family: var(--mono); font-size: 0.78rem; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; }
.job { border-top: 1px solid var(--line); }
.job:last-child { border-bottom: 1px solid var(--line); }
.job summary { display: grid; grid-template-columns: 11rem minmax(0, 1fr) minmax(0, 15rem) 2rem; gap: 1.5rem; align-items: center; padding-block: 1.6rem; list-style: none; cursor: pointer; }
.job summary::-webkit-details-marker { display: none; }
.job__years { color: var(--muted); font-family: var(--mono); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.job__role { font-family: var(--display); font-stretch: 112%; font-weight: 600; font-size: clamp(1.3rem, 2.5vw, 2.3rem); line-height: 1.1; letter-spacing: -0.015em; transition: transform 0.3s; }
.job summary:hover .job__role { transform: translateX(0.4rem); }
.job__org { color: var(--accent); font-size: 1.05rem; }
.job__toggle { position: relative; justify-self: end; width: 18px; height: 18px; }
.job__toggle::before, .job__toggle::after { content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 1.5px; background: var(--ink); transition: transform 0.25s; }
.job__toggle::after { transform: rotate(90deg); }
.job[open] .job__toggle::after { transform: rotate(0deg); }
.job__body { padding: 0 0 2.25rem 12.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.chips li { padding: 0.4rem 0.75rem; border: 1px solid rgb(158 216 195 / 0.5); font-family: var(--mono); font-size: 0.75rem; }

/* stack */
.stack { padding-block: clamp(4rem, 8vw, 7rem); }
.stack__title { margin: 0 0 2rem; font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: clamp(3rem, 8vw, 7.5rem); line-height: 0.9; letter-spacing: -0.035em; }
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cell { min-width: 0; min-height: 17rem; margin: 0; padding: 1.75rem; background: var(--bg-2); }
.cell h3 { margin: 0 0 1.1rem; font-family: var(--display); font-stretch: 112%; font-weight: 600; font-size: 1.3rem; }
.cell ul { display: grid; gap: 0.35rem; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.95rem; }
.cell--b { background: var(--bg-3); }
.cell--c { background: var(--bg-4); }
.cell--accent { background: var(--accent); color: var(--bg); }
.cell--accent ul { color: #1d2b26; }
.cell--image { position: relative; grid-column: span 2; padding: 0; overflow: hidden; }
.cell--image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.cell--image:hover img { transform: scale(1.04); }

/* contact */
.contact { padding-block: clamp(5rem, 10vw, 9rem) 2.5rem; border-top: 1px solid var(--line); }
.contact__title { max-width: 24ch; margin: 0; font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: clamp(2rem, 4.4vw, 4rem); line-height: 1.02; letter-spacing: -0.03em; text-wrap: balance; }
.contact__lead { max-width: 52ch; margin: 1.25rem 0 0; color: var(--muted); font-size: clamp(1.05rem, 1.4vw, 1.2rem); }
.contact__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2.25rem; }
.mailbtn {
  display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.95rem 1.4rem; background: var(--accent); color: var(--bg);
  font-weight: 500; font-size: 1.05rem; text-decoration: none; transition: transform 0.15s, background 0.2s;
}
.mailbtn:hover { background: var(--ink); }
.mailbtn:active { transform: translateY(1px); }
.contact__addr { font-family: var(--mono); font-size: 0.95rem; user-select: all; }
.copy { padding: 0.45rem 0.8rem; border: 1px solid var(--line); background: transparent; color: var(--muted); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.copy:hover { color: var(--ink); border-color: var(--ink); }
.contact__li { color: var(--muted); text-decoration: none; }
.contact__li:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.3em; }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem clamp(2rem, 6vw, 6rem); margin-top: clamp(3rem, 6vw, 5rem); padding-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); }
.about p { max-width: 52ch; margin: 0 0 1rem; font-size: 1.05rem; line-height: 1.65; }
.edu { display: grid; gap: 0.5rem; margin: 1.75rem 0 0; padding: 0; list-style: none; color: var(--muted); font-family: var(--mono); font-size: 0.82rem; }
.subhead { margin: 0 0 1rem; color: var(--muted); font-family: var(--mono); font-size: 0.78rem; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; }
.projects { margin: 0; padding: 0; list-style: none; }
.projlink { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 1rem; padding-block: 1rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.projlink strong { font-family: var(--display); font-stretch: 112%; font-weight: 600; font-size: 1.15rem; }
.projlink span { grid-column: 1; color: var(--muted); font-size: 0.92rem; }
.projlink i { grid-column: 2; grid-row: 1; color: var(--accent); font-style: normal; transition: transform 0.25s; }
.projlink:hover i { transform: translate(0.2rem, -0.2rem); }
.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: clamp(3rem, 6vw, 5rem); padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.footer a { text-decoration: none; color: var(--ink); }
.footer a:hover { color: var(--accent); }
.footer img { height: 16px; width: auto; }

/* responsive */
@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 2.75rem; }
  .step:nth-child(5) { border-left: 0; padding-left: 0; }
}
@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell--image { order: -1; min-height: 16rem; }
}
@media (max-width: 900px) {
  .now { grid-template-columns: 1fr; }
  .now__role { padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); padding-bottom: 0; }
  .now__plate { min-height: 0; aspect-ratio: 4 / 3; }
}
@media (max-width: 860px) {
  .header { grid-template-columns: minmax(0, 1fr) auto; }
  :root { --header-h: 124px; }
  .chapters { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; overflow-x: auto; margin-inline: -0.8rem; }
  .stage__poster, .stage__video { object-position: 50% 50%; }
  .stage__shade { background: radial-gradient(ellipse 120% 60% at 30% 55%, rgb(10 10 11 / 0.82) 0%, rgb(10 10 11 / 0.55) 55%, rgb(10 10 11 / 0.25) 100%); }
  .chapter, .chapter--right { justify-content: flex-start; }
  .chapter__copy { width: 100%; justify-content: center; padding-block: 7.5rem 2rem; }
  .chapters { gap: 0; }
  .chapters a { padding: 0.5rem 0.6rem; font-size: 0.66rem; letter-spacing: 0.08em; }
  .chapter__title { font-size: clamp(2rem, 9vw, 3.4rem); max-width: 14ch; }
  /* text sits over the film on phones: a soft local scrim + brighter secondary text keeps it at WCAG AA */
  .chapter__copy > * { position: relative; }
  .chapter__copy::before {
    content: ""; position: absolute; z-index: 0; left: -1.25rem; right: -1.25rem; top: 52%; height: 78%; transform: translateY(-50%);
    background: radial-gradient(ellipse 85% 55% at 50% 50%, rgb(10 10 11 / 0.9) 0%, rgb(10 10 11 / 0.78) 55%, rgb(10 10 11 / 0) 100%);
    pointer-events: none;
  }
  .chapter__body, .heroalt { color: #c9cbcf; }
  .chapter__body, .chapter__title, .heroalt { text-shadow: 0 1px 12px rgb(10 10 11 / 0.85); }
  .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .job summary { grid-template-columns: minmax(0, 1fr) 2rem; gap: 0.35rem 1rem; }
  .job__years { grid-column: 1 / -1; }
  .job__org { grid-column: 1; grid-row: 3; }
  .job__toggle { grid-column: 2; grid-row: 2; }
  .job__body { padding-left: 0; }
}
@media (max-width: 600px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(odd) { border-left: 0; padding-left: 0; }
  .step:nth-child(even) { border-left: 1px solid var(--line); padding-left: 1.1rem; }
  .step--gate:nth-child(odd)::before { left: 0; }
}
@media (max-width: 540px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .cell--image { grid-column: span 1; }
  .cell { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { flex-wrap: wrap; width: auto; animation: none; }
  .marquee__list[aria-hidden="true"] { display: none; }
  #intro .chapter__title { animation: none; }
  .herolink span, .job__role, .cell--image img, .projlink i, .stage__video { transition: none; }
}

/* desktop: push the film right of the copy column; solid header after the journey */
@media (min-width: 861px) {
  .stage picture, .stage__video { transform: translateX(14vw); }
  .stage__shade { background: linear-gradient(90deg, var(--bg) 0%, var(--bg) 14vw, rgb(10 10 11 / 0.7) 26vw, rgb(10 10 11 / 0) 60%); }
}
.header { transition: background 0.25s ease, border-color 0.25s ease; border-bottom: 1px solid transparent; }
.header.is-solid { background: rgb(10 10 11 / 0.97); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom-color: var(--line); }
