:root {
  --bg: #f0f0ee;
  --ink: #111111;
  --muted: #6b6b68;
  --line: #cfcfcb;
  --accent: #f05a3c;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 2.4vw, 32px);
  --gap: clamp(10px, 1.4vw, 18px);
  --radius: 6px;
  --maxw: 1600px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--mono); font-size: 14px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; }

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

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -60px; background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 100; }
.skip:focus { top: 12px; }

/* Header: wordmark left, round menu button right */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center;
  height: 64px; padding: 0 var(--gutter);
  background: var(--bg);
}
.brand { text-decoration: none; display: grid; line-height: 1; gap: 5px; }
.brand b { font-family: var(--display); font-weight: 900; font-size: clamp(18px, 2vw, 24px); letter-spacing: -0.01em; text-transform: uppercase; }
.brand span { font-size: 10px; letter-spacing: 0.5em; text-transform: uppercase; padding-left: 2px; }
.menu-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: none; border: 1px solid var(--ink);
  transition: background .2s, color .2s;
}
.menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--ink); color: var(--bg); }

.menu { position: fixed; inset: 0; z-index: 25; background: var(--accent); color: var(--ink); display: grid; place-items: center; }
.menu[hidden] { display: none; }
.menu nav { display: grid; gap: 0.1em; text-align: center; }
.menu a { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(44px, 10vw, 128px); line-height: 1; text-decoration: none; letter-spacing: -0.01em; }
.menu a:hover { text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.08em; }

/* Intro: just a big title, like a gallery wall label */
.intro { text-align: center; padding: clamp(120px, 22vh, 220px) var(--gutter) clamp(48px, 8vw, 96px); }
.intro h1 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(40px, 7vw, 104px); line-height: 1; letter-spacing: 0.005em; }
.intro .sub { margin-top: 1.6em; color: var(--muted); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }

/* Segmented tab bar, full width */
.tabs { display: flex; overflow-x: auto; scrollbar-width: none; border: 1px solid var(--ink); border-left: 0; border-right: 0; margin-bottom: var(--gap); position: sticky; top: 64px; z-index: 10; background: var(--bg); }
.tab {
  flex: 1 0 auto; padding: 0 14px; height: 28px; background: none; white-space: nowrap; cursor: pointer; border: 0; border-left: 1px solid var(--ink);
  font-size: 11px; letter-spacing: .12em; transition: background .2s;
}
.tab:first-child { border-left: 0; }
.tab:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.tab.is-active { background: var(--accent); }

/* Mosaic: rows alternate between two-up and full width */
.work { padding-bottom: clamp(56px, 8vw, 120px); }
.grid { display: flex; align-items: flex-start; gap: var(--gap);   /* two columns */
  padding: 0 var(--gap); max-width: 1000px; margin: 0 auto; }   /* capped, so two per row never get huge on wide screens */
.grid .col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.card { position: relative; display: block; border: 0; padding: 0; background: none; cursor: pointer; overflow: hidden; border-radius: var(--radius); text-align: left; color: #fff; }
.card[hidden] { display: none; }
.thumb { width: 100%; display: block; aspect-ratio: var(--ar, 1 / 1); object-fit: cover; transition: transform .9s cubic-bezier(.2,.7,.2,1); background: var(--g); }
.card.is-film { background: #000; }
.card.is-film .thumb { object-fit: contain; background: #000; }   /* the whole video frame, never cropped */
.card:hover .thumb { transform: scale(1.03); }
.card .cap {
  position: absolute; inset: auto 0 0 0; padding: 32px 12px 11px; display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(to top, rgba(0,0,0,.65), transparent); font-size: 12px; line-height: 1.35; letter-spacing: .03em;
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s;
}
.card:hover .cap, .card:focus-visible .cap { opacity: 1; transform: none; }
.card .cap .k { opacity: .75; font-size: 11px; }
.frame { display: block; position: relative; }
.card.is-film .frame::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; transform: translate(-50%, -50%);
  border-radius: 50%; background: rgba(255,255,255,.25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 6.5v11l9-5.5z'/%3E%3C/svg%3E") center / 32px no-repeat;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); pointer-events: none; transition: transform .3s, background-color .3s;
}
.card.has-video .frame::after { display: none; }   /* the tile is the playing video, so no play badge */
.card.is-film:hover .frame::after { transform: translate(-50%, -50%) scale(1.1); background-color: rgba(255,255,255,.4); }
@media (hover: none) { .card .cap { opacity: 1; transform: none; } }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* Text sections */
.about, .services { max-width: var(--maxw); margin: 0 auto; padding: clamp(48px, 7vw, 104px) var(--gutter); border-top: 1px solid var(--line); }
.label { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .16em; font-size: 12px; margin-bottom: clamp(20px, 3vw, 36px); }
h3.label { margin-bottom: 14px; }

.about-grid, .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 5vw, 80px); }
.about-lede { font-family: var(--display); font-weight: 800; font-size: clamp(24px, 3.2vw, 48px); line-height: 1.1; letter-spacing: -0.015em; }
.about-copy { display: grid; gap: 1em; align-content: end; max-width: 60ch; color: #2b2b29; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(36px, 5vw, 72px); }
.tags li { border: 1px solid var(--ink); border-radius: 4px; padding: 2px 14px; font-size: 13px; }
.plain li { padding: 8px 0; border-top: 1px solid var(--line); }
.plain li:last-child { border-bottom: 1px solid var(--line); }

/* Contact: accent block */
.contact { background: var(--accent); padding: clamp(48px, 7vw, 104px) var(--gutter); }
.mail { display: inline-block; font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(22px, 6.2vw, 104px); line-height: 1.05; letter-spacing: -0.01em; text-decoration: none; overflow-wrap: anywhere; border-bottom: .06em solid currentColor; }
.mail:hover { opacity: .7; }
.social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(24px, 3vw, 40px); }
.social a { display: inline-block; text-decoration: none; border: 1px solid var(--ink); border-radius: 4px; padding: 2px 14px; font-size: 13px; transition: background .2s, color .2s; }
.social a:hover { background: var(--ink); color: var(--accent); }

.site-footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px var(--gutter); font-size: 12px; color: var(--muted); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* Lightbox stays dark so the work is the focus */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(14,14,13,.96); display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; color: #f0f0ee; }
.lightbox[hidden] { display: none; }
.lightbox:not([hidden]) { animation: lbin .4s ease both; }
@keyframes lbin { from { opacity: 0; } to { opacity: 1; } }
.lb-stage { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; padding: 56px 0 28px; }
.lb-media { display: grid; place-items: center; width: 100%; }
.lb-media img, .lb-media video, .lb-media iframe, .lb-media .placeholder { max-height: calc(100svh - 150px); max-width: 100%; width: auto; height: auto; border-radius: var(--radius); }
.lb-media iframe { width: min(100%, calc((100svh - 150px) * 16 / 9)); aspect-ratio: 16/9; border: 0; height: auto; }
.lb-media .placeholder { width: min(100%, calc((100svh - 150px) * var(--arn, 1.5))); aspect-ratio: var(--ar, 3/2); background: var(--g); }
#lb-caption { font-size: 13px; text-align: center; padding: 0 8px; opacity: .8; }
#lb-caption b { font-family: var(--display); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin-right: 12px; }
.lb-close, .lb-nav { background: none; border: 0; color: inherit; font-size: 28px; cursor: pointer; opacity: .7; transition: opacity .2s; }
.lb-close:hover, .lb-nav:hover { opacity: 1; }
.lb-close { position: absolute; top: 12px; right: 16px; font-size: 38px; line-height: 1; z-index: 2; padding: 4px 10px; }
.lb-nav { height: 100%; }

@media (max-width: 900px) {
  .about-grid, .cols { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .lightbox { grid-template-columns: 1fr; }
  .lb-nav { position: absolute; bottom: 12px; height: auto; padding: 8px 20px; z-index: 2; }
  .lb-nav.prev { left: 0; } .lb-nav.next { right: 0; }
  .lb-stage { padding-bottom: 64px; }
}

/* arriving from the 3D home */
html.arrive { background: #02030a; }
html.arrive body { animation: arrive .9s ease-out both; }
@keyframes arrive { from { opacity: 0; } to { opacity: 1; } }
.card.spotlight { animation: spot 1.7s ease-out 2; }
@keyframes spot { 0% { box-shadow: 0 0 0 0 rgba(240,90,60,.95); } 100% { box-shadow: 0 0 0 26px rgba(240,90,60,0); } }

@media (prefers-reduced-motion: reduce) {
  html.arrive body, .card.spotlight { animation: none; }
  .card.spotlight { outline: 3px solid var(--accent); outline-offset: 3px; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .thumb { transition: none; }
  .card:hover .thumb { transform: none; }
}

/* Photo series open as a scrollable sheet above the page. */
.photo-sheet { display: none; }
.lightbox.is-gallery {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 100vh;
  height: 100dvh;
  padding: clamp(32px, 6vh, 64px) 24px 0;
  overflow: hidden;
  background: rgba(0, 0, 0, .92);
  color: #f4f4f1;
  color-scheme: dark;
  overscroll-behavior: contain;
}
.lightbox.is-gallery[hidden],
.photo-sheet[hidden],
.lightbox.is-gallery .lb-stage,
.lightbox.is-gallery .lb-nav,
.lightbox.is-gallery > .lb-close { display: none; }
.lightbox.is-gallery .photo-sheet:not([hidden]) {
  display: flex;
  flex-direction: column;
  width: min(100%, 960px);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #101010;
  border: 1px solid rgba(255,255,255,.12);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -16px 80px rgba(0,0,0,.28);
}
.lightbox.is-gallery:not([hidden]) .photo-sheet {
  animation: photo-sheet-in .5s cubic-bezier(.2,.75,.25,1) both;
}
@keyframes photo-sheet-in {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.photo-sheet-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255,255,255,.11);
  background: #101010;
  position: relative;
  z-index: 1;
}
.photo-sheet-info { min-width: 0; }
.photo-sheet-title {
  font-family: var(--display);
  font-size: clamp(18px, 2.1vw, 28px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}
.photo-sheet-meta {
  margin-top: 7px;
  color: #a3a3a0;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.photo-sheet-hint {
  color: #b0b0ac;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .03em;
  white-space: nowrap;
}
.photo-sheet-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 20px;
}
.photo-sheet-progress {
  color: #dededb;
  font-size: 12px;
  line-height: 1;
  letter-spacing: .06em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.photo-sheet-close {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  background: transparent;
  color: #f4f4f1;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.photo-sheet-close:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.5);
}
.photo-sheet-scroll {
  display: flex;
  flex-direction: column;
  gap: 40px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 28px 32px max(36px, env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #575754 #101010;
}
.photo-sheet-item {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
}
.photo-sheet-item img {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  max-width: 92%;
  max-height: min(62vh, 620px);
  max-height: min(62svh, 620px);
  object-fit: contain;
  border-radius: 3px;
}
.photo-sheet-photo-caption {
  color: #a3a3a0;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .12em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.lightbox:focus-visible,
.lightbox.is-gallery :focus-visible {
  outline: 2px solid #f4f4f1;
  outline-offset: 4px;
}
.lightbox.is-gallery .photo-sheet-scroll:focus-visible { outline-offset: -4px; }

@media (max-width: 900px) {
  .photo-sheet-header > .photo-sheet-hint { display: none; }
}

@media (max-width: 560px) {
  .lightbox.is-gallery { padding: 32px 12px 0; }
  .lightbox.is-gallery .photo-sheet:not([hidden]) { border-radius: 16px 16px 0 0; }
  .photo-sheet-header {
    gap: 12px;
    padding: 14px max(14px, env(safe-area-inset-right)) 14px max(14px, env(safe-area-inset-left));
  }
  .photo-sheet-title { font-size: clamp(16px, 4.4vw, 22px); }
  .photo-sheet-meta { margin-top: 6px; font-size: 10px; letter-spacing: .05em; }
  .photo-sheet-actions { gap: 12px; }
  .photo-sheet-progress { font-size: 11px; }
  .photo-sheet-header > .photo-sheet-hint { display: none; }
  .photo-sheet-scroll {
    gap: 32px;
    padding: 20px max(12px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  .photo-sheet-item img {
    max-height: 62vh;
    max-height: 62svh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox:not([hidden]),
  .lightbox.is-gallery:not([hidden]) .photo-sheet { animation: none; }
  .photo-sheet-close { transition: none; }
  .photo-sheet-scroll { scroll-behavior: auto; }
}

/* Music video details share the compact, scrollable project sheet. */
.lightbox.is-project .photo-sheet-scroll { gap: 24px; }
.lightbox.is-project .photo-sheet-progress { display: none; }
.lightbox.is-project .mv-project-intro {
  flex: 0 0 auto;
  width: 100%;
  max-width: 650px;
  align-self: center;
}
.lightbox.is-project .mv-project-description {
  color: #c9c9c5;
  font-size: 15px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.lightbox.is-project .mv-project-player,
.lightbox.is-project .mv-project-stills {
  flex: 0 0 auto;
  width: 100%;
  max-width: 800px;
  align-self: center;
}
.lightbox.is-project .mv-project-player {
  overflow: hidden;
  border-radius: 3px;
  background: #000;
}
.lightbox.is-project .mv-project-player video,
.lightbox.is-project .mv-project-player iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}
.lightbox.is-project .mv-project-player video {
  max-height: 55vh;
  max-height: 55svh;
  object-fit: contain;
}
.lightbox.is-project .mv-project-stills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}
.lightbox.is-project .mv-project-still {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 3px;
}
.lightbox.is-project .mv-project-still img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  /* Trim the tiny pale seams embedded at the edges of exported PDF frames. */
  transform: scale(1.006);
}
@media (max-width: 560px) {
  .lightbox.is-project .mv-project-description { font-size: 14px; }
  .lightbox.is-project .mv-project-stills { grid-template-columns: 1fr; }
}
