/* ============================================================
   Drew Abbott — Video Editor
   Black, white, and one light blue. Everything else is spacing.
   ============================================================ */

:root {
  /* Surface */
  --black:      #000000;
  --near-black: #0B0B0C;

  /* Ink */
  --white:      #FFFFFF;
  --white-soft: rgba(255, 255, 255, .72);
  --white-mute: rgba(255, 255, 255, .52);
  /* .46 is the floor that clears WCAG AA (4.5:1) on black at these small sizes.
     .38 looked similar but only reached 3.4:1. */
  --white-faint:rgba(255, 255, 255, .46);
  --hair:       rgba(255, 255, 255, .16);
  --hair-soft:  rgba(255, 255, 255, .09);

  /* The one accent */
  --blue:       #8FD3FF;
  --blue-deep:  #5FBEF5;

  /* Type */
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body:    "Figtree", "Helvetica Neue", Helvetica, sans-serif;

  /* Rhythm */
  --gut:  clamp(1.25rem, 3.2vw, 2.75rem);
  --pad:  clamp(1.25rem, 5vw, 5.5rem);
  --rule: 1px solid var(--hair);

  /* One easing curve for the whole site */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --slow: .7s;
  --med:  .45s;
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--black);
}
body {
  margin: 0;
  /* ambient lift at the top of the viewport, settling into pure black.
     fixed, so it reads as light in the room rather than a band that scrolls by */
  background-color: var(--black);
  background-image:
    radial-gradient(120% 68% at 68% -12%, rgba(143, 211, 255, .07), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, .06) 0%, rgba(255, 255, 255, .015) 34%, transparent 66%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--white);
  font-family: var(--body);
  font-size: clamp(.98rem, .35vw + .9rem, 1.06rem);
  line-height: 1.62;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; }
p { margin: 0 0 1em; }

::selection { background: var(--blue); color: var(--black); }

/* the grain layer from the previous build stays out of the way */
.grain { display: none; }

.skip {
  position: fixed; top: -100px; left: 1rem; z-index: 200;
  background: var(--white); color: var(--black);
  padding: .7rem 1.1rem; border-radius: 2px;
}
.skip:focus { top: 1rem; }

:where(a, button, .card):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

section[id] { scroll-margin-top: 4.5rem; }

/* ---------- shared ---------- */
.eyebrow {
  font-size: .688rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--white-mute);
  margin: 0;
}

.btn {
  display: inline-block;
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: .95rem 1.7rem;
  border-radius: 999px;
  transition:
    background-color var(--med) var(--ease),
    border-color var(--med) var(--ease),
    color var(--med) var(--ease),
    transform var(--slow) var(--ease);
}
.btn--solid { background: var(--white); color: var(--black); }
.btn--solid:hover { background: var(--blue); transform: translateY(-2px); }
.btn--ghost { border: 1px solid var(--hair); color: var(--white); }
.btn--ghost:hover {
  border-color: var(--blue); color: var(--blue);
  transform: translateY(-2px);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--pad);
  transition:
    background-color var(--slow) var(--ease),
    padding var(--slow) var(--ease),
    box-shadow var(--slow) var(--ease);
}
.nav.is-stuck {
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(16px);
  padding-block: .75rem;
  box-shadow: 0 1px 0 var(--hair-soft);
}
.nav__mark { display: flex; align-items: baseline; gap: .6rem; }
.nav__initials {
  font-family: var(--display);
  font-variation-settings: "WONK" 1, "SOFT" 40;
  font-size: 1.25rem; letter-spacing: .02em;
  transition: color var(--med) var(--ease);
}
.nav__mark:hover .nav__initials { color: var(--blue); }
.nav__name {
  font-size: .688rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--white-faint);
}
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.2rem); }
.nav__links a {
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  position: relative; padding-block: .35rem;
  transition: color var(--med) var(--ease);
}
.nav__links a:hover { color: var(--blue); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--blue); transform: scaleX(0); transform-origin: right;
  transition: transform var(--med) var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
@media (max-width: 560px) { .nav__name { display: none; } }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 8rem var(--pad) 0;
  overflow: hidden;
}
.hero__sky { position: absolute; inset: 0; z-index: 0; }

/* a whisper of light so the black has depth, not a colour wash */
.hero__sun {
  position: absolute; left: 64%; top: 6%;
  width: min(78vw, 900px); aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
     rgba(255, 255, 255, .08) 0%,
     rgba(143, 211, 255, .05) 42%,
     transparent 68%);
  filter: blur(30px);
  animation: bloom 2.2s var(--ease) both, drift 22s ease-in-out infinite alternate;
}
@keyframes bloom { from { opacity: 0 } to { opacity: 1 } }
@keyframes drift { to { transform: translate(-52%, 5%) scale(1.08) } }

/* no horizon lines — the ticker rule closes the hero cleanly on its own */
.hero__ridge { display: none; }

.hero__inner { position: relative; z-index: 1; width: 100%; }
.hero__title {
  font-size: clamp(4.2rem, 17.5vw, 16rem);
  line-height: .82;
  letter-spacing: -.035em;
  margin: .18em 0 0;
  font-variation-settings: "SOFT" 28, "WONK" 0, "opsz" 144;
}
.hero__title span { display: block; }
.hero__title--wonk {
  font-style: italic;
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 144;
  margin-left: clamp(.4rem, 8vw, 7rem);
}

.hero__meta {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: clamp(2rem, 5vw, 3.4rem);
}
.hero__actions { display: flex; gap: .7rem; flex-wrap: wrap; }
@media (max-width: 560px) {
  .hero { padding-top: 5.5rem; min-height: 92svh; }
  .hero__actions .btn { flex: 1 1 auto; text-align: center; }
}

/* ---------- ticker ---------- */
.ticker {
  position: relative; z-index: 1;
  border-top: var(--rule); border-bottom: var(--rule);
  margin-inline: calc(var(--pad) * -1);
  padding-block: .85rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ticker__track {
  display: flex; align-items: center; gap: 2.4rem;
  width: max-content;
  animation: slide 52s linear infinite;
}
.ticker__track span {
  font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--white-faint); white-space: nowrap;
}
.ticker__dot { color: var(--blue); }
@keyframes slide { to { transform: translateX(-50%) } }

/* ============================================================
   SECTION HEADS
   ============================================================ */
.section-head {
  padding: clamp(2.75rem, 6vw, 5rem) var(--pad) clamp(1.4rem, 2.5vw, 2.2rem);
}
.section-head__title {
  font-size: clamp(2rem, 5.2vw, 3.9rem);
  letter-spacing: -.02em;
  font-variation-settings: "SOFT" 30, "opsz" 100;
}

/* ============================================================
   FILTERS
   ============================================================ */
.filters {
  position: sticky; top: 54px; z-index: 40;
  padding: .9rem var(--pad);
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(14px);
  border-block: var(--rule);
}
.filters__rail { display: flex; gap: .4rem; flex-wrap: wrap; }
.filter {
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  padding: .55rem 1.1rem; border-radius: 999px;
  color: var(--white-mute);
  border: 1px solid transparent;
  transition:
    color var(--med) var(--ease),
    background-color var(--med) var(--ease),
    border-color var(--med) var(--ease);
}
.filter:hover { color: var(--blue); border-color: var(--hair); }
.filter.is-active {
  background: var(--white); color: var(--black); border-color: var(--white);
}
.filter.is-active:hover { background: var(--blue); border-color: var(--blue); color: var(--black); }
.filter__count {
  font-size: .58em; margin-left: .35em; opacity: .65;
  font-variant-numeric: tabular-nums; top: -.6em;
}

@media (max-width: 620px) {
  .filters__rail {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad);
  }
  .filters__rail::-webkit-scrollbar { display: none; }
  .filter { white-space: nowrap; }
}

/* ============================================================
   GRID
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gut);
  padding: clamp(1.6rem, 3vw, 2.4rem) var(--pad) clamp(2rem, 4vw, 3rem);
  position: relative;
}

.card {
  grid-column: span 4;
  align-self: start;
  display: block; text-align: left;
  opacity: 0; transform: translateY(28px);
  transition:
    opacity .9s var(--ease),
    transform .9s var(--ease);
}
.card.is-in { opacity: 1; transform: none; }
.card.is-out { opacity: 0; transform: translateY(12px) scale(.985); pointer-events: none; }

/* every card is one uniform size — a 3-across grid of identical 16:9 frames */

.card__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--near-black);
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--hair-soft);
  transition: box-shadow var(--slow) var(--ease);
}
.card:hover .card__frame { box-shadow: 0 0 0 1px var(--blue); }

.card__img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.7) brightness(.82);
  transition:
    transform 1.2s var(--ease),
    filter .9s var(--ease);
}
.card:hover .card__img {
  transform: scale(1.04);
  filter: saturate(1) brightness(1);
}

.card__runtime {
  position: absolute; right: .7rem; bottom: .7rem; z-index: 2;
  font-size: .625rem; letter-spacing: .1em;
  padding: .28rem .55rem; border-radius: 2px;
  background: rgba(0, 0, 0, .7);
  color: var(--white);
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(4px);
  transition: opacity var(--med) var(--ease);
}
.card:hover .card__runtime { opacity: 0; }

.card__body {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 1rem;
  padding-top: .95rem;
  border-top: 1px solid var(--hair-soft);
  margin-top: .95rem;
  transition: border-color var(--slow) var(--ease);
}
.card:hover .card__body { border-color: var(--hair); }
.card__title {
  font-size: clamp(1.15rem, 1.4vw, 1.5rem);
  line-height: 1.2; letter-spacing: -.012em;
  font-variation-settings: "SOFT" 24, "opsz" 60;
  transition: color var(--med) var(--ease);
}
.card:hover .card__title { color: var(--blue); }
.card__sub {
  margin: .3rem 0 0;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--white-faint);
}
.card__idx {
  font-size: .65rem; color: var(--white-faint);
  font-variant-numeric: tabular-nums; letter-spacing: .1em;
}
.card__tag {
  display: inline-block; margin-top: .5rem;
  font-size: .6rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--white-mute);
}

@media (max-width: 1000px) {
  .card { grid-column: span 6; }   /* 2 across on tablet */
}
@media (max-width: 640px) {
  .card { grid-column: span 12; }  /* 1 across on phones */
}

/* ---------- follow cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 80;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blue); color: var(--black);
  font-size: .5rem; letter-spacing: .1em; text-transform: uppercase;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  transition: transform var(--med) var(--ease), opacity .3s var(--ease);
  opacity: 0;
}
.cursor.is-on { transform: translate(-50%, -50%) scale(1); opacity: 1; }

@media (hover: hover) and (min-width: 901px) {
  .card, .card * { cursor: none; }
}
@media (hover: none), (max-width: 900px) { .cursor { display: none; } }

/* ============================================================
   ABOUT
   ============================================================ */
.about { border-top: var(--rule); }
.about__grid {
  /* stacked and left-aligned: portrait on top, bio beneath */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: clamp(1.8rem, 4vw, 3rem);
  padding: 0 var(--pad) clamp(2.75rem, 5vw, 4.5rem);
}
.about__portrait { margin: 0; width: min(340px, 78vw); }
.about__portrait-frame {
  /* matches the source photo, so nothing gets cropped */
  aspect-ratio: 3 / 4;
  overflow: hidden; border-radius: 2px;
  background: var(--near-black);
  box-shadow: 0 0 0 1px var(--hair-soft);
  position: relative;
}
.about__portrait-frame.is-empty::after {
  content: "Portrait";
  position: absolute; inset: auto 0 1rem 0; text-align: center;
  font-size: .625rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--white-faint);
}
.about__portrait-frame img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.9);
  transition: filter var(--slow) var(--ease), transform 1.2s var(--ease);
}
.about__portrait:hover img { filter: saturate(1); transform: scale(1.02); }
.about__portrait figcaption {
  margin-top: .8rem; font-size: .65rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--white-faint);
}

.about__lead {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.3vw, 1.95rem);
  line-height: 1.32; letter-spacing: -.015em;
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 90;
  margin-bottom: 1.4em;
  text-wrap: balance;
}
.about__body { max-width: 52ch; }
.about__body p { color: var(--white-soft); }
.about__body em {
  font-family: var(--display); font-style: italic;
  font-variation-settings: "WONK" 1;
  color: var(--white); font-size: 1.06em;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  position: relative;
  padding: clamp(3rem, 7vw, 6rem) var(--pad);
  border-top: var(--rule);
  background: transparent; /* let the page gradient through */
  overflow: hidden;
}
.contact::before {
  content: ""; position: absolute; right: -8%; top: -30%;
  width: 48vw; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 211, 255, .06), transparent 66%);
  pointer-events: none;
}
.contact__inner { position: relative; max-width: 62rem; }
.contact__title {
  font-size: clamp(2.6rem, 8vw, 6.2rem);
  line-height: .95; letter-spacing: -.03em;
  margin: 0 0 1.2rem;
  font-variation-settings: "SOFT" 34, "opsz" 144;
}
.contact__title em {
  font-style: italic; color: var(--blue);
  font-variation-settings: "WONK" 1, "SOFT" 70;
}
.contact__note { max-width: 42ch; color: var(--white-soft); }
.contact__mail {
  display: inline-block; margin-top: 1.4rem;
  font-family: var(--display);
  font-size: clamp(1.2rem, 3vw, 2rem);
  border-bottom: 1px solid var(--hair);
  padding-bottom: .18em;
  transition: color var(--med) var(--ease), border-color var(--med) var(--ease);
}
.contact__mail:hover { color: var(--blue); border-color: var(--blue); }
.contact__links {
  list-style: none; display: flex; flex-wrap: wrap; gap: 1.6rem;
  margin: 3rem 0 0; padding: 1.4rem 0 0;
  border-top: 1px solid var(--hair-soft);
}
.contact__links a {
  font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--white-mute);
  transition: color var(--med) var(--ease);
}
.contact__links a:hover { color: var(--blue); }

/* ============================================================
   FOOTER
   ============================================================ */
.foot {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.5rem var(--pad);
  border-top: 1px solid var(--hair-soft);
  font-size: .65rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--white-faint);
}
.foot a { transition: color var(--med) var(--ease); }
.foot a:hover { color: var(--blue); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 150;
  display: grid; place-items: center;
  /* room around the panel; extra up top so the fixed close button never overlaps it */
  padding: clamp(3.5rem, 8vh, 5rem) clamp(1rem, 4vw, 2.5rem) clamp(1rem, 4vh, 2.5rem);
}
.lightbox[hidden] { display: none; }
.lightbox__backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .92);
  backdrop-filter: blur(10px);
  animation: fade .4s var(--ease) both;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

.lightbox__panel {
  position: relative;
  /* cap width so a 16:9 stage plus the info bar always fits the viewport height —
     no more panel taller than the screen, no clipped bar */
  width: min(1180px, 100%, calc((100dvh - 13rem) * 16 / 9));
  animation: pop .6s var(--ease) both;
}
@keyframes pop { from { opacity: 0; transform: translateY(22px) scale(.985) } to { opacity: 1; transform: none } }

.lightbox__stage {
  aspect-ratio: 16 / 9; background: #000;
  border-radius: 2px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--hair);
}
.lightbox__stage iframe,
.lightbox__stage video { width: 100%; height: 100%; border: 0; display: block; }
.lightbox__placeholder {
  width: 100%; height: 100%;
  display: grid; place-content: center; gap: .6rem; text-align: center;
  background: var(--near-black);
  color: var(--white-mute);
  padding: 2rem;
}
.lightbox__placeholder strong {
  font-family: var(--display); font-size: 1.3rem; font-weight: 400; color: var(--white);
}
.lightbox__placeholder code {
  font-size: .72rem; color: var(--blue);
  background: rgba(255, 255, 255, .08); padding: .25rem .5rem; border-radius: 2px;
}

.lightbox__bar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem;
  padding-top: 1.1rem; color: var(--white);
}
.lightbox__cat {
  margin: 0 0 .3rem; font-size: .62rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--blue);
}
.lightbox__title { font-size: clamp(1.2rem, 2.4vw, 1.85rem); letter-spacing: -.015em; }
.lightbox__credit {
  margin: .3rem 0 0; font-size: .72rem; letter-spacing: .08em;
  color: var(--white-faint);
}
.lightbox__nav { display: flex; gap: .5rem; }
.lightbox__nav button,
.lightbox__close {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--hair);
  color: var(--white);
  display: grid; place-items: center;
  transition:
    background-color var(--med) var(--ease),
    border-color var(--med) var(--ease),
    color var(--med) var(--ease);
}
.lightbox__nav button:hover,
.lightbox__close:hover {
  background: var(--blue); border-color: var(--blue); color: var(--black);
}
/* pinned to the viewport corner so it's always visible and clickable,
   whatever the panel height */
.lightbox__close {
  position: fixed; z-index: 160;
  top: clamp(.85rem, 2.5vh, 1.6rem);
  right: clamp(.85rem, 2.5vw, 1.6rem);
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(6px);
}
body.is-locked { overflow: hidden; }

@media (max-width: 640px) {
  .lightbox__bar { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* ============================================================
   MOTION
   ============================================================ */
.reveal {
  opacity: 0; transform: translateY(24px);
  animation: enter 1s var(--ease) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes enter { to { opacity: 1; transform: none } }

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