/* ==========================================================================
   Sabina Rai — Portfolio
   ========================================================================== */

@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("assets/fonts/inter-tight-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("assets/fonts/geist-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0e0d0b;
  --ink-2: #181613;
  --paper: #eee8dd;
  --paper-2: #e3dbcc;
  --accent: #e2481c;

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(16px, 2.6vw, 40px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Defaults (dark); sections override with .theme-* */
  --bg: var(--ink);
  --fg: var(--paper);
  --muted: rgba(238, 232, 221, 0.55);
  --line: rgba(238, 232, 221, 0.16);
}

.theme-dark {
  --bg: var(--ink);
  --fg: var(--paper);
  --muted: rgba(238, 232, 221, 0.55);
  --line: rgba(238, 232, 221, 0.16);
  background: var(--bg);
  color: var(--fg);
}

.theme-light {
  --bg: var(--paper);
  --fg: var(--ink);
  --muted: rgba(14, 13, 11, 0.56);
  --line: rgba(14, 13, 11, 0.16);
  background: var(--bg);
  color: var(--fg);
}

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

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

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, video { display: block; max-width: 100%; }

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

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

em { font-style: italic; }

::selection { background: var(--accent); color: var(--paper); }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Primitives ---------- */

.label {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

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

.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0;
}

.display em { font-style: italic; }

.link-u {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.6s var(--ease);
  padding-bottom: 2px;
}
.link-u:hover { background-size: 100% 1px; }

.pad { padding-left: var(--gutter); padding-right: var(--gutter); }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}

.sec-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

/* ---------- Grain ---------- */

.grain {
  position: fixed;
  inset: -50%;
  z-index: 100;
  pointer-events: none;
  opacity: 0.07;
  transform: translateZ(0);
  will-change: transform;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Cursor ---------- */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  pointer-events: none;
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  display: grid;
  place-items: center;
}
.cursor span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--paper);
  transform: scale(0);
  transition: transform 0.45s var(--ease);
}
.cursor.is-active span { transform: scale(1); }
.cursor span { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; }
@media (pointer: coarse) { .cursor { display: none; } }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px var(--gutter);
  color: #fff;
  mix-blend-mode: difference;
}

.nav__logo {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.01em;
}

.nav__links { display: flex; gap: 28px; }
.nav__links a { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; }

.nav__end { justify-self: end; display: flex; gap: 10px; align-items: center; }
.nav__time { display: flex; gap: 10px; align-items: center; margin-right: 10px; }

.nav__btn {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.nav__btn:hover { background: #fff; color: #000; }
.nav__time .dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  animation: blink 2s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0.2; } }

.nav__menu { display: none; margin-left: 6px; }

.menu {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 96px var(--gutter) 32px;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.8s var(--ease);
}
.menu a {
  font-family: var(--serif);
  font-size: clamp(3.4rem, 16vw, 6rem);
  line-height: 1;
  border-bottom: 1px solid rgba(238, 232, 221, 0.16);
  padding: 8px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.menu a .label { color: rgba(238, 232, 221, 0.55); }
body.menu-open .menu { clip-path: inset(0 0 0 0); }

/* ---------- Hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 96px var(--gutter) 28px;
  position: relative;
}

.hero__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  color: var(--muted);
}
.hero__meta > :nth-child(2) { text-align: center; }
.hero__meta > :nth-child(3) { text-align: right; }

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(5.5rem, min(27vw, 36svh), 32rem);
  line-height: 0.8;
  letter-spacing: -0.035em;
  margin: 4vh 0;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.hero__title .line > span { display: inline-block; }
.hero__title .line--indent { text-align: right; }
.hero__title em { color: var(--accent); padding-right: 0.04em; }

.hero__foot {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.hero__intro {
  grid-column: 1 / span 5;
  margin: 0;
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  max-width: 34ch;
}
.hero__scroll { grid-column: 12; justify-self: end; display: inline-flex; gap: 8px; align-items: center; }
.hero__scroll .arrow { display: inline-block; animation: nudge 2.2s var(--ease) infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ---------- Intro film ---------- */

.film {
  position: relative;
  height: 100svh;
  overflow: hidden;
}

.film__top,
.film__bottom {
  position: absolute;
  left: 0;
  right: 0;
  padding: 0 var(--gutter);
}
.film__top { top: 0; height: 22%; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 2.2vh; }
.film__bottom { bottom: 0; height: 16%; display: flex; align-items: center; justify-content: space-between; color: var(--muted); }

.film__heading {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.4vw, 6.4rem);
  line-height: 0.9;
  letter-spacing: -0.025em;
}
.film__heading em { font-style: italic; color: var(--accent); }

/* Full-bleed by default; JS starts it as an inset card and grows it on scroll */
.film__frame {
  position: absolute;
  inset: 0;
  background: #000;
  overflow: hidden;
  outline: none;
  cursor: none;
}
@media (pointer: coarse) { .film__frame { cursor: pointer; } }

.film__frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Player */

.player {
  position: absolute;
  left: clamp(12px, 2vw, 28px);
  right: clamp(12px, 2vw, 28px);
  bottom: clamp(12px, 2vw, 28px);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: rgba(14, 13, 11, 0.55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--paper);
  cursor: auto;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.film__frame:not(.is-started) .player,
.film__frame.is-idle .player { opacity: 0; transform: translateY(12px); pointer-events: none; }

.player__btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background 0.3s;
}
.player__btn:hover { background: rgba(238, 232, 221, 0.14); }
.player__btn svg { width: 20px; height: 20px; fill: currentColor; }
.player__btn[data-action="toggle"] { background: var(--paper); color: var(--ink); }
.player__btn[data-action="toggle"]:hover { background: #fff; }

.i-pause, .i-muted { display: none; }
.film__frame.is-playing .i-play { display: none; }
.film__frame.is-playing .i-pause { display: block; }
.film__frame.is-muted .i-vol { display: none; }
.film__frame.is-muted .i-muted { display: block; }

.player__time { flex-shrink: 0; min-width: 88px; font-variant-numeric: tabular-nums; }
.player__time .muted { color: rgba(238, 232, 221, 0.55); }

.player__bar {
  position: relative;
  flex: 1;
  height: 28px;
  cursor: pointer;
  touch-action: none;
}
.player__bar::before,
.player__buffer,
.player__fill {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 3px;
}
.player__bar::before { background: rgba(238, 232, 221, 0.2); }
.player__buffer { background: rgba(238, 232, 221, 0.3); transform-origin: 0 50%; transform: scaleX(0); }
.player__fill { background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.player__bar:hover::before, .player__bar:hover .player__buffer, .player__bar:hover .player__fill { height: 5px; margin-top: -2.5px; }

.player__vol { display: flex; align-items: center; gap: 4px; }
.player__range {
  -webkit-appearance: none;
  appearance: none;
  width: 84px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(var(--paper), var(--paper)) 0 0 / var(--vol, 100%) 100% no-repeat, rgba(238, 232, 221, 0.25);
  cursor: pointer;
}
.player__range::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 0; }
.player__range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 0; }

/* Centre pills */

.film__sound,
.film__replay {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px 14px 16px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.film__sound svg, .film__replay svg { width: 22px; height: 22px; fill: currentColor; }
.film__sound svg path + path { fill: none; }
.film__frame.is-started.is-muted.is-playing .film__sound,
.film__frame.is-ended .film__replay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}
.film__frame.is-ended .film__sound { opacity: 0; pointer-events: none; }

.film__missing {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: rgba(238, 232, 221, 0.6);
  background: var(--ink-2);
}
.film__frame:fullscreen { clip-path: none !important; }
.film__frame:fullscreen video { object-fit: contain; }

/* No scroll animation (reduced motion): show the card at its framed size */
@media (min-width: 761px) {
  html:not(.js) .film__frame { inset: 22% 24% 16% 24%; border-radius: 14px; }
}

.film__frame.is-missing .film__missing { display: grid; }
.film__frame.is-missing .player,
.film__frame.is-missing .film__sound,
.film__frame.is-missing video { display: none; }

/* ---------- Marquee ---------- */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2.2vh 0;
  white-space: nowrap;
}
.marquee__track { display: inline-flex; animation: marquee 38s linear infinite; }
.marquee__track span {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 7vw, 6.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  padding-right: 0.35em;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}
.marquee__track span:nth-child(even) { font-style: italic; }
.marquee__track i {
  width: 0.28em; height: 0.28em; border-radius: 50%; background: var(--accent); display: inline-block;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- About ---------- */

.about { padding: 18vh var(--gutter) 14vh; }

.about__label { grid-column: 1 / span 3; }

.about__statement {
  grid-column: 4 / span 9;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  text-indent: 12%;
}
.about__statement em { font-style: italic; color: var(--accent); }

.about__facts { margin-top: 14vh; row-gap: 32px; }
.fact { grid-column: span 3; border-top: 1px solid var(--line); padding-top: 14px; }
.fact:first-child { grid-column: 4 / span 3; }
.fact p { margin: 10px 0 0; font-size: 1.05rem; line-height: 1.4; letter-spacing: -0.01em; }

/* ---------- Work ---------- */

.work { padding: 0 var(--gutter) 16vh; }

.work__heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin: 8vh 0 6vh;
}
.work__heading .display { font-size: clamp(4rem, 13vw, 13rem); }
.work__heading p { max-width: 30ch; margin: 0 0 1.2vw; color: var(--muted); }

.story { display: block; }

.story__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 8.2;
  border-radius: 6px;
  background: var(--paper-2);
}
.story__media img {
  position: absolute;
  inset: -10% 0;
  width: 100%;
  height: 120%;
  object-fit: cover;
}
.story__zoom { position: absolute; inset: 0; transition: transform 1.4s var(--ease); }
.story:hover .story__zoom { transform: scale(1.04); }

.story__row { margin-top: 22px; row-gap: 24px; align-items: start; }
.story__num { grid-column: 1 / span 1; }
.story__title {
  grid-column: 2 / span 6;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 5.2rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
  margin: 0;
}
.story__title em { font-style: italic; }
.story__side { grid-column: 9 / span 4; display: flex; flex-direction: column; gap: 22px; }
.story__dek { margin: 0; font-size: 1.05rem; line-height: 1.45; letter-spacing: -0.01em; }

.meta-list { margin: 0; display: grid; grid-template-columns: auto 1fr; border-top: 1px solid var(--line); }
.meta-list dt, .meta-list dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.meta-list dt { color: var(--muted); padding-right: 24px; }
.meta-list dd { text-align: right; }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cta .arr {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s;
}
.story:hover .cta .arr, .cta:hover .arr { background: var(--accent); border-color: var(--accent); color: var(--paper); }

.reel { margin-top: 16vh; padding-top: 22px; border-top: 1px solid var(--line); align-items: center; row-gap: 40px; }
.reel__media { grid-column: 2 / span 4; }
.reel__frame {
  position: relative;
  aspect-ratio: 9 / 16;
  max-height: 86vh;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 18px;
  background: var(--ink);
  cursor: pointer;
}
.reel__frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel__sound {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(14, 13, 11, 0.55);
  color: var(--paper);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.3s var(--ease);
}
.reel__sound:hover { background: var(--accent); }
.reel__text { grid-column: 7 / -1; }
.reel .story__title { font-size: clamp(2.4rem, 4.4vw, 4.6rem); margin: 18px 0 32px; }

/* ---------- Resume ---------- */

.resume { padding: 12vh var(--gutter) 18vh; }
.resume .display { font-size: clamp(4rem, 14.5vw, 15rem); margin: 7vh 0 9vh; }
.resume .display em { color: var(--accent); }

.resume .display { margin-bottom: 6vh; }

.resume__profile {
  max-width: 34ch;
  margin: 0 0 10vh auto;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.4vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.resume__row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: start;
  padding: 36px 0 44px;
  border-top: 1px solid var(--line);
}
.resume__row:last-child { border-bottom: 1px solid var(--line); }
.resume__row > .label:first-child { grid-column: 1 / span 1; color: var(--muted); padding-top: 0.6em; }
.resume__row h3 {
  grid-column: 2 / span 4;
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.resume__body { grid-column: 6 / -1; margin: 0; }

.job + .job { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--line); }
.job__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 24px; flex-wrap: wrap; }
.job h4 { margin: 0; font-size: clamp(1.15rem, 1.5vw, 1.4rem); font-weight: 500; letter-spacing: -0.01em; line-height: 1.25; }
.job__org { margin: 8px 0 0; color: var(--accent); }
.job ul { margin: 16px 0 0; padding: 0; list-style: none; color: var(--muted); }
.job li { position: relative; padding-left: 20px; }
.job li + li { margin-top: 8px; }
.job li::before { content: "—"; position: absolute; left: 0; color: var(--line); }

.resume__skills > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px var(--gutter); }
.resume__skills > div + div { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.resume__skills dt { color: var(--fg); padding-top: 0.35em; }
.resume__skills dd { margin: 0; color: var(--muted); }

.resume__download { max-width: 640px; margin: 10vh 0 0 auto; }

/* ---------- Contact ---------- */

.contact { padding: 14vh var(--gutter) 12vh; }
.contact__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.6rem, 10.5vw, 11.5rem);
  line-height: 0.88;
  letter-spacing: -0.03em;
  margin: 7vh 0 12vh;
  max-width: 11ch;
}
.contact__title em { font-style: italic; color: var(--accent); }
.contact__links { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }

.big-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: clamp(22px, 3vw, 40px) clamp(24px, 3vw, 44px);
  border: 1px solid var(--fg);
  border-radius: 999px;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.6vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  transition: background 0.5s var(--ease), color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.big-btn__icon {
  font-family: var(--sans);
  font-size: 0.6em;
  transition: transform 0.5s var(--ease);
}
.big-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.big-btn:hover .big-btn__icon { transform: translate(4px, -4px); }
.big-btn[download]:hover .big-btn__icon { transform: translateY(5px); }
.big-btn--solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Strengths ---------- */

.strengths { margin-top: 16vh; }

.strength {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: baseline;
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.strength:last-child { border-bottom: 1px solid var(--line); }
.strength .label { grid-column: 1 / span 1; color: var(--muted); }
.strength h3 {
  grid-column: 2 / span 6;
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.2vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.strength h3 em { font-style: italic; }
.strength p { grid-column: 8 / span 5; margin: 0; font-size: 1.05rem; line-height: 1.5; letter-spacing: -0.01em; max-width: 42ch; }

/* ---------- Footer ---------- */

.footer { padding: 22px var(--gutter) 0; overflow: hidden; }
.footer__row { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); }
.footer__row a { color: var(--fg); }
.footer__mark {
  font-family: var(--serif);
  font-size: 23vw; /* refined to fit exactly by main.js */
  line-height: 0.74;
  letter-spacing: -0.045em;
  white-space: nowrap;
  margin: 5vh 0 0 -0.04em;
  padding-bottom: 0.04em;
}
.footer__mark [data-fit] { display: inline-block; }
.footer__mark em { font-style: italic; color: var(--accent); }

/* ==========================================================================
   Article page
   ========================================================================== */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

.a-hero { padding: 120px var(--gutter) 0; }

.a-hero__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; color: var(--muted); }
.a-hero__meta a { color: var(--fg); }

.a-hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.8rem, 15vw, 17rem);
  line-height: 0.84;
  letter-spacing: -0.035em;
  margin: 8vh 0 0;
}
.a-hero__title .line { display: block; overflow: hidden; padding-bottom: 0.07em; margin-bottom: -0.07em; }
.a-hero__title .line > span { display: inline-block; }
.a-hero__title .line--indent { padding-left: 14vw; }
.a-hero__title em { font-style: italic; color: var(--accent); }

.a-hero__dek { margin: 6vh 0 0; row-gap: 20px; align-items: end; }
.a-hero__dek p {
  grid-column: 1 / span 6;
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  max-width: 30ch;
}
.a-hero__dek .label { grid-column: 12; justify-self: end; }

.a-cover { margin: 8vh 0 0; }
.a-cover__media { position: relative; overflow: hidden; height: 92svh; }
.a-cover__media img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; }
.a-cover figcaption { padding: 14px var(--gutter) 0; }

.a-body { padding: 14vh var(--gutter) 10vh; }

.a-aside { grid-column: 1 / span 3; }
.a-aside__inner { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 0; }
.a-aside .meta-list { grid-template-columns: 1fr; }
.a-aside .meta-list dt { padding-bottom: 2px; border-bottom: 0; }
.a-aside .meta-list dd { text-align: left; padding-top: 0; }
.a-aside .btn { margin-top: 24px; }

.a-text { grid-column: 5 / span 6; }

.a-text p {
  font-size: clamp(1.08rem, 1.25vw, 1.22rem);
  line-height: 1.68;
  letter-spacing: -0.005em;
  margin: 0 0 1.35em;
  max-width: 62ch;
}

.a-text p.first::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 5.6em;
  line-height: 0.78;
  padding: 0.06em 0.1em 0 0;
  color: var(--accent);
}

.a-text .dateline { display: block; margin-bottom: 18px; color: var(--accent); }

.a-fig { margin: 11vh 0; }
.a-fig img { width: 100%; border-radius: 4px; }

figcaption.cap {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
  max-width: 70ch;
}
figcaption.cap .label { color: var(--fg); flex-shrink: 0; padding-top: 3px; }

.a-wide { padding: 0 var(--gutter); }
.a-wide img { width: 100%; border-radius: 4px; }
.a-wide .cap { margin-left: auto; margin-right: 0; }

.a-quote {
  padding: 18vh var(--gutter);
  text-align: center;
}
.a-quote blockquote {
  margin: 0 auto;
  max-width: 17ch;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6.4vw, 7rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
}
.a-quote blockquote em { font-style: italic; color: var(--accent); }
.a-quote .label { display: block; margin-top: 40px; color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s;
}
.btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.next {
  display: block;
  padding: 12vh var(--gutter) 10vh;
  border-top: 1px solid var(--line);
}
.next .display { font-size: clamp(3.6rem, 12vw, 13rem); margin-top: 4vh; transition: color 0.4s var(--ease); }
.next:hover .display { color: var(--accent); }

/* ==========================================================================
   Motion (initial states only apply when JS + motion are available)
   ========================================================================== */

.js .hero__title .line > span,
.js .a-hero__title .line > span { transform: translateY(105%); }
.js [data-reveal] { opacity: 0; transform: translateY(36px); }
.js .hero__meta, .js .hero__foot, .js .a-hero__meta { opacity: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1180px) {
  .nav__time { display: none; }
}

@media (max-width: 1000px) {
  .nav__links { gap: 18px; }
  .about__label { grid-column: 1 / -1; margin-bottom: 36px; }
  .about__statement { grid-column: 1 / -1; }
  .fact, .fact:first-child { grid-column: span 6; }
  .story__num { grid-column: 1 / span 2; }
  .story__title { grid-column: 3 / -1; }
  .story__side { grid-column: 3 / -1; }
  .reel__media { grid-column: 1 / span 5; }
  .reel__text { grid-column: 6 / -1; }
  .a-aside { grid-column: 1 / -1; margin-bottom: 8vh; }
  .a-aside__inner { position: static; }
  .a-aside .meta-list { grid-template-columns: repeat(3, 1fr); column-gap: var(--gutter); }
  .a-text { grid-column: 1 / -1; }
  .a-text p { max-width: none; }
  .strength h3 { grid-column: 2 / span 11; }
  .strength p { grid-column: 2 / span 11; margin-top: 14px; }
  .resume__row { row-gap: 28px; }
  .resume__row h3 { grid-column: 2 / -1; }
  .resume__body { grid-column: 2 / -1; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { grid-template-columns: 1fr auto; }
  .nav__links, .nav__time { display: none; }
  .nav__menu { display: block; }
  .nav__btn { padding: 6px 10px; }
  .hero__meta { grid-template-columns: 1fr 1fr; }
  .hero__meta > :nth-child(2) { display: none; }
  /* "Sabina" is ~2.13em wide: size it to span the screen */
  .hero__title { font-size: calc((100vw - 2 * var(--gutter)) / 2.18); margin: 8vh 0 6vh; }
  .hero__intro { grid-column: 1 / span 10; }
  .hero__scroll { grid-column: 11 / span 2; }
  /* Intro: no pinning on phones; a card at the video's own shape */
  .film { height: auto; padding: 88px var(--gutter) 8vh; }
  .film__top, .film__bottom { position: static; height: auto; padding: 0; }
  .film__top { justify-content: flex-start; padding-bottom: 20px; }
  .film__bottom { order: 3; padding-top: 14px; }
  .film { display: flex; flex-direction: column; }
  .film__frame { position: relative; inset: auto; aspect-ratio: var(--ar, 16 / 9); border-radius: 8px; }
  .film__frame video { object-fit: contain; }
  .player { gap: 8px; padding-right: 10px; }
  .player__range, .player__btn[data-action="fullscreen"] { display: none; }
  .player__time { min-width: 0; }
  .film__sound, .film__replay { padding: 10px 16px 10px 12px; }
  .about { padding-top: 12vh; }
  .about__statement { text-indent: 0; }
  .about__facts { margin-top: 9vh; }
  .fact, .fact:first-child { grid-column: 1 / -1; }
  .work__heading { flex-direction: column; align-items: flex-start; }
  .story__media { aspect-ratio: 4 / 5; }
  .story__num { grid-column: 1 / -1; }
  .story__title, .story__side { grid-column: 1 / -1; }
  .reel { margin-top: 12vh; }
  .reel__media, .reel__text { grid-column: 1 / -1; }
  .reel__frame { max-width: 320px; }
  .resume__row { row-gap: 28px; }
  .resume__row > .label:first-child { grid-column: 1 / span 2; padding-top: 0.5em; }
  .resume__row h3 { grid-column: 3 / -1; }
  .resume__body { grid-column: 1 / -1; }
  .resume__skills > div { grid-template-columns: 1fr; }
  .resume__download { margin-left: 0; }
  .contact__links { grid-template-columns: 1fr; }
  .strength .label { grid-column: 1 / -1; margin-bottom: 10px; }
  .strength h3, .strength p { grid-column: 1 / -1; }
  .a-hero { padding-top: 96px; }
  .a-hero__title .line--indent { padding-left: 0; }
  .a-hero__dek p { grid-column: 1 / -1; }
  .a-hero__dek .label { grid-column: 1 / -1; justify-self: start; }
  .a-cover__media { height: 70svh; }
  .a-aside .meta-list { grid-template-columns: 1fr; }
  .a-fig { margin: 8vh 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
