/* alnimeri.com — Ahmed El-Nimeri
   Dark reading of the nas.com / 1000media house style:
   Poppins, pill shapes, soft ambient glow, generous radii. Monochrome. */

@font-face { font-family: Poppins; font-weight: 400; font-style: normal; font-display: swap; src: url(assets/fonts/poppins-400.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 500; font-style: normal; font-display: swap; src: url(assets/fonts/poppins-500.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 600; font-style: normal; font-display: swap; src: url(assets/fonts/poppins-600.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 700; font-style: normal; font-display: swap; src: url(assets/fonts/poppins-700.woff2) format("woff2"); }

:root {
  --bg:        #0a0a0c;
  --bg-raised: #141418;
  --fg:        #ffffff;
  --fg-dim:    #a5a3ad;
  --fg-faint:  #6e6c78;
  --line:      rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.07);

  --ff: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --gut:  clamp(1.25rem, 5vw, 5.5rem);
  --pill: 100px;
  --card: clamp(14px, 1.4vw, 22px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

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

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

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

.skip {
  position: absolute; left: -9999px; top: 0;
  padding: 0.75rem 1.25rem; border-radius: var(--pill);
  background: var(--fg); color: var(--bg);
  z-index: 100; font-size: 0.85rem; font-weight: 500;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- ambient glow ----------
   The soft radial bloom both reference sites use, desaturated for dark. */

.glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(58vw 48vw at 50% -8%, rgba(255,255,255,0.10), transparent 62%),
    radial-gradient(42vw 38vw at 88% 12%, rgba(255,255,255,0.045), transparent 65%);
}

/* ---------- pill navbar ---------- */

.masthead {
  position: fixed; z-index: 40;
  top: clamp(0.75rem, 2vw, 1.4rem);
  left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 2rem), 1120px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.6rem 0.55rem 1.5rem;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: rgba(18, 18, 22, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.masthead__mark {
  text-decoration: none; font-weight: 600;
  font-size: 0.92rem; letter-spacing: -0.01em; white-space: nowrap;
  display: flex; align-items: center; gap: 0.65rem;
}
/* Calligraphy mark, white-on-transparent, so it needs no colour handling. */
.mark { width: auto; height: 30px; flex: none; }
@media (max-width: 560px) {
  .mark { height: 26px; }
  .masthead__mark > span { display: none; }
}
.masthead__nav { display: flex; align-items: center; gap: 1.6rem; }
.masthead__nav a {
  text-decoration: none; font-size: 0.87rem; font-weight: 500;
  color: var(--fg-dim); transition: color 0.3s var(--ease);
}
.masthead__nav a:hover { color: var(--fg); }
@media (max-width: 620px) {
  .masthead { padding-left: 1.1rem; }
  .masthead__nav a:not(.btn) { display: none; }
}

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

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.72rem 1.5rem;
  border-radius: var(--pill); border: 1px solid transparent;
  font-size: 0.9rem; font-weight: 600; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), opacity 0.3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--solid  { background: var(--fg); color: #0a0a0c; }
.btn--solid:hover { opacity: 0.88; }
.btn--ghost  { background: transparent; color: var(--fg); border-color: var(--line); }
.btn--ghost:hover { background: rgba(255,255,255,0.07); }
/* `.masthead__nav a` (0,1,1) outranks `.btn--solid` (0,1,0), so the button's
   dark label loses to the nav's dim colour. Restate it at higher specificity. */
.masthead .btn { padding: 0.6rem 1.25rem; font-size: 0.85rem; }
/* `.masthead__nav a` (0,2,1 with :hover) outranks `.btn--solid` (0,1,0), so the
   button's label loses to the nav's colour — invisible white-on-white on hover.
   Both states must be restated at matching specificity. */
.masthead .btn--solid,
.masthead .btn--solid:hover { color: #0a0a0c; }
.masthead .btn--ghost,
.masthead .btn--ghost:hover { color: var(--fg); }

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

.hero {
  position: relative; z-index: 1;
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 9rem var(--gut) clamp(3rem, 8vh, 6rem);
  isolation: isolate;
}

/* Full-bleed silent loop behind the hero. The iframe is sized in viewport
   units so it always covers, whatever the window aspect ratio. */
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  overflow: hidden; background: #000;
  opacity: 0; transition: opacity 1.6s var(--ease);
}
.hero__bg.is-playing { opacity: 1; }
.hero__bg iframe {
  position: absolute; top: 50%; left: 50%;
  width: 100vw; height: 56.25vw;
  min-height: 100svh; min-width: 177.78svh;
  transform: translate(-50%, -50%);
  border: 0; pointer-events: none;
}
/* Scrim: without it the headline sits on moving footage and becomes unreadable. */
.hero__scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(10,10,12,0.82) 0%, rgba(10,10,12,0.62) 45%, rgba(10,10,12,0.92) 100%),
    radial-gradient(70vw 60vh at 50% 45%, rgba(10,10,12,0.25), rgba(10,10,12,0.8) 75%);
}

.hero__eyebrow {
  display: inline-block;
  margin: 0 0 clamp(1.5rem, 4vh, 2.25rem);
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--line); border-radius: var(--pill);
  background: rgba(255,255,255,0.035);
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.01em;
  color: var(--fg-dim);
}
.hero__eyebrow strong { color: var(--fg); font-weight: 600; }

.hero__name {
  margin: 0;
  font-size: clamp(2.6rem, 8.4vw, 7.5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  max-width: 15ch;
}
.hero__name em { font-style: normal; color: var(--fg-dim); }

.hero__lede {
  margin: clamp(1.5rem, 4vh, 2.25rem) auto 0;
  max-width: 54ch;
  font-size: clamp(1rem, 1.45vw, 1.2rem);
  line-height: 1.6;
  color: var(--fg-dim);
}
.hero__lede strong { color: var(--fg); font-weight: 600; }

.hero__cta {
  margin-top: clamp(2rem, 5vh, 3rem);
  display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center;
}

.hero__note {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  font-size: 0.8rem; color: var(--fg-faint);
}

/* ---------- section furniture ---------- */

.section { position: relative; z-index: 1; padding: clamp(4rem, 11vh, 8.5rem) var(--gut); }

.section__head {
  display: flex; align-items: center; justify-content: center;
  gap: 0.75rem; margin-bottom: clamp(2.5rem, 6vh, 4rem);
  text-align: center;
}
.section__num {
  font-size: 0.72rem; font-weight: 600; color: var(--fg-faint);
  border: 1px solid var(--line); border-radius: var(--pill);
  padding: 0.2rem 0.6rem;
}
.section__title {
  margin: 0; font-size: 0.9rem; font-weight: 600;
  letter-spacing: -0.005em; color: var(--fg-dim);
}

/* ---------- work tiles ---------- */

/* minmax(0, 1fr) rather than 1fr: a bare 1fr floors at min-content, so the
   tall portrait poster widens its own column and knocks the grid off-square. */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
  max-width: 1320px; margin: 0 auto;
}
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.tile { position: relative; }
.tile--wide { grid-column: 1 / -1; }
.tile--tall { grid-row: span 2; }

.tile__link {
  display: block; text-decoration: none;
  position: relative; overflow: hidden;
  background: var(--bg-raised);
  border: 1px solid var(--line-soft);
  border-radius: var(--card);
  aspect-ratio: 16 / 9;
  transition: transform 0.5s var(--ease), border-color 0.4s var(--ease);
}
.tile__link:hover { transform: translateY(-4px); border-color: var(--line); }
.tile--wide .tile__link { aspect-ratio: 21 / 9; }
/* Width-driven, not height-driven: pairing height:100% with aspect-ratio makes
   the element derive its own width and overflow the column. */
.tile--tall .tile__link { aspect-ratio: 3 / 4; width: 100%; }
@media (max-width: 900px) {
  .tile--wide .tile__link { aspect-ratio: 16 / 9; }
  .tile--tall { grid-row: auto; }
  .tile--tall .tile__link { aspect-ratio: 16 / 9; }
}

.tile__img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.015);
  filter: saturate(0.9) brightness(0.85);
  transition: transform 0.9s var(--ease), filter 0.6s var(--ease);
}
.tile__link:hover .tile__img { transform: scale(1.06); filter: saturate(1) brightness(1); }

/* Silent preview, injected on hover intent and torn down on leave. */
.tile__preview {
  position: absolute; inset: 0; overflow: hidden;
  opacity: 0; transition: opacity 0.7s var(--ease);
  pointer-events: none; background: #000;
}
.tile__preview.is-playing { opacity: 1; }
.tile__preview iframe {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%; aspect-ratio: 16 / 9;
  border: 0; pointer-events: none;
}
/* Portrait tiles are taller than the 16:9 source, so drive from height instead
   or the video letterboxes inside the frame. */
.tile--tall .tile__preview iframe { width: auto; height: 100%; }

.tile__veil {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 55%);
  opacity: 0.9; transition: opacity 0.5s var(--ease);
}
.tile__link:hover .tile__veil { opacity: 0.45; }

.tile__play {
  position: absolute; inset: 0; margin: auto;
  width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.92);
  opacity: 0; transform: scale(0.8);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  pointer-events: none;
}
.tile__link:hover .tile__play, .tile__link:focus-visible .tile__play { opacity: 1; transform: scale(1); }
.tile__play svg { width: 15px; height: 15px; fill: #0a0a0c; margin-left: 3px; }

.tile__dur {
  position: absolute; right: 0.8rem; top: 0.8rem;
  padding: 0.2rem 0.6rem; border-radius: var(--pill);
  background: rgba(10,10,12,0.6);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 0.7rem; font-weight: 500; color: #fff;
  font-variant-numeric: tabular-nums;
}

.tile__meta { display: flex; align-items: baseline; gap: 0.7rem; margin-top: 0.9rem; padding: 0 0.15rem; }
.tile__idx { font-size: 0.72rem; color: var(--fg-faint); font-variant-numeric: tabular-nums; flex: none; }
.tile__name { margin: 0; font-size: clamp(0.95rem, 1.25vw, 1.1rem); font-weight: 600; letter-spacing: -0.015em; line-height: 1.35; }
.tile__kind { margin: 0.1rem 0 0; font-size: 0.8rem; color: var(--fg-faint); }

/* Verified engagement on the original post — the number a visitor can check. */
.tile__stat {
  display: inline-flex; align-items: center; gap: 0.35rem;
  margin-top: 0.5rem;
  font-size: 0.76rem; font-weight: 500;
  color: var(--fg-dim); text-decoration: none;
  border: 1px solid var(--line-soft); border-radius: var(--pill);
  padding: 0.24rem 0.7rem;
  transition: border-color 0.35s var(--ease), color 0.35s var(--ease);
}
.tile__stat:hover { border-color: var(--line); color: var(--fg); }
.tile__stat span { font-size: 0.7em; }

/* ---------- about ---------- */

.about__grid {
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  max-width: 1320px; margin: 0 auto;
}
@media (max-width: 820px) { .about__grid { grid-template-columns: 1fr; } }

.card {
  border: 1px solid var(--line-soft); border-radius: var(--card);
  background: rgba(255,255,255,0.022);
  padding: clamp(1.5rem, 3vw, 2.75rem);
}

.about__lead {
  margin: 0 0 1.25rem;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  line-height: 1.25; letter-spacing: -0.03em; font-weight: 600;
}
.about__body { margin: 0 0 1rem; color: var(--fg-dim); }
.about__body:last-child { margin-bottom: 0; }

.facts { margin: 0; display: grid; gap: 1.4rem; align-content: start; }
.facts div { border-top: 1px solid var(--line-soft); padding-top: 0.9rem; }
.facts div:first-child { border-top: 0; padding-top: 0; }
.facts dt { font-size: 0.75rem; font-weight: 600; color: var(--fg-faint); margin-bottom: 0.35rem; }
.facts dd { margin: 0; font-size: 0.93rem; line-height: 1.55; }

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

.contact { position: relative; z-index: 1; padding: clamp(4rem, 11vh, 8.5rem) var(--gut) clamp(2rem, 5vh, 3.5rem); }
.contact__inner { max-width: 1320px; margin: 0 auto; text-align: center; }

.lockup {
  width: auto;
  height: clamp(110px, 15vw, 190px);
  margin: 0 auto clamp(2rem, 5vh, 3.25rem);
  opacity: 0.95;
}

.contact__mail {
  display: inline-block; text-decoration: none;
  font-size: clamp(1.4rem, 5vw, 3.75rem);
  letter-spacing: -0.035em; line-height: 1.1; font-weight: 600;
  word-break: break-word;
  transition: opacity 0.35s var(--ease);
}
.contact__mail:hover { opacity: 0.6; }

.contact__links {
  margin-top: clamp(2rem, 5vh, 3rem);
  display: flex; gap: 0.7rem; flex-wrap: wrap; justify-content: center;
}

.colophon {
  margin-top: clamp(2.5rem, 7vh, 4.5rem);
  padding-top: 1.4rem; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: 0.75rem; color: var(--fg-faint);
}

/* ---------- timeline HUD ----------
   The page read as an NLE sequence: scroll position is the playhead, each
   section is a clip on the track, and the readout is running timecode. */

.tl {
  position: fixed; z-index: 45;
  left: 50%; transform: translateX(-50%) translateY(0);
  bottom: clamp(0.75rem, 2vw, 1.4rem);
  width: min(calc(100% - 2rem), 1120px);
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: clamp(0.75rem, 2vw, 1.5rem);
  padding: 0.6rem 0.9rem;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: rgba(18, 18, 22, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  opacity: 0; pointer-events: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.tl.is-up { opacity: 1; pointer-events: auto; }

.tl__tc {
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em;
  color: var(--fg); white-space: nowrap;
  display: flex; align-items: center; gap: 0.55rem;
}
.tl__rec {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--fg); flex: none;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

/* the track */
.tl__track {
  position: relative;
  display: flex; gap: 3px; height: 26px; align-items: stretch;
}
.tl__clip {
  position: relative; flex: 1 1 auto;
  border-radius: 5px; border: 0;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer; overflow: hidden;
  font: inherit; padding: 0;
  transition: background 0.35s var(--ease);
}
.tl__clip:hover { background: rgba(255, 255, 255, 0.15); }
/* Sprocket ticks — reads as film stock rather than a progress bar. */
.tl__clip::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    to right, rgba(255,255,255,0.13) 0 1px, transparent 1px 9px);
  opacity: 0.8;
}
.tl__clip > span {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 0.6rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-dim);
  white-space: nowrap; padding: 0 0.4rem;
}
.tl__clip.is-live > span { color: var(--fg); }
.tl__clip.is-live { background: rgba(255, 255, 255, 0.13); }

.tl__head {
  position: absolute; top: -4px; bottom: -4px; left: 0;
  width: 2px; background: var(--fg);
  border-radius: 2px; pointer-events: none;
  box-shadow: 0 0 12px rgba(255,255,255,0.55);
}
.tl__head::before {
  content: ""; position: absolute; top: -3px; left: 50%;
  width: 9px; height: 9px; border-radius: 2px;
  background: var(--fg); transform: translateX(-50%) rotate(45deg);
}

.tl__pct {
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem; color: var(--fg-faint); white-space: nowrap;
}

@media (max-width: 720px) {
  .tl { grid-template-columns: auto 1fr; padding: 0.5rem 0.75rem; }
  .tl__pct { display: none; }
  .tl__clip > span { display: none; }
  .tl__track { height: 20px; }
}
@media (prefers-reduced-motion: reduce) { .tl__rec { animation: none; } }

/* ---------- hero discipline strip ---------- */

.strip {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; width: min(100%, 900px);
  border-top: 1px solid var(--line-soft);
  padding-top: 1.1rem;
}
@media (max-width: 620px) { .strip { grid-template-columns: repeat(2, 1fr); gap: 1.25rem 1px; } }
.strip__n {
  display: block; font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.12em; color: var(--fg-faint); margin-bottom: 0.4rem;
  font-variant-numeric: tabular-nums;
}
.strip__t { display: block; font-size: 0.88rem; font-weight: 500; color: var(--fg-dim); }

/* ---------- client marquee ----------
   Two identical tracks side by side, the pair translated by exactly -50%.
   When the first track leaves, the second sits precisely where it began, so
   the loop has no seam. */

.marquee {
  position: relative; z-index: 1;
  padding: clamp(3rem, 8vh, 5.5rem) 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.marquee__label {
  text-align: center; margin: 0 0 clamp(1.5rem, 4vh, 2.5rem);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--fg-faint);
}
.marquee__row { display: flex; width: max-content; animation: slide 42s linear infinite; }
.marquee:hover .marquee__row { animation-play-state: paused; }
.marquee__track { display: flex; align-items: center; flex: none; }

/* Every logo arrives in its own brand colour. brightness(0) flattens each to
   black regardless of fills or gradients, invert(1) lifts it to white — one
   rule that works for single-colour marks, two-colour wordmarks and the
   fill-less Landell Mills paths alike. */
.logo {
  flex: none;
  width: auto;
  margin: 0 clamp(1.5rem, 3.5vw, 3.25rem);
  filter: brightness(0) invert(1);
  opacity: 0.42;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.logo:hover { opacity: 1; transform: translateY(-2px); }

/* Square marks need more height than wordmarks to read at equal weight. */
.logo--mark { height: clamp(26px, 3.4vw, 40px); }
.logo--word { height: clamp(17px, 2.3vw, 27px); }

.marquee__item {
  flex: none;
  padding: 0 clamp(1.5rem, 3.5vw, 3.25rem);
  font-size: clamp(1.05rem, 2.1vw, 1.85rem);
  font-weight: 600; letter-spacing: -0.025em; white-space: nowrap;
  color: var(--fg-faint);
  transition: color 0.4s var(--ease);
}
.marquee__item:hover { color: var(--fg); }
.marquee__dot {
  flex: none; width: 4px; height: 4px; border-radius: 50%;
  background: var(--line); align-self: center;
}

@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee__row { animation: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__row { flex-wrap: wrap; justify-content: center; width: 100%; }
  .marquee__track:last-child { display: none; }
  .marquee__track { flex-wrap: wrap; justify-content: center; }
}

/* ---------- about page ---------- */

.pagehead {
  position: relative; z-index: 1;
  padding: clamp(8rem, 20vh, 12rem) var(--gut) clamp(3rem, 8vh, 5rem);
  max-width: 1320px; margin: 0 auto; text-align: center;
}
.pagehead__title {
  margin: 0 auto;
  max-width: 20ch;
  font-size: clamp(2rem, 5.6vw, 4.5rem);
  line-height: 1.06; letter-spacing: -0.035em; font-weight: 600;
}
.pagehead__lede {
  margin: clamp(1.5rem, 4vh, 2.25rem) auto 0;
  max-width: 62ch; color: var(--fg-dim);
  font-size: clamp(1rem, 1.35vw, 1.15rem);
}

.stats {
  margin-top: clamp(2.5rem, 7vh, 4.5rem);
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--line-soft); padding-top: 1.75rem;
}
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 1.75rem; } }
.stats b {
  display: block; font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
/* Larger treatment for the standalone figures band on the home page. */
.stats--lg {
  max-width: 1320px; margin: 0 auto;
  border-top: 0; padding-top: 0;
}
.stats--lg b { font-size: clamp(2.4rem, 6.5vw, 5rem); }
.stats--lg span { max-width: 22ch; margin-inline: auto; }
.stats--lg > div { text-align: center; }
.stats span {
  display: block; margin-top: 0.5rem;
  font-size: 0.78rem; color: var(--fg-faint); line-height: 1.4;
}

/* timeline */
.track { list-style: none; margin: 0 auto; padding: 0; max-width: 1320px; }
.track__item {
  display: grid; grid-template-columns: 280px 1fr;
  gap: clamp(1.25rem, 4vw, 4rem);
  padding: clamp(1.75rem, 4vh, 2.75rem) 0;
  border-top: 1px solid var(--line-soft);
}
.track__item:first-child { border-top: 0; padding-top: 0; }
@media (max-width: 820px) { .track__item { grid-template-columns: 1fr; gap: 0.9rem; } }

.track__when { display: grid; align-content: start; gap: 0.3rem; }
.track__years { font-size: 0.82rem; font-weight: 600; color: var(--fg); }
.track__where { font-size: 0.85rem; color: var(--fg-dim); }
.track__city  { font-size: 0.78rem; color: var(--fg-faint); }

.track__role {
  margin: 0 0 0.5rem;
  font-size: clamp(1.1rem, 1.9vw, 1.5rem);
  font-weight: 600; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap;
}
.tag {
  font-size: 0.66rem; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-faint);
  border: 1px solid var(--line); border-radius: var(--pill);
  padding: 0.18rem 0.6rem;
}
.track__brief { margin: 0 0 0.9rem; color: var(--fg-dim); }
.track__brief b { color: var(--fg); font-weight: 600; }

.track__points { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.6rem; }
.track__points li {
  position: relative; padding-left: 1.15rem;
  color: var(--fg-dim); font-size: 0.95rem; line-height: 1.6;
}
.track__points li::before {
  content: ""; position: absolute; left: 0; top: 0.68em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--fg-faint);
}
.track__points a { color: var(--fg); text-underline-offset: 3px; }

/* project cards */
.cards {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
  max-width: 1320px; margin: 0 auto;
}
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .cards { grid-template-columns: 1fr; } }

.card__year {
  display: inline-block; margin-bottom: 0.9rem;
  font-size: 0.72rem; color: var(--fg-faint);
  border: 1px solid var(--line); border-radius: var(--pill);
  padding: 0.2rem 0.65rem;
}
.card__title { margin: 0 0 0.35rem; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
.card__org { margin: 0 0 0.8rem; font-size: 0.82rem; color: var(--fg-faint); }
.card__body { margin: 0; font-size: 0.92rem; color: var(--fg-dim); line-height: 1.6; }

/* craft */
.skills {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
  max-width: 1320px; margin: 0 auto;
}
@media (max-width: 900px) { .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .skills { grid-template-columns: 1fr; } }
.skills__group { border-top: 1px solid var(--line-soft); padding-top: 1.1rem; }
.skills__group h3 {
  margin: 0 0 0.9rem; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-faint);
}
.skills__group ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.skills__group li {
  font-size: 0.85rem; color: var(--fg-dim);
  border: 1px solid var(--line-soft); border-radius: var(--pill);
  padding: 0.35rem 0.85rem;
  transition: border-color 0.35s var(--ease), color 0.35s var(--ease);
}
.skills__group li:hover { border-color: var(--line); color: var(--fg); }

/* ---------- lightbox ---------- */

.lb {
  position: fixed; inset: 0; z-index: 90;
  display: none; place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(6, 6, 8, 0.94);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.lb.is-open { display: grid; }
.lb.is-visible { opacity: 1; }

.lb__frame {
  width: min(100%, 1400px); aspect-ratio: 16 / 9;
  background: #000; position: relative;
  border-radius: var(--card); overflow: hidden;
  transform: translateY(12px) scale(0.985);
  transition: transform 0.5s var(--ease);
}
.lb.is-portrait .lb__frame { aspect-ratio: 9 / 16; width: auto; height: min(84vh, 900px); }
.lb.is-visible .lb__frame { transform: none; }
.lb__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.lb__close {
  position: absolute; top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: 1px solid var(--line);
  color: var(--fg); cursor: pointer;
  display: grid; place-items: center; font-size: 1.1rem; line-height: 1;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.lb__close:hover { background: rgba(255,255,255,0.2); transform: rotate(90deg); }

.lb__cap {
  position: absolute; left: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 1.75rem);
  font-size: 0.82rem; font-weight: 500; color: var(--fg-dim);
}

body.is-locked { overflow: hidden; }

/* ---------- reveal ----------
   Heavier, slower curves than the default. Film motion settles; UI motion
   snaps, and snapping is what made the old version feel like a template. */

:root { --film: cubic-bezier(0.16, 1, 0.3, 1); }

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

/* Masked word reveal — words rise from behind their own baseline.
   The mask box must extend past the baseline or it shears the descenders off
   letters like g, y and p. Padding grows the clip area; the matching negative
   margin keeps the line box exactly where it was. */
.word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.22em;
  margin-bottom: -0.22em;
}
.word > i {
  display: inline-block; font-style: inherit; color: inherit;
  transform: translateY(115%);
  transition: transform 1.1s var(--film);
  transition-delay: var(--d, 0ms);
}
.is-lit .word > i { transform: none; }

/* Hero furniture fades up behind the headline. */
.lift { opacity: 0; transform: translateY(18px); }
.is-lit .lift {
  opacity: 1; transform: none;
  transition: opacity 1s var(--film) var(--d, 0ms), transform 1s var(--film) var(--d, 0ms);
}

/* Tiles wipe open rather than fading — closer to a cut than a dissolve. */
.tile.reveal { opacity: 1; transform: none; }
.tile.reveal .tile__link {
  clip-path: inset(0 0 100% 0);
  transform: scale(1.04);
  transition: clip-path 1.15s var(--film), transform 1.4s var(--film);
  transition-delay: var(--d, 0ms);
}
.tile.reveal.is-in .tile__link { clip-path: inset(0 0 0 0); transform: none; }
.tile.reveal .tile__meta {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.9s var(--film), transform 0.9s var(--film);
  transition-delay: calc(var(--d, 0ms) + 180ms);
}
.tile.reveal.is-in .tile__meta { opacity: 1; transform: none; }

/* ---------- cursor ----------
   Replaces the pointer over playable work with an explicit PLAY affordance.
   Pointer devices only; the real cursor stays for everything else. */

.cursor {
  position: fixed; top: 0; left: 0; z-index: 80;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--fg);
  pointer-events: none;
  mix-blend-mode: difference;
  transform: translate3d(-50%, -50%, 0);
  transition: width 0.45s var(--film), height 0.45s var(--film),
              background 0.45s var(--film), opacity 0.3s linear;
  opacity: 0;
  display: grid; place-items: center;
}
.cursor.is-awake { opacity: 1; }
.cursor__label {
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.16em;
  color: #0a0a0c; opacity: 0; transform: scale(0.7);
  transition: opacity 0.35s var(--film), transform 0.45s var(--film);
  white-space: nowrap;
}
.cursor.is-play { width: 86px; height: 86px; }
.cursor.is-play .cursor__label { opacity: 1; transform: none; }

@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

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

/* Without JS the reveal class never resolves — show everything. */
.no-js .reveal { opacity: 1; transform: none; }
.no-js .tile__play { display: none; }
