:root {
  --bg: #0b0d10;
  --bg-2: #101317;
  --surface: rgba(255, 255, 255, 0.025);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.18);
  --fg: #eceef1;
  --fg-2: #b4bac4;
  --muted: #7b828d;
  --accent: #eb0000;
  --sans: "Instrument Sans", "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1140px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 8px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
::selection { background: var(--fg); color: var(--bg); }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.label {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Nav */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), opacity 0.3s;
}

.nav.scrolled {
  background: rgba(11, 13, 16, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: var(--line);
}

body.lb-open .nav { opacity: 0; pointer-events: none; }

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.nav nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 36px); }

.nav nav a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.nav nav a:hover, .nav nav a.active { color: var(--fg); }

.lang {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 4px;
  border: 0;
  background: none;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  cursor: pointer;
}

.lang .sep { opacity: 0.5; }
.lang [data-lang] { transition: color 0.2s; }
.lang [data-lang].on { color: var(--fg); }
.lang:hover [data-lang]:not(.on) { color: var(--fg-2); }

.nav-cta {
  padding: 9px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--fg) !important;
  transition: border-color 0.2s, background 0.2s;
}

.nav-cta:hover { background: var(--fg); color: var(--bg) !important; border-color: var(--fg); }

@media (max-width: 560px) {
  .nav .wrap { height: 64px; }
  .nav nav { gap: 14px; }
  .nav nav a { font-size: 0.78rem; }
  .nav-cta, .nav nav a[href="#trains"] { display: none; }
}

/* Hero */
.hero {
  position: relative;
  min-height: 82svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  z-index: -2;
  filter: saturate(0.75);
  transform: scale(1.05);
  animation: settle 16s var(--ease) forwards;
}

@keyframes settle { to { transform: scale(1); } }

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(11,13,16,0.35) 0%, rgba(11,13,16,0.05) 25%, rgba(11,13,16,0.3) 55%, rgba(11,13,16,0.94) 88%, var(--bg) 100%),
    linear-gradient(90deg, rgba(11,13,16,0.5) 0%, rgba(11,13,16,0) 55%);
}

.hero-content { padding: 0 0 clamp(56px, 9vh, 110px); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  animation: rise 1s var(--ease) both;
}

.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent); }

.hero h1 {
  margin: 0 0 22px;
  font-weight: 600;
  font-size: clamp(3.4rem, 11vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  animation: rise 1.1s var(--ease) 0.1s both;
}

.role {
  max-width: 30em;
  margin: 0 0 10px;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.015em;
  animation: rise 1.1s var(--ease) 0.2s both;
}

.lede {
  max-width: 34em;
  margin: 0 0 34px;
  font-size: clamp(0.95rem, 1.25vw, 1.05rem);
  color: var(--fg-2);
  animation: rise 1.1s var(--ease) 0.3s both;
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; animation: rise 1.1s var(--ease) 0.4s both; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 22px;
  border-radius: 999px;
  border: 0;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.2s;
}

.btn:hover { transform: translateY(-1px); background: #fff; }

.btn.ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line-2);
}

.btn.ghost:hover { border-color: var(--fg); background: rgba(255,255,255,0.04); }

.live {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: start;
  margin: 28px 0 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1.6;
  letter-spacing: 0.06em;
  color: var(--muted);
  animation: rise 1s var(--ease) both;
}

.live::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 0.45em;
  border-radius: 50%;
  background: var(--accent);
}

.live b { font-weight: 500; color: var(--fg-2); }

@media (max-width: 560px) {
  .live { font-size: 0.66rem; letter-spacing: 0.04em; margin-top: 22px; }
  .live .sep { display: none; }
  .live .p2 { display: block; margin-top: 2px; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

.scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: 40px;
  width: 1px;
  height: 64px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
}

.scroll-cue span {
  position: absolute;
  inset: 0;
  background: var(--accent);
  animation: cue 2.4s var(--ease) infinite;
}

@keyframes cue {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Pillars */
.pillars { border-block: 1px solid var(--line); }

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

.pillar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 34px 32px 34px 0;
}

.pillar + .pillar { padding-left: 32px; border-left: 1px solid var(--line); }

.pillar .label { color: var(--muted); }

.pillar strong {
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.pillar .sub { font-size: 0.86rem; color: var(--muted); }

@media (max-width: 820px) {
  .pillars .wrap { grid-template-columns: 1fr; }
  .pillar { padding: 22px 0; }
  .pillar + .pillar { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* Trains */
.trains { padding: clamp(64px, 8vw, 110px) 0; background: var(--bg-2); border-bottom: 1px solid var(--line); }

.trains-head { max-width: 46em; margin-bottom: clamp(28px, 4vw, 44px); }

.live-label { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.live-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(235, 0, 0, 0.18); }

.trains h2 {
  margin: 14px 0 10px;
  font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.trains-tag { margin: 0; color: var(--muted); font-size: 1rem; }

.trains-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 16px;
}

.board-card, .search-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  padding: 20px 22px 14px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.clock { color: var(--fg-2); font-variant-numeric: tabular-nums; }

.board, .conns { list-style: none; margin: 0; padding: 0; }

.board li {
  display: grid;
  grid-template-columns: 58px 1fr auto auto;
  gap: 14px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.board li:last-child, .conns li:last-child { border-bottom: 0; }

.board .t, .conns .t { font-family: var(--mono); font-size: 0.86rem; color: var(--fg); font-variant-numeric: tabular-nums; }
.board .to { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .line, .board .pl { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--muted); }
.board .line { color: var(--fg-2); }
.delay { color: var(--accent); font-family: var(--mono); font-size: 0.7rem; margin-left: 6px; }

.board .empty, .conns .empty { color: var(--muted); padding: 14px 0; font-size: 0.9rem; }

.conn-form {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 16px 0 6px;
}

.field { display: grid; gap: 6px; min-width: 0; }
.field .label { color: var(--muted); }

.field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--fg);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.field input:focus { border-color: var(--fg-2); }

.swap {
  height: 42px;
  width: 42px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: none;
  color: var(--fg-2);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.swap:hover { border-color: var(--fg); color: var(--fg); }

.btn.find { padding: 11px 18px; height: 42px; }

.conns li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.conns .t { grid-row: 1 / 3; align-self: center; font-size: 0.95rem; }
.conns .t small { color: var(--muted); font-size: 0.8rem; }
.conns .meta { color: var(--fg-2); }
.conns .prod { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--muted); }

@media (max-width: 860px) {
  .trains-grid { grid-template-columns: 1fr; }
  .board-card { display: none; }
}

@media (max-width: 480px) {
  .conn-form { grid-template-columns: 1fr auto; }
  .btn.find { grid-column: 1 / -1; justify-content: center; }
  .board li { grid-template-columns: 52px 1fr auto; }
  .board .pl { display: none; }
}

/* Sections */
.section { padding: clamp(88px, 11vw, 150px) 0; }
.section.notfound { padding-top: 160px; min-height: 70vh; }

.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  column-gap: 20px;
  align-items: baseline;
  margin-bottom: clamp(40px, 6vw, 68px);
}

.section-head .num {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.section-head h2 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(2.3rem, 6vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.section-sub { grid-column: 2; margin: 12px 0 0; color: var(--muted); font-size: 1rem; }

@media (max-width: 560px) {
  .section-head { grid-template-columns: auto 1fr; }
}

/* Career intro */
.intro {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  margin-bottom: clamp(64px, 9vw, 110px);
}

.portrait {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-2);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85);
  transition: transform 1.2s var(--ease);
}

.portrait:hover img { transform: scale(1.02); }

.intro-text h3 {
  margin: 0 0 22px;
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.intro-text p { margin: 0 0 18px; font-size: 1.02rem; color: var(--fg-2); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--fg-2);
  background: var(--surface);
}

@media (max-width: 820px) {
  .intro { grid-template-columns: 1fr; }
  .portrait { max-width: 420px; }
}

/* Timeline */
.timeline { display: grid; gap: clamp(44px, 6vw, 72px); }

.tl-group h4 {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.tl-group h4::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.tl-group ol { list-style: none; margin: 0; padding: 0; }

.tl-group > ol > li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.tl-group > ol > li > div { display: grid; gap: 3px; }

.tl-group .years {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--fg-2);
  white-space: nowrap;
  line-height: 1.9;
}

.tl-group .title { font-size: 1.08rem; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }
.tl-group .org { color: var(--fg-2); font-size: 0.95rem; }
.tl-group .note { font-size: 0.85rem; color: var(--muted); }

.steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  color: var(--fg-2);
  line-height: 1.4;
}

.steps li + li::before {
  content: "";
  width: 22px;
  height: 1px;
  margin: 0 12px;
  background: var(--line-2);
}

.steps li:first-child { color: var(--fg); font-weight: 500; }

.steps li:first-child::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.step-year {
  margin-right: 8px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--accent);
}

@media (max-width: 620px) {
  .tl-group > ol > li { grid-template-columns: 1fr; gap: 6px; }
  .steps { flex-direction: column; align-items: flex-start; gap: 8px; }
  .steps li + li::before { display: none; }
}

/* Photography — filmstrip */
.photo-section { padding-bottom: clamp(56px, 7vw, 100px); }
.photo-section .section-head { margin-bottom: clamp(16px, 3vw, 32px); }

.strip-wrap { height: 230vh; }

.strip-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.gallery.strip {
  display: flex;
  gap: 14px;
  padding: 0 var(--gutter);
  will-change: transform;
}

.gallery a {
  display: block;
  position: relative;
  flex: 0 0 auto;
  height: min(64vh, 620px);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-2);
}

.gallery img {
  width: auto;
  height: 100%;
  transition: transform 1s var(--ease), filter 0.5s;
  filter: saturate(0.9);
}

.gallery a:hover img { transform: scale(1.03); filter: saturate(1); }

.gallery-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.quiet-hint { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.quiet-link {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.2s;
}

.quiet-link:hover { color: var(--fg); }

@media (max-width: 760px), (prefers-reduced-motion: reduce) {
  .strip-wrap { height: auto; }
  .strip-sticky {
    position: static;
    height: auto;
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .strip-sticky::-webkit-scrollbar { display: none; }
  .gallery.strip { transform: none !important; padding: 4px var(--gutter); }
  .gallery a { height: 56vh; scroll-snap-align: center; }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(11, 13, 16, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.open { opacity: 1; visibility: visible; }
.lightbox.instant { transition: none; }

.lightbox img {
  max-width: min(92vw, 1600px);
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

.lightbox .counter {
  position: absolute;
  left: var(--gutter);
  bottom: 24px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.lightbox button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  color: var(--fg);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.lightbox button:hover { background: rgba(255,255,255,0.1); border-color: var(--fg); }
.lightbox .close { top: 20px; right: var(--gutter); }
.lightbox .prev { left: var(--gutter); top: 50%; transform: translateY(-50%); }
.lightbox .next { right: var(--gutter); top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
  .lightbox .prev, .lightbox .next { top: auto; bottom: 16px; transform: none; }
  .lightbox .prev { left: auto; right: calc(var(--gutter) + 60px); }
  .lightbox .counter { bottom: 32px; }
}

/* Dispatcher (easter egg) */
.dispatcher {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  background: var(--bg);
}

.dispatcher.open { display: block; }
.dispatcher canvas { display: block; touch-action: none; user-select: none; }

.dispatcher .close {
  position: absolute;
  top: 20px;
  right: var(--gutter);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  color: var(--fg);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.dispatcher .close:hover { background: rgba(255,255,255,0.1); border-color: var(--fg); }

.dispatcher .sound {
  position: absolute;
  top: 20px;
  right: calc(var(--gutter) + 58px);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  color: var(--fg);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.dispatcher .sound:hover { background: rgba(255,255,255,0.1); border-color: var(--fg); }
.dispatcher .sound .x { display: none; }
.dispatcher .sound.off { color: var(--muted); }
.dispatcher .sound.off .w1, .dispatcher .sound.off .w2 { display: none; }
.dispatcher .sound.off .x { display: block; }

body.game-open .nav { opacity: 0; pointer-events: none; }

/* View transitions (photo morph) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; }

::view-transition-old(lb-photo), ::view-transition-new(lb-photo) {
  animation-duration: 0.5s;
  animation-timing-function: var(--ease);
  mix-blend-mode: normal;
  overflow: hidden;
  border-radius: 8px;
}

::view-transition-image-pair(lb-photo) { isolation: isolate; }

/* Film */
.films {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 32px);
}

.film { margin: 0; }

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  cursor: pointer;
}

.video img, .video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video img {
  object-fit: cover;
  opacity: 0.8;
  filter: saturate(0.85);
  transition: transform 1s var(--ease), opacity 0.4s;
}

.video:hover img { transform: scale(1.03); opacity: 1; }

.video .play {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: rgba(236, 238, 241, 0.94);
  color: var(--bg);
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.2s;
}

.video .play svg { margin-left: 3px; }
.video:hover .play { transform: scale(1.06); background: #fff; }

.film figcaption { display: grid; gap: 3px; padding: 16px 2px 0; }
.film .title { font-size: 1.08rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; }
.film .credit { color: var(--muted); font-size: 0.88rem; }

@media (max-width: 720px) { .films { grid-template-columns: 1fr; } }

/* Footer */
.footer { padding: 26px 0 40px; background: var(--bg-2); border-top: 1px solid var(--line); }

.footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
}

.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--fg); }

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0s);
}

.reveal.in { opacity: 1; transform: none; }
/* Stagger delays as classes so the markup needs no inline styles (strict CSP). */
.reveal.d1 { --d: .1s; }
.reveal.d15 { --d: .15s; }
.reveal.d2 { --d: .2s; }
.dispatcher:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-img, .eyebrow, .hero h1, .lede, .role, .cta, .live, .scroll-cue span { animation: none !important; }
  .hero-img { transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; }
}

/* Print — CV */
@media print {
  @page { margin: 18mm 16mm; }
  html { scroll-behavior: auto; }
  body { background: #fff; color: #111; font-size: 11pt; line-height: 1.45; }
  .nav, .hero-img, .hero-shade, .scroll-cue, .cta, .live, .lede, .portrait, .photo-section, #film, .footer-links, .print-btn, .lightbox, .section-head .num { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero { min-height: 0; display: block; padding: 0 0 8mm; border-bottom: 1px solid #ccc; }
  .hero-content { padding: 0; }
  .eyebrow { color: #666; margin-bottom: 6pt; animation: none; }
  .eyebrow::before { background: #eb0000; }
  .hero h1 { font-size: 26pt; margin: 0 0 6pt; color: #111; animation: none; }
  .role { font-size: 13pt; margin: 0; color: #111; animation: none; }
  .pillars { border: 0; margin-top: 6mm; }
  .pillars .wrap { grid-template-columns: repeat(3, 1fr); gap: 6mm; }
  .pillar { padding: 0 !important; border: 0 !important; gap: 2pt; }
  .pillar .label { color: #666; }
  .pillar strong { font-size: 11.5pt; color: #111; }
  .pillar .sub { color: #444; font-size: 9pt; }
  .section { padding: 8mm 0 0; }
  .section-head { margin-bottom: 4mm; grid-template-columns: 1fr; }
  .section-head h2 { font-size: 16pt; color: #111; }
  .intro { grid-template-columns: 1fr; margin-bottom: 6mm; gap: 0; }
  .intro-text h3 { font-size: 12.5pt; margin-bottom: 6pt; color: #111; }
  .intro-text p { color: #222; font-size: 10.5pt; margin-bottom: 6pt; }
  .tags { margin-top: 6pt; gap: 4pt; }
  .tags li { border-color: #bbb; background: none; color: #333; font-size: 8.5pt; padding: 2pt 7pt; }
  .timeline { gap: 6mm; }
  .tl-group h4 { color: #666; }
  .tl-group h4::after { background: #ccc; }
  .tl-group > ol > li { border-bottom-color: #ddd; padding: 8pt 0; grid-template-columns: 34mm 1fr; gap: 6mm; break-inside: avoid; }
  .tl-group .years { color: #444; }
  .tl-group .title { color: #111; font-size: 11pt; }
  .tl-group .org, .tl-group .note { color: #444; }
  .steps li { color: #333; font-size: 10pt; }
  .steps li:first-child { color: #111; }
  .steps li + li::before { background: #bbb; }
  .step-year { color: #eb0000; }
  .footer { background: none; border-top: 1px solid #ccc; padding: 4mm 0 0; margin-top: 8mm; color: #666; font-size: 9pt; }
  .footer .wrap::after { content: "karim-rifai.com · linkedin.com/in/karim-rifai"; }
  .wrap { width: 100%; }
}
