/* ============================================================
   Video editor portfolio
   ============================================================ */

:root {
  --u: clamp(0.82px, calc(100vw / 1440), 1.4px);

  --bg: #000;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #f4f4f4;
  --text-2: #9a9a9a;
  --text-3: #5f5f5f;
  --white: #f5f5f5;
  --cream: #d8ccb2;
  --cream-2: #b9b09d;
  --rec: #ff3b30;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --hero-font: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
/* smooth scrolling is handled by script.js (one glide engine for wheel, keys and links) */
html { -webkit-text-size-adjust: 100%; scrollbar-color: #2a2a2a #000; scrollbar-width: thin; color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip; /* "clip" (not hidden) so the sticky hero keeps working */
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.7); outline-offset: 3px; }

/* shared bits */
.rec {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--rec);
  box-shadow: 0 0 8px rgba(255, 59, 48, 0.8);
  animation: blink 1.6s steps(1, end) infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }

.play-btn {
  position: absolute;
  left: 50%; top: 50%;
  display: grid; place-items: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  transform: translate(-50%, -50%) scale(0.85);
  opacity: 0;
  transition: opacity 0.35s, transform 0.5s var(--ease), background 0.3s;
  z-index: 2;
}
.play-btn svg { width: 22px; height: 22px; fill: #fff; margin-left: 3px; }
.play-btn.big { width: 84px; height: 84px; opacity: 1; transform: translate(-50%, -50%); }
.play-btn.big svg { width: 32px; height: 32px; }

.clip-time {
  position: absolute;
  top: 10px; right: 10px;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: #eee;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  z-index: 2;
}
/* preview video injected by script.js sits over the poster image */
.clip-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s;
}
.clip-video.on { opacity: 1; }

/* ============ HERO ============ */
.hero {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  color: var(--cream);
  background:
    radial-gradient(ellipse calc(980 * var(--u)) calc(760 * var(--u)) at -6% 102%, rgba(118, 118, 118, 0.62), rgba(60, 60, 60, 0.3) 40%, rgba(20, 20, 20, 0.1) 66%, transparent 80%),
    radial-gradient(ellipse calc(620 * var(--u)) calc(420 * var(--u)) at 4% 42%, rgba(255, 255, 255, 0.035), transparent 70%),
    linear-gradient(#060606, #000 55%);
}
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.dust { position: absolute; inset: 0; width: 100%; height: 100%; }
.sparkle {
  position: absolute;
  left: calc(100% - 29 * var(--u));
  top: calc(393 * var(--u));
  width: calc(14 * var(--u)); height: calc(14 * var(--u));
  fill: #fff;
  opacity: 0.75;
  filter: drop-shadow(0 0 calc(5 * var(--u)) rgba(255, 255, 255, 0.8)) drop-shadow(0 0 calc(14 * var(--u)) rgba(255, 255, 255, 0.25));
  animation: twinkle 3.6s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { transform: scale(0.8) rotate(0deg); opacity: 0.45; }
  50% { transform: scale(1.1) rotate(45deg); opacity: 0.95; }
}

.hero-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: clamp(14px, 1vw, 22px) 7vw 0;
}
.brand {
  display: flex; flex-direction: column;
  font-family: var(--hero-font);
  font-weight: 600;
  font-size: clamp(13px, 1.05vw, 21px);
  line-height: 1;
  letter-spacing: 0.3em;
  color: var(--cream);
}
.brand span { display: flex; align-items: center; }
/* the square stands in for the last "O" of TURJO */
.brand i {
  display: inline-block;
  width: 0.74em; height: 0.74em;
  margin: 0;
  background: var(--cream);
}
.hero-mail {
  margin-top: clamp(10px, 1.1vw, 22px);
  font-family: var(--hero-font);
  font-size: clamp(12px, 0.78vw, 15px);
  color: #cfc6b3;
  transition: color 0.25s;
}
.hero-mail:hover { color: #fff; }
.hero-square {
  position: absolute;
  left: 54.2%; top: 7.8%;
  width: clamp(12px, 1.1vw, 22px); height: clamp(12px, 1.1vw, 22px);
  background: var(--cream);
  opacity: 0.75;
  animation: drift 7s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(1.2vw, 1.4vh) rotate(8deg); }
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(64px, 9vh, 110px) 0 clamp(24px, 5vh, 70px);
  transform: translate3d(0, calc(var(--hp, 0) * -6vh), 0) scale(calc(1 - var(--hp, 0) * 0.06));
  transform-origin: 50% 50%;
  will-change: transform;
}
.hero-title {
  margin: 0;
  font-family: var(--hero-font);
  font-weight: 600;
  font-size: 9.6vw;
  line-height: 1;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: var(--cream);
}
.hl-row { display: flex; align-items: center; gap: 1.35vw; }
.hl-row + .hl-row { margin-top: 0.02em; }
.hl-row.r1 { padding-left: 21vw; transform: translate3d(0, calc(var(--hp, 0) * -5vh), 0); will-change: transform; }
.hl-row.r2 { justify-content: flex-end; padding-right: 15.5vw; transform: translate3d(0, calc(var(--hp, 0) * -2.5vh), 0); will-change: transform; }
.hl-row.r3 { justify-content: flex-end; padding-right: 14.8vw; }
.hl-word { display: block; line-height: 0.9; padding-top: 0.04em; }
/* each letter sits in a mask so it can slide up into place on load */
.hl-word.split { overflow: hidden; padding: 0.06em 0.03em 0.08em; margin: -0.02em -0.03em -0.08em; }
.ch { display: inline-block; will-change: transform; }
.hl-intro .w { display: inline-block; }
.hl-box {
  position: relative;
  flex: none;
  width: 7.2vw; height: 7.2vw;
  padding: 0.85vw 0.9vw;
  border-radius: 3px;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 112%, rgba(216, 204, 178, 0.32), rgba(216, 204, 178, 0.06) 55%, transparent 75%),
    linear-gradient(180deg, #151515, #0d0d0d);
  box-shadow: inset 0 0 0 1px rgba(216, 204, 178, 0.12), 0 1vw 2.5vw rgba(0, 0, 0, 0.5);
  transition: transform 0.6s var(--ease), box-shadow 0.4s;
}
.hl-box:hover { transform: translateY(-0.4vw); box-shadow: inset 0 0 0 1px rgba(216, 204, 178, 0.28), 0 1vw 2.5vw rgba(0, 0, 0, 0.5); }
.hl-box b {
  display: block;
  font-size: clamp(9px, 0.72vw, 15px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  color: #d0c7b4;
}
.hl-intro {
  align-self: flex-start;
  width: 16.8vw;
  min-width: 220px;
  margin-top: 0.5vw;
  margin-right: 1.2vw;
  font-size: clamp(13px, 0.88vw, 18px);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
  text-transform: none;
  color: var(--cream-2);
}
.hl-arrow { display: block; width: 5.6vw; color: var(--cream); transition: transform 0.5s var(--ease), color 0.3s; }
.hl-arrow svg { display: block; width: 100%; height: auto; }
.hl-arrow:hover { transform: translateY(0.6vw); color: #fff; }
.hero-stats { display: none; }
.hero-dim { position: absolute; inset: 0; z-index: 3; background: #000; opacity: calc(var(--hp, 0) * 0.65); pointer-events: none; will-change: opacity; }

/* ============ FLOATING NAV (dock) ============ */
.dock {
  position: fixed;
  left: 50%;
  bottom: calc(22 * var(--u));
  z-index: 50;
  display: flex; align-items: center;
  height: calc(46 * var(--u));
  padding: 0 calc(4 * var(--u)) 0 calc(8 * var(--u));
  border-radius: 999px;
  background: rgba(28, 28, 28, 0.62);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
          backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 calc(10 * var(--u)) calc(40 * var(--u)) rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 140%);
  transition: opacity 0.5s, transform 0.8s var(--ease);
}
.dock.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.dock-home {
  display: grid; place-items: center;
  width: calc(32 * var(--u)); height: calc(32 * var(--u));
  border-radius: 50%;
  color: #cfcfcf;
  transition: color 0.2s, background 0.2s;
}
.dock-home svg { width: calc(15 * var(--u)); height: calc(15 * var(--u)); }
.dock-home:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.dock-links { display: flex; align-items: center; }
.dock-links a {
  padding: calc(6 * var(--u)) calc(10 * var(--u));
  font-size: calc(13.5 * var(--u));
  color: #bdbdbd;
  letter-spacing: -0.01em;
  white-space: nowrap;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.dock-links a:hover { color: #fff; }
.dock-links a.active { color: #fff; background: rgba(255, 255, 255, 0.07); }
.dock-cta {
  margin-left: calc(9 * var(--u));
  display: inline-flex; align-items: center;
  height: calc(37 * var(--u));
  padding: 0 calc(17 * var(--u));
  border-radius: 999px;
  background: var(--white);
  color: #111;
  font-size: calc(13.5 * var(--u));
  font-weight: 500;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.2s;
}
.dock-cta:hover { background: #fff; transform: scale(1.04); }

/* ============ SHEET (slides up over the pinned hero) ============ */
.sheet {
  position: relative;
  z-index: 2;
  overflow-x: clip; /* nothing may poke out sideways (phones would zoom out to fit it); "clip" keeps sticky working */
  background: #000;
  border-radius: 32px 32px 0 0;
  box-shadow: 0 -40px 90px rgba(0, 0, 0, 0.75), 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.section { max-width: 1120px; margin: 0 auto; padding: 120px 24px 40px; }
.section.wide { max-width: 1240px; }
.head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: #cfcfcf;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--line);
}
.head h2, .about h2, .contact h2 {
  margin: 18px 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}
.head p { margin: 16px auto 0; max-width: 460px; font-size: 15px; line-height: 1.6; color: var(--text-2); }

.card {
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(180deg, #0f0f0f, #090909);
  box-shadow: inset 0 0 0 1px var(--line);
}
.ico {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px var(--line);
}
.ico svg { width: 20px; height: 20px; fill: none; stroke: #e6e6e6; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---- work: heading (a small pill over one big line that fades from white to grey) ---- */
/* the top space lets the showreel window rest low on the screen, tilted back, when you arrive */
#work { padding-top: clamp(110px, calc(60vh - 300px), 320px); }
.work-head { max-width: 1000px; margin-bottom: clamp(36px, 4.4vw, 64px); }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 15px 8px 13px;
  border-radius: 999px;
  font-family: var(--hero-font);
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: #d6d6d6;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: #ededed; box-shadow: 0 0 10px rgba(255, 255, 255, 0.7); }
.head .work-title {
  margin-top: 24px;
  font-weight: 500;
  font-size: clamp(42px, 6.3vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}
/* each word carries its slice of the white → grey fade (colours set by script.js) */
.work-title .rw > span {
  background: linear-gradient(90deg, var(--g0, #fff), var(--g1, #fff));
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

/* ---- work: the showreel in a player window ----
   script.js tilts the window back (--rx) and shrinks it a little (--s) while it sits low on the
   screen, and straightens it out to full size as it rises to the middle (--fp: 0 → 1). */
.feature-stage {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  perspective: 1400px;
}
/* a soft pool of light behind the window that grows as it comes up */
.feature-stage::before {
  content: "";
  position: absolute;
  left: -8%; right: -8%; top: 4%; bottom: -18%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.03) 55%, transparent);
  opacity: calc(0.35 + var(--fp, 1) * 0.65);
}
.feature {
  position: relative;
  display: block;
  width: 100%;
  padding: 0 10px 10px;
  border: 0;
  border-radius: 26px;
  color: inherit;
  text-align: left;
  background: linear-gradient(180deg, #171717, #0b0b0b 60%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 60px 120px -30px rgba(0, 0, 0, 0.9),
    0 24px 60px rgba(0, 0, 0, 0.45);
  transform-origin: 50% 50%;
  transform: rotateX(var(--rx, 0deg)) scale(var(--s, 1));
  will-change: transform;
}
/* the window's title bar: three dots, the file name, a running timecode */
.feature-bar {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  height: 46px;
  padding: 0 8px;
}
.fb-dots { display: flex; gap: 7px; }
.fb-dots i { width: 10px; height: 10px; border-radius: 50%; background: #3a3a3a; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.fb-title {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 7px;
  height: 26px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  color: #a6a6a6;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.fb-title svg { width: 9px; height: 9px; fill: currentColor; }
.fb-time { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; color: #8c8c8c; }
.fb-time .rec { width: 6px; height: 6px; }
/* the screen inside the window */
.feature-screen {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #0d0d0d;
  isolation: isolate;
}
/* dimmed while tilted back, with a glare across the glass that fades as it faces you */
.feature-screen::before,
.feature-screen::after {
  content: "";
  position: absolute; inset: 0;
  z-index: 4;
  border-radius: inherit;
  pointer-events: none;
}
.feature-screen::before { background: #000; opacity: calc((1 - var(--fp, 1)) * 0.42); }
.feature-screen::after {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  background: linear-gradient(162deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.02) 34%, transparent 46%);
  opacity: calc(1 - var(--fp, 1) * 0.7);
}
/* the picture (and the muted video) drift up inside the screen as the page scrolls */
.feature-img { position: absolute; inset: -9% 0; display: block; transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }
.feature-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.feature:hover .feature-img img, .feature:hover .feature-img video { transform: scale(1.03); }
.feature-img video { transition: transform 1.2s var(--ease), opacity 0.6s; }
.feature-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0.8)); }
.feature-cap { max-width: 440px; margin: clamp(30px, 3.4vw, 46px) auto 0; text-align: center; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.feature .play-btn.big { background: rgba(255, 255, 255, 0.9); }
.feature .play-btn.big svg { fill: #111; }
.feature:hover .play-btn.big { transform: translate(-50%, -50%) scale(1.08); }
.feature-meta {
  position: absolute; left: 32px; bottom: 28px;
  display: flex; flex-direction: column; gap: 6px;
  text-align: left;
}
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: #d0d0d0; letter-spacing: 0.04em; text-transform: uppercase; }
.feature-meta strong { font-family: var(--display); font-weight: 500; font-size: clamp(24px, 3vw, 36px); letter-spacing: -0.03em; color: #fff; }
.feature-meta em { font-style: normal; font-size: 14px; color: #bdbdbd; }

/* ---- work: auto-scrolling row of four films ---- */
/* breathing room between the showreel and the reel row */
.carousel { margin-top: clamp(64px, 7.5vw, 120px); }
[data-parallax] { will-change: translate; }
/* the reel row runs edge to edge (--fullw = page width without the scrollbar, set by script.js) */
.carousel-viewport {
  overflow: hidden;
  width: var(--fullw, 100vw);
  margin-left: calc(50% - var(--fullw, 100vw) / 2);
  padding: 0 20px;
}
.carousel-track {
  --gap: 14px;
  display: flex;
  gap: var(--gap);
  transition: transform 0.9s var(--ease);
  will-change: transform;
}
.carousel-track.no-anim { transition: none; }
/* vertical 9:16 cards, six across on wide screens */
.slide {
  flex: 0 0 calc((100% - 5 * var(--gap)) / 6);
  display: block;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
.p-media {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 20px;
  background: #111;
  box-shadow: inset 0 0 0 1px var(--line);
}
.p-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.p-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); pointer-events: none; z-index: 3; }
.slide:hover .p-media img, .slide:hover .clip-video { transform: scale(1.04); }
/* until a reel has a preview clip, its thumbnail drifts slowly so the row never looks frozen */
.anim .slide .p-media img { animation: drift-kb 14s ease-in-out infinite alternate; }
.anim .slide:nth-child(3n + 2) .p-media img { animation-duration: 17s; animation-delay: -6s; }
.anim .slide:nth-child(3n + 3) .p-media img { animation-duration: 15s; animation-delay: -11s; }
@keyframes drift-kb { from { scale: 1; translate: 0 0; } to { scale: 1.12; translate: 0 -3%; } }
.clip-video { transition: opacity 0.5s, transform 1s var(--ease); }
.slide:hover .play-btn { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.reel-chip {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px 4px 6px;
  border-radius: 999px;
  font-size: 11px; font-weight: 500;
  color: #eee;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}
.reel-chip svg { width: 14px; height: 14px; }
.p-meta {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 2px;
  padding: 56px 16px 16px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55) 40%, rgba(0, 0, 0, 0.88));
}
.p-num { grid-row: span 2; font-size: 12px; color: rgba(255, 255, 255, 0.55); padding-top: 3px; font-variant-numeric: tabular-nums; }
.p-title { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; color: #fff; }
.p-tags { font-size: 12.5px; color: #c4c4c4; }

.carousel-ui { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 22px; }
/* the dots shrink to fit, so 10 of them never push the arrows off a phone screen */
.carousel-dots { display: flex; gap: 6px; flex: 1; min-width: 0; max-width: 420px; }
.carousel-dots button {
  position: relative;
  flex: 1 1 0;
  min-width: 6px; max-width: 34px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
}
.carousel-dots button::after {
  content: "";
  position: absolute; inset: 0;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
}
.carousel-dots button.active::after { animation: fill var(--dwell, 3.8s) linear forwards; }
.carousel.paused .carousel-dots button.active::after { animation-play-state: paused; }
@keyframes fill { to { transform: scaleX(1); } }
.carousel-arrows { display: flex; gap: 8px; }
.carousel-arrows button {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 0;
  border-radius: 50%;
  color: #ddd;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background 0.2s, color 0.2s;
}
.carousel-arrows button:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.carousel-arrows svg { width: 18px; height: 18px; }

/* ---- services ---- */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.svc-grid .card { transition: box-shadow 0.3s, transform 0.5s var(--ease); }
.svc-grid .card:hover { box-shadow: inset 0 0 0 1px var(--line-2); transform: translateY(-4px); }
.card h3 { margin: 32px 0 8px; font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.card p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-2); }

/* ---- about ---- */
/* the photo column is sized so the photo shows whole, at its own proportions */
.about { display: grid; grid-template-columns: 1fr minmax(280px, 360px); gap: 12px; align-items: stretch; }
.about-main { padding: 36px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.about-main h2 { margin-top: 20px; }
.about-main p { margin: 16px 0 0; font-size: 15px; line-height: 1.7; color: var(--text-2); max-width: 520px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.stats strong { display: block; font-family: var(--display); font-weight: 500; font-size: 34px; letter-spacing: -0.03em; }
.stats span { font-size: 13px; color: var(--text-2); }

/* right column: your photo with the social links beneath it */
.socials-card { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.portrait {
  position: relative;
  flex: none;
  /* frame takes the photo's own shape (set from the image by script.js; 2:3 until it loads) */
  aspect-ratio: var(--ratio, 2 / 3);
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  background:
    radial-gradient(120% 70% at 50% 110%, rgba(216, 204, 178, 0.12), transparent 60%),
    linear-gradient(180deg, #141414, #0b0b0b);
  box-shadow: inset 0 0 0 1px var(--line);
}
/* anchored top-centre, so there's room above your head */
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; transform-origin: 50% 0%; transition: transform 1.2s var(--ease); }
.socials-card:hover .portrait img { transform: scale(1.03); }
.portrait-ph {
  position: absolute; inset: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border: 1px dashed rgba(216, 204, 178, 0.22);
  border-radius: 10px;
  text-align: center;
  color: var(--cream-2);
}
.portrait-ph svg { width: 56px; height: 56px; opacity: 0.7; }
.portrait-ph b { font-size: 14px; font-weight: 500; color: var(--cream); }
.portrait-ph em { font-style: normal; font-size: 12px; color: var(--text-3); }
.portrait.has-photo .portrait-ph { display: none; }
.social-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.social {
  --brand: 255, 255, 255;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  height: 54px;
  border-radius: 12px;
  font-size: 13px;
  color: #d8d8d8;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background 0.35s, box-shadow 0.35s, color 0.3s, transform 0.5s var(--ease);
}
.social svg { width: 21px; height: 21px; flex: none; transition: transform 0.5s var(--ease); }
.social.fb { --brand: 24, 119, 242; }
.social.wa { --brand: 37, 211, 102; }
.social.ig { --brand: 225, 48, 108; }
.social:hover {
  color: #fff;
  background: rgba(var(--brand), 0.16);
  box-shadow: inset 0 0 0 1px rgba(var(--brand), 0.55), 0 18px 40px rgba(var(--brand), 0.18);
  transform: translateY(-4px);
}
.social:hover svg { transform: scale(1.1); }

/* ---- reviews: pinned giant words, cards scroll up and stack ---- */
.testimonials { position: relative; margin-top: 80px; --card-h: min(540px, 78vh); }
.t-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
  pointer-events: none;
}
.t-label {
  margin-bottom: 1.6vw;
  font-family: var(--hero-font);
  font-size: clamp(11px, 0.72vw, 14px);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream-2);
}
.t-big {
  margin: 0;
  display: flex; flex-direction: column; align-items: center;
  font-family: var(--hero-font);
  font-weight: 600;
  font-size: 11.6vw;
  line-height: 0.84;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--cream);
  text-align: center;
}
.t-big span { display: block; }
.t-cards {
  position: relative;
  z-index: 1;
  margin-top: -100vh;
  margin-top: -100svh;
  padding: 100vh 16px 45vh;
  display: flex; flex-direction: column; align-items: center;
  gap: 32vh;
}
.t-card {
  position: sticky;
  top: calc(50vh - var(--card-h) / 2);
  width: min(500px, 90vw);
  min-height: var(--card-h);
  display: flex; flex-direction: column;
  padding: 42px;
  border-radius: 6px;
  background:
    radial-gradient(90% 60% at 50% 58%, rgba(216, 204, 178, 0.11), transparent 70%),
    linear-gradient(180deg, #1c1a17, #13120f);
  box-shadow: inset 0 0 0 1px rgba(216, 204, 178, 0.1), 0 30px 70px rgba(0, 0, 0, 0.6);
  transform-origin: 50% 0;
  scale: var(--s, 1);
  will-change: scale;
}
/* a covered card darkens via a GPU-friendly overlay (cheaper than a brightness filter while scrolling) */
.t-card::before {
  content: "";
  position: absolute; inset: 0; z-index: 2;
  border-radius: inherit;
  background: #000;
  opacity: calc(1 - var(--b, 1));
  pointer-events: none;
  will-change: opacity;
}
.t-num { font-family: var(--hero-font); font-weight: 600; font-size: 64px; line-height: 1; color: var(--cream); }
.t-card p {
  margin: 52px 0 0;
  font-size: 23px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: #ddd3bf;
}
.t-card footer { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 40px; }
.t-card img { width: 50px; height: 50px; border-radius: 5px; object-fit: cover; }
.t-card footer span { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: #8f877a; }
.t-card footer b { font-size: 18px; font-weight: 500; color: var(--cream); }

/* ---- custom cursor ---- */
.cursor {
  position: fixed;
  left: 0; top: 0;
  z-index: 9999;
  width: 16px; height: 16px;
  display: grid; place-items: center;
  border-radius: 2px;
  background: var(--cream);
  pointer-events: none;
  opacity: 0;
  transform: translate3d(var(--cx, -100px), var(--cy, -100px), 0);
  /* keep a gap: the square's top-right corner sits 22px left of and 22px below the pointer tip */
  translate: calc(-100% - 22px) 22px;
  transition: width 0.4s var(--ease), height 0.4s var(--ease), background 0.3s, box-shadow 0.3s, opacity 0.3s, border-radius 0.4s;
}
.cursor.on { opacity: 1; }
.cursor-label {
  font-family: var(--hero-font);
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: #121110;
  opacity: 0;
  transition: opacity 0.2s;
}
/* over links and buttons: grows into an outlined square */
.cursor.link { width: 34px; height: 34px; background: rgba(216, 204, 178, 0.1); box-shadow: inset 0 0 0 1px var(--cream); }
/* over videos: becomes a solid "PLAY" tile */
.cursor.play { width: 76px; height: 76px; background: var(--cream); box-shadow: none; }
.cursor.play .cursor-label { opacity: 1; }
.cursor.text { opacity: 0; }
.cursor.down { scale: 0.85; }
.has-cursor .hero-square { transition: opacity 0.5s; }
.has-cursor.cursor-live .hero-square { opacity: 0 !important; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---- switching to the Archive and back, in place (script.js loads archive.html into .archive-view) ---- */
/* a black veil fades over the page while it switches (the dock stays on top of it) */
.veil {
  position: fixed; inset: 0;
  z-index: 48;
  display: grid; place-items: center;
  background: #000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.46s var(--ease), visibility 0s linear 0.46s;
}
.veil.on, .boot-archive .veil { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.46s var(--ease); }
.veil.now { transition: none; }
/* the little square only shows if loading takes a moment */
.veil i { width: 14px; height: 14px; background: var(--cream); opacity: 0; transition: opacity 0.3s; }
.veil.wait i { opacity: 1; animation: veilSpin 1.2s var(--ease) infinite; }
@keyframes veilSpin {
  0% { transform: scale(0.7) rotate(0deg); opacity: 0.45; }
  50% { transform: scale(1) rotate(90deg); opacity: 1; }
  100% { transform: scale(0.7) rotate(180deg); opacity: 0.45; }
}
.archive-view[hidden] { display: none; }
html.in-archive { overflow: hidden; overscroll-behavior: none; }
html.in-archive .hero,
html.in-archive .sheet { visibility: hidden; }
.a-meta h1:focus { outline: none; }

/* ---- hire me: floating portfolio wall + centred brief ---- */
/* The section is taller than the screen: the stage pins for --pin of scrolling while the
   portfolio pieces slide up behind the form, then script.js snaps on to the footer. */
.hire {
  --pin: 80vh;
  position: relative;
  height: calc(100vh + var(--pin));
  height: calc(100svh + var(--pin));
  margin-top: 40px;
}
.hire-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  isolation: isolate;
  display: flex; align-items: center; justify-content: center;
  padding: 80px 16px;
  overflow: hidden;
}
.hire-wall { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
/* soft dark pool behind the form so it always reads clearly */
.hire-stage::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(38% 42% at 50% 50%, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.35) 60%, transparent 85%);
  pointer-events: none;
}
.wall-item {
  position: absolute;
  left: var(--x); top: var(--y);
  width: var(--w);
  margin: 0;
  opacity: 0;
  translate: 0 var(--py, 0px);
  transition: opacity 1.4s var(--ease);
  will-change: translate;
}
.wall-item.in { opacity: var(--o); }
.wall-item img {
  display: block;
  width: 100%; height: auto;
  border-radius: 3px;
  filter: blur(var(--blur, 0px)) saturate(var(--sat, 1));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
}
/* your reels in the wall: preview clip plays over the thumbnail, small play badge in the corner */
.wall-item video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 3px;
  filter: blur(var(--blur, 0px)) saturate(var(--sat, 1));
  opacity: 0;
  transition: opacity 0.6s;
}
.wall-item video.on { opacity: 1; }
.wall-item.is-reel::after {
  content: "";
  position: absolute; top: 8px; right: 8px; z-index: 1;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7v10l8-5z' fill='%23d8ccb2'/%3E%3C/svg%3E") center / 14px no-repeat;
  box-shadow: inset 0 0 0 1px rgba(216, 204, 178, 0.35);
}

.hire-center {
  position: relative;
  width: min(560px, 100%);
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.hire .t-label { margin-bottom: 18px; }
.hire-title {
  margin: 0;
  font-family: var(--hero-font);
  font-weight: 500;
  font-size: clamp(38px, 3.8vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--cream);
}
.brief {
  width: 100%;
  margin-top: 36px;
  display: grid; gap: 14px;
  padding: 22px;
  border-radius: 6px;
  text-align: left;
  background: rgba(20, 19, 17, 0.66);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
          backdrop-filter: blur(16px) saturate(1.15);
  box-shadow: inset 0 0 0 1px rgba(216, 204, 178, 0.12), 0 30px 80px rgba(0, 0, 0, 0.55);
}
.brief .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.brief label {
  display: grid; gap: 8px;
  font-family: var(--hero-font);
  font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--cream-2);
}
.brief input, .brief textarea {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(216, 204, 178, 0.12);
  outline: none;
  transition: box-shadow 0.2s, background 0.2s;
}
.brief input::placeholder, .brief textarea::placeholder { color: #6f6a61; }
.brief textarea { resize: vertical; min-height: 110px; }
.brief input:focus, .brief textarea:focus { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(216, 204, 178, 0.5); }
.brief .invalid { box-shadow: inset 0 0 0 1px rgba(255, 90, 90, 0.6); }
.brief-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.send {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px;
  padding: 0 18px 0 8px;
  border: 0;
  border-radius: 4px;
  font-family: var(--hero-font);
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: #141310;
  background: var(--cream);
  transition: background 0.2s, transform 0.25s var(--ease);
}
.send:not(:has(img)) { padding-left: 18px; }
.send img { width: 28px; height: 28px; border-radius: 3px; object-fit: cover; }
.send svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.send:hover { background: #e7ddc6; }
.send:hover svg { transform: translateX(3px); }
.send:active { transform: scale(0.97); }
.form-msg { margin: 0; font-size: 13px; color: var(--cream-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 22px;
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  color: #111;
  background: var(--white);
  transition: transform 0.25s var(--ease), background 0.2s;
}
.btn:hover { background: #fff; transform: scale(1.03); }

/* ---- footer: huge wordmark + "Ready to start?" ---- */
.site-footer {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  padding: 48px clamp(16px, 2.2vw, 44px) 110px;
  border-top: 1px solid rgba(216, 204, 178, 0.08);
}
.foot-brand {
  display: flex; flex-direction: column;
  font-family: var(--hero-font);
  font-weight: 600;
  font-size: clamp(44px, 7.6vw, 150px);
  line-height: 0.96;
  letter-spacing: 0.18em;
  color: var(--cream);
}
.foot-brand span { display: flex; align-items: center; }
.foot-brand i { display: inline-block; width: 0.72em; height: 0.72em; margin: 0; background: var(--cream); }
.foot-brand .rl { display: inline-flex; align-items: center; }
.foot-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.foot-cta > span { font-family: var(--hero-font); font-weight: 500; font-size: clamp(26px, 2.5vw, 42px); letter-spacing: -0.025em; color: var(--cream); }
.mail {
  font-family: var(--hero-font);
  font-size: clamp(16px, 1.3vw, 22px);
  color: var(--cream-2);
  border-bottom: 1px solid transparent;
  transition: color 0.25s, border-color 0.25s;
}
.mail:hover { color: var(--cream); border-color: var(--cream); }
.foot-cta small { margin-top: 14px; font-size: 12px; color: var(--text-3); }

/* ============ PLAYER (opens full screen, video centred) ============ */
.player {
  position: fixed;
  inset: 0;
  width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none;
  margin: 0; padding: 0;
  border: 0;
  overflow: hidden;
  color: #fff;
  background: #000;
}
.player::backdrop { background: #000; }
.player[open] { animation: playerIn 0.45s var(--ease); }
@keyframes playerIn { from { opacity: 0; } }
/* the stage is what goes into the browser's real full-screen mode */
.player-stage {
  position: relative;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: #000;
}
.player-stage:fullscreen { width: 100%; height: 100%; }
.player video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
/* Google Drive reels play inside Drive's own player: a tall 9:16 frame, centred */
.player iframe { display: block; width: 100%; height: 100%; border: 0; background: #000; }
.player.portrait iframe { width: min(100%, calc(100dvh * 9 / 16)); }
.player [hidden] { display: none; }
.player-close {
  position: absolute; top: 18px; right: 18px; z-index: 2;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  transition: background 0.2s, transform 0.25s var(--ease);
}
.player-close:hover { background: rgba(255, 255, 255, 0.26); transform: scale(1.06); }
.player-close svg { width: 20px; height: 20px; }

/* ============ MOTION ============ */
/* hero load-in: script.js adds .is-in to the hero once fonts are ready (html.anim = motion allowed) */
.anim .hero:not(.is-in) .hero-top,
.anim .hero:not(.is-in) .hero-content,
.anim .hero:not(.is-in) .hero-square,
.anim .hero:not(.is-in) .hero-bg { visibility: hidden; }

.anim .hero.is-in .hero-bg { animation: bgIn 2s ease both; }
.anim .hero.is-in .ha { animation: dropIn 1s var(--ease) var(--d) both; }
.anim .hero.is-in .ch { animation: chUp 1.15s var(--ease) calc(var(--d) + var(--i) * 0.045s) both; }
.anim .hero.is-in .hl-box { animation: boxIn 1.1s var(--ease) var(--d) both; }
.anim .hero.is-in .hl-box b { animation: wordIn 0.8s var(--ease) calc(var(--d) + 0.45s) both; }
.anim .hero.is-in .hl-intro .w { animation: wordIn 0.9s var(--ease) calc(var(--d) + var(--i) * 0.03s) both; }
.anim .hero.is-in .hl-arrow { animation: arrowIn 1s var(--ease) var(--d) both, bob 2.6s ease-in-out calc(var(--d) + 1.3s) infinite; }
.anim .hero.is-in .hero-square { animation: popIn 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 1.3s both, drift 7s ease-in-out 2.2s infinite; }
.anim .hero.is-in .hero-stats { animation: wordIn 0.9s var(--ease) var(--d) both; }

@keyframes bgIn { from { opacity: 0; } }
@keyframes dropIn { from { opacity: 0; translate: 0 -14px; } }
@keyframes chUp { from { transform: translateY(108%) rotate(7deg); } }
@keyframes boxIn {
  from { clip-path: inset(100% 0 0 0); opacity: 0.2; }
  to { clip-path: inset(0 0 0 0); opacity: 1; }
}
@keyframes wordIn { from { opacity: 0; translate: 0 0.6em; filter: blur(6px); } }
@keyframes arrowIn { from { opacity: 0; translate: 0 -45%; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 12%; } }
@keyframes popIn { from { scale: 0; opacity: 0; } }

/* ---- scroll-in reveals (html.anim = motion allowed; script.js adds .in the first time it's on screen) ---- */
/* fade + rise; side-by-side items arrive one after another via --rd */
.anim [data-reveal=""] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1s var(--ease), transform 1.15s var(--ease);
  transition-delay: var(--rd, 0s);
}
.anim [data-reveal=""].in { opacity: 1; transform: none; }

/* words / lines slide up out of a mask */
.rw, .rlw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.rlw { display: block; }
.rw > span, .rl { display: inline-block; }
.anim [data-reveal="words"] .rw > span,
.anim [data-reveal="lines"] .rl {
  transform: translateY(112%) rotate(4deg);
  transform-origin: 0 100%;
  transition: transform 1.15s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms + 80ms);
}
.anim [data-reveal="lines"] .rl { transition-duration: 1.3s; transition-delay: calc(var(--i, 0) * 120ms + 80ms); }
.anim [data-reveal="words"].in .rw > span,
.anim [data-reveal="lines"].in .rl { transform: none; }

/* media opens up from a smaller, rounded frame */
.anim [data-reveal="clip"] {
  clip-path: inset(14% 10% 14% 10% round 28px);
  transition: clip-path 1.4s var(--ease);
}
.anim [data-reveal="clip"].in { clip-path: inset(0 0 0 0 round 0px); }
.anim [data-reveal="clip"] img { scale: 1.18; transition: scale 1.8s var(--ease); }
.anim [data-reveal="clip"].in img { scale: 1; }

/* reel cards rise one after another */
.anim [data-reveal="stagger"] .slide {
  opacity: 0;
  translate: 0 60px;
  transition: opacity 0.9s var(--ease), translate 1.1s var(--ease);
  transition-delay: calc(var(--k, 0) * 90ms);
}
.anim [data-reveal="stagger"].in .slide { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sparkle, .rec, .hero-square { animation: none; }
  .carousel-track { transition: none; }
}

/* ============ RESPONSIVE ============ */
@media (hover: none) {
  .play-btn { opacity: 1; transform: translate(-50%, -50%) scale(0.8); }
}

@media (max-width: 1280px) {
  .slide { flex-basis: calc((100% - 4 * var(--gap)) / 5); }
}

@media (max-width: 1100px) {
  .slide { flex-basis: calc((100% - 3 * var(--gap)) / 4); }
}

@media (max-width: 1000px) {
  .about { grid-template-columns: 1fr; }
  /* stacked: keep the photo card a sensible size and centred */
  .socials-card { width: 100%; max-width: 400px; justify-self: center; }
}

@media (max-width: 820px) {
  :root { --u: 1px; }
  .br { display: none; }

  /* hero: stacked type, intro + stats below */
  .hero-top { padding: 16px 16px 0; }
  .hero-mail { display: none; }
  .hero-square { left: auto; right: 16px; top: 18px; }
  .hero-content { padding: 72px 16px 40px; }
  .hero-title { display: flex; flex-direction: column; font-size: 15.5vw; }
  .hl-row, .hl-row.r1, .hl-row.r2, .hl-row.r3 { padding: 0; justify-content: flex-start; gap: 3vw; }
  .hl-row.r2 { display: contents; }
  .hl-row.r1 { order: 1; }
  .hl-row.r2 .hl-word { order: 2; }
  .hl-row.r3 { order: 3; }
  .hl-intro { order: 4; width: auto; min-width: 0; max-width: 360px; margin: 22px 0 0; font-size: 15px; }
  .hl-box { display: none; }
  .hl-arrow { width: 11vw; }
  .hero-stats {
    display: flex; gap: 10px; flex-wrap: wrap;
    margin: 18px 0 0;
    font-family: var(--hero-font);
  }
  .hero-stats span {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase;
    color: #d0c7b4;
    background: linear-gradient(180deg, #151515, #0d0d0d);
    box-shadow: inset 0 0 0 1px rgba(216, 204, 178, 0.14);
  }
  .sparkle { display: none; }

  .dock { max-width: calc(100vw - 24px); height: 50px; }
  .dock-links {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 14px), transparent);
            mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 14px), transparent);
  }
  .dock-links::-webkit-scrollbar { display: none; }
  .dock-links a { font-size: 13px; padding: 6px 9px; }
  .dock-cta { height: 40px; font-size: 13px; padding: 0 14px; }

  .sheet { border-radius: 22px 22px 0 0; }
  .section { padding: 90px 16px 20px; }
  #work { padding-top: 70px; }
  .head { margin-bottom: 40px; }
  .head .work-title { margin-top: 18px; line-height: 1.02; }
  .feature-stage { perspective: 800px; }
  .feature { padding: 0 6px 6px; border-radius: 18px; }
  .feature-bar { height: 34px; padding: 0 6px; }
  .fb-dots { gap: 5px; }
  .fb-dots i { width: 7px; height: 7px; }
  .fb-title { height: 21px; padding: 0 10px; font-size: 10.5px; }
  .fb-time { font-size: 10px; gap: 6px; }
  .feature-screen { border-radius: 12px; aspect-ratio: 4 / 3; }
  .feature-meta { left: 18px; bottom: 16px; }
  .feature-cap { font-size: 14px; }
  .play-btn.big { width: 64px; height: 64px; }
  .carousel-viewport { padding: 0 12px; }
  .slide { flex-basis: calc((100% - 2 * var(--gap)) / 3); }
  .about-main { padding: 24px; }
  .testimonials { --card-h: min(440px, 74vh); margin-top: 40px; }
  .t-big { font-size: 17.5vw; line-height: 0.86; }
  .t-label { margin-bottom: 14px; }
  .t-card { padding: 28px; }
  .t-num { font-size: 52px; }
  .t-card p { font-size: 19px; margin-top: 36px; }
  .player-close { top: 14px; right: 14px; }
}

@media (max-width: 560px) {
  .slide { flex-basis: 46%; }
  .fb-time { display: none; }
  .brief .row { grid-template-columns: 1fr; }
  .stats strong { font-size: 26px; }
  .hire { --pin: 60vh; }
  .hire-stage { padding: 72px 16px; }
  .brief { padding: 18px; background: rgba(20, 19, 17, 0.9); }
  .site-footer { flex-direction: column; align-items: flex-start; }
  .foot-cta { align-items: flex-start; text-align: left; }
  /* five places in the dock: tighten it so they fit on a phone */
  .dock { padding: 0 4px 0 5px; }
  .dock-links a { font-size: 12.5px; padding: 6px 7px; }
  .dock-cta { margin-left: 5px; padding: 0 12px; font-size: 12.5px; }
}
