:root {
  --bg: #000;
  --fg: #fff;
  --red: #ef1923;
  --muted: rgba(255, 255, 255, 0.55);
  --line: rgba(255, 255, 255, 0.14);
  --pad: clamp(12px, 1.6vw, 24px);
  --header-h: 120px;
  --wide: "Archivo", "Arial Black", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--wide);
  font-variation-settings: "wdth" 100;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, video, iframe { display: block; max-width: 100%; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.wide { font-variation-settings: "wdth" 125; }
.caps { text-transform: uppercase; letter-spacing: 0.16em; font-size: 10px; font-weight: 700; font-variation-settings: "wdth" 125; }

/* ---------------- LOADER ---------------- */
#loader {
  position: fixed; inset: 0; z-index: 100; background: #000;
  display: grid; place-items: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
#loader.done { opacity: 0; visibility: hidden; }
.ld-corner {
  position: absolute; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  color: #fff; text-transform: uppercase;
}
.ld-corner.tl { top: 16px; left: 16px; }
.ld-corner.tr { top: 16px; right: 16px; }
.ld-corner.bl { bottom: 16px; left: 16px; }
.ld-corner.br { bottom: 16px; right: 16px; }
.ld-row { display: flex; align-items: center; gap: clamp(24px, 6vw, 80px); }
.ld-name {
  color: var(--red); font-weight: 900; font-variation-settings: "wdth" 125;
  font-size: clamp(14px, 1.8vw, 20px); letter-spacing: -0.01em;
  transition: transform 0.8s var(--ease);
}
.ld-pct { font-family: var(--mono); font-size: 10px; min-width: 4ch; text-align: center; }
#loader.split .ld-left { transform: translateX(-30vw); }
#loader.split .ld-right { transform: translateX(30vw); }

/* ---------------- HEADER ---------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  padding: 10px var(--pad) 14px;
  background: #000;
  transition: background 0.4s;
}
body.is-home .site-header { background: linear-gradient(#000c, #0000); }
.wordmark {
  display: flex; align-items: flex-start; color: var(--red);
  line-height: 0.78; white-space: nowrap;
}
.wm-text {
  font-weight: 900; font-variation-settings: "wdth" 125;
  letter-spacing: -0.035em; font-size: 80px; padding-top: 0.06em;
}
.wordmark sup { font-size: 10px; font-weight: 900; margin-left: 4px; line-height: 1; }
.site-nav {
  display: flex; justify-content: space-between; margin-top: 12px; gap: 8px;
}
.site-nav a {
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 10px; font-weight: 700;
  font-variation-settings: "wdth" 125; color: var(--red);
  white-space: nowrap; transition: color 0.2s;
}
body.is-home .site-nav a { color: #fff; }
.site-nav a:hover, .site-nav a.active { color: #fff; }
body.is-home .site-nav a:hover { color: var(--red); }

/* ---------------- PAGES ---------------- */
#app { min-height: 100vh; }
.page { animation: pageIn 0.7s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------------- HOME / HERO ---------------- */
.hero { position: fixed; inset: 0; overflow: hidden; }
.hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-fallback {
  position: absolute; inset: -20%;
  background:
    radial-gradient(40% 35% at 30% 40%, #ef192355, transparent 70%),
    radial-gradient(35% 40% at 70% 65%, #3a5bff33, transparent 70%),
    radial-gradient(60% 60% at 50% 50%, #1a1a1a, #000 80%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(4%, -3%) scale(1.08) rotate(2deg); } }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: 0.12; mix-blend-mode: overlay;
}
.hero-video { opacity: 0; transition: opacity 1.2s var(--ease); filter: saturate(0.9) contrast(1.05); }
.hero-video.ready { opacity: 1; }
/* Overall dim + black vignette top and bottom so header and tagline stay readable */
.hero-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, #000 0%, #000d 12%, #0006 26%, #0000 42%, #0000 58%, #0006 74%, #000d 88%, #000 100%),
    radial-gradient(ellipse at center, #0000 40%, #0008 100%),
    #00000040;
}
.hero-center {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  padding-top: var(--header-h);
}
.monogram { width: clamp(150px, 26vw, 260px); color: #fff; }
.hero-center > div, .hero-tag { filter: drop-shadow(0 2px 14px #000a); }
.monogram .ring { stroke-dasharray: 560; stroke-dashoffset: 560; animation: draw 1.8s 0.3s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero-name {
  margin-top: 18px; font-size: clamp(12px, 1.5vw, 17px); letter-spacing: 0.5em;
  font-weight: 500; font-variation-settings: "wdth" 110; text-transform: uppercase; padding-left: 0.5em;
}
.hero-tag {
  position: absolute; left: 0; right: 0; top: calc(50% + var(--header-h) / 2); transform: translateY(-50%);
  text-align: center; padding: 0 var(--pad);
  font-family: var(--mono); font-size: clamp(12px, 1.15vw, 15px); line-height: 1.55; letter-spacing: 0.04em; text-transform: uppercase;
  text-shadow: 0 1px 2px #000, 0 0 18px #000c;
}
@media (max-width: 760px) { .hero-tag { font-size: 11px; } }
.hero-role, .hero-year {
  position: absolute; left: 0; right: 0; text-align: center; padding: 0 var(--pad);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.hero-role { bottom: 46px; }
.hero-year { bottom: 26px; }

/* ---------------- WORK GRID ---------------- */
.work { padding: calc(var(--header-h) + 28px) var(--pad) 140px; }
.grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  column-gap: 20px; row-gap: clamp(28px, 4vw, 64px); align-items: start;
  grid-auto-flow: dense;
}
/* Justified rows: every row fills the full width, cards in a row share one height,
   each keeps its true aspect ratio, and order is preserved. --a = width / height. */
.grid.flow {
  --rowh: clamp(200px, 24vw, 440px);
  display: flex; flex-wrap: wrap; gap: clamp(22px, 2.4vw, 36px) 14px;
}
.grid.flow .card { flex: var(--a) var(--a) calc(var(--a) * var(--rowh)); min-width: 0; }
.grid.flow .frame { aspect-ratio: var(--a) !important; }
.grid.flow::after { content: ""; flex: 999 1 0; } /* stops the last row from over-stretching */
.grid.flow.fill::after { display: none; }        /* few videos / nearly-full last row: fill the width */
.grid.flow.fill { justify-content: center; }
/* never let a card's picture be taller than the screen */
.grid.flow .card { max-width: calc((100vh - var(--header-h) - 150px) * var(--a)); }
.filters[hidden] { display: none; }
.card { text-align: left; display: block; width: 100%; }
.card.hidden { display: none; }
/* "And more!" end card */
.card.more .frame { background: #0a0a0a; border: 1px solid #ffffff1f; transition: border-color .4s, background .4s; }
.card.more:hover .frame { border-color: var(--red); background: #120405; }
.more-in {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  align-items: center; gap: clamp(8px, 1vw, 14px); text-align: center; padding: 8%;
}
.more-kick, .more-cta { font-family: var(--mono); font-size: clamp(9px, .75vw, 11px); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.more-title {
  font-weight: 900; font-variation-settings: "wdth" 125; text-transform: uppercase; line-height: .9;
  font-size: clamp(28px, 4vw, 64px); color: #fff;
}
.more-title::after { content: ""; display: block; width: 36%; height: 3px; margin: .22em auto 0; background: var(--red); transition: width .6s var(--ease); }
.card.more:hover .more-title::after { width: 100%; }
.more-cta { color: var(--red); }
.grid.flow .card.more.solo { flex: 1 1 100%; max-width: none; }
.grid.flow .card.more.solo .frame { aspect-ratio: auto !important; height: clamp(150px, 14vw, 240px); }
.frame {
  position: relative; overflow: hidden; background: #0d0d0d; aspect-ratio: 16 / 9;
}
.frame img, .frame video { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), opacity 0.4s; }
.card:hover .frame img { transform: scale(1.04); }
.frame .preview { position: absolute; inset: 0; opacity: 0; }
.card:hover .frame .preview { opacity: 1; }
.ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    radial-gradient(70% 90% at var(--x, 30%) var(--y, 40%), hsl(var(--h) 70% 30% / 0.9), transparent 70%),
    linear-gradient(160deg, hsl(var(--h) 40% 10%), #050505);
  transition: transform 1s var(--ease);
}
.card:hover .ph { transform: scale(1.04); }
.ph span { font-family: var(--mono); font-size: 10px; color: #ffffff80; letter-spacing: 0.1em; text-transform: uppercase; }
.play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.9);
  background: var(--red); color: #fff; padding: 9px 14px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.16em; font-variation-settings: "wdth" 125;
  opacity: 0; transition: opacity 0.3s, transform 0.4s var(--ease);
}
.card:hover .play, .card:focus-visible .play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.meta {
  display: flex; justify-content: space-between; gap: 16px; margin-top: 10px;
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  font-variation-settings: "wdth" 112; color: #fff;
}
.meta .yr { flex-shrink: 0; color: var(--muted); }
.role {
  margin-top: 5px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted);
}
.role::before { content: "Role — "; color: var(--red); }
.empty { grid-column: 1 / -1; padding: 15vh 0; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------------- FILTER BAR ---------------- */
.filterbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  display: flex; justify-content: center; align-items: center; gap: 6px;
  padding: 18px var(--pad);
  background: linear-gradient(#0000, #000c 40%);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; }
.filters button {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 10px; font-weight: 600;
  font-variation-settings: "wdth" 112; color: var(--muted); transition: color 0.2s;
}
.filters button:hover, .filters button.on { color: #fff; }
.filters .sep { color: var(--muted); font-size: 10px; }
.reel {
  position: absolute; right: var(--pad); top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; gap: 7px; border: 1px solid #fff; border-radius: 6px;
  padding: 7px 10px; font-size: 11px; font-weight: 900; font-variation-settings: "wdth" 125; letter-spacing: 0.04em;
  transition: background 0.2s, color 0.2s;
}
.reel:hover { background: #fff; color: #000; }
.reel i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.15; } }

/* ---------------- ABOUT ---------------- */
/* Homepage video, black & white and muted, fixed behind a single text column */
.about-bg { position: fixed; inset: 0; z-index: 0; background: #000; overflow: hidden; }
.about-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) brightness(0.55) contrast(1.05) blur(1px);
  transform: scale(1.03);
}
.about-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, #000 0%, #000a 18%, #0006 40%, #0006 65%, #000b 88%, #000 100%),
    radial-gradient(ellipse at 45% 50%, #0000 20%, #0009 100%);
}
.about {
  position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center;
  padding: calc(var(--header-h) + 40px) var(--pad) 80px;
}
.about-text { max-width: 640px; margin: 0 auto; transform: translateX(-6%); }
.about-text p {
  font-size: clamp(15px, 1.2vw, 18px); line-height: 1.55; font-weight: 500;
  font-variation-settings: "wdth" 100; color: #f2f2f2; letter-spacing: 0.005em;
  text-shadow: 0 1px 12px #000c;
}
.about-text p + p { margin-top: 1.4em; }
.about-title {
  font-size: clamp(36px, 5.2vw, 76px); line-height: 0.9; font-weight: 900; letter-spacing: -0.035em;
  font-variation-settings: "wdth" 125; text-transform: uppercase; color: #fff;
}
.about-sub {
  margin: 14px 0 34px; font-family: var(--mono); font-size: clamp(10px, 0.85vw, 12px);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--red);
}
.about-cta {
  display: inline-block; margin-top: 2.6em; padding-bottom: 4px; border-bottom: 1px solid var(--red);
  font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; font-variation-settings: "wdth" 125;
  transition: color 0.2s;
}
.about-cta:hover { color: var(--red); }
body.is-about .site-header { background: #000; }
body.is-about .site-header::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 56px; pointer-events: none;
  background: linear-gradient(#000, #0000);
}
@media (max-width: 760px) { .about-text { transform: none; } }

/* ---------------- CONTACT ---------------- */
.contact {
  position: relative; z-index: 1;
  min-height: 100vh; padding: calc(var(--header-h) + 40px) var(--pad) 40px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
}
.contact .kicker { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; }
.contact h1 {
  font-size: clamp(36px, 8.5vw, 150px); line-height: 0.86; font-weight: 900; font-variation-settings: "wdth" 125;
  letter-spacing: -0.04em; text-transform: uppercase; margin-top: 16px;
}
.contact h1 a { color: var(--red); transition: color 0.2s; }
.contact h1 a:hover { color: #fff; }
.mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 28px; }
.copy {
  font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; font-variation-settings: "wdth" 125;
  border: 1px solid rgba(255,255,255,0.5); border-radius: 999px; padding: 8px 14px; transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.copy:hover { background: #fff; color: #000; border-color: #fff; }
.contact h1, .contact .mail { text-shadow: 0 2px 18px #000a; }
.mail {
  display: inline-block; font-size: clamp(16px, 2.4vw, 34px); font-weight: 800;
  font-variation-settings: "wdth" 120; border-bottom: 2px solid var(--red); padding-bottom: 4px; word-break: break-all;
}
.mail:hover { color: var(--red); }
.contact-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; border-top: 1px solid var(--line); padding-top: 20px; }
.contact-foot h3 { font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--muted); text-transform: uppercase; margin-bottom: 10px; }
.contact-foot p, .contact-foot a { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-variation-settings: "wdth" 115; line-height: 1.9; }
.contact-foot a { display: block; }
.contact-foot a:hover { color: var(--red); }
.avail { display: inline-flex; align-items: center; gap: 8px; }
.avail i { width: 7px; height: 7px; border-radius: 50%; background: #2bd96b; box-shadow: 0 0 10px #2bd96b; }

/* ---------------- LIGHTBOX ---------------- */
#lightbox {
  position: fixed; inset: 0; z-index: 50; background: #000f; display: grid; place-items: center;
  padding: 64px clamp(12px, 6vw, 90px);
  animation: pageIn 0.4s var(--ease);
}
#lightbox[hidden] { display: none; }
.lb-stage { width: min(100%, calc((100vh - 160px) * 16 / 9)); aspect-ratio: 16 / 9; background: #0a0a0a; }
.lb-stage.v { width: min(100%, calc((100vh - 160px) * 9 / 16)); aspect-ratio: 9 / 16; }
.lb-stage.p { width: min(100%, calc((100vh - 160px) * 4 / 5)); aspect-ratio: 4 / 5; }
.lb-stage.s { width: min(100%, calc(100vh - 160px)); aspect-ratio: 1; }
.lb-stage iframe, .lb-stage video { width: 100%; height: 100%; border: 0; background: #000; }
/* Article / photo projects in the viewer */
.lb-stage.article {
  width: min(100%, 980px); aspect-ratio: auto; max-height: calc(100vh - 140px);
  overflow-y: auto; background: transparent; overscroll-behavior: contain;
}
.lb-article { display: grid; gap: 14px; }
.lb-article img { width: 100%; height: auto; background: #0a0a0a; }
.lb-article-text { padding: 10px 0 8px; max-width: 680px; }
.lb-article-text h2 {
  font-size: clamp(20px, 2.4vw, 32px); line-height: 1; font-weight: 900; letter-spacing: -0.02em;
  font-variation-settings: "wdth" 125; text-transform: uppercase;
}
.lb-article-text .role { margin-top: 10px; }
.lb-article-text p { margin-top: 16px; font-size: clamp(14px, 1.1vw, 16px); line-height: 1.6; color: #ddd; }
.lb-link {
  display: inline-block; margin-top: 22px; padding: 10px 16px; border: 1px solid #fff; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; font-variation-settings: "wdth" 125;
  transition: background 0.2s, color 0.2s;
}
.lb-link:hover { background: #fff; color: #000; }
.lb-msg { height: 100%; display: grid; place-items: center; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 24px; line-height: 1.7; }
.lb-caption { position: absolute; left: var(--pad); bottom: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-variation-settings: "wdth" 120; }
.lb-caption span { color: var(--muted); margin-left: 12px; }
.lb-close { position: absolute; top: 18px; right: var(--pad); font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; font-variation-settings: "wdth" 125; }
.lb-close:hover, .lb-arrow:hover { color: var(--red); }
.lb-arrow { position: absolute; top: 50%; transform: translateY(-50%); font-size: 22px; padding: 12px; }
.lb-prev { left: 6px; } .lb-next { right: 6px; }

/* ---------------- CUSTOM CURSOR ---------------- */
#cursor { display: none; }
body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }
body.has-cursor #cursor { display: block; }
#cursor > div {
  position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; border-radius: 50%;
  will-change: transform;
}
.c-dot {
  width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; background: var(--red);
}
.c-ring {
  width: 24px; height: 24px; margin: -12px 0 0 -12px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), margin 0.3s var(--ease),
              border-color 0.3s, opacity 0.3s;
}
.c-label { display: none; }
/* hovering anything clickable: ring opens up a little, stays hollow so nothing is covered */
#cursor.is-link .c-ring, #cursor.is-play .c-ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px; border-color: rgba(255, 255, 255, 0.8);
}
#cursor.is-down .c-ring { width: 18px; height: 18px; margin: -9px 0 0 -9px; }
#cursor.is-hide > div { opacity: 0; }
body.has-cursor .card .play { display: none; }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 760px) {
  .site-nav { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; row-gap: 8px; }
  .site-nav a { font-size: 9px; letter-spacing: 0.1em; }
  .grid { grid-template-columns: 1fr 1fr; column-gap: 12px; row-gap: 26px; grid-auto-flow: row dense; }
  .grid.flow { --rowh: 170px; gap: 22px 10px; }
  .card { grid-column: 1 / -1 !important; align-self: start !important; }
  .card.vert { grid-column: span 1 !important; }
  .meta { font-size: 9px; gap: 8px; }
  .filterbar { flex-direction: column; gap: 12px; padding-bottom: 16px; }
  .filters { gap: 4px 14px; }
  .reel { position: static; transform: none; }
  .work { padding-bottom: 170px; }
  .about { grid-template-columns: 1fr; }
  .portrait { position: relative; top: 0; max-width: 420px; }
  .lists { grid-template-columns: 1fr; }
  .contact-foot { grid-template-columns: 1fr; }
  .lb-arrow { top: auto; bottom: 8px; transform: none; }
  .lb-caption { bottom: 64px; }
}

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