/* Layout: a quiet screening room. One elegant name, then an even grid of clips.
   Dark only. Creativity lives in the type pairing and the hover previews, not decoration. */
:root {
  --bg: #0c0c0d;
  --surface: #151517;
  --line: rgba(240, 236, 228, 0.1);
  --fg: #f0ece4;
  --muted: #8d8a84;
  --accent: #d9a86c;   /* warm tungsten, used sparingly */
  --scrim: rgba(8, 8, 9, 0.94);

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Space Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1280px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
}
.serif { font-family: var(--font-display); font-weight: 800; }
.leak-text { color: var(--accent); }
.leaks { display: none; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; }
.rec { width: 7px; height: 7px; border-radius: 50%; background: #e5484d; }
.nav { display: flex; gap: clamp(18px, 3vw, 36px); }
.nav a { text-decoration: none; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); transition: color 0.2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }

/* Hero: the name */
.hero { padding-block: clamp(28px, 4vw, 52px) clamp(40px, 6vw, 72px); }
.hero h1 {
  font-family: var(--font-display); font-weight: 800; font-stretch: 125%; text-transform: uppercase;
  font-size: clamp(2.6rem, 8.6vw, 7.5rem); line-height: 0.92; letter-spacing: -0.03em;
  margin: 18px 0 0; text-wrap: balance;
}
.hero h1 .line { display: block; }
.hero h1 .outline { color: var(--muted); }
.hero .role {
  margin: 22px 0 0; display: flex; align-items: center; gap: 14px;
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.hero .role::before { content: ""; width: 40px; height: 1px; background: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px;
  font: 500 0.875rem var(--font-body);
  text-decoration: none; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--fg);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.btn:hover { border-color: var(--fg); }
.btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* Video frames */
.frame {
  position: relative; width: 100%; max-width: 100%; aspect-ratio: 16 / 9;
  overflow: hidden; border-radius: 4px; background: var(--surface);
  cursor: pointer; border: 0; padding: 0; color: inherit; display: block;
}
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(.2,.7,.2,1); }
.frame .placeholder {
  position: absolute; inset: 0;
  background:
    radial-gradient(90% 80% at var(--px, 30%) var(--py, 30%), hsl(var(--h, 30) 25% 24%), transparent 70%),
    linear-gradient(160deg, hsl(var(--h, 30) 10% 14%), #0e0e10);
  transition: transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.frame:hover img, .frame:hover .placeholder { transform: scale(1.03); }
.frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.frame.previewing video { opacity: 1; }
.frame .hint {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  font: 400 0.625rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.14em;
  color: #fff; background: rgba(0,0,0,0.5); backdrop-filter: blur(6px);
  padding: 5px 9px; border-radius: 999px; opacity: 0; transition: opacity 0.3s;
}
.frame:hover .hint, .frame:focus-visible .hint { opacity: 1; }
.frame .dur { position: absolute; left: 12px; bottom: 12px; font: 400 0.6875rem var(--font-mono); color: #fff; background: rgba(0,0,0,0.5); padding: 3px 7px; border-radius: 3px; }

/* Sections */
section { scroll-margin-top: 80px; }
.section { padding-block: clamp(56px, 9vw, 120px); }
.section.first { padding-top: clamp(28px, 4vw, 52px); }
.work { padding-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(32px, 5vw, 56px); }
.page-title { font-family: var(--font-display); font-weight: 800; font-stretch: 125%; text-transform: uppercase; font-size: clamp(2.4rem, 7vw, 5rem); line-height: 0.95; letter-spacing: -0.03em; margin: 14px 0 0; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: 400 0.6875rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); cursor: pointer; transition: all 0.2s;
}
.chip:hover { color: var(--fg); border-color: var(--muted); }
.chip[aria-pressed="true"] { color: var(--bg); background: var(--fg); border-color: var(--fg); }
.chip .n { opacity: 0.5; margin-left: 6px; }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 52px) clamp(16px, 2vw, 28px); }
.card { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: baseline; }
.card .num { display: none; }
.card h3 { font-family: var(--font-body); font-weight: 600; font-size: 1rem; letter-spacing: -0.005em; margin: 0; line-height: 1.35; }
.card h3 span { background: linear-gradient(var(--accent), var(--accent)) left bottom / 0 1px no-repeat; transition: background-size 0.35s; padding-bottom: 2px; }
.card:hover h3 span { background-size: 100% 1px; }
.card .tag { font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); white-space: nowrap; }
.card .tag b { font-weight: 400; }
.card .client { display: none; }

.more-row { display: flex; justify-content: center; margin-top: clamp(48px, 7vw, 88px); }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.about-copy p { margin: 0 0 22px; max-width: 34ch; }
.about-copy p:first-child { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 3.2vw, 2.5rem); line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
.about-copy p:not(:first-child) { font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.5; color: var(--muted); }
.spec { display: flex; flex-direction: column; gap: 32px; padding-top: 8px; }
.spec-row { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.spec-row ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.spec-row li { font-size: 0.875rem; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; }

/* Contact */
.contact { border-top: 1px solid var(--line); }
.contact h2 { font-family: var(--font-display); font-weight: 800; font-stretch: 125%; text-transform: uppercase; font-size: clamp(2.4rem, 7vw, 5.5rem); line-height: 0.95; letter-spacing: -0.03em; margin: 16px 0 36px; }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.email { font-size: clamp(1.05rem, 2.6vw, 1.5rem); color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 4px; overflow-wrap: anywhere; user-select: all; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 28px; color: var(--muted); font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.12em; }
.foot-contact { display: inline-flex; flex-wrap: wrap; gap: 20px; }
.foot-contact a { text-decoration: none; color: var(--fg); transition: color 0.2s; }
.foot-contact a:hover { color: var(--accent); }
.social-links:not(.links) { display: inline-flex; gap: 20px; }

/* Player modal */
.modal { position: fixed; inset: 0; z-index: 80; background: var(--scrim); display: grid; place-items: center; padding: 16px; }
.modal-inner { width: min(1160px, 100%); display: flex; flex-direction: column; gap: 16px; }
.modal-top { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.modal-top h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -0.02em; margin: 0; line-height: 1.1; }
.modal-top p { margin: 4px 0 0; color: var(--muted); font-size: 0.875rem; }
.close { background: transparent; color: var(--fg); border: 1px solid var(--line); width: 42px; height: 42px; border-radius: 50%; font-size: 16px; cursor: pointer; flex: none; transition: border-color 0.2s; }
.close:hover { border-color: var(--fg); }
.player { position: relative; aspect-ratio: 16 / 9; width: 100%; max-width: 100%; background: #000; border-radius: 4px; overflow: hidden; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 0.875rem; }
.modal-foot a { color: var(--fg); font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.12em; }
.modal-foot .summary { max-width: 70ch; margin: 0; }

/* Entrance: one gentle fade-up */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .role, .card { animation: rise 0.8s cubic-bezier(.2,.7,.2,1) both; }
  .hero .role { animation-delay: 0.1s; }
  .card:nth-child(2) { animation-delay: 0.05s; } .card:nth-child(3) { animation-delay: 0.1s; }
  .card:nth-child(4) { animation-delay: 0.15s; } .card:nth-child(5) { animation-delay: 0.2s; }
  .card:nth-child(6) { animation-delay: 0.25s; } .card:nth-child(n+7) { animation-delay: 0.3s; }
  @keyframes rise { from { transform: translateY(12px); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .about-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .site-header .wrap { flex-wrap: wrap; row-gap: 12px; padding-block: 16px; }
  .nav { width: 100%; justify-content: space-between; gap: 12px; }
  .nav a { letter-spacing: 0.1em; }
}

/* More Work: category sections */
a.chip { text-decoration: none; display: inline-flex; align-items: center; }
.cat { padding-top: clamp(40px, 6vw, 72px); scroll-margin-top: 90px; }
.cat:first-child { padding-top: 0; }
.cat-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 18px; margin-bottom: clamp(20px, 3vw, 32px); border-bottom: 1px solid var(--line); }
.cat-head h2 { min-width: 0; overflow-wrap: anywhere; font-family: var(--font-display); font-weight: 800; font-stretch: 125%; text-transform: uppercase; font-size: clamp(1.25rem, 2.4vw, 1.75rem); letter-spacing: -0.02em; margin: 0; }
#categories.single .cat { padding-top: 0; }
#categories { transition: opacity 0.22s ease, transform 0.22s ease; }
#categories.fading { opacity: 0; transform: translateY(8px); }

/* Résumé */
.nav { align-items: center; }
.site-header .resume-btn {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bg); background: var(--fg); border: 0; border-radius: 999px; padding: 8px 14px; cursor: pointer;
  transition: background 0.2s;
}
.site-header .resume-btn:hover { background: var(--accent); }
.player.doc { aspect-ratio: auto; height: min(78vh, 1000px); background: #fff; }

/* Runs of wide and vertical videos, in order */
.runs { display: flex; flex-direction: column; gap: clamp(32px, 4vw, 52px); }
.grid.tall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card.vertical .frame { aspect-ratio: 9 / 16; }
.grid.tall .card-info { grid-template-columns: minmax(0, 1fr); }
.grid.tall .card .tag { white-space: normal; }
@media (max-width: 960px) { .grid.tall { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid.tall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Vertical videos in the player */
.modal.tall .modal-inner { width: min(100%, calc(min(74vh, 880px) * 9 / 16)); }
.player.vertical { aspect-ratio: 9 / 16; }
.player .shield { position: absolute; top: 0; right: 0; width: 72px; height: 64px; z-index: 2; }
