/* Gabriel Corral, Video Editor. Plain CSS, no build step. */

/* ---------- Fonts (self-hosted, OFL) ---------- */
@font-face {
  font-family: "Redaction 50";
  src: url("assets/fonts/Redaction50-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Redaction 50";
  src: url("assets/fonts/Redaction50-Italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Redaction 100";
  src: url("assets/fonts/Redaction100-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/Manrope.woff2") format("woff2");
  font-weight: 200 800; font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/SpaceGrotesk.woff2") format("woff2");
  font-weight: 300 700; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #0c0c0d;
  --bg-2: #131214;
  --ink: #f2eee8;
  --ink-2: #bdb6ac;
  --muted: #8d867c;
  --line: rgb(242 238 232 / .12);
  --green: #22c55e;
  --green-ink: #06270f;
  --teal: #4fb8ad;
  --amber: #d6a544;
  --violet: #8f83d8;
  --magenta: #c9699b;

  --serif: "Redaction 50", Georgia, "Times New Roman", serif;
  --pixel: "Redaction 100", "Redaction 50", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ui: "Space Grotesk", "Manrope", system-ui, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}
img, video, canvas, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--green); color: var(--green-ink); }

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

.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.tc { font-family: var(--ui); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.wrap { width: 100%; max-width: 96rem; margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: fixed; left: 1rem; top: -4rem; z-index: 50;
  background: var(--green); color: var(--green-ink); font-weight: 700;
  padding: .6rem 1rem; border-radius: 4px; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Page progress drawn as a render bar */
.renderbar { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 40; pointer-events: none; }
.renderbar__fill {
  display: block; height: 100%; background: var(--green);
  transform-origin: 0 50%; transform: scaleX(0);
  box-shadow: 0 0 12px rgb(34 197 94 / .6);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: clamp(1rem, 3vw, 3.5rem);
  padding-inline: var(--gutter);
  overflow: hidden;
  background: var(--bg);
  --hero-bg-dim: .34;
}

/* nav */
.nav {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: clamp(1rem, 2.2vw, 1.75rem) var(--gutter);
  font-family: var(--ui); font-size: .875rem;
}
.nav__tc { display: flex; align-items: center; gap: .55rem; color: var(--ink-2); }
.nav__rec { font-weight: 600; color: var(--ink); }
.rec {
  width: .55rem; height: .55rem; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 0 rgb(34 197 94 / .5);
  animation: rec 1.6s steps(1) infinite;
}
@keyframes rec { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.nav__links { display: flex; gap: clamp(1.1rem, 2.6vw, 2.4rem); }
.nav__links a {
  position: relative; display: block; padding: .7rem .35rem; margin-inline: -.35rem; text-decoration: none; font-weight: 500;
}
.nav__links a::after {
  content: ""; position: absolute; left: .35rem; right: .35rem; bottom: .45rem; height: 2px;
  background: var(--green); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .35s var(--ease);
}
.nav__links a:hover::after, .nav__links a:focus-visible::after { transform: scaleX(1); }

/* portrait */
.hero__photo {
  grid-column: 1; align-self: end; justify-self: center;
  width: min(100%, 78svh * .7525, 38rem);
  will-change: transform;
}
.hero__photo-inner { position: relative; will-change: transform; }
.hero__rise { position: relative; }
.hero__img {
  width: 100%; height: auto;
  filter: drop-shadow(0 0 26px rgb(34 197 94 / .16)) drop-shadow(0 30px 50px rgb(0 0 0 / .6));
}
.hero__glow {
  position: absolute; inset: -6% -22% 0 -22%; z-index: -1;
  background:
    radial-gradient(46% 40% at 50% 46%, rgb(242 238 232 / .2), transparent 70%),
    radial-gradient(60% 56% at 50% 50%, rgb(34 197 94 / .26), transparent 72%);
  opacity: .75;
}
/* Light sweep across the portrait. It needs the cutout as a mask, and browsers refuse
   mask images on file://, so it is only switched on when the page is served over http. */
.hero__sweep { display: none; position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.can-mask .hero__sweep {
  display: block;
  -webkit-mask: url("assets/me-cutout.webp") center / 100% 100% no-repeat;
  mask: url("assets/me-cutout.webp") center / 100% 100% no-repeat;
}
.hero__sweep::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 26%;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(226,255,236,.3) 50%, rgba(255,255,255,0));
  transform: translateX(-110%);
  opacity: 0;
}

/* text */
.hero__text {
  grid-column: 2; align-self: center; z-index: 2;
  padding-block: 5.5rem 4rem;
  will-change: transform, opacity;
}
.hero__text-inner { position: relative; will-change: transform; }
.hero__text-inner::before {
  content: ""; position: absolute; inset: -12% -14% -16% -12%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgb(8 8 9 / .5), rgb(8 8 9 / .28) 55%, transparent);
}
.hero__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: min(13.5vw, 24svh, 15rem);
  line-height: .84;
  letter-spacing: -.035em;
  margin-left: -.04em;
  text-shadow: 0 2px 40px rgb(0 0 0 / .6);
}
.hero__line { display: block; overflow: hidden; padding: .06em .04em .08em; margin: -.06em -.04em -.08em; }
.hero__line .ch { display: inline-block; will-change: transform; }

.hero__rule {
  height: 2px; width: min(100%, 34rem); margin-top: clamp(1.1rem, 2.6svh, 2rem);
  background: linear-gradient(90deg, var(--green) 0 3.5rem, var(--line) 3.5rem);
  transform-origin: 0 50%;
}
.hero__role {
  margin-top: clamp(.8rem, 2svh, 1.25rem);
  font-family: var(--ui); font-weight: 500;
  font-size: clamp(1.15rem, 2vw, 1.75rem);
  letter-spacing: -.01em;
}
.hero__pitch {
  max-width: 34rem; margin-top: clamp(.5rem, 1.2svh, .8rem);
  color: var(--ink-2); font-size: clamp(.95rem, 1.2vw, 1.125rem); line-height: 1.5;
  text-shadow: 0 1px 14px rgb(0 0 0 / .7);
}
.skills {
  margin-top: clamp(1rem, 2.6svh, 1.75rem);
  display: grid; grid-template-columns: repeat(2, max-content);
  gap: .55rem clamp(1.5rem, 3vw, 3rem);
  font-weight: 500; font-size: clamp(.9rem, 1.15vw, 1.0625rem);
  color: var(--ink);
  text-shadow: 0 1px 14px rgb(0 0 0 / .7);
}
.skills li { display: flex; align-items: center; gap: .7rem; }
.skills li::before {
  content: ""; flex: none; width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgb(34 197 94 / .7);
}
.skills li { position: relative; }
.skills li::after {
  content: ""; position: absolute; left: 0; top: 50%; width: .5rem; height: .5rem; margin-top: -.25rem;
  border-radius: 50%; border: 1px solid var(--green); opacity: 0;
  animation: ping 2.8s var(--ease) infinite;
  animation-delay: calc(var(--i, 0) * .35s + 2.4s);
}
@keyframes ping {
  0% { transform: scale(1); opacity: .8; }
  45%, 100% { transform: scale(3.2); opacity: 0; }
}

.hero__fade {
  position: absolute; inset: auto 0 0 0; height: 20%; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, var(--bg) 4%, rgb(12 12 13 / .55) 45%, transparent);
}

/* Scroll cue: the playhead fades at the loop boundary. */
.cue {
  position: absolute; right: var(--gutter); bottom: clamp(1.25rem, 3.5svh, 2.25rem); z-index: 3;
  display: flex; align-items: center; gap: .9rem;
  font-family: var(--ui); font-size: .8125rem; color: var(--ink-2); text-decoration: none;
}
.cue__label { color: var(--ink); font-weight: 500; }
.cue__track {
  position: relative; width: 5.5rem; height: 20px; overflow: hidden;
  background: linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat;
}
.cue__head {
  position: absolute; inset: 0; width: 100%;
  transform: translateX(4px);
  animation: cue 3.2s linear infinite;
}
.cue__head::after {
  content: ""; position: absolute; left: 0; top: 6px; width: 2px; height: 11px;
  background: var(--green);
  box-shadow: 0 0 8px rgb(34 197 94 / .8);
}
.cue__head::before {
  content: ""; position: absolute; left: -3px; top: 2px; border: 4px solid transparent; border-top-color: var(--green);
}
@keyframes cue {
  0% { transform: translateX(4px); opacity: 0; }
  8%, 92% { opacity: 1; }
  100% { transform: translateX(calc(100% - 6px)); opacity: 0; }
}
.cue__frame { min-width: 5.2em; }

/* ---- load sequence (only when JS is running) ---- */
.js .hero__rise { transform: translate3d(0, 34%, 0) scale(1.07); opacity: 0; transform-origin: 50% 100%; }
.js .hero__glow { opacity: 0; }
.js .hero__line .ch { transform: translate3d(0, 112%, 0); }
.js .hero__rule { transform: scaleX(0); }
.js .hero__role, .js .hero__pitch, .js .skills li, .js .nav, .js .cue, .js .hero__cta, .js .header-character { opacity: 0; }

.js .is-loaded .hero__rise { animation: rise 1.7s var(--ease) both; }
.js .is-loaded .hero__glow { animation: glow 2.6s var(--ease) .25s both; }
.js .is-loaded .hero__sweep::before { animation: sweep 1.5s var(--ease-io) .75s both; }
.js .is-loaded .hero__line .ch {
  animation: letter 1s var(--ease) both, proxy .5s steps(1, end) both;
  animation-delay: calc(.35s + var(--i) * .045s), calc(.6s + var(--i) * .045s);
}
.js .is-loaded .hero__rule { animation: wipe 1s var(--ease) 1s both; }
.js .is-loaded .hero__role { animation: fade-up .8s var(--ease) 1.15s both; }
.js .is-loaded .hero__pitch { animation: fade-up .8s var(--ease) 1.3s both; }
.js .is-loaded .hero__cta { animation: fade-up .8s var(--ease) 1.6s both; }
.js .is-loaded .header-character { animation: fade .9s ease 1.4s both; }
.js .is-loaded .skills li { animation: fade-right .7s var(--ease) both; animation-delay: calc(1.35s + var(--i) * .085s); }
.js .is-loaded .nav { animation: fade .9s ease 1.2s both; }
.js .is-loaded .cue { animation: fade .9s ease 2.1s both; }

@keyframes rise {
  from { transform: translate3d(0, 34%, 0) scale(1.07); opacity: 0; }
  35% { opacity: 1; }
  to { transform: none; opacity: 1; }
}
@keyframes glow { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: .75; } }
@keyframes sweep {
  0% { transform: translateX(-110%); opacity: 1; }
  100% { transform: translateX(400%); opacity: 1; }
}
@keyframes letter { from { transform: translate3d(0, 112%, 0); } to { transform: none; } }
/* each letter lands as a low-res proxy, then snaps to full quality */
@keyframes proxy { from { font-family: var(--pixel); } to { font-family: var(--serif); } }
@keyframes wipe { from { transform: scaleX(0); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade-right { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }

.hero.is-idle .rec, .hero.is-idle .cue__head, .hero.is-idle .skills li::after { animation-play-state: paused; }

/* ============ SECTIONS ============ */
.section { position: relative; padding-block: clamp(4.5rem, 11vw, 10rem); }
.work { padding-top: clamp(3.5rem, 8vw, 7rem); }

/* timeline ruler above each section */
.ruler {
  position: relative; height: 22px; overflow: hidden;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  background:
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 12px) 0 100% / 120px 6px repeat-x,
    repeating-linear-gradient(90deg, rgb(242 238 232 / .26) 0 1px, transparent 1px 120px) 0 100% / 120px 14px repeat-x;
  border-bottom: 1px solid var(--line);
  animation: ruler-travel 6s linear infinite;
}
.ruler::before {
  content: ""; position: absolute; left: calc(22% - 4px); top: 0;
  border: 5px solid transparent; border-top-color: var(--green);
}
.ruler::after {
  content: ""; position: absolute; left: 22%; top: 4px; bottom: 0;
  width: 2px; background: var(--green);
}
@keyframes ruler-travel {
  to { background-position: -120px 100%, -120px 100%; }
}
.section__head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 1.25rem clamp(1.5rem, 4vw, 4rem);
  margin-bottom: clamp(3rem, 7vw, 6.5rem);
}
.section__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3rem, 8vw, 8.25rem);
  line-height: .9; letter-spacing: -.035em;
}
.section__lede { flex: 1 1 16rem; max-width: 23rem; color: var(--ink-2); font-size: clamp(1rem, 1.2vw, 1.125rem); padding-bottom: .5em; }

/* ---------- Project ---------- */
.project { --clip: var(--teal); }
.project--amber { --clip: var(--amber); }
.project + .project { margin-top: clamp(5rem, 11vw, 10rem); }

.project__head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: .4rem 1.5rem;
  padding-bottom: 1.1rem; margin-bottom: clamp(1.1rem, 2vw, 1.75rem);
  border-bottom: 1px solid var(--line);
}
.project__title {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(2.2rem, 4.6vw, 4.25rem); line-height: 1; letter-spacing: -.02em;
}
.project__kind { font-family: var(--ui); font-size: clamp(.95rem, 1.2vw, 1.125rem); color: var(--ink-2); }
.project__dur {
  display: inline-flex; align-items: baseline; gap: .75rem; margin-left: auto;
  font-family: var(--ui); font-size: .75rem; color: var(--muted);
}
.project__dur .tc { color: var(--clip); font-size: .9375rem; }

.project__grid {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  grid-template-areas: "main side" "main info";
  grid-template-rows: auto 1fr;
  gap: clamp(1rem, 1.8vw, 1.75rem) clamp(1rem, 2vw, 2rem);
}
.project--flip .project__grid {
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  grid-template-areas: "side main" "info main";
}
.clip--main { grid-area: main; }
.clip--side { grid-area: side; }
.project__info { grid-area: info; }

/* a clip, as it sits on a timeline track */
.clip {
  align-self: start;
  border-radius: 3px; overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--clip) 55%, transparent), 0 30px 60px -30px rgb(0 0 0 / .9);
}
.clip__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .38rem .75rem;
  background: var(--clip); color: #0c0c0d;
  font-family: var(--ui); font-size: .8125rem; font-weight: 600; line-height: 1.3;
}
.clip__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip__tc { flex: none; font-weight: 500; }
.clip__btn {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  padding: 0; border: 0; background: #000; cursor: pointer; overflow: hidden;
}
.clip__btn:focus-visible { outline-offset: -4px; }
.clip__video { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.clip__progress { position: absolute; inset: auto 0 0 0; height: 3px; background: rgb(0 0 0 / .45); }
.clip__progress i { display: block; height: 100%; background: var(--green); transform-origin: 0 50%; transform: scaleX(0); }
.clip__scrub {
  position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--green);
  box-shadow: 0 0 10px rgb(34 197 94 / .9); opacity: 0; transition: opacity .2s;
  pointer-events: none; will-change: transform;
}
.clip__scrub::before {
  content: ""; position: absolute; left: -5px; top: 0; border: 6px solid transparent; border-top: 8px solid var(--green);
}
.clip__btn.is-scrubbing .clip__scrub { opacity: 1; }
.clip__play {
  position: absolute; right: .8rem; bottom: 1rem;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .5rem .7rem; border: 1px solid rgb(242 238 232 / .22); border-radius: 2px;
  background: rgb(24 25 27 / .94); color: var(--ink);
  font-family: var(--ui); font-size: .8125rem; font-weight: 500;
  transition: background-color .2s, border-color .2s;
}
.clip__play svg { color: var(--green); transition: color .25s; }
@media (hover: hover) {
  .clip__btn:hover .clip__video { transform: scale(1.025); }
  .clip__btn:hover .clip__play { background: #282b2d; border-color: var(--clip); }
}
.clip__btn:focus-visible .clip__play { border-color: var(--green); }

.project__info { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; padding-top: .35rem; }
.project__desc { color: var(--ink-2); font-size: clamp(.95rem, 1.05vw, 1.0625rem); max-width: 34rem; }
/* Techniques: one muted metadata line, not a grid of badges. */
.tags {
  display: flex; flex-wrap: wrap; width: 100%; max-width: 34rem;
  padding-top: .9rem; border-top: 1px solid #2a2b2d;
  font-family: var(--ui); font-size: .8125rem; line-height: 1.7; color: #a7a39d;
}
.tags { overflow: hidden; column-gap: 1.2rem; }
.tags li { position: relative; }
/* Separator sits before each item; the one starting a wrapped line falls outside the list and is clipped. */
.tags li::before { content: "\00b7"; position: absolute; right: 100%; width: 1.2rem; text-align: center; color: var(--clip); }
.tags svg { display: none; }
.btn {
  display: inline-flex; align-items: stretch; min-height: 44px; margin-top: auto;
  padding: 0; border-radius: 3px; border: 1px solid #454749;
  background: #222426; color: var(--ink); cursor: pointer;
  font-family: var(--ui); font-weight: 500; font-size: .8125rem; text-align: left;
  transition: background-color .2s, border-color .2s;
}
.btn__play { display: grid; place-items: center; width: 44px; border-right: 1px solid #454749; }
.btn__play svg { color: var(--green); width: 11px; height: 13px; }
.btn__label { display: flex; align-items: center; padding-inline: 1rem; }
.btn__duration { display: flex; align-items: center; padding-inline: .8rem; border-left: 1px solid #454749; color: var(--ink-2); }
.btn:hover { background: #303336; border-color: var(--clip); }
.btn:active { background: #191b1d; }

/* ============ MOTION ============ */
.motion-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 4rem) clamp(1rem, 2vw, 2rem);
}
.mg:nth-child(even) { margin-top: clamp(2.5rem, 6vw, 6rem); margin-bottom: calc(clamp(2.5rem, 6vw, 6rem) * -1); }
.motion-grid { padding-bottom: clamp(2.5rem, 6vw, 6rem); }
.motion-tile {
  aspect-ratio: 16 / 9; overflow: hidden; border-radius: 7px; background: var(--bg);
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgb(0 0 0 / .9);
}
.mg figcaption {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .2rem 1rem;
  padding-top: .9rem;
}
.mg__title { font-family: var(--serif); font-size: clamp(1.3rem, 2vw, 1.75rem); line-height: 1.15; letter-spacing: -.01em; }
.mg__meta { font-family: var(--ui); font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ============ CONTACT ============ */
.contact { padding-block: clamp(6rem, 15vw, 14rem) clamp(5rem, 10vw, 9rem); overflow: hidden; }
.contact .wrap { position: relative; }
.ease {
  /* sized to the title band only, so the curve never runs through the form or the steps copy */
  position: absolute; left: var(--gutter); right: var(--gutter); top: clamp(-6rem, -6vw, -2rem); width: calc(100% - var(--gutter) * 2); height: clamp(9rem, 30vw, 26rem);
  overflow: visible; pointer-events: none; opacity: .4;
}
.ease__curve { fill: none; stroke: var(--green); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; }
.ease__handle { stroke: rgb(242 238 232 / .2); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 4 5; }
.js .ease__curve { stroke-dashoffset: 1; transition: stroke-dashoffset 2.2s var(--ease-io); }
.js .ease.is-in .ease__curve { stroke-dashoffset: 0; }
/* the handles only make sense next to the drawn curve: fade them in once it lands */
.js .ease__handle { opacity: 0; transition: opacity .8s ease 1.8s; }
.js .ease.is-in .ease__handle { opacity: 1; }
.contact__title {
  position: relative;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3.5rem, 14vw, 13rem);
  line-height: .88; letter-spacing: -.04em;
}
.contact__line { display: block; }
.contact__line:last-child { font-style: italic; padding-left: clamp(1.5rem, 9vw, 9rem); }
.contact__dot { width: .55rem; height: .55rem; border-radius: 50%; border: 1.5px solid var(--amber); }

.footer { border-top: 1px solid var(--line); padding-block: 1.5rem 2rem; font-family: var(--ui); font-size: .875rem; color: var(--ink-2); }
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
.footer a { text-underline-offset: .25em; text-decoration-color: var(--green); }
.footer a:hover { color: var(--ink); }

/* ============ LIGHTBOX ============ */
.lightbox {
  width: min(94vw, 150vh, 80rem); max-width: none; max-height: none;
  padding: 0; border: 0; border-radius: 3px; overflow: hidden;
  background: var(--bg-2); color: var(--ink);
  box-shadow: 0 0 0 1px var(--line), 0 40px 120px rgb(0 0 0 / .8);
  overscroll-behavior: contain;
  opacity: 0; transform: scale(.97);
  transition: opacity .3s ease, transform .45s var(--ease), overlay .45s allow-discrete, display .45s allow-discrete;
}
.lightbox[open] { opacity: 1; transform: none; }
@starting-style { .lightbox[open] { opacity: 0; transform: scale(.97); } }
.lightbox::backdrop {
  background: rgb(6 6 7 / .88);
  overflow: hidden; overscroll-behavior: contain;
}
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem .6rem .6rem 1rem; }
.lightbox__title { font-family: var(--ui); font-weight: 500; font-size: .9375rem; }
.lightbox__close {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .55rem .9rem; border-radius: 3px; border: 1px solid var(--line);
  background: transparent; cursor: pointer; font-family: var(--ui); font-size: .875rem;
  transition: background-color .2s, color .2s, border-color .2s;
}
.lightbox__close:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.lightbox__video { width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }

/* ============ SCROLL REVEALS ============ */
.js .reveal { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
/* media is trimmed in from its in-point, like dragging a clip edge */
.js .trim { clip-path: inset(0 100% 0 0 round 3px); transition: clip-path 1.2s var(--ease-io); }
.js .trim.is-in { clip-path: inset(0 0 0 0 round 3px); }
.js .trim.is-done { clip-path: none; }
.js .clip--side.trim { transition-delay: .15s; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .project__grid, .project--flip .project__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "main main" "side info";
    grid-template-rows: auto auto;
  }
}

@media (max-width: 860px) {
  .section__lede { padding-bottom: 0; max-width: 30rem; }
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    --hero-bg-dim: .42;
  }
  .hero__text { grid-column: 1; grid-row: 1; align-self: start; padding-block: 5.25rem 0; }
  .hero__name { font-size: min(21vw, 13svh); }
  .hero__photo {
    grid-column: 1; grid-row: 2; justify-self: center; align-self: end;
    width: min(86%, 47svh * .7525);
    margin-top: 1rem;
  }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem .75rem; font-size: .84rem; }
  .skills li { gap: .5rem; }
  .cue { display: none; }
  .hero__fade { height: 14%; }

  .project__grid, .project--flip .project__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "main" "side" "info";
  }
  .motion-grid { grid-template-columns: minmax(0, 1fr); padding-bottom: 0; }
  .mg:nth-child(even) { margin-block: 0; }
  .ease { opacity: .35; }
}

/* Tablets held upright: stack the hero like a phone instead of squeezing two columns */
@media (min-width: 761px) and (max-width: 1100px) and (orientation: portrait) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    --hero-bg-dim: .42;
  }
  .hero__text { grid-column: 1; grid-row: 1; align-self: start; padding-block: 6.5rem 0; }
  .hero__name { font-size: min(19vw, 14svh); }
  .hero__photo {
    grid-column: 1; grid-row: 2; justify-self: center; align-self: end;
    width: min(74%, 52svh * .7525);
    margin-top: 1rem;
  }
  .skills { grid-template-columns: repeat(2, minmax(0, max-content)); gap: .6rem 2.5rem; }
  .cue { display: none; }
  .hero__fade { height: 14%; }
}

@media (max-width: 420px) {
  .nav__rec { display: none; }
  .nav { font-size: .8125rem; }
  .skills { font-size: .8rem; }
}
/* very narrow phones: the running timecode gives its room to the Contact link */
@media (max-width: 380px) {
  .nav__tc .tc { display: none; }
  .nav__links { gap: 1rem; }
}

/* short landscape windows: keep the call to action above the fold */
@media (min-width: 761px) and (max-height: 560px) {
  .hero__text { padding-block: 3.5rem 1rem; }
  .hero__name { font-size: min(11vw, 20svh); }
  .hero__rule { margin-top: .6rem; }
  .hero__role { margin-top: .4rem; font-size: 1.1rem; }
  .hero__pitch { margin-top: .25rem; font-size: .9rem; }
  .skills { gap: .2rem 2rem; margin-top: .6rem; font-size: .85rem; }
  .skills li:nth-child(n + 5) { display: none; }
  .hero__cta { margin-top: .75rem; }
  .cta { min-height: 44px; }
  .cta__icon { width: 44px; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .hero__rise, .js .hero__line .ch, .js .hero__rule, .js .reveal { transform: none; opacity: 1; }
  .js .hero__glow { opacity: .75; }
  .js .hero__role, .js .hero__pitch, .js .skills li, .js .nav, .js .cue, .js .hero__cta, .js .header-character { opacity: 1; }
  .js .ease__handle { opacity: 1; }
  .js .trim { clip-path: none; }
  .js .ease__curve { stroke-dashoffset: 0; }
  .lightbox { opacity: 1; transform: none; }
}
