/* Layout: logo left / nav right header, then a three-column work grid that
   collapses to two and one. White ground like the current site. */
:root {
  --bg: #ffffff;
  --fg: #141414;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --tint: #f5f5f4;
  --overlay: rgba(255, 255, 255, 0.98);
  --font: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: light;
}
/* Always white, even when the visitor's device is in dark mode. */

[hidden] { display: none !important; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* Header */
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 32px;
}
/* Wordmark: logo, hairline divider, name over a small tracked title */
.brand {
  display: flex; align-items: center; gap: 18px;
  text-decoration: none; color: var(--fg); min-width: 0;
}
.brand-mark { width: 56px; height: auto; flex: none; }
.brand-text {
  display: flex; flex-direction: column; gap: 5px;
  padding-left: 18px; border-left: 1px solid var(--line);
  line-height: 1.1; min-width: 0;
}
.brand-name { font-size: 19px; font-weight: 500; letter-spacing: 0.01em; white-space: nowrap; }
.brand-role {
  font-size: 11px; font-weight: 400; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.2em; white-space: nowrap;
}
@media (max-width: 960px) and (min-width: 721px) { .nav { gap: 20px; } }
@media (max-width: 420px) {
  .brand { gap: 12px; }
  .brand-mark { width: 44px; }
  .brand-text { padding-left: 12px; gap: 4px; }
  .brand-name { font-size: 16px; }
  .brand-role { font-size: 9.5px; letter-spacing: 0.16em; }
}
.nav { display: flex; gap: 32px; }
.nav a {
  text-decoration: none;
  font-size: 17px;
  letter-spacing: 0.02em;
  color: var(--muted);
  padding-block: 4px;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--fg); }
.nav a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--fg); }
/* Sliding underline: follows the pointer across the menu and settles back on the current page */
.nav { position: relative; }
.nav-indicator {
  position: absolute; left: 0; bottom: 0;
  height: 1px; width: 0;
  background: var(--fg);
  opacity: 0;
  pointer-events: none;
  transition: transform .35s cubic-bezier(.22,.61,.36,1), width .35s cubic-bezier(.22,.61,.36,1), opacity .2s ease;
}
.nav.has-indicator a[aria-current="page"] { border-bottom-color: transparent; }
@media (max-width: 720px) { .nav-indicator { display: none; } .nav.has-indicator a[aria-current="page"] { border-bottom-color: var(--fg); } }
.menu-btn { display: none; }

@media (max-width: 720px) {
  .menu-btn {
    display: inline-flex; flex-direction: column; gap: 6px;
    background: none; border: 0; padding: 10px 4px; cursor: pointer;
  }
  .menu-btn span { width: 26px; height: 1.5px; background: var(--fg); }
  .nav {
    position: fixed; inset: 0; z-index: 20;
    flex-direction: column; align-items: center; justify-content: center; gap: 28px;
    background: var(--bg);
    visibility: hidden; opacity: 0; transition: opacity .2s;
  }
  .nav a { font-size: 22px; color: var(--fg); }
  body.menu-open .nav { visibility: visible; opacity: 1; }
  body.menu-open .menu-btn { position: relative; z-index: 21; }
}

main { padding-bottom: 72px; }

/* Featured work: one large player, the project's details beneath it,
   a hairline divider, then every project as a 3-column grid of previews. */
.feature { max-width: 1120px; margin: 0 auto; }
.player { position: relative; aspect-ratio: 16 / 9; background: var(--line); max-width: 100%; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.feature-soon { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-start; padding: clamp(12px, 2.5vw, 28px); }
.feature-soon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-soon span {
  position: relative;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--fg);
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
}

.feature-head {
  max-width: 680px;
  margin-inline: auto;
  text-align: center;
  display: grid;
  gap: 12px;
}
.feature-head { margin-top: clamp(32px, 5vw, 72px); margin-bottom: clamp(20px, 2.5vw, 28px); }
.feature-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.feature-head .meta {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.feature-head p:empty { display: none; }

.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: clamp(56px, 8vw, 96px) 0 clamp(40px, 5vw, 56px);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px 28px;
}
@media (max-width: 960px) { .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .work-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

.thumb {
  display: grid; gap: 14px; width: 100%;
  padding: 0; border: 0; background: none; color: var(--fg);
  font: inherit; text-align: center; cursor: pointer;
}
.thumb-media {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 16 / 9; max-width: 100%; background: var(--line);
}
.thumb-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease, opacity .3s ease;
}
.thumb:hover .thumb-media img { transform: scale(1.03); }
.thumb-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.thumb-video.is-playing { opacity: 1; }
.project.is-active .thumb-video { display: none; }
.thumb-title { font-style: italic; font-size: 15px; text-wrap: balance; }

.now-playing {
  position: absolute; inset: 0;
  display: none; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--fg);
}
.project.is-active .now-playing { display: flex; }
.project.is-active .thumb { cursor: default; }
.project.is-active .thumb:hover .thumb-media img { transform: none; }

/* Grid sits a little lower when it opens the page (no player above it) */
.feature[hidden] ~ .work-grid { margin-top: clamp(24px, 4vw, 56px); }

/* Home intro (plain text Google can read) */
.home-intro {
  max-width: 640px;
  margin: clamp(64px, 8vw, 96px) auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  text-wrap: pretty;
}
.home-intro p { margin: 0; }
.home-intro a { color: var(--fg); }

/* Stills */
.stills { columns: 3 320px; column-gap: 20px; }
.stills button {
  display: block; width: 100%; padding: 0; margin: 0 0 20px;
  border: 0; background: var(--line); cursor: zoom-in;
  break-inside: avoid;
}
.stills img { width: 100%; height: auto; transition: opacity .2s; }
.stills button:hover img { opacity: .85; }
/* With JS on, photos are placed left-to-right in reading order, each into the shortest column */
.stills.is-arranged { columns: auto; display: flex; gap: 20px; align-items: flex-start; }
.stills-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.stills.is-arranged button { margin: 0; }

.lightbox {
  position: fixed; inset: 0; z-index: 30;
  background: var(--overlay);
  display: flex; align-items: center; justify-content: center;
  padding: max(56px, env(safe-area-inset-top, 0px)) max(56px, env(safe-area-inset-right, 0px)) max(56px, env(safe-area-inset-bottom, 0px)) max(56px, env(safe-area-inset-left, 0px));
}
.lightbox img { max-height: 100%; max-width: 100%; object-fit: contain; }
.lightbox button {
  position: absolute; background: none; border: 0; color: var(--fg);
  font: 300 34px/1 var(--font); cursor: pointer; padding: 12px;
}
.lb-close { top: max(12px, env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); }
.lb-prev { left: max(4px, env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%); }
.lb-next { right: max(4px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); }
@media (max-width: 560px) { .lightbox { padding-inline: 8px; } }

/* About */
.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
@media (max-width: 800px) { .about { grid-template-columns: minmax(0, 1fr); } }
.about-photo figure { margin: 0; }
.about-photo figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; font-style: italic; }
.about h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 500; line-height: 1.1; margin: 0 0 24px; letter-spacing: -0.01em; }
.about p { max-width: 62ch; margin: 0 0 18px; }
.about .contact { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.about .contact a { font-weight: 500; }

/* About: resume link */
.about .about-links { margin-top: 8px; }
.about .about-links a { font-weight: 500; }

/* Services */
.services { max-width: 1040px; margin: 0 auto; }
.services-intro {
  max-width: 680px;
  margin: clamp(32px, 5vw, 72px) auto clamp(56px, 7vw, 88px);
  text-align: center;
}
.services-intro h1 {
  margin: 0 0 20px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.services-intro p { margin: 0; font-size: 17px; line-height: 1.7; text-wrap: pretty; }
.service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px clamp(32px, 5vw, 72px);
}
@media (max-width: 680px) { .service-list { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.service-list article { padding-top: 20px; border-top: 1px solid var(--line); }
.services h2 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.service-list p { margin: 0; max-width: 46ch; }

/* Services: page sections */
.service-list article h2 { font-size: 13px; }
.service-also {
  margin-top: clamp(48px, 6vw, 72px);
  padding: 24px 28px;
  background: var(--tint);
}
.service-also p { margin: 0; max-width: 80ch; }
.service-also strong { font-weight: 500; }
.service-block { margin-top: clamp(64px, 8vw, 96px); }
.service-block > h2 {
  margin: 0 0 24px;
  font-size: clamp(22px, 2.6vw, 26px);
  font-weight: 500;
  text-transform: none;
  letter-spacing: -0.005em;
}
.industry-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.industry-list li {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
}
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; font-size: 17px; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 300; font-size: 24px; line-height: 1; color: var(--muted); flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 20px; max-width: 70ch; color: var(--muted); }

/* Services: photo spots. Missing photos show as labeled boxes only in
   local/test previews (see main.js); on the live site they hide. */
.photo-slot { position: relative; margin: 0; background: var(--tint); overflow: hidden; max-width: 100%; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot--square { aspect-ratio: 1 / 1; width: 88px; flex: none; }
.photo-slot--portrait { aspect-ratio: 1 / 1; width: 120px; margin: 0 auto 28px; }
@media (max-width: 520px) { .photo-slot--square { width: 64px; } .photo-slot--portrait { width: 96px; } .photo-slot.is-empty::after { font-size: 8px; letter-spacing: 0.02em; padding: 0 2px; } }
.photo-slot.is-empty { border: 1px dashed #c9c9c4; display: flex; align-items: center; justify-content: center; }
.photo-slot.is-empty img { display: none; }
.photo-slot.is-empty::after {
  content: attr(data-label);
  padding: 0 6px; text-align: center;
  font-size: 10px; line-height: 1.3; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.service-list article:has(.photo-slot) { display: flex; gap: 20px; align-items: flex-start; }
.service-text { min-width: 0; }

/* Services: where I work band */
.where { margin-top: clamp(64px, 8vw, 96px); }
.services .where h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.6vw, 26px); font-weight: 500;
  text-transform: none; letter-spacing: -0.005em;
}
.where-head p { margin: 0 0 10px; color: var(--muted); font-size: 15px; max-width: 90ch; }
.where-places { overflow: hidden; }
.where-list {
  list-style: none; margin: 0 0 0 -22px; padding: 0;
  display: flex; flex-wrap: wrap; row-gap: 2px;
  font-size: 15px; line-height: 1.6;
}
.where-list li::before {
  content: "·";
  display: inline-block; width: 22px; text-align: center;
  color: var(--muted);
}

/* Services: closing call to action */
.contact-cta {
  margin-top: clamp(72px, 9vw, 112px);
  padding: clamp(40px, 6vw, 72px) clamp(20px, 4vw, 48px);
  background: var(--tint);
  text-align: center;
}
.services .contact-cta h2 {
  margin: 0 0 20px;
  font-size: clamp(40px, 6vw, 64px); font-weight: 500; line-height: 1.05;
  text-transform: none; letter-spacing: -0.02em;
  text-wrap: balance;
}
.contact-cta > p { margin: 0 auto; max-width: 52ch; }
.button {
  display: inline-block;
  margin-top: 16px;
  padding: 22px 56px;
  background: var(--fg); color: var(--bg);
  text-decoration: none;
  font-size: 17px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  transition: opacity .2s;
}
.button:hover { opacity: .85; }
.contact-cta .contact-cta-email { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* Resume */
.resume { max-width: 900px; margin: 0 auto; }
.resume img { width: 100%; height: auto; border: 1px solid var(--line); }
.resume p { text-align: center; color: var(--muted); font-size: 14px; }

/* Footer */
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-block: 28px;
  border-top: 1px solid var(--line);
  font-size: 14px; color: var(--muted);
}
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--fg); }

@media (prefers-reduced-motion: reduce) { *:not(.nav-indicator):not(.thumb-video) { transition: none !important; } }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
