/* ==========================================================================
   Parker Bohon portfolio
   ========================================================================== */

:root {
  --bg: #08080a;
  --bg-alt: #0c0c10;
  --panel: #121217;
  --panel-2: #191920;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f3f1ec;
  --muted: #a6a6b0;
  --dim: #6c6c76;
  --accent: #29e0ff;
  --accent-ink: #00161b;
  --rec: #ff3b3b;

  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --max: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

::selection { background: var(--accent); color: var(--accent-ink); }

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

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* Subtle film grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Shared bits ---------- */

.rec {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rec);
  box-shadow: 0 0 12px var(--rec);
  animation: blink 1.4s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.2s, border-color 0.2s;
}
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 0 rgba(41, 224, 255, 0.5);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 40px -8px rgba(41, 224, 255, 0.65); }
.btn--ghost { border-color: var(--line-2); background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: var(--text); transform: translateY(-2px); }
.btn__icon { font-size: 12px; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker span {
  color: var(--accent);
  border: 1px solid rgba(41, 224, 255, 0.4);
  padding: 2px 7px;
  border-radius: 4px;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 3px 10px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  font-size: 18px;
  display: grid;
  place-items: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.icon-btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background 0.3s, border-color 0.3s, padding 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(8, 8, 10, 0.72);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: var(--line);
  padding-block: 12px;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.nav__links { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 500; }
.nav__links a { text-decoration: none; color: var(--muted); position: relative; transition: color 0.2s; }
.nav__links a:hover,
.nav__links a.is-active { color: var(--text); }
.nav__links a.is-active:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.nav__cta {
  color: var(--text) !important;
  border: 1px solid var(--line-2);
  padding: 8px 16px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s !important;
}
.nav__cta:hover { background: var(--text); color: var(--bg) !important; }
.nav__links .nav__resume {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  border: 1px solid var(--line-2);
  padding: 8px 15px 8px 13px;
  border-radius: 999px;
  transition: color 0.2s, border-color 0.2s;
}
.nav__resume svg { width: 14px; height: 14px; flex: none; }
.nav__links .nav__resume:hover { color: var(--accent); border-color: var(--accent); }

/* Below 900px the section links don't fit beside the Résumé and contact buttons. */
@media (max-width: 900px) {
  .nav__links a:not(.nav__cta):not(.nav__resume) { display: none; }
  .nav__links { gap: 10px; }
}
@media (max-width: 420px) {
  .nav__brand { font-size: 17px; gap: 8px; }
  .nav__cta,
  .nav__links .nav__resume { padding: 7px 11px; font-size: 13px; }
  .nav__resume svg { width: 12px; height: 12px; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.thumbwall {
  position: absolute;
  inset: -20% -10%;
  z-index: -2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: rotate(-7deg);
  filter: grayscale(0.55) brightness(0.5) contrast(1.05);
}
.thumbwall__row {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marquee var(--dur, 90s) linear infinite;
}
.thumbwall__row:nth-child(even) { animation-direction: reverse; }
.thumbwall__row img {
  width: clamp(220px, 22vw, 360px);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  opacity: 0.9;
}
@keyframes marquee { to { transform: translateX(-50%); } }

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 70% at 30% 50%, rgba(8, 8, 10, 0.55), rgba(8, 8, 10, 0.92) 70%),
    linear-gradient(180deg, rgba(8, 8, 10, 0.6) 0%, transparent 30%, transparent 70%, var(--bg) 100%);
}

.viewfinder {
  position: absolute;
  inset: clamp(70px, 9vh, 96px) var(--gutter) clamp(24px, 4vh, 40px);
  pointer-events: none;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
}
.vf-corner { position: absolute; width: 36px; height: 36px; border: 0 solid rgba(255, 255, 255, 0.55); }
.vf-corner--tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.vf-corner--tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.vf-corner--bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.vf-corner--br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.vf-top,
.vf-bottom {
  position: absolute;
  left: 52px;
  right: 52px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.vf-top { top: 10px; }
.vf-bottom { bottom: 10px; }
.vf-rec { display: inline-flex; align-items: center; gap: 8px; color: #fff; }
.vf-tc { font-size: 14px; color: #fff; font-variant-numeric: tabular-nums; }
.vf-right { display: inline-flex; align-items: center; gap: 18px; }
.vf-meter { display: inline-flex; gap: 3px; align-items: flex-end; height: 14px; }
.vf-meter i {
  width: 4px;
  background: #7bd88f;
  border-radius: 1px;
  animation: meter 0.9s ease-in-out infinite alternate;
}
.vf-meter i:nth-child(n + 6) { background: #f5c451; }
.vf-meter i:nth-child(8) { background: var(--rec); }
.vf-meter i:nth-child(1) { animation-delay: -0.2s; }
.vf-meter i:nth-child(2) { animation-delay: -0.5s; }
.vf-meter i:nth-child(3) { animation-delay: -0.1s; }
.vf-meter i:nth-child(4) { animation-delay: -0.7s; }
.vf-meter i:nth-child(5) { animation-delay: -0.3s; }
.vf-meter i:nth-child(6) { animation-delay: -0.6s; }
.vf-meter i:nth-child(7) { animation-delay: -0.4s; }
.vf-meter i:nth-child(8) { animation-delay: -0.8s; }
@keyframes meter { from { height: 3px; } to { height: 14px; } }

.hero__inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 120px calc(var(--gutter) + 40px) 90px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.hero__title {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(4.6rem, 15vw, 12.5rem);
  line-height: 0.84;
  letter-spacing: 0.005em;
  text-shadow: 0 10px 60px rgba(0, 0, 0, 0.6);
}
.hero__lede {
  max-width: 54ch;
  margin-top: 28px;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  color: #d9d8d3;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  font-size: 14px;
  color: var(--muted);
}
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7bd88f;
  box-shadow: 0 0 0 0 rgba(123, 216, 143, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(123, 216, 143, 0); }
  100% { box-shadow: 0 0 0 0 rgba(123, 216, 143, 0); }
}

.hero .reveal:nth-child(2) { transition-delay: 0.08s; }
.hero .reveal:nth-child(3) { transition-delay: 0.16s; }
.hero .reveal:nth-child(4) { transition-delay: 0.24s; }
.hero .reveal:nth-child(5) { transition-delay: 0.32s; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 14px;
}
.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: #fff;
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

@media (max-width: 700px) {
  .viewfinder { inset: 72px 12px 16px; }
  .vf-meta, .vf-bottom { display: none; }
  .vf-top { left: 40px; right: 40px; }
  .hero__inner { padding-inline: 30px; }
  .scroll-cue { display: none; }
}

/* ---------- Stats ---------- */

.stats {
  border-block: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg), var(--bg-alt));
}
.stats__list {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
.stats__list li {
  padding: 34px 22px;
  border-left: 1px solid var(--line);
}
.stats__list li:first-child { border-left: 0; }
.stat__value {
  font-family: var(--display);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat__value em { font-style: normal; color: var(--accent); }
.stat__label { margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--muted); }

@media (max-width: 1000px) {
  .stats__list { grid-template-columns: repeat(3, 1fr); }
  .stats__list li:nth-child(4) { border-left: 0; }
  .stats__list li:nth-child(n + 4) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .stats__list { grid-template-columns: repeat(2, 1fr); }
  .stats__list li { border-left: 0 !important; border-top: 1px solid var(--line); }
  .stats__list li:nth-child(odd) { border-right: 1px solid var(--line); }
  .stats__list li:nth-child(-n + 2) { border-top: 0; }
}

/* ---------- Sections ---------- */

.section {
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: clamp(90px, 12vw, 150px) var(--gutter);
}
.section--alt {
  max-width: none;
  padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2));
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.section__head { margin-bottom: 44px; }
.section__head h2 {
  margin-top: 18px;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  line-height: 0.92;
}
.section__intro { margin-top: 18px; max-width: 58ch; color: var(--muted); }

/* ---------- Work ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter:hover { color: var(--text); border-color: var(--text); }
.filter[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.filter__n { font-family: var(--mono); font-size: 11px; opacity: 0.6; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 36px 28px;
}
@media (min-width: 980px) {
  .grid > li:first-child { grid-column: span 2; grid-row: span 2; }
  .grid > li:first-child .card__title { font-size: 1.7rem; }
}

.card { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; }
.card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
}
.card__media img,
.card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease), filter 0.5s;
}
.card:hover .card__media img,
.card:hover .card__media video,
.card:focus-visible .card__media img { transform: scale(1.06); filter: brightness(0.75); }
.card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(8, 8, 10, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(6px);
  font-size: 18px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s, transform 0.4s var(--ease), background 0.2s;
}
.card:hover .card__play,
.card:focus-visible .card__play { opacity: 1; transform: scale(1); background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(8, 8, 10, 0.75);
  backdrop-filter: blur(6px);
}
.card__badge--metric { color: var(--accent); }
.card__year { left: auto; right: 12px; color: var(--muted); }
.card__body { padding-top: 16px; }
.card__client {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.card__title {
  margin: 6px 0 12px;
  font-size: 1.14rem;
  font-weight: 600;
  line-height: 1.3;
  transition: color 0.2s;
}
.card:hover .card__title { color: var(--accent); }

/* ---------- Process ---------- */

.pipes {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  overflow: hidden;
}
.pipes__tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.pipe-tab {
  flex: 1 0 auto;
  padding: 18px 22px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.pipe-tab:last-child { border-right: 0; }
.pipe-tab:hover { color: var(--text); }
.pipe-tab[aria-selected="true"] { color: var(--text); background: var(--panel-2); }
.pipe-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
}

.pipes__stage { padding: clamp(24px, 4vw, 48px); }
.pipe__head { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: baseline; justify-content: space-between; margin-bottom: 40px; }
.pipe__title { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 700; letter-spacing: -0.01em; }
.pipe__result {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  background: rgba(41, 224, 255, 0.08);
  border: 1px solid rgba(41, 224, 255, 0.3);
  padding: 8px 14px;
  border-radius: 999px;
}
.pipe__result b { color: var(--accent); font-weight: 600; }

.steps { display: flex; align-items: flex-start; gap: 0; }
.step {
  flex: 1 1 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 6px;
  border: 0;
  background: none;
  text-align: center;
}
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 34px;
  left: calc(50% + 40px);
  right: calc(-50% + 40px);
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 12px);
}
.step__signal {
  position: absolute;
  top: 31px;
  left: calc(50% + 40px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  opacity: 0;
}
.step.is-active .step__signal { animation: signal 1.6s var(--ease) infinite; }
@keyframes signal {
  0% { opacity: 0; transform: translateX(0); }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translateX(var(--run, 120px)); }
}
.step__icon {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 1px solid var(--line-2);
  color: var(--muted);
  transition: all 0.35s var(--ease);
}
.step__icon svg { width: 28px; height: 28px; }
.step__num { font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: 0.1em; }
.step__name { font-size: 14px; font-weight: 600; color: var(--muted); line-height: 1.3; transition: color 0.2s; }
.step:hover .step__icon { border-color: var(--text); color: var(--text); }
.step.is-active .step__icon {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  box-shadow: 0 12px 40px -10px rgba(41, 224, 255, 0.7);
  transform: translateY(-4px);
}
.step.is-active .step__name { color: var(--text); }
.step.is-done .step__icon { color: var(--accent); border-color: rgba(41, 224, 255, 0.45); }

.step-detail {
  margin-top: 36px;
  padding: 22px 26px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex;
  gap: 18px;
  align-items: baseline;
  min-height: 84px;
}
.step-detail__num { font-family: var(--mono); color: var(--accent); font-size: 13px; }
.step-detail__text { font-size: 1.05rem; color: #dcdbd6; }
.step-detail__text.swap { animation: swap 0.45s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* On phones, stack the pipeline tabs so none hide off-screen. */
@media (max-width: 600px) {
  .pipes__tabs { flex-direction: column; overflow-x: visible; }
  .pipe-tab { text-align: left; border-right: 0; border-bottom: 1px solid var(--line); padding: 14px 20px; }
  .pipe-tab:last-child { border-bottom: 0; }
}
@media (max-width: 760px) {
  .steps { flex-direction: column; gap: 14px; }
  .step { flex-direction: row; text-align: left; width: 100%; gap: 16px; padding: 0; }
  .step:not(:last-child)::after,
  .step__signal { display: none; }
  .step__icon { width: 52px; height: 52px; border-radius: 14px; flex: none; }
  .step__num { order: 3; margin-left: auto; }
}

/* ---------- Career NLE ---------- */

.nle {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0d0d11;
  overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
}
.nle__bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}
.nle__tc { color: var(--accent); font-size: 14px; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.nle__body { display: grid; grid-template-columns: 48px 1fr; overflow-x: auto; }
.nle__labels {
  display: grid;
  grid-template-rows: 30px 58px 58px 46px;
  border-right: 1px solid var(--line);
  background: var(--panel);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}
.nle__labels span { display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.nle__labels span:last-child { border-bottom: 0; }

.nle__tracks {
  position: relative;
  min-width: 760px;
  display: grid;
  grid-template-rows: 30px 58px 58px 46px;
  cursor: ew-resize;
  user-select: none;
  touch-action: pan-y;
  border-radius: 0;
}
.nle__tracks:focus-visible { outline-offset: -2px; }
.nle__ruler {
  position: relative;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 54 - 1px), rgba(255, 255, 255, 0.06) calc(100% / 54 - 1px) calc(100% / 54));
}
.nle__year {
  position: absolute;
  top: 0;
  bottom: 0;
  padding-left: 5px;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 30px;
  color: var(--dim);
}
.nle__seq { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nle__tc { white-space: nowrap; }
/* Fit the timeline to the screen on tablets and phones instead of scrolling sideways. */
@media (max-width: 900px) {
  .nle__body { overflow-x: hidden; }
  .nle__tracks { min-width: 0; }
}
@media (max-width: 760px) {
  .nle__year--odd { color: transparent; }
  .clip { padding: 0 6px; font-size: 11px; }
}
.nle__track { position: relative; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.012); }
.nle__track--audio { border-bottom: 0; }

.clip {
  position: absolute;
  top: 7px;
  bottom: 7px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  overflow: hidden;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #0b0b0d;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25), inset 3px 0 0 rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0.55;
  filter: saturate(0.7);
  transition: opacity 0.25s, filter 0.25s, transform 0.25s var(--ease);
}
.clip span { display: block; overflow: hidden; text-overflow: ellipsis; line-height: 44px; }
.nle__track--audio .clip span { line-height: 32px; }
.clip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.25), transparent 50%);
  pointer-events: none;
}
.nle__track--audio .clip {
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.28) 0 2px, transparent 2px 5px) center / 100% 46% no-repeat,
    var(--c);
}
.clip:hover { opacity: 0.85; }
.clip.is-hot { opacity: 1; filter: none; }
.clip.is-selected { box-shadow: inset 0 0 0 2px #fff, 0 0 24px -4px var(--c); }

.nle__playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  pointer-events: none;
  z-index: 3;
  transition: left 0.08s linear;
}
.nle__head {
  position: absolute;
  top: 0;
  left: -8px;
  width: 18px;
  height: 22px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%);
}
.nle.is-dragging .nle__playhead { transition: none; }

.job {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) 1.4fr;
  gap: 28px 48px;
  padding: clamp(24px, 3.4vw, 40px);
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 120% at 0% 0%, color-mix(in srgb, var(--c, var(--accent)) 14%, transparent), transparent 70%),
    var(--panel);
  position: relative;
  overflow: hidden;
}
.job::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--c, var(--accent));
}
.job__when { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--c, var(--accent)); text-transform: uppercase; }
.job__role { margin-top: 10px; font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.job__company { margin-top: 6px; color: var(--muted); }
.job__place { margin-top: 14px; font-size: 13px; color: var(--dim); }
.job__points { display: grid; gap: 12px; }
.job__points li { position: relative; padding-left: 22px; color: #d8d7d2; }
.job__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 10px;
  height: 2px;
  background: var(--c, var(--accent));
}
.job.swap > * { animation: swap 0.45s var(--ease); }
@media (max-width: 760px) { .job { grid-template-columns: 1fr; } }

.toolkit {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.toolkit__group h3 {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 14px;
}
.toolkit .chips li { font-size: 12.5px; color: #d3d2cd; padding: 6px 12px; background: rgba(255, 255, 255, 0.02); }
@media (max-width: 860px) { .toolkit { grid-template-columns: 1fr; } }

/* ---------- Design gallery ---------- */

.gtabs { display: flex; flex-wrap: wrap; gap: 10px; }
.gblurb { margin: 22px 0 34px; max-width: 64ch; color: var(--muted); min-height: 3.2em; }
.masonry { columns: 3 300px; column-gap: 18px; }
.masonry li { break-inside: avoid; margin-bottom: 18px; }
.masonry button {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  cursor: zoom-in;
}
.masonry img { width: 100%; height: auto; transition: transform 0.7s var(--ease), opacity 0.6s; opacity: 0; }
.masonry img.is-loaded { opacity: 1; }
.masonry button:hover img { transform: scale(1.04); }
.masonry li { animation: rise 0.6s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Contact ---------- */

.contact {
  text-align: center;
  padding: clamp(110px, 16vw, 200px) var(--gutter);
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 120%;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(41, 224, 255, 0.14), transparent 70%);
  pointer-events: none;
}
.contact__title {
  margin-top: 22px;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(3rem, 9vw, 7.4rem);
  line-height: 0.9;
}
.contact__row { margin-top: 44px; }
.email-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 40px;
  border-radius: 22px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s, background 0.2s, transform 0.3s var(--ease);
}
.email-btn:hover { border-color: var(--accent); background: rgba(41, 224, 255, 0.06); transform: translateY(-3px); }
.email-btn__addr { font-family: var(--mono); font-size: clamp(1rem, 2.6vw, 1.6rem); letter-spacing: 0.02em; }
.email-btn__hint { font-size: 12px; color: var(--dim); letter-spacing: 0.08em; text-transform: uppercase; }
.email-btn.is-copied .email-btn__hint { color: #7bd88f; }
.contact__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px 36px; margin-top: 40px; }
.contact__links a { text-decoration: none; font-weight: 600; color: var(--muted); border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.contact__links a:hover { color: var(--text); border-color: var(--accent); }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 26px var(--gutter);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

/* ---------- Dialogs ---------- */

dialog {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
}
dialog::backdrop { background: rgba(4, 4, 6, 0.9); backdrop-filter: blur(10px); }
dialog[open] { display: grid; place-items: center; animation: fade 0.3s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.theater__frame {
  width: min(1180px, 92vw, calc(66vh * 16 / 9));
  max-height: 94vh;
  overflow-y: auto;
  scrollbar-width: thin;
  animation: pop 0.45s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: none; } }
.theater__player {
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--line);
}
.theater__player iframe,
.theater__player video { width: 100%; height: 100%; border: 0; display: block; }
.theater__info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 22px 4px 4px;
}
.theater__client { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.theater__title { margin-top: 6px; font-size: clamp(1.2rem, 2.2vw, 1.6rem); font-weight: 700; line-height: 1.25; }
.theater__blurb { margin: 10px 0 14px; max-width: 70ch; color: var(--muted); }
.theater__nav { display: flex; align-items: center; gap: 12px; flex: none; }
.theater__count { font-family: var(--mono); font-size: 12px; color: var(--dim); min-width: 52px; text-align: center; }
.theater__close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.05);
  font-size: 26px;
  line-height: 1;
  transition: background 0.2s, transform 0.3s var(--ease);
}
.theater__close:hover { background: var(--text); color: var(--bg); transform: rotate(90deg); }
@media (max-width: 700px) {
  .theater__info { flex-direction: column; align-items: stretch; }
  .theater__nav { justify-content: space-between; }
}

.lightbox img {
  max-width: 88vw;
  max-height: 86vh;
  border-radius: 10px;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.9);
  animation: pop 0.4s var(--ease);
}
.lightbox__prev,
.lightbox__next { position: fixed; top: 50%; margin-top: -22px; }
.lightbox__prev { left: 22px; }
.lightbox__next { right: 22px; }
.lightbox__count { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------- Toast & tailored banner ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 120;
  transform: translate(-50%, 30px);
  opacity: 0;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 14px;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.for-banner {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 60;
  max-width: 400px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(18, 18, 23, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(41, 224, 255, 0.35);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.9);
  font-size: 14px;
  animation: pop 0.6s 1.2s var(--ease) both;
}
.for-banner[hidden] { display: none; }
.for-banner__dot { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 10px var(--accent); }
.for-banner p { color: #dcdbd6; }
.for-banner b { color: var(--text); }
.for-banner__close { border: 0; background: none; font-size: 20px; line-height: 1; color: var(--dim); padding: 0 2px; }
.for-banner__close:hover { color: var(--text); }

/* ---------- View transitions for filtering ---------- */

::view-transition-group(*) { animation-duration: 0.45s; animation-timing-function: var(--ease); }

/* ---------- Reduced motion ---------- */

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