/* ==========================================================
   Alexander Nguyen — Portfolio
   One dark theme: black base, warm light leaks, icy headlines,
   amber accent, handwritten notes.
   ========================================================== */

:root {
  --bg: #050505;
  --tile: #171717;
  --white: #f5f5f5;
  --muted: #9e9e9e;
  --grey: #333333;
  --line: rgba(245, 245, 245, 0.1);
  --amber: #ffa142;
  --ink: #0d0d0d;

  --leak-orange: #ff7314;
  --leak-cream: #ffdb9e;
  --leak-red: #d91a38;

  --icy: linear-gradient(180deg, #ffffff 0%, #edf5ff 55%, #8cbfff 100%);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --script: "Caveat", "Segoe Print", cursive;

  --pad: clamp(20px, 2.8vw, 40px);
  --section: clamp(80px, 9vw, 140px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

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

/* Film grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 200;
  background: var(--amber); color: var(--ink); padding: 10px 16px;
}
.skip-link:focus { left: 8px; }

.container { padding-inline: var(--pad); position: relative; }

/* ---------- Type ---------- */
.icy {
  background: var(--icy);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.display {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  line-height: 0.9;
  margin: 0;
  width: fit-content;
  max-width: 100%;
}

.section-title {
  font-weight: 500;
  font-size: clamp(44px, 7.6vw, 110px);
  letter-spacing: -0.05em;
  line-height: 0.9;
  color: var(--grey);
  text-transform: uppercase;
  margin: 0;
}

.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0;
}

.lead {
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0;
}

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

.note {
  font-family: var(--script);
  color: var(--amber);
  font-size: clamp(24px, 2.3vw, 34px);
  line-height: 1;
  position: absolute;
  transform: rotate(-6deg);
  white-space: nowrap;
  pointer-events: none;
  z-index: 3;
}
.note--ring::after {
  content: "";
  position: absolute;
  inset: -14px -22px;
  border: 2px solid var(--amber);
  border-radius: 50%;
}

/* ---------- Light leaks ---------- */
.leaks { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.leak {
  position: absolute;
  border-radius: 50%;
  filter: blur(var(--b, 120px));
  opacity: var(--o, 0.8);
  background: var(--c, var(--leak-orange));
  animation: drift 18s ease-in-out infinite alternate;
}
.leak--streak {
  border-radius: 0;
  background: linear-gradient(90deg, rgba(26, 89, 255, 0.9), rgba(51, 230, 242, 0.8) 30%, rgba(255, 217, 77, 0.8) 55%, rgba(255, 115, 38, 0.6) 80%, transparent);
  transform: rotate(28deg);
}
@keyframes drift {
  from { translate: 0 0; }
  to { translate: -30px 24px; }
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 44px;
  font-size: 16px;
  font-weight: 500;
  background: var(--amber);
  color: var(--ink);
  transition: transform 0.3s var(--ease), background 0.3s;
}
.btn:hover { transform: translateY(-2px); background: #ffb468; }
.btn--ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1.5px rgba(245, 245, 245, 0.3); }
.btn--ghost:hover { background: rgba(245, 245, 245, 0.06); }

.link {
  font-weight: 600;
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 5px;
  transition: text-underline-offset 0.2s;
}
.link:hover { text-underline-offset: 8px; }
.see-more { font-size: 13px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }

.tag {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(245, 245, 245, 0.2);
  font-size: 14px;
  font-weight: 500;
}
.tags { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }

/* ---------- Placeholder photo ---------- */
.ph {
  background: var(--tile);
  border: 1px solid rgba(245, 245, 245, 0.08);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}
button.ph { padding: 0; width: 100%; font: inherit; color: var(--muted); }
.ph > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding-inline: var(--pad);
  background: rgba(5, 5, 5, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__brand { display: flex; align-items: baseline; gap: 16px; }
.nav__brand strong { font-weight: 800; font-size: 15px; letter-spacing: 0.02em; }
.nav__brand span { font-size: 13px; color: var(--muted); }
.nav__links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav__links a { font-size: 15px; font-weight: 500; position: relative; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 1px;
  background: currentColor; transition: right 0.3s var(--ease);
}
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { right: 0; }
.nav__links .is-accent { color: var(--amber); }
.nav__toggle { display: none; width: 44px; height: 44px; position: relative; }
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  position: absolute; left: 10px; right: 10px; height: 2px; background: var(--white);
  transition: transform 0.3s var(--ease), opacity 0.2s; content: "";
}
.nav__toggle span { top: 21px; }
.nav__toggle span::before { left: 0; right: 0; top: -7px; }
.nav__toggle span::after { left: 0; right: 0; top: 7px; }
.nav.is-open .nav__toggle span { background: transparent; }
.nav.is-open .nav__toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid rgba(245, 245, 245, 0.08);
  overflow: hidden;
  padding-block: 14px;
  position: relative;
  z-index: 2;
  background: var(--bg);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee__group { display: flex; gap: 20px; padding-right: 20px; }
.marquee span {
  font-size: clamp(26px, 2.5vw, 36px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--amber);
  white-space: nowrap;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Section shell ---------- */
.section { padding-block: var(--section); position: relative; overflow: hidden; }
.section--line { border-top: 1px solid var(--line); }
.section > *:not(.leaks):not(.note) { position: relative; z-index: 1; }
.section > .leaks { position: absolute; z-index: 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 48px;
}
.section-head .num { font-size: 24px; font-weight: 500; color: var(--muted); }

/* ==========================================================
   HOME
   ========================================================== */
.hero {
  position: relative;
  min-height: 780px;
  padding: 96px var(--pad) 96px;
  overflow: hidden;
  isolation: isolate;
}
.hero__content { position: relative; z-index: 2; }
.hero__eyebrow { font-size: 14px; font-weight: 500; letter-spacing: 0.08em; margin: 0 0 28px; }
.hero__name { font-size: clamp(42px, 10.4vw, 150px); }
.hero__tagline {
  font-weight: 600;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 640px;
  margin: 40px 0 32px;
}
.hero__stack {
  position: absolute;
  z-index: 1;
  right: clamp(40px, 9vw, 140px);
  top: 110px;
  width: clamp(240px, 22vw, 320px);
  aspect-ratio: 4 / 5;
}
.hero__stack .ph { position: absolute; inset: 0; transition: transform 0.6s var(--ease); }
.hero__stack .ph:first-child { transform: rotate(6deg) translate(-40px, -50px); }
.hero__stack .ph:last-child { transform: rotate(-4deg); box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6); }
.hero__stack:hover .ph:first-child { transform: rotate(9deg) translate(-70px, -60px); }
.hero__stack:hover .ph:last-child { transform: rotate(-2deg) translateY(-6px); }
.hero .note { right: clamp(40px, 9vw, 160px); bottom: 110px; }

/* About */
.about__grid {
  display: grid;
  grid-template-columns: minmax(280px, 520px) 1fr;
  gap: clamp(40px, 5.5vw, 80px);
  align-items: start;
}
.about__portrait { aspect-ratio: 520 / 640; }
.about__text { display: grid; gap: 32px; padding-top: 24px; }
.about__bio { color: var(--muted); margin: 0; }
.facts {
  display: flex; flex-wrap: wrap; gap: 24px 48px; padding-top: 24px;
  border-top: 1px solid var(--line); margin: 0;
}
.facts dt { font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); }
.facts dd { margin: 6px 0 0; font-weight: 500; }
.about .note { left: min(470px, 34vw); top: 250px; }

/* Languages carousel */
.carousel__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 48px; }
.carousel__head .section-title { font-size: clamp(36px, 5vw, 72px); }
.carousel__arrows { display: flex; gap: 12px; }
.round-btn {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px;
  box-shadow: inset 0 0 0 1.5px rgba(245, 245, 245, 0.25);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.round-btn--accent { color: var(--amber); box-shadow: inset 0 0 0 1.5px var(--amber); }
.round-btn:hover { background: var(--amber); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--amber); }
.round-btn:disabled { opacity: 0.3; pointer-events: none; }
.carousel__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
  margin: 0;
  list-style: none;
  padding-left: 0;
}
.carousel__track::-webkit-scrollbar { display: none; }
.lang {
  flex: 0 0 280px;
  height: 320px;
  scroll-snap-align: start;
  background: var(--tile);
  border: 1px solid rgba(245, 245, 245, 0.08);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.lang:hover { border-color: rgba(255, 161, 66, 0.5); transform: translateY(-6px); }
.lang__glyph { font-weight: 900; font-size: 72px; letter-spacing: -0.04em; line-height: 1; }
.lang h3 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.lang p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.carousel__dots { display: flex; gap: 8px; margin-top: 32px; }
.carousel__dots button { width: 8px; height: 4px; border-radius: 2px; background: rgba(245, 245, 245, 0.25); transition: width 0.3s var(--ease), background 0.3s; padding: 0; }
.carousel__dots button[aria-current="true"] { width: 32px; background: var(--amber); }

/* Home feature sections */
.feature-title { font-size: clamp(38px, 9vw, 130px); }
.feature-it { display: grid; grid-template-columns: 1.8fr 1fr; gap: 48px; align-items: start; }
.feature-it .cover { aspect-ratio: 860 / 500; }
.feature-it__details { display: grid; gap: 28px; font-size: 20px; }
.feature-it__details p { margin: 0; }
.feature-link { display: block; }
.feature-link:hover .cover img { transform: scale(1.04); }
.cover img { transition: transform 0.8s var(--ease); }

.photo-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: end; }
.photo-row .ph:nth-child(1) { height: 420px; }
.photo-row .ph:nth-child(2) { height: 540px; }
.photo-row .ph:nth-child(3) { height: 360px; }
.photo-row .ph:nth-child(4) { height: 460px; }
.feature-foot { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 32px; font-size: 20px; }

/* ---------- Contact footer ---------- */
.contact { position: relative; overflow: hidden; padding: 80px var(--pad) 40px; }
.contact__title { font-size: clamp(40px, 8.3vw, 120px); }
.contact__row {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  margin: 28px 0 120px; position: relative; z-index: 1;
}
.contact__email { font-size: clamp(18px, 1.6vw, 22px); font-weight: 500; text-decoration: underline; text-underline-offset: 6px; }
.contact__email:hover { color: var(--amber); }
.socials { display: flex; gap: 12px; list-style: none; margin: 0; padding: 0; font-size: 15px; font-weight: 500; }
.socials li + li::before { content: "·"; margin-right: 12px; color: var(--muted); }
.socials a:hover { color: var(--amber); }
.contact small { color: var(--muted); font-size: 13px; position: relative; z-index: 1; }

/* ==========================================================
   INNER PAGES
   ========================================================== */
.page-head { position: relative; overflow: hidden; padding: 140px var(--pad); }
.page-head .display { font-size: clamp(40px, 10.4vw, 150px); position: relative; z-index: 1; }
.page-head p:not(.note) { position: relative; z-index: 1; font-size: 22px; max-width: 720px; margin: 24px 0 0; }

/* IT index */
.index { list-style: none; margin: 0 0 var(--section); padding: 0 var(--pad); }
.index a, .index .index__row {
  display: grid;
  grid-template-columns: 48px 1fr auto 80px 24px;
  gap: 40px;
  align-items: center;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.index__num { font-weight: 500; color: var(--amber); }
.index__name { font-size: clamp(32px, 3.4vw, 48px); font-weight: 500; letter-spacing: -0.03em; transition: transform 0.4s var(--ease); }
.index a:hover .index__name { transform: translateX(12px); }
.index__cat { font-size: 16px; }
.index__year { font-size: 16px; font-weight: 500; color: var(--muted); }
.index__arrow { color: var(--amber); font-size: 24px; }
.index .is-soon { color: var(--grey); }
.index .is-soon .index__num { color: var(--muted); }

/* Case study */
.case-title { font-size: clamp(34px, 10.4vw, 150px); }
.case-intro { display: grid; grid-template-columns: 1.4fr 1fr; gap: 80px; align-items: start; margin-bottom: 72px; }
.meta { margin: 0; display: grid; gap: 20px; }
.meta div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.meta dt { font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); }
.meta dd { margin: 0; font-weight: 500; text-align: right; }

.phones { display: flex; justify-content: center; gap: 24px; padding-block: 24px 72px; }
.phone { display: grid; gap: 16px; justify-items: center; }
.phone:nth-child(even) { padding-top: 48px; }
.phone__screen {
  width: 300px;
  aspect-ratio: 393 / 852;
  border-radius: 44px;
  box-shadow: 0 0 0 6px rgba(245, 245, 245, 0.18), 0 30px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  background: linear-gradient(160deg, #1d1d1d, #0e0e0e);
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
  transition: transform 0.5s var(--ease);
}
.phone__screen:hover { transform: translateY(-10px); }
.phone__screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone__screen span { font-size: 15px; font-weight: 500; }
.phone__screen small { display: block; color: var(--muted); font-size: 13px; }
.phone figcaption { font-size: 14px; font-weight: 500; color: var(--muted); }

.story {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px;
  padding-top: 40px; border-top: 1px solid var(--line); margin-bottom: 56px;
}
.story h3 { margin: 0 0 16px; }
.story p { margin: 0; line-height: 1.6; }

.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; }
.slot {
  height: 320px; border: 1.5px dashed rgba(245, 245, 245, 0.2);
  display: grid; place-content: center; text-align: center; gap: 8px;
}
.slot strong { color: var(--amber); font-weight: 500; }
.slot span { color: var(--muted); font-weight: 500; font-size: 20px; }

/* Photography */
.page-head .note { right: var(--pad); bottom: 120px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 var(--pad) 56px; }
.filter {
  padding: 10px 20px; border-radius: 999px; font-size: 15px; font-weight: 500;
  box-shadow: inset 0 0 0 1px rgba(245, 245, 245, 0.25);
  transition: background 0.2s, color 0.2s;
}
.filter:hover { background: rgba(245, 245, 245, 0.08); }
.filter[aria-pressed="true"] { background: var(--amber); color: var(--ink); box-shadow: none; }

.featured { padding: 0 var(--pad) var(--section); position: relative; }
.featured__img { width: 100%; aspect-ratio: 1360 / 760; cursor: zoom-in; }
.featured__cap { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 16px; }
.featured__cap h2 { margin: 0; font-size: 28px; font-weight: 500; letter-spacing: -0.02em; }
.featured__cap p { margin: 0; font-size: 14px; }
.featured .note { right: calc(var(--pad) + 40px); top: 24px; }

.series-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: end;
}
.series-card .cover { aspect-ratio: 4 / 5; }
.series-card:nth-child(2) .cover { aspect-ratio: 3 / 4; }
.series-card__row { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 12px; }
.series-card h3 { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }
.series-card p { margin: 4px 0 0; font-size: 13px; }
.series-card.is-soon .cover { border-style: dashed; border-color: rgba(245, 245, 245, 0.2); background: transparent; }
.series-card.is-soon h3 { color: var(--muted); }

.gallery-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 48px; }
.gallery { columns: 4 260px; column-gap: 16px; }
.gallery__item {
  break-inside: avoid;
  margin: 0 0 16px;
  width: 100%;
  display: block;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--tile);
}
.gallery__item img { width: 100%; height: auto; transition: transform 0.8s var(--ease), filter 0.4s; }
.gallery__item:hover img { transform: scale(1.04); filter: brightness(1.08); }
.gallery__item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 16px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  font-size: 14px; font-weight: 500; text-align: left;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.gallery__item:hover figcaption,
.gallery__item:focus-visible figcaption { opacity: 1; transform: none; }
.gallery__empty { color: var(--muted); padding: 40px 0; }
.gallery__item.is-hidden { display: none; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(3, 3, 3, 0.95);
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  grid-template-rows: 88px 1fr 96px;
  align-items: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  overflow: hidden;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox .leaks { z-index: 0; }
.lightbox > *:not(.leaks) { position: relative; z-index: 1; }
.lightbox__count { grid-column: 1 / 3; grid-row: 1; padding-left: 48px; font-weight: 500; }
.lightbox__close {
  grid-column: 3; grid-row: 1; justify-self: end; margin-right: 48px;
  padding: 10px 18px; border-radius: 999px; font-size: 15px; font-weight: 500; white-space: nowrap;
  box-shadow: inset 0 0 0 1.5px rgba(245, 245, 245, 0.3);
}
.lightbox__close:hover { background: var(--white); color: var(--ink); }
.lightbox__stage { grid-column: 2; grid-row: 2; height: 100%; display: grid; place-items: center; min-height: 0; }
.lightbox__img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transition: opacity 0.25s;
}
.lightbox__img.is-loading { opacity: 0; }
.lightbox__prev { grid-column: 1; grid-row: 2; justify-self: center; }
.lightbox__next { grid-column: 3; grid-row: 2; justify-self: center; }
.lightbox__cap { grid-column: 2; grid-row: 3; display: flex; justify-content: space-between; gap: 16px; align-self: start; padding-top: 20px; font-weight: 500; }
.lightbox__cap span:last-child { color: var(--amber); font-size: 14px; }
body.no-scroll { overflow: hidden; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1100px) {
  .hero__stack { opacity: 0.55; right: 24px; }
  .feature-it, .case-intro { grid-template-columns: 1fr; gap: 40px; }
  .phones { flex-wrap: wrap; }
  .phone__screen { width: 240px; }
  .index a, .index .index__row { grid-template-columns: 40px 1fr auto 24px; gap: 24px; }
  .index__year { display: none; }
}

@media (max-width: 820px) {
  body { font-size: 17px; }
  .nav__brand span { display: none; }
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; gap: 0;
    background: rgba(5, 5, 5, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--pad) 24px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0.25s;
  }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transform: none; }
  .nav__links a { display: block; padding: 14px 0; font-size: 22px; }
  .nav__links a::after { display: none; }

  .hero { min-height: auto; padding-top: 64px; padding-bottom: 72px; }
  .hero__stack { position: relative; right: auto; top: auto; margin: 56px auto 0; opacity: 1; width: 70%; max-width: 300px; }
  .hero .note { position: relative; display: inline-block; right: auto; bottom: auto; margin: 40px 0 0 24px; }

  .about__grid { grid-template-columns: 1fr; }
  .about__portrait { max-width: 420px; }
  .about .note { left: auto; right: var(--pad); top: 200px; }

  .photo-row { grid-template-columns: 1fr 1fr; }
  .photo-row .ph:nth-child(n) { height: 260px; }
  .photo-row .ph:nth-child(2) { height: 340px; }

  .phones { gap: 16px; }
  .phone__screen { width: 42vw; border-radius: 28px; box-shadow: 0 0 0 4px rgba(245,245,245,.18), 0 20px 40px rgba(0,0,0,.6); }
  .phone:nth-child(even) { padding-top: 32px; }
  .story { grid-template-columns: 1fr; gap: 32px; }
  .slots { grid-template-columns: 1fr; }
  .slot { height: 200px; }
  .series-grid { grid-template-columns: 1fr; }
  .section-head { flex-wrap: wrap; }
  .page-head { padding-block: 96px 72px; }
  .page-head .note { position: relative; display: inline-block; right: auto; bottom: auto; margin: 40px 0 0 24px; }
  .featured .note { display: none; }
  .section > .note:not(.about .note) { display: none; }
  .carousel__head { flex-wrap: wrap; }
  .hero__tagline { max-width: none; }
  .index__cat { display: none; }
  .index a, .index .index__row { grid-template-columns: 32px 1fr 24px; }

  .lightbox { grid-template-columns: 1fr 1fr; grid-template-rows: 72px 1fr auto 88px; }
  .lightbox__count { grid-column: 1; padding-left: 20px; }
  .lightbox__close { grid-column: 2; margin-right: 20px; }
  .lightbox__stage { grid-column: 1 / -1; padding-inline: 12px; }
  .lightbox__cap { grid-column: 1 / -1; grid-row: 3; padding: 16px 20px 0; flex-direction: column; gap: 2px; }
  .lightbox__prev { grid-column: 1; grid-row: 4; }
  .lightbox__next { grid-column: 2; grid-row: 4; }
}

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