:root {
  --bg: #0a1114;
  --raised: #0f191d;
  --raised-2: #142226;
  --line: rgba(190, 225, 222, 0.12);
  --line-strong: rgba(190, 225, 222, 0.22);
  --ink: #e6eeec;
  --muted: #8fa3a6;
  --dim: #56696d;
  --teal: #3cc4b4;
  --teal-ink: #04201c;
  --amber: #f4b860;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --wrap: 1200px;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --text: "Geist", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--display); margin: 0; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 50; background: var(--teal); color: var(--teal-ink); padding: 0.6rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- top bar: the name lives here, quietly ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem var(--gutter);
  background: rgba(10, 17, 20, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.wordmark { font-weight: 600; font-size: 0.9375rem; text-decoration: none; letter-spacing: 0.01em; }
.topbar nav { display: flex; align-items: center; gap: clamp(0.9rem, 2.4vw, 1.9rem); font-size: 0.9375rem; }
.topbar nav a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.topbar nav a:hover { color: var(--ink); }
.topbar .nav-cta { color: var(--ink); border: 1px solid var(--line-strong); padding: 0.4rem 0.95rem; border-radius: 999px; }
.topbar .nav-cta:hover { border-color: var(--teal); color: var(--teal); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.35rem; border-radius: 999px;
  font-weight: 600; font-size: 0.9688rem; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; background: none;
  transition: transform 0.2s ease, background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--teal); color: var(--teal-ink); }
.btn-solid:hover { background: #5fd6c7; }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  max-width: var(--wrap); margin: 0 auto;
  min-height: calc(100svh - 62px);
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) clamp(2.5rem, 6vw, 4rem);
  display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center;
}
.hero::before {
  content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; pointer-events: none;
  background:
    radial-gradient(42rem 30rem at 72% 48%, rgba(60, 196, 180, 0.13), transparent 70%),
    radial-gradient(26rem 20rem at 85% 75%, rgba(244, 184, 96, 0.07), transparent 70%);
}

.kicker { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--muted); font-size: 0.9375rem; margin-bottom: clamp(1.25rem, 3vw, 2rem); }
.kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(60, 196, 180, 0.6); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(60, 196, 180, 0.55); } 80%, 100% { box-shadow: 0 0 0 12px rgba(60, 196, 180, 0); } }

.pillars { display: flex; flex-direction: column; align-items: flex-start; gap: 0.05em; font-size: clamp(3rem, 7.6vw, 6.3rem); line-height: 1; letter-spacing: -0.045em; font-weight: 650; }
.pillar {
  position: relative; background: none; border: 0; padding: 0 0 0.08em; cursor: pointer;
  font: inherit; letter-spacing: inherit; color: var(--dim); text-align: left;
  transition: color 0.35s ease;
}
.pillar::after {
  content: ""; position: absolute; left: 0; bottom: 0.02em; height: 0.07em; width: 100%;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  border-radius: 99px; transform: scaleX(0); transform-origin: left; transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pillar:hover { color: var(--muted); }
.pillar[aria-pressed="true"] { color: var(--ink); }
.pillar[aria-pressed="true"]::after { transform: scaleX(1); }

.lede { max-width: 33rem; margin-top: clamp(1.5rem, 3vw, 2rem); font-size: clamp(1.0625rem, 1.6vw, 1.2rem); color: #c3d1d0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.facts { display: flex; flex-wrap: wrap; gap: 0.6rem 1.75rem; margin-top: 2.25rem; color: var(--muted); font-size: 0.9375rem; }
.facts strong { color: var(--ink); font-family: var(--display); font-size: 1.25rem; font-weight: 600; margin-right: 0.3rem; }

.hero-visual { position: relative; margin: 0; height: clamp(340px, 52vh, 600px); display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
#system { width: 100%; flex: 1; min-height: 0; display: block; }
#mode-caption {
  width: max-content; max-width: 100%; text-align: center;
  font-size: 0.875rem; color: var(--muted);
  padding: 0.45rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(15, 25, 29, 0.7);
}

@media (min-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .hero-visual { height: min(68vh, 640px); }
}

/* ---------- section scaffolding ---------- */

main { position: relative; }
.block { max-width: var(--wrap); margin: 0 auto; padding: clamp(4.5rem, 10vw, 8rem) var(--gutter) 0; }
.block-head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.block-head h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); line-height: 1.04; max-width: 21ch; }
.block-head p { margin-top: 0.9rem; color: var(--muted); max-width: 52ch; }

.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- role finder ---------- */

.finder { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.finder-tabs {
  display: flex; gap: 0.5rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.5rem;
  scrollbar-width: none;
}
.finder-tabs::-webkit-scrollbar { display: none; }
.finder-tabs [role="tab"] {
  flex: none; scroll-snap-align: start; cursor: pointer;
  background: var(--raised); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.6rem 1rem; font-size: 0.9375rem; color: var(--muted); text-align: left;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.finder-tabs [role="tab"]:hover { color: var(--ink); }
.finder-tabs [role="tab"][aria-selected="true"] { color: var(--teal-ink); background: var(--teal); border-color: var(--teal); }

.panel {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--raised-2), var(--raised) 60%);
  border: 1px solid var(--line); border-radius: 24px;
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
}
.panel::after {
  content: ""; position: absolute; width: 22rem; height: 22rem; right: -8rem; top: -8rem; pointer-events: none;
  background: radial-gradient(circle, rgba(60, 196, 180, 0.16), transparent 65%);
}
.panel.enter { animation: panel-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.need { font-family: var(--display); font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.25; font-weight: 500; max-width: 34ch; letter-spacing: -0.015em; }
.proof { margin-top: 1.75rem; display: grid; gap: 1rem; }
.proof li { position: relative; padding-left: 2rem; color: #c3d1d0; max-width: 66ch; }
.proof li::before {
  content: ""; position: absolute; left: 0; top: 0.3em; width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: rgba(60, 196, 180, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%233CC4B4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.8rem no-repeat;
}
.panel.enter .proof li { animation: panel-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.panel.enter .proof li:nth-child(2) { animation-delay: 0.07s; }
.panel.enter .proof li:nth-child(3) { animation-delay: 0.14s; }

.tools-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.tools-label { color: var(--muted); font-size: 0.875rem; margin-right: 0.35rem; }
.chip { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.875rem; padding: 0.35rem 0.75rem; border-radius: 999px; background: rgba(230, 238, 236, 0.05); border: 1px solid var(--line); }

@media (min-width: 900px) {
  .finder { grid-template-columns: 17rem minmax(0, 1fr); gap: 2rem; align-items: start; }
  .finder-tabs { flex-direction: column; overflow: visible; padding: 0; position: sticky; top: 6rem; }
  .finder-tabs [role="tab"] { border-radius: 14px; padding: 0.85rem 1.1rem; }
}

/* ---------- method: four steps on a line that draws itself ---------- */

.method { position: relative; display: grid; grid-template-columns: 1fr; gap: 1.25rem; counter-reset: none; }
.step { position: relative; background: var(--raised); border: 1px solid var(--line); border-radius: 20px; padding: 1.5rem; }
.step-n {
  display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  font-family: var(--display); font-weight: 600; color: var(--teal);
  border: 1px solid rgba(60, 196, 180, 0.5); background: var(--bg); margin-bottom: 1.1rem;
}
.step h3 { font-size: 1.35rem; margin-bottom: 0.4rem; }
.step p { color: var(--muted); }
.js .method .step:nth-child(2) { transition-delay: 0.1s; }
.js .method .step:nth-child(3) { transition-delay: 0.2s; }
.js .method .step:nth-child(4) { transition-delay: 0.3s; }

@media (min-width: 640px) { .method { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) {
  .method { grid-template-columns: repeat(4, 1fr); }
  .method::before {
    content: ""; position: absolute; left: 2.8rem; right: 2.8rem; top: calc(1.5rem + 1.3rem); height: 2px; z-index: 0;
    background: linear-gradient(90deg, var(--teal), var(--amber));
    transform: scaleX(0); transform-origin: left; transition: transform 1.6s cubic-bezier(0.6, 0, 0.2, 1) 0.2s;
  }
  .method.in::before { transform: scaleX(1); }
  .step { background: transparent; border: 0; padding: 1.5rem 0.5rem 0; }
  .step-n { position: relative; z-index: 1; }
}

/* ---------- work cases ---------- */

.cases { border-top: 1px solid var(--line); }
.case { border-bottom: 1px solid var(--line); }
.case summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem 1.5rem; align-items: center;
  padding: clamp(1.25rem, 2.5vw, 1.75rem) 0;
}
.case summary::-webkit-details-marker { display: none; }
.case-title { font-family: var(--display); font-size: clamp(1.2rem, 2.3vw, 1.6rem); font-weight: 500; line-height: 1.2; letter-spacing: -0.015em; transition: color 0.25s, transform 0.35s ease; }
.case summary:hover .case-title { color: var(--teal); transform: translateX(6px); }
.case summary::after {
  content: ""; grid-column: 2; grid-row: 1; width: 2.3rem; height: 2.3rem; border-radius: 50%;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(var(--ink), var(--ink)) center / 0.85rem 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1.5px 0.85rem no-repeat;
  transition: transform 0.35s ease, border-color 0.25s;
}
.case[open] summary::after { transform: rotate(45deg); border-color: var(--teal); }
.tags { grid-column: 1; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tags span { font-size: 0.8125rem; color: var(--muted); padding: 0.18rem 0.6rem; border-radius: 999px; border: 1px solid var(--line); }
.case-body { padding: 0 0 1.75rem; display: grid; gap: 1rem; max-width: 70ch; }
.case[open] .case-body { animation: panel-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
.case-body p { color: #c3d1d0; }
.case-body .elsewhere { padding: 0.9rem 1.1rem; border-radius: 14px; background: rgba(244, 184, 96, 0.07); border: 1px solid rgba(244, 184, 96, 0.2); }
.elsewhere strong { color: var(--amber); font-weight: 600; }

/* ---------- toolkit marquee ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; }
.filter { cursor: pointer; padding: 0.45rem 0.95rem; border-radius: 999px; border: 1px solid var(--line); background: var(--raised); color: var(--muted); font-size: 0.9375rem; transition: color 0.2s, border-color 0.2s, background-color 0.2s; }
.filter:hover { color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.marquee {
  display: grid; gap: 1rem;
  margin-inline: calc(var(--gutter) * -1);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.mq-row { overflow: hidden; padding-block: 0.4rem; }
.mq-track { display: flex; width: max-content; animation: mq 70s linear infinite; }
.mq-row.reverse .mq-track { animation-direction: reverse; animation-duration: 80s; }
.mq-row:hover .mq-track, .mq-row:focus-within .mq-track { animation-play-state: paused; }
.mq-group { display: flex; gap: 1rem; padding-right: 1rem; }
@keyframes mq { to { transform: translateX(-50%); } }

.tile { width: 11rem; height: 8.25rem; perspective: 900px; cursor: pointer; transition: opacity 0.35s, filter 0.35s; }
.tile.dim { opacity: 0.16; filter: grayscale(1); }
.tile-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.7s cubic-bezier(0.3, 1.3, 0.5, 1); }
.tile:hover .tile-inner, .tile:focus-visible .tile-inner, .tile.flipped .tile-inner { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0; border-radius: 18px; border: 1px solid var(--line);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.7rem; padding: 0.9rem;
}
.front { background: linear-gradient(160deg, var(--raised-2), var(--raised)); }
.front svg { filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45)); }
.tname { font-size: 0.8125rem; color: var(--muted); }
.wm { font-family: var(--display); font-weight: 700; font-size: 1.45rem; letter-spacing: -0.03em; }
.back { transform: rotateY(180deg); background: linear-gradient(160deg, #15302f, #0f1d20); border-color: rgba(60, 196, 180, 0.35); align-items: flex-start; justify-content: flex-start; gap: 0.35rem; }
.tgroup { font-size: 0.75rem; color: var(--teal); font-weight: 600; }
.back p { font-size: 0.875rem; line-height: 1.35; color: var(--ink); }

/* ---------- career timeline ---------- */

.timeline { position: relative; display: grid; gap: 0; padding-left: 1.75rem; }
.timeline::before { content: ""; position: absolute; left: 0.35rem; top: 0.5rem; bottom: 0.5rem; width: 2px; background: var(--line); }
.timeline::after {
  content: ""; position: absolute; left: 0.35rem; top: 0.5rem; bottom: 0.5rem; width: 2px;
  background: linear-gradient(var(--teal), var(--amber));
  transform: scaleY(0); transform-origin: top; transition: transform 1.8s cubic-bezier(0.6, 0, 0.2, 1) 0.2s;
}
.timeline.in::after { transform: scaleY(1); }
.timeline li { position: relative; padding: 0 0 2.25rem; }
.timeline li::before {
  content: ""; position: absolute; left: -1.75rem; top: 0.35rem; width: 0.85rem; height: 0.85rem; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--teal); z-index: 1;
}
.when { display: block; color: var(--teal); font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.45rem; }
.industry { display: inline-block; white-space: nowrap; font-size: 0.8125rem; color: var(--amber); border: 1px solid rgba(244, 184, 96, 0.35); padding: 0.12rem 0.55rem; border-radius: 999px; }
.timeline h3 { font-size: 1.5rem; margin-top: 0.6rem; }
.timeline .role { color: var(--muted); font-size: 0.9375rem; margin-top: 0.1rem; }
.timeline p:last-child { margin-top: 0.5rem; color: #c3d1d0; max-width: 46ch; }

@media (min-width: 1000px) {
  .timeline { grid-template-columns: repeat(5, 1fr); gap: 1.75rem; padding: 2.25rem 0 0; }
  .timeline::before { left: 0; right: 0; top: 0.4rem; bottom: auto; width: auto; height: 2px; }
  .timeline::after { left: 0; right: 0; top: 0.4rem; bottom: auto; width: auto; height: 2px; background: linear-gradient(90deg, var(--teal), var(--amber)); transform: scaleX(0); transform-origin: left; }
  .timeline.in::after { transform: scaleX(1); }
  .timeline li { padding: 0; }
  .timeline li::before { left: 0; top: -2.25rem; }
  .js .timeline li:nth-child(2) { transition-delay: 0.12s; }
  .js .timeline li:nth-child(3) { transition-delay: 0.24s; }
  .js .timeline li:nth-child(4) { transition-delay: 0.36s; }
  .js .timeline li:nth-child(5) { transition-delay: 0.48s; }
}

/* ---------- contact ---------- */

.contact {
  position: relative; overflow: hidden;
  max-width: var(--wrap); margin: clamp(5rem, 10vw, 8rem) auto 0;
  padding: clamp(3rem, 7vw, 5.5rem) var(--gutter);
  border-top: 1px solid var(--line);
}
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(40rem 22rem at 20% 100%, rgba(60, 196, 180, 0.16), transparent 70%);
}
.contact h2 { font-size: clamp(2.1rem, 5.4vw, 4.2rem); line-height: 1.02; letter-spacing: -0.04em; max-width: 16ch; }
.contact p { color: var(--muted); max-width: 50ch; margin-top: 1.1rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.contact .copied { color: var(--teal); min-height: 1.6em; margin-top: 1rem; font-size: 0.9375rem; }

.foot {
  max-width: var(--wrap); margin: 0 auto;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 2rem;
  padding: 1.5rem var(--gutter) 2.5rem; color: var(--dim); font-size: 0.875rem; border-top: 1px solid var(--line);
}

/* ---------- small screens ---------- */

@media (max-width: 720px) {
  .topbar nav a:not(.nav-cta) { display: none; }
  .hero { min-height: 0; padding-top: 2rem; }
  .hero-visual { order: -1; height: 320px; margin-inline: calc(var(--gutter) * -0.5); }
  #mode-caption { font-size: 0.8125rem; white-space: normal; width: 92%; }
}

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .method::before, .timeline::after { transform: none !important; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .mq-track { width: auto; }
  .mq-group { flex-wrap: wrap; }
  .mq-group[aria-hidden="true"] { display: none; }
}
