/* ============================================================
   Мария · Product Designer Portfolio
   Dark, cinematic. Native CSS, scroll-driven reveals.
   Tokens: one accent (teal), one radius system
   (buttons = pill, cards = 16px), one dark theme.
   ============================================================ */

:root {
  --bg:        #080608;   /* как фон первого экрана (hero) */
  --bg-2:      #0a0809;
  --surface:   #0f1218;
  --surface-2: #14181f;
  --line:      rgba(255, 255, 255, 0.08);
  --line-2:    rgba(255, 255, 255, 0.14);

  --text:      #f3f5f8;
  --text-dim:  #9aa1ad;
  --text-mute: #5c636e;

  --accent:    #FF090D;          /* red */
  --accent-dim:#b50008;
  --ink:       #ffffff;          /* light text on red buttons */

  --led:       #d8e2ff;          /* hero LED dot color */
  --glow-blue: #2747e8;
  --glow-rose: #ff5d86;
  --glow-warm: #ff9a5e;
  --white:     #ffffff;

  --shell:     1240px;
  --r-card:    16px;
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);

  --mx: 0;   /* pointer parallax, set from JS, range -1..1 */
  --my: 0;

  /* ---------- единая система отступов между секциями ---------- */
  --sp-sect-sm: clamp(80px, 12.5vh, 152px);
  --sp-sect-md: clamp(100px, 15vh, 176px);
  --sp-sect-lg: clamp(124px, 18.5vh, 212px);
  --sp-sect-xl: clamp(146px, 21vh, 240px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #4d4d4d; color: var(--text); }

a { color: inherit; text-decoration: none; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 56px);
}

/* fixed film grain + edge vignette */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: overlay;
  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='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
}

/* shared section heading */
.section__head {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin-bottom: clamp(36px, 6vw, 72px);
}

/* ============================ BUTTONS ============================ */
.btn {
  --pad-y: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: var(--pad-y) 26px;
  border-radius: 999px;            /* pill */
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
              box-shadow 0.25s var(--ease), color 0.25s var(--ease);
}
.btn--solid {
  background: var(--white);
  color: var(--bg);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
}
.btn--solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px 4px rgba(255, 255, 255, 0.35);
}
.btn--solid:active { transform: translateY(0) scale(0.985); }
.btn--lg {
  --pad-y: 20px;
  padding-inline: 38px;
  font-size: 1.15rem;
  font-family: "Inter", sans-serif;
  letter-spacing: -0.02em;
}

/* ============================ HERO ============================ */
.hero {
  position: relative;
  height: 100vh;
  background: #080608;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 4vh, 48px) clamp(24px, 4vw, 56px) clamp(20px, 3vh, 36px);
}

/* WebGL flow-field gradient canvas (hero-canvas, как на референсе) */
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}
/* fade the bottom of the hero into the page black so screen 1 → 2 has no seam */
.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(to bottom, rgba(8, 6, 8, 0), #080608);
  z-index: 0;
  pointer-events: none;
}

/* top row: tagline (left) + language switch (right) */
.hero__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.hero__tagline {
  font-size: 14px;
  color: #ffffff;
  line-height: 1.65;
  max-width: 40ch;
}
.hero__tagline em {
  font-family: "Inter", sans-serif;
  font-style: italic;
  color: rgba(243, 245, 248, 0.7);
}

.hero__lang { flex: 0 0 auto; }
.hero__lang-link {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243, 245, 248, 0.45);
  transition: color 0.2s var(--ease);
}
.hero__lang-link:hover { color: var(--text); }

/* bottom group: name + bar, flex-grows to push from tagline */
.hero__bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* name block — spans full width */
.hero__name {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  line-height: 0.88;
  letter-spacing: -0.4em;
  user-select: none;
}
.hero__name-first,
.hero__name-last {
  font-size: clamp(4rem, 13vw, 13rem);
  color: var(--text);
  white-space: nowrap;
}
.hero__name-first {
  font-family: "Inter", sans-serif;
  font-weight: 500;
}
.hero__name-last {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
}

/* gap between first and last name */
.hero__name {
  gap: 24px;
}

/* bottom bar inside hero */
.hero__bar {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: clamp(14px, 2vh, 22px);
  margin-top: clamp(8px, 1.5vh, 16px);
}
.hero__bar-links,
.hero__bar-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
}
.hero__bar-links a,
.hero__bar-nav a {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243,245,248,0.45);
  transition: color 0.2s var(--ease);
}
.hero__bar-links a:hover,
.hero__bar-nav a:hover { color: var(--text); }
.hero__bar-links .btn,
.hero__bar-links .btn:hover {
  color: var(--bg);
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.85rem;
}
.hero__bar-sep {
  color: rgba(243,245,248,0.2);
  font-size: 0.75rem;
}

/* ============================ DOCK NAV ============================ */
.dock {
  position: fixed;
  z-index: 50;
  bottom: clamp(18px, 3vh, 30px);
  left: 50%;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 22px);
  padding: 9px 9px 9px 22px;
  border-radius: 999px;
  background: rgba(16, 19, 26, 0.72);
  border: 1px solid var(--line-2);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
          backdrop-filter: blur(18px) saturate(1.4);
  max-width: calc(100vw - 28px);
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.dock.dock--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.dock__brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.02rem;
}
.dock__brand-last {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 700;
}
.dock__divider {
  width: 1px; height: 20px;
  background: var(--line-2);
}
.dock__links {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(10px, 1.4vw, 20px);
  list-style: none;
}
.dock__links a { white-space: nowrap; }
.dock__links a {
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: color 0.2s var(--ease);
  position: relative;
}
.dock__links a:hover { color: var(--text); }
.dock__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 100%; height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}
.dock__links a:hover::after { transform: scaleX(1); }
.dock__cta { padding: 11px 22px; font-size: 0.92rem; }

/* ============================ ABOUT ============================ */
.about {
  padding: var(--sp-sect-lg) 0 var(--sp-sect-sm);
  position: relative;
  /* clip blobs without breaking sticky child (no BFC created) */
  overflow: clip;
}
.about::before {
  content: '';
  position: absolute;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: none;
  filter: blur(60px);
  animation: ambient-drift 18s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
  top: -100px;
  left: -200px;
}
.about::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: none;
  filter: blur(80px);
  animation: ambient-drift 24s ease-in-out infinite alternate-reverse;
  pointer-events: none;
  z-index: 0;
  bottom: -100px;
  right: -100px;
}
@keyframes ambient-drift {
  0%   { transform: translate(0px, 0px) scale(1); }
  33%  { transform: translate(120px, 60px) scale(1.1); }
  66%  { transform: translate(40px, 140px) scale(0.95); }
  100% { transform: translate(200px, 80px) scale(1.08); }
}
.about__inner { position: relative; z-index: 1; }

.about__inner {
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: clamp(48px, 6vw, 96px);
  align-items: start;
}

.about__statement {
  font-size: clamp(1.6rem, 3.4vw, 2.9rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  max-width: 20ch;
}
.about__statement em {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  color: var(--text);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: clamp(16px, 1.6vw, 24px);
}
.metric {
  padding: clamp(20px, 2.4vw, 30px) 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.metric__num {
  font-family: "Inter", sans-serif;
  font-size: clamp(1.6rem, 3.4vw, 2.9rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
  white-space: nowrap;
}
.metric__num--word {
  font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 2.3rem);
}
.metric__label {
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.45;
}

/* ============================ CASES ============================ */
.cases {
  padding: var(--sp-sect-sm) 0 0;
}
.cases__head-sticky {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--bg);
}
.cases__head {
  padding-block: clamp(14px, 2vw, 22px);
  margin-bottom: clamp(4px, 1vw, 12px);
}
.cases__title {
  font-family: "Inter", sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--text);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

/* stacked sticky cards */
.cases__stack {
  display: flex;
  flex-direction: column;
}

.case-card {
  position: static;
  overflow: hidden;
  margin-top: 0;
}

.case-card__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(32px, 5vh, 64px);
}

.case-card__img {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}
.case-card__img img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s var(--ease);
}
.case-card:hover .case-card__img img { transform: scale(1.02); }

.case-card__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.case-card__num {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 500;
}
.case-card__name {
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
}
.case-card__desc {
  color: var(--text-dim);
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  line-height: 1.6;
  max-width: 44ch;
}
.case-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.case-card__tags span {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-mute);
  border: 1px solid var(--line-2);
  border-radius: 100px;
  padding: 4px 12px;
}
.case-card__btn {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  transition: opacity 0.2s;
}
.case-card__btn:hover { opacity: 0.7; }

/* ============================ SUPERPOWER ============================ */
.superpower {
  padding: var(--sp-sect-sm) 0;
  position: relative;
  overflow: hidden;
}
.superpower__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 8vw, 100px);
  align-items: center;
}
.superpower__label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 20px;
}
.superpower__heading {
  font-family: "Inter", sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}
.superpower__heading em {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  color: var(--text);
}
.superpower__body {
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 44ch;
}

/* visual rings */
.superpower__visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 420px;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.superpower__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 9, 13, 0.2);
}
.superpower__ring--1 { width: 100%; height: 100%; animation: ring-spin 28s linear infinite; }
.superpower__ring--2 { width: 72%; height: 72%; border-color: rgba(255, 9, 13, 0.35); animation: ring-spin 18s linear infinite reverse; }
.superpower__ring--3 { width: 44%; height: 44%; border-color: rgba(255, 9, 13, 0.6); animation: ring-spin 12s linear infinite; }
@keyframes ring-spin { to { transform: rotate(360deg); } }
.superpower__ring--1::before,
.superpower__ring--2::before,
.superpower__ring--3::before {
  content: '';
  position: absolute;
  top: -4px; left: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 4px rgba(255,9,13,0.7);
  transform: translateX(-50%);
}
.superpower__core {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.superpower__core span {
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-dim);
}
.superpower__core span:nth-child(3) { color: var(--text); }

/* ============================ EXPERIENCE ============================ */
.exp { padding: var(--sp-sect-md) 0; }
.timeline { list-style: none; display: grid; }
.role {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(40px, 5vw, 64px) 0;
  border-top: 1px solid var(--line);
}
.role:last-child { border-bottom: 1px solid var(--line); }
.role__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 36px;
  align-self: start;
}
.role__years {
  font-family: "Inter", sans-serif;
  font-size: 0.86rem;
  color: var(--text-mute);
}
.role__tag {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.role__company {
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 16px;
}
.role__about {
  color: var(--text-dim);
  font-size: 1.02rem;
  max-width: 52ch;
  margin-bottom: 28px;
}
.wins {
  list-style: none;
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}
.wins li {
  position: relative;
  padding-left: 26px;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--text);
}
.wins li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
}
.wins b { font-weight: 700; color: var(--text); }
.tasks {
  list-style: none;
  display: grid;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.tasks li {
  position: relative;
  padding-left: 26px;
  color: var(--text-dim);
  font-size: 0.96rem;
  line-height: 1.5;
}
.tasks li::before {
  content: "";
  position: absolute;
  left: 4px; top: 0.7em;
  width: 8px; height: 1.5px;
  background: var(--text-mute);
}

/* ============================ GALLERY (frames) ============================ */
.gallery { padding: var(--sp-sect-sm) 0 var(--sp-sect-sm); }
.gallery .section__head { margin-bottom: clamp(28px, 4vw, 48px); }
.gallery__strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding: 6px clamp(20px, 5vw, 56px) 22px;
  scrollbar-width: none;
  cursor: grab;
}
.gallery__strip:active { cursor: grabbing; }
.gallery__strip::-webkit-scrollbar { display: none; }
.frame {
  flex: 0 0 auto;
  height: clamp(300px, 52vh, 520px);
  margin: 0;
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  scroll-snap-align: center;
}
.frame--tall { aspect-ratio: 3 / 4; }
.frame--wide { aspect-ratio: 4 / 3; }
.frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.82) contrast(1.05);
  transition: transform 0.7s var(--ease), filter 0.5s var(--ease);
}
.frame:hover img { transform: scale(1.05); filter: grayscale(0.35) brightness(0.96); }

/* ============================ STUDIO (floating scatter) ============================ */
.studio {
  position: relative;
  overflow: hidden;
  min-height: clamp(820px, 124vh, 1320px);
  display: flex;
  align-items: center;
  padding: var(--sp-sect-lg) 0;
}
.studio__scatter {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--shell);
  z-index: 1;
  perspective: 900px;
  perspective-origin: 50% 45%;
}
.studio__pic {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w, 120px);
  margin: 0;
  transform: translate(calc(-50% + var(--px, 0px)), calc(-50% + var(--py, 0px) + var(--sy, 0px))) scale(var(--rs, 1));
  cursor: pointer;
  will-change: transform, opacity;
}
.studio__pic-float {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.7);
  animation: studio-float 9s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.7s);
  transition: box-shadow 0.4s var(--ease);
}
/* white depth-of-field veil — stronger for frames pushed further back */
.studio__pic-float::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: var(--ov, 0);
  pointer-events: none;
}
.studio__pic img {
  display: block;
  width: 100%;
  height: auto;
  transition: filter 0.5s var(--ease), transform 0.7s var(--ease);
}
.studio__pic:hover { z-index: 6; }
.studio__pic:hover .studio__pic-float {
  box-shadow: 0 26px 60px -24px rgba(0, 0, 0, 0.85);
}
.studio__pic:hover img { filter: grayscale(0) brightness(1); transform: scale(1.06); }
@keyframes studio-float {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50%      { transform: translateY(-14px) rotate(1.2deg); }
}

.studio__inner {
  position: relative;
  z-index: 3;
  text-align: center;
  pointer-events: none;
}
.studio__label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 18px;
}
.studio__heading {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: clamp(3rem, 11vw, 9rem);
  line-height: 0.8;
  letter-spacing: -0.04em;
}
.studio__heading em {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  color: var(--text);
}
.studio__body {
  margin: 26px auto 0;
  max-width: 50ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dim);
}

/* ============================ LIGHTBOX ============================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vw, 64px);
  background: rgba(4, 5, 8, 0.92);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 14px;
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.9);
  transform: scale(0.96);
  transition: transform 0.35s var(--ease);
}
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__close {
  position: absolute;
  top: clamp(16px, 3vw, 32px);
  right: clamp(16px, 3vw, 32px);
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s var(--ease);
}
.lightbox__close:hover { background: var(--accent); }

/* ============================ RESULTS (bento) ============================ */
.results { padding: var(--sp-sect-md) 0; }
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(170px, auto);
  gap: 14px;
}
.tile {
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  overflow: hidden;
  padding: clamp(24px, 2.6vw, 36px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  background: var(--bg);
}
.tile--hero  { grid-column: span 3; grid-row: span 2; background: var(--bg); }
.tile--photo { grid-column: span 3; padding: 0; }
.tile--accent{ grid-column: span 2; background: var(--bg); }
.tile--split { grid-column: span 4; flex-direction: row; gap: 0; }
.tile--wide  { grid-column: span 6; }

.tile--photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.9) brightness(0.85);
  transition: transform 0.7s var(--ease), filter 0.5s var(--ease);
}
.tile--photo:hover img { transform: scale(1.05); filter: saturate(1.05) brightness(1); }

.tile__num {
  font-family: "Inter", sans-serif;
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--text);
}
.tile--accent .tile__num {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text);
}
.tile__text { color: var(--text-dim); font-size: 0.98rem; line-height: 1.5; max-width: 32ch; }
.tile__text--lg {
  color: var(--text);
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  max-width: 40ch;
}
.split {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: clamp(20px, 2vw, 30px);
}
.split + .split { border-left: 1px solid var(--line); }
.split__num {
  font-family: "Inter", sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.9;
}
.split__cap { color: var(--text-dim); font-size: 0.95rem; }

/* ============================ CONTACT ============================ */
.contact {
  padding: var(--sp-sect-lg) 0 var(--sp-sect-xl);
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  width: 70vw; height: 70vw;
  left: 50%; top: 50%;
  transform: translate(-50%, -40%);
  background: none;
  filter: blur(40px);
  pointer-events: none;
}
.contact__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}
.contact__head {
  font-size: clamp(2.2rem, 6.5vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.contact__sub {
  color: var(--text-dim);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  max-width: 42ch;
}
.contact .btn--lg { margin-top: 16px; }

/* ============================ FOOTER ============================ */
.foot {
  border-top: 1px solid var(--line);
  padding: 30px 0 calc(30px + 70px);   /* leave room for the dock */
}
.foot__inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-mute);
  font-size: 0.9rem;
}
.foot__inner span:first-child { color: var(--text); font-weight: 600; }

/* ============================ SCROLL REVEAL ============================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.reveal.in { opacity: 1; transform: none; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 980px) {
  .about__inner { grid-template-columns: 1fr 340px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .superpower__inner { grid-template-columns: 1fr; }
  .superpower__visual { max-width: 280px; }
  .tile--hero, .tile--photo, .tile--accent, .tile--split, .tile--wide { grid-column: span 2; grid-row: auto; }
  .tile--photo { min-height: 220px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }

  /* hero */
  .hero { padding-inline: 20px; }
  /* stack name vertically so -0.4em kerning doesn't collapse letters at small sizes */
  .hero__name {
    flex-direction: column;
    align-items: flex-start;
    letter-spacing: -0.04em;
    gap: 0;
    line-height: 1;
  }
  .hero__name-first, .hero__name-last { font-size: clamp(3rem, 14vw, 5.5rem); }
  .hero__tagline br { display: none; }
  .hero__bar-nav { display: none; }

  /* about — overflow: hidden safe here (sticky photo already removed) */
  .about { overflow: hidden; }
  .about__inner { grid-template-columns: 1fr; }
  .about__statement { max-width: 100%; margin-bottom: clamp(40px, 8vw, 64px); }

  /* cases */
  .case-card__inner { grid-template-columns: 1fr; }

  /* experience */
  .role { grid-template-columns: 1fr; gap: 18px; }
  .role__meta { position: static; flex-direction: row; align-items: baseline; gap: 14px; }

  /* studio — smaller scatter, drop the densest pics so the heading stays readable */
  .studio { min-height: 100vh; }
  .studio__pic { width: calc(var(--w, 120px) * 0.62) !important; }
  .studio__pic:nth-child(4),
  .studio__pic:nth-child(5),
  .studio__pic:nth-child(7) { display: none; }

  /* metrics & bento */
  .metrics { grid-template-columns: 1fr; }
  .tile--split { flex-direction: column; }
  .split + .split { border-left: none; border-top: 1px solid var(--line); }

  /* dock */
  .dock {
    padding: 6px 6px 6px 14px;
    gap: 8px;
  }
  .dock__brand { display: none; }
  .dock__divider { display: none; }
  .dock__links { gap: 10px; }
  .dock__links a { font-size: 0.82rem; }
  .dock__cta { padding: 8px 16px; font-size: 0.82rem; }
}

@media (max-width: 460px) {
  /* contact — break tag is unnecessary on single-column layout */
  .contact__head br { display: none; }

  /* dock — at very small screens keep just 2 links + CTA */
  .dock__links li:nth-child(3) { display: none; }
  .dock { padding: 5px 5px 5px 12px; gap: 6px; }
  .dock__links a { font-size: 0.78rem; }
  .dock__cta { padding: 7px 14px; font-size: 0.78rem; }

  .bento { grid-template-columns: 1fr; }
  .tile--hero, .tile--photo, .tile--accent, .tile--split, .tile--wide { grid-column: span 1; }
}

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

/* solid fallback when transparency is reduced */
@media (prefers-reduced-transparency: reduce) {
  .dock { background: #0f1218; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
