/* =========================================================
   STEVEN TSUCHIDA SITE — GLOBAL CONTROLS
   ========================================================= */

:root {
  --font-main: "Abel", "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  --bg-color: #171717;
  --text-color: #f4f4f4;
  --text-muted: #c5c5c5;
  --site-name-size: 34px;
  --nav-size: 14px;
  --body-size: 18px;
  --page-side-padding: 10px;
  --header-top-padding: 18px;
  --header-bottom-padding: 24px;
  --grid-gap: 3px;
  --overlay-darkness: 0.80;
  --overlay-bg: rgba(0, 0, 0, var(--overlay-darkness));
  --modal-edge-gap: 32px;
  --modal-max-width: 1600px;
}

* { box-sizing: border-box; }

html, body {
  background: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  font-size: var(--body-size);
  font-style: normal;
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Header / navigation ---------- */

.site-header {
  display: flex;
  align-items: baseline;
  gap: clamp(48px, 8vw, 120px);
  padding:
    var(--header-top-padding)
    var(--page-side-padding)
    var(--header-bottom-padding);
}

.site-name {
  flex: 0 0 auto;
  font-family: var(--font-main);
  font-size: var(--site-name-size);
  font-style: normal;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: var(--nav-size);
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav a { transition: color 140ms ease; }

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.active {
  color: #ffffff;
}

.nav-plus {
  color: #9f9f9f;
  font-size: 0.9em;
  line-height: 1;
}

/* ---------- Narrative project grid ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--grid-gap);
  padding: 0 var(--page-side-padding) var(--page-side-padding);
}

.project {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  content-visibility: auto;
  contain-intrinsic-size: 300px 450px;
}

.project img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 2 / 3;
  transition: transform 180ms ease, opacity 180ms ease;
}

.project:hover img,
.project:focus-visible img {
  transform: scale(1.012);
  opacity: 0.92;
}

.project:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
}

@media (min-width: 1900px) {
  .project-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (min-width: 2500px) {
  .project-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

@media (max-width: 1150px) {
  .project-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-header { gap: 35px; }
}

@media (max-width: 640px) {
  :root {
    --site-name-size: 28px;
    --nav-size: 13px;
    --body-size: 17px;
    --page-side-padding: 6px;
    --header-top-padding: 15px;
    --header-bottom-padding: 18px;
    --grid-gap: 3px;
    --modal-edge-gap: 10px;
  }

  .site-header { display: block; }

  .site-nav {
    margin-top: 15px;
    gap: 0.45rem;
  }

  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Commercials grid ---------- */

.commercial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 52px 10px;
  padding: 28px var(--page-side-padding) 56px;
}

.commercial-project {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-color);
  font: inherit;
  text-align: left;
  cursor: pointer;
  content-visibility: auto;
  contain-intrinsic-size: 400px 280px;
}

.commercial-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.commercial-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease, opacity 180ms ease;
}

.commercial-project:hover .commercial-thumb img,
.commercial-project:focus-visible .commercial-thumb img {
  transform: scale(1.012);
  opacity: 0.92;
}

.commercial-project:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.commercial-caption {
  display: block;
  padding: 9px 4px 0;
  font-family: var(--font-main);
  font-size: var(--nav-size);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0;
}

@media (max-width: 900px) {
  .commercial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 38px 8px;
    padding-top: 18px;
  }
}

@media (max-width: 560px) {
  .commercial-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 10px;
  }
}

/* ---------- Video modal ---------- */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.video-modal.is-open { display: flex; }

.video-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-bg);
}

.video-dialog {
  position: relative;
  z-index: 1;
  width: min(calc(100vw - (var(--modal-edge-gap) * 2)), var(--modal-max-width));
  max-height: calc(100vh - (var(--modal-edge-gap) * 2));
}

.video-frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - (var(--modal-edge-gap) * 2));
  background: #000;
}

.video-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-close {
  position: absolute;
  z-index: 2;
  top: -40px;
  right: 0;
  width: 36px;
  height: 36px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 34px;
  font-weight: 200;
  line-height: 1;
  cursor: pointer;
}

body.video-open { overflow: hidden; }

/* Local MP4 player support */
.local-video-player {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: calc(100vh - (var(--modal-edge-gap) * 2));
  margin: auto;
  background: #000;
  object-fit: contain;
}

.video-frame-wrap.has-local-video {
  aspect-ratio: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: calc(100vh - (var(--modal-edge-gap) * 2));
}

.video-frame-wrap.has-local-video iframe { display: none; }

/* =========================================================
   LOCAL VIDEO — DESKTOP + MOBILE
   Desktop keeps the browser's native controls.
   Touch/mobile uses lightweight custom controls that hide
   quickly so the opening shot is unobstructed.
   ========================================================= */

.local-video-shell {
  position: relative;
  width: 100%;
  max-height: calc(100vh - (var(--modal-edge-gap) * 2));
  background: #000;
  overflow: hidden;
}

.local-video-shell[hidden] {
  display: none !important;
}

.local-video-player {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - (var(--modal-edge-gap) * 2));
  margin: 0 auto;
  background: #000;
  object-fit: contain;
}

.video-frame-wrap.has-local-video {
  aspect-ratio: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.video-frame-wrap.has-local-video iframe {
  display: none;
}

/* Hidden on desktop; JS only enables this UI for touch/coarse-pointer devices. */
.mobile-video-controls {
  display: none;
}

.local-video-shell.mobile-custom-controls .mobile-video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 12px 10px;
  background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,0));
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.local-video-shell.mobile-custom-controls.show-controls .mobile-video-controls,
.local-video-shell.mobile-custom-controls.is-paused .mobile-video-controls {
  opacity: 1;
  pointer-events: auto;
}

.mobile-control-button {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.mobile-video-progress {
  flex: 1 1 auto;
  min-width: 0;
}

/* ---------- Biography page ---------- */

.biography-page {
  padding: 54px var(--page-side-padding) 60px;
}

.biography-card {
  width: min(460px, calc(100vw - 2 * var(--page-side-padding)));
  margin-left: clamp(32px, 3.8vw, 58px);
}

.biography-photo {
  display: block;
  width: 100%;
  height: auto;
}

.biography-copy {
  margin-top: 10px;
  color: var(--text-color);
  font-family: var(--font-main);
  font-size: var(--body-size);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  font-style: italic;
}

.biography-copy p {
  margin: 0;
}

@media (max-width: 640px) {
  .biography-page {
    padding-top: 24px;
  }

  .biography-card {
    width: 100%;
    margin-left: 0;
  }

  .biography-copy {
    font-size: 17px;
    line-height: 1.25;
  }
}

/* ---------- Contact page ---------- */

.contact-page {
  padding: 58px var(--page-side-padding) 60px;
}

.contact-card {
  width: min(460px, calc(100vw - 2 * var(--page-side-padding)));
  margin-left: clamp(32px, 3.8vw, 58px);
  color: var(--text-color);
  font-family: var(--font-main);
  font-size: var(--body-size);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: 0;
}

.contact-section + .contact-section {
  margin-top: 34px;
}

.contact-label {
  margin: 0 0 14px;
  font-style: italic;
}

.contact-agency {
  margin: 0 0 14px;
  font-style: italic;
}

.contact-name,
.contact-line {
  margin: 0;
  font-style: italic;
}

.contact-card a {
  color: inherit;
  text-decoration: none;
}

.contact-card a:hover,
.contact-card a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .contact-page {
    padding-top: 28px;
  }

  .contact-card {
    width: 100%;
    margin-left: 0;
    font-size: 17px;
    line-height: 1.2;
  }
}


/* =========================================================
   TYPOGRAPHY MASTER
   Abel / normal / 400, no added tracking.
   Active navigation is intentionally brighter than inactive.
   ========================================================= */


/* =========================================================
   JON CHEMA TYPOGRAPHY TEST
   Branding: Title Case
   Navigation: uppercase, Abel 400, tracked and slightly smaller.
   ========================================================= */


/* =========================================================
   BRANDING SIZE TEST
   Main name enlarged to better match the Jon Chema hierarchy.
   Desktop: 34px
   Mobile: 28px
   ========================================================= */


/* =========================================================
   ABOUT PAGE
   Former Biography page renamed to About.
   Copy uses the same italic treatment as Contact.
   ========================================================= */


/* =========================================================
   SITE V15 — JOST HEADER / ABOUT / CONTACT
   ========================================================= */

:root {
  --font-main: "Jost", "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  --site-name-size: 15px;
  --nav-size: 15px;
}

.site-header {
  display: flex;
  align-items: baseline;
  width: 100%;
  gap: 28px;
  padding: 28px 26px 28px;
}

.site-name {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.site-nav {
  margin-left: auto;
  display: flex;
  flex: 0 1 auto;
  align-items: baseline;
  justify-content: flex-end;
  gap: clamp(28px, 2.5vw, 52px);
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-plus { display: none; }

/* ABOUT */
.about-page {
  min-height: calc(100vh - 90px);
  padding: clamp(56px, 10vh, 120px) 26px 70px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.about-layout {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(280px, 410px) minmax(360px, 1fr);
  align-items: center;
  gap: clamp(34px, 4vw, 64px);
}

.about-photo {
  display: block;
  width: 100%;
  height: auto;
}

.about-copy {
  font-family: var(--font-main);
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-color);
}

.about-copy p {
  margin: 0 0 14px;
}
.about-copy p:last-child { margin-bottom: 0; }

/* CONTACT */
.contact-page-v15 {
  min-height: calc(100vh - 90px);
  padding: clamp(70px, 16vh, 150px) 26px 70px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.contact-card-v15 {
  width: min(520px, 100%);
  text-align: center;
  font-family: var(--font-main);
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text-color);
}

.contact-card-v15 p { margin: 0 0 18px; }
.contact-card-v15 .contact-agency-v15 {
  margin-bottom: 46px;
  font-weight: 400;
}
.contact-card-v15 .contact-direct-v15 { margin-top: 54px; }
.contact-card-v15 a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 900px) {
  .site-header { gap: 20px; }
  .site-nav { gap: clamp(16px, 2vw, 28px); }
  .about-layout {
    width: min(820px, 100%);
    grid-template-columns: minmax(240px, 360px) minmax(300px, 1fr);
    gap: 30px;
  }
}

@media (max-width: 720px) {
  .site-header {
    display: flex;
    flex-wrap: wrap;
    padding: 20px 12px 22px;
  }
  .site-nav {
    width: 100%;
    margin-left: 0;
    margin-top: 8px;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    white-space: normal;
  }
  .site-name { font-size: 15px; }

  .about-page {
    min-height: 0;
    padding: 28px 12px 48px;
  }
  .about-layout {
    width: min(520px, 100%);
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .about-copy { font-size: 16px; line-height: 1.45; }

  .contact-page-v15 {
    min-height: 0;
    padding: 54px 12px 48px;
  }
  .contact-card-v15 { font-size: 16px; }
}


/* =========================================================
   SITE V16 — FINAL SIZE / EDGE / ABOUT PHOTO ADJUSTMENTS
   ========================================================= */

/* Header closer to browser edges; dynamic space remains between name and nav. */
.site-header {
  padding-left: 10px;
  padding-right: 10px;
}

.site-name,
.site-nav {
  font-size: 15px;
}

/* Match supporting text to the 15px navigation. */
.about-copy,
.contact-card-v15 {
  font-size: 15px;
}

/* Commercial captions / text under commercial thumbnails. */
.commercial-title,
.commercial-copy,
.commercial-caption,
.commercial-card,
.commercial-card figcaption,
.commercial-card .title,
.commercial-project,
.commercial-project figcaption,
.commercial-project .title {
  font-size: 15px;
}

/* About image is 25% smaller than v15 while keeping the image/text group centered. */
.about-layout {
  grid-template-columns: minmax(210px, 307.5px) minmax(360px, 1fr);
  width: min(878px, 100%);
}

/* Keep mobile readable and fluid; image may use available width on narrow screens. */
@media (max-width: 900px) {
  .about-layout {
    grid-template-columns: minmax(180px, 270px) minmax(300px, 1fr);
  }
}

@media (max-width: 720px) {
  .site-header {
    padding-left: 10px;
    padding-right: 10px;
  }
  .site-name { font-size: 15px; }
  .site-nav { font-size: 15px; }

  .about-layout {
    width: min(390px, 100%);
    grid-template-columns: 1fr;
  }
  .about-photo {
    width: 75%;
    margin-left: auto;
    margin-right: auto;
  }
  .about-copy,
  .contact-card-v15 {
    font-size: 15px;
  }
}


/* =========================================================
   SITE V17 — TIGHTER ABOUT / CONTACT SPACING
   ========================================================= */

/* Slightly tighter spacing between About bio lines. */
.about-copy {
  line-height: 1.32;
}
.about-copy p {
  margin-bottom: 9px;
}

/* Slightly tighter Contact grouping. */
.contact-card-v15 {
  line-height: 1.25;
}
.contact-card-v15 p {
  margin-bottom: 13px;
}
.contact-card-v15 .contact-agency-v15 {
  margin-bottom: 34px;
}
.contact-card-v15 .contact-direct-v15 {
  margin-top: 42px;
}

/* When About stacks, align the copy exactly to the photo's left edge. */
@media (max-width: 720px) {
  .about-layout {
    width: min(390px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .about-photo,
  .about-copy {
    width: 75%;
    margin-left: auto;
    margin-right: auto;
  }
  .about-copy {
    align-self: center;
    text-align: left;
  }
}


/* =========================================================
   SITE V18 — ABOUT COMPOSITION REFINEMENT
   ========================================================= */

/*
  Desktop/tablet:
  - Photo is 15% smaller than v17.
  - Gap between photo and copy is 15% tighter.
  - The complete photo/copy composition remains responsive,
    but gets a subtle optical nudge to the right to compensate
    for the visual weight of the portrait.
*/
.about-layout {
  grid-template-columns: minmax(180px, 261.375px) minmax(360px, 1fr);
  column-gap: 85%;
  position: relative;
  left: clamp(8px, 1.25vw, 20px);
  width: min(805px, calc(100% - 40px));
}

/* Override the percentage gap above with a predictable 15%-reduced physical gap
   while retaining compatibility with the existing grid. */
.about-layout {
  column-gap: 25.5px;
}

@media (max-width: 900px) and (min-width: 721px) {
  .about-layout {
    grid-template-columns: minmax(165px, 229.5px) minmax(300px, 1fr);
    column-gap: 25.5px;
    left: clamp(6px, 1vw, 12px);
    width: min(735px, calc(100% - 32px));
  }
}

/*
  Stacked About:
  Photo becomes 15% smaller than v17's 75% width (63.75%).
  Copy uses exactly the same width, so its left edge stays aligned
  to the left edge of the photo.
*/
@media (max-width: 720px) {
  .about-layout {
    width: min(390px, 100%);
    left: 0;
    column-gap: 0;
  }

  .about-photo,
  .about-copy {
    width: 63.75%;
    margin-left: auto;
    margin-right: auto;
  }
}
