:root {
  --bg: #0b0c0f;
  --bg-alt: #111318;
  --surface: #171a21;
  --line: #262a33;
  --text: #e8e6e1;
  --muted: #9a9ca3;
  --accent: #7cc4ff;
  --radius: 14px;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --display: "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; letter-spacing: -0.035em; }

/* NAV */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gutter);
  background: linear-gradient(to bottom, rgba(11,12,15,.85), rgba(11,12,15,0));
  backdrop-filter: blur(6px);
  transition: background .3s;
}
.nav.solid { background: rgba(11,12,15,.92); border-bottom: 1px solid var(--line); }
.brand { font-family: var(--body); font-weight: 600; font-size: 14px; text-decoration: none; letter-spacing: .24em; text-transform: uppercase; }
.nav nav { display: flex; gap: 26px; align-items: center; }
.nav nav a { text-decoration: none; font-size: 14px; color: var(--muted); transition: color .2s; }
.nav nav a:hover { color: var(--text); }


/* HERO */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 44% 30%; transform: scale(1.04); animation: drift 18s ease-out forwards; }
@keyframes drift { to { transform: scale(1); } }
/* Portrait screens and phones: image fills the top of the hero and fades out, keeping the face above the headline */
@media (max-aspect-ratio: 5/4) {
  .hero-bg { bottom: auto; height: 64%; -webkit-mask-image: linear-gradient(to top, transparent 0, #000 30%); mask-image: linear-gradient(to top, transparent 0, #000 30%); }
}
/* Landscape screens: image fills the right side at full height and fades out left/bottom, so the headline sits beside the face, not over it */
@media (min-width: 821px) and (min-aspect-ratio: 5/4) {
  .hero-bg { inset: 0 0 0 auto; width: 72%; height: 100%; object-position: 30% 40%;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 35%), linear-gradient(to top, transparent 0, #000 30%); -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent 0, #000 35%), linear-gradient(to top, transparent 0, #000 30%); mask-composite: intersect; }
}
.hero-shade { position: absolute; inset: 0; background:
  linear-gradient(to top, var(--bg) 2%, rgba(11,12,15,.55) 45%, rgba(11,12,15,.1) 75%),
  linear-gradient(to right, rgba(11,12,15,.75), rgba(11,12,15,0) 60%); }
.hero-content { position: relative; max-width: var(--max); width: 100%; margin: 0 auto; padding: 0 var(--gutter) clamp(56px, 10vh, 110px); }
.hero h1 { font-size: clamp(40px, 7vw, 88px); font-weight: 600; margin: 14px 0 22px; }
.lede { max-width: 560px; color: #c9c8c4; font-size: clamp(17px, 1.6vw, 20px); }

.eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }

/* SECTIONS */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 11vw, 140px) var(--gutter); }
.section.alt { max-width: none; background: var(--bg-alt); }
.section.alt > * { max-width: calc(var(--max) - 2 * var(--gutter)); margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: 48px; }
.section-head h2 { font-size: clamp(34px, 5vw, 60px); margin-top: 10px; }
.section-intro { max-width: 680px; color: var(--muted); margin-top: 18px; font-size: 18px; }

/* FEATURE */
.feature { display: grid; grid-template-columns: 1.5fr 1fr; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.feature-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/9; }
.feature-body { padding: clamp(24px, 3vw, 44px); display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.feature-body h3 { font-size: clamp(26px, 3vw, 36px); }
.feature-body p { color: var(--muted); }
.tag { font-size: 13px; color: var(--accent) !important; font-weight: 500; }
.link { color: var(--text); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--accent); align-self: flex-start; padding-bottom: 2px; }
@media (max-width: 820px) { .feature { grid-template-columns: 1fr; } }

/* GRIDS */
.grid { display: grid; gap: 20px; }

/* PROJECT CARDS */
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .25s, border-color .25s; }
.card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.card > div { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.card .tag { margin: 0; }
.card .watch { margin-top: 6px; }
.card h3 { font-size: 19px; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 14.5px; line-height: 1.5; }

/* ABOUT */
.about { display: grid; grid-template-columns: 260px 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.about-img { border-radius: var(--radius); overflow: hidden; margin-top: 8px; }
.about-img img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: 50% 30%; }
.about h2 { font-size: clamp(30px, 4vw, 48px); margin: 10px 0 22px; }
.about p { color: #c9c8c4; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chips span { font-size: 13px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } .about-img { max-width: 200px; } }


.footer { text-align: center; padding: 32px var(--gutter) 48px; color: #5f626a; font-size: 13px; border-top: 1px solid var(--line); }

/* PLAYER */
dialog#player { position: fixed; inset: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; overflow: hidden; }
dialog#player[open] { display: flex; align-items: center; justify-content: center; animation: player-fade .3s ease; }
dialog#player::backdrop { background: rgba(4,5,7,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: player-fade .3s ease; }
.frame { width: min(1280px, 92vw, calc(84vh * 16 / 9)); aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; box-shadow: 0 40px 120px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.06); animation: player-in .4s cubic-bezier(.2,.8,.2,1); }
.frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.close { position: fixed; top: 20px; right: 20px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #e8e6e1; font-size: 22px; line-height: 1; cursor: pointer; backdrop-filter: blur(6px); transition: background .2s, transform .2s; }
.close:hover { background: rgba(255,255,255,.16); transform: rotate(90deg); }
.close:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@keyframes player-fade { from { opacity: 0; } }
@keyframes player-in { from { opacity: 0; transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) { dialog#player[open], dialog#player::backdrop, .frame { animation: none; } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg { animation: none; transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}


.grid-2 { grid-template-columns: repeat(2, 1fr); }
.feature + .feature { margin-top: 0; }
.feature-media.stack { display: grid; grid-template-rows: 1fr 1fr; gap: 2px; background: var(--line); }
.feature-media.stack img { aspect-ratio: auto; height: 100%; min-height: 180px; object-position: 70% 30%; }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; } }

/* ARCHIVE */
.archive { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.archive ul { grid-row: 2; list-style: none; padding: 0; border-top: 1px solid var(--line); }
.archive li > * { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; width: 100%; padding: 14px 0; border-bottom: 1px solid var(--line); }
.archive strong { grid-column: 1; font-weight: 500; }
.archive em { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-style: normal; font-size: 13px; color: var(--muted); transition: color .2s; }
.archive li > *:hover em, .archive li > *:focus-visible em { color: var(--accent); }
.archive li > *:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 820px) {
  .archive { grid-template-columns: 1fr; }
  .archive ul { grid-row: auto; }
}

/* Alternate feature layout for rhythm */
.feature:nth-of-type(even) .feature-media { order: 2; }
.feature:nth-of-type(even) { grid-template-columns: 1fr 1.5fr; }
@media (max-width: 820px) { .feature:nth-of-type(even) { grid-template-columns: 1fr; } .feature:nth-of-type(even) .feature-media { order: 0; } }
button.link { background: none; border: 0; border-bottom: 1px solid var(--accent); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; padding: 0 0 2px; }
button.link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* TALKS & PUBLICATIONS */
.pubs { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.pubs a { display: grid; grid-template-columns: 64px 1fr auto; gap: 20px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .2s; }
.pubs a:hover .pub-venue, .pubs a:focus-visible .pub-venue { color: var(--accent); }
.pubs a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pub-year { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.pub-main strong { display: block; font-size: 18px; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 4px; }
.pub-authors { color: var(--muted); font-size: 14px; }
.pub-authors b { color: var(--text); font-weight: 500; }
.pub-venue { color: var(--muted); font-size: 13px; white-space: nowrap; transition: color .2s; }
@media (max-width: 700px) {
  .pubs a { grid-template-columns: 1fr; gap: 6px; }
  .pub-venue { white-space: normal; }
}

/* FILMOGRAPHY */
.filmography { margin-top: 40px; }
.filmography summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filmography summary::-webkit-details-marker { display: none; }
.filmography summary span { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.filmography summary em { font-style: normal; color: var(--muted); font-size: 14px; }
.filmography summary::after { content: "+"; margin-left: auto; flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 1.5px solid var(--accent); border-radius: 50%; font-size: 24px; font-weight: 300; line-height: 1; color: var(--accent); transition: transform .25s, color .2s, background-color .2s; }
.filmography[open] summary::after { transform: rotate(45deg); }
.filmography summary:hover::after, .filmography summary:focus-visible::after { background-color: var(--accent); color: var(--bg); }
.filmography summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.filmography[open] summary { border-bottom-color: transparent; }
.filmography ul { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.filmography li { display: grid; grid-template-columns: 64px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.fy { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.ft { font-size: 16px; line-height: 1.55; }
.ft em { font-style: normal; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: 2px; }
.mosaic { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; border-radius: var(--radius); overflow: hidden; }
.mosaic figure { position: relative; margin: 0; aspect-ratio: 2 / 1; overflow: hidden; background: var(--surface); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, filter .4s; }
.mosaic figcaption { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 8px 10px; font-size: 12px; font-weight: 500; line-height: 1.3; background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0) 70%); opacity: 0; transition: opacity .25s; }
.mosaic figcaption span { color: #bdbcb8; font-weight: 400; font-size: 11px; }
.mosaic figure:hover img { transform: scale(1.06); }
.mosaic figure:hover figcaption { opacity: 1; }
@media (max-width: 640px) { .mosaic { grid-template-columns: repeat(3, 1fr); } }

/* Wide feature: full-width image on top, text below */
.feature.wide, .feature.wide:nth-of-type(even) { grid-template-columns: 1fr; }
.feature.wide .feature-media { order: 0; }
.feature.wide .feature-media img { aspect-ratio: 2.38 / 1; height: auto; }
.feature.wide .feature-body { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px 48px; align-items: start; }
.feature.wide .feature-body .tag, .feature.wide .feature-body h3 { grid-column: 1; }
.feature.wide .feature-body p:not(.tag):not(.pub-authors) { grid-column: 2; grid-row: 1 / span 4; margin: 0; }
.feature.wide .feature-body .pub-authors { grid-column: 1; margin: 0; }
.feature.wide .feature-body .link { grid-column: 1; justify-self: start; margin-top: 8px; }
@media (max-width: 820px) {
  .feature.wide .feature-body { display: flex; }
  .feature.wide .feature-media img { aspect-ratio: 16 / 9; }
}

/* Compact feature with a row of three images */
.feature-media.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--line); }
.feature.wide .feature-media.trio img { aspect-ratio: 16 / 10; height: 100%; object-fit: cover; }
.feature.compact .feature-body { padding: 20px 24px; }
.feature.compact .feature-body h3 { font-size: 24px; }
.feature.compact .feature-body p:not(.tag):not(.pub-authors) { font-size: 15px; }
.feature.compact + .pubs { margin-top: 32px; }
@media (max-width: 820px) { .feature.wide .feature-media.trio img { aspect-ratio: 1 / 1; } }
.pubs a { grid-template-columns: 56px 160px 1fr auto; align-items: center; }
.pub-thumb { width: 160px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); transition: transform .3s; }
.pubs a:hover .pub-thumb { transform: scale(1.03); }
@media (max-width: 700px) {
  .pubs a { grid-template-columns: 1fr; }
  .pub-thumb { width: 100%; }
}
.project-cards .card img { aspect-ratio: 16 / 9; }

/* Feature with a smaller, uncropped image */
.feature.narrow-media, .feature.narrow-media:nth-of-type(even) { grid-template-columns: 1fr 1.6fr; }
.feature.narrow-media .feature-media { background: #000; display: flex; align-items: center; justify-content: center; }
.feature.narrow-media .feature-media img { width: 100%; height: 100%; max-height: 380px; aspect-ratio: auto; object-fit: contain; }
@media (max-width: 820px) { .feature.narrow-media, .feature.narrow-media:nth-of-type(even) { grid-template-columns: 1fr; } }

/* Video links row */
.watch { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 4px; }
.feature.wide .feature-body .watch { grid-column: 1; }
.feature.wide .feature-body .watch .link { margin-top: 0; }

/* Reels list (single list, two columns on desktop) */
.archive.reels-only { display: block; }
.archive.reels-only ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; }
@media (max-width: 820px) { .archive.reels-only ul { grid-template-columns: 1fr; } }
.archive.reels-only li > * { grid-template-columns: 1fr auto auto; align-items: center; gap: 0 20px; }
.archive.reels-only img { grid-column: 2; grid-row: 1; width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); filter: brightness(.8); transition: filter .25s; }
.archive.reels-only li > *:hover img, .archive.reels-only li > *:focus-visible img { filter: brightness(1); }
.archive.reels-only em { grid-column: 3; grid-row: 1; }
@media (max-width: 480px) { .archive.reels-only img { width: 72px; } .archive.reels-only li > * { gap: 0 12px; } }

.about > div:last-child { max-width: 720px; }

.about-contact { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }


.tag a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(124,196,255,.35); transition: border-color .2s; }
.tag a:hover { border-bottom-color: var(--accent); }

/* Slow zoom as images scroll into view */
.feature-media { overflow: hidden; }
.zoomwrap { display: block; overflow: hidden; min-height: 0; height: 100%; }
.feature .feature-media img, .project-cards .card img { transform: scale(1.08); transition: transform 0s; }
.feature.zoom-in .feature-media img, .project-cards .card.zoom-in img { transform: scale(1); transition: transform 2.2s cubic-bezier(.16,.84,.3,1); }
@media (prefers-reduced-motion: reduce) { .feature .feature-media img, .project-cards .card img { transform: none; transition: none; } }

/* Pill video buttons */
.watch { gap: 10px 12px; }
.watch .link, a.link { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 11px 18px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(255,255,255,.03); color: var(--text); font: 500 14px/1 var(--body); text-decoration: none; cursor: pointer; transition: background .25s, border-color .25s, color .25s; }
.watch .link:hover, a.link:hover { background: var(--accent); border-color: var(--accent); color: #0b0c0f; }
.watch .link:focus-visible, a.link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Single pill links sit a little below their text */
.feature-body > a.link { align-self: flex-start; margin-top: 6px; }
.feature.wide .feature-body > a.link { grid-column: 1; justify-self: start; }
.about-contact a.link { margin: 0; }
/* Publication venue as a pill */
.pub-venue { display: inline-flex; align-items: center; padding: 8px 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: var(--text); font-size: 13px; transition: background .25s, border-color .25s, color .25s; }
.pubs a:hover .pub-venue, .pubs a:focus-visible .pub-venue { background: var(--accent); border-color: var(--accent); color: #0b0c0f; }

/* Reels: Watch as a pill */
.archive em { padding: 8px 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: var(--text); transition: background .25s, border-color .25s, color .25s; }
.archive li > *:hover em, .archive li > *:focus-visible em { background: var(--accent); border-color: var(--accent); color: #0b0c0f; }

/* Center the action buttons within their card */
.feature-body .watch, .card .watch { align-self: stretch; justify-content: center; }
.feature.wide .feature-body .watch { grid-column: 1 / -1; grid-row: 5; justify-self: stretch; margin-top: 18px; }
.feature-body > a.link { align-self: center; }
.feature.wide .feature-body > a.link { grid-column: 1 / -1; grid-row: 5; justify-self: center; margin-top: 18px; }

/* Equal-width pills: share a row evenly, or stack at matching widths */
.feature-body .watch .link, .card .watch .link { flex: 1 1 0; min-width: max-content; max-width: 260px; justify-content: center; }

/* Balanced card proportions: a little more room for text */
.feature { grid-template-columns: 1.2fr 1fr; }
.feature:nth-of-type(even) { grid-template-columns: 1fr 1.2fr; }
.feature.narrow-media, .feature.narrow-media:nth-of-type(even) { grid-template-columns: 1fr 1.6fr; }
.feature.wide, .feature.wide:nth-of-type(even) { grid-template-columns: 1fr; }
.feature-body > p:not(.tag):not(.pub-authors) { font-size: 15.5px; line-height: 1.6; }
@media (max-width: 820px) { .feature, .feature:nth-of-type(even), .feature.narrow-media, .feature.narrow-media:nth-of-type(even) { grid-template-columns: 1fr; } }

/* Responsive nav: full links on tablets, menu button on phones */
.menu-btn { display: none; }
@media (max-width: 820px) { .nav nav { gap: 18px; } .nav nav a { font-size: 13px; } }
@media (max-width: 600px) {
  .menu-btn { display: grid; gap: 6px; place-content: center; width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; cursor: pointer; }
  .menu-btn span { display: block; width: 22px; height: 1.5px; background: var(--text); transition: transform .25s; }
  .nav.open .menu-btn span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav.open .menu-btn span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .nav nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; background: rgba(11,12,15,.97); border-bottom: 1px solid var(--line); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .2s, visibility .2s; }
  .nav.open nav { opacity: 1; visibility: visible; transform: none; }
  .nav nav a { font-size: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text); }
  .nav nav a:last-child { border-bottom: 0; }
  .nav.open { background: rgba(11,12,15,.97); }
}
/* Publications on phones: venue pill sized to its text */
@media (max-width: 700px) { .pub-venue { justify-self: start; } }
