/*
════════════════════════════════════════════════════════
  style.css — Kaiden Charan portfolio
  Single stylesheet shared by all pages:
    index.html        Homepage (marquee)
    category pages    Work grids filtered by data-page-category
    project.html      Individual project detail
    publications.html Zines & books grid
    info.html         About / contact page

  SECTION MAP:
    1. Fonts
    2. Reset & Base
    3. Placeholder utility (.ph)
    4. Header
    5. Homepage Marquee
    6. Work Grid
    7. Project Page
    8. Publications Page
    9. Info Page
   10. Responsive — Tablet (max-width: 1100px)
   11. Responsive — Mobile (max-width: 768px)
   12. Responsive — Small mobile (max-width: 480px)
════════════════════════════════════════════════════════
*/


/* =============================================
   1. FONTS
   Self-hosted fonts loaded from the shared theme
   folder two levels up (../../kaiden-charan-theme/).
   Two typefaces are used across the site:

   DirtyBleedDisplay (weight 400 only)
     — Used for: logo, nav links, headings, pub titles
     — Files: .woff2 (modern), .woff (fallback), .ttf (legacy)

   HelveticaNeue (weights 300–900, normal + italic)
     — Used for: body text, bio, contact, captions
     — Multiple .otf / .ttf files, one @font-face per weight/style
============================================= */

@font-face {
  font-family: 'DirtyBleedDisplay';
  /* woff2 is smallest/fastest; browser picks the first format it supports */
  src: url('../fonts/DirtyBleedDisplay.woff2') format('woff2'),
       url('../fonts/DirtyBleedDisplay.woff') format('woff'),
       url('../fonts/DirtyBleedDisplay.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

/* HelveticaNeue — one rule per weight/style combination */
@font-face {
  font-family: 'HelveticaNeue';
  src: url('../fonts/HelveticaNeueLight.otf') format('opentype');
  font-weight: 300; font-style: normal;
}
@font-face {
  font-family: 'HelveticaNeue';
  src: url('../fonts/HelveticaNeueLightItalic.otf') format('opentype');
  font-weight: 300; font-style: italic;
}
@font-face {
  font-family: 'HelveticaNeue';
  src: url('../fonts/HelveticaNeueRoman.otf') format('opentype');
  font-weight: 400; font-style: normal;
}
@font-face {
  font-family: 'HelveticaNeue';
  src: url('../fonts/HelveticaNeueItalic.ttf') format('truetype');
  font-weight: 400; font-style: italic;
}
@font-face {
  font-family: 'HelveticaNeue';
  src: url('../fonts/HelveticaNeueMedium.otf') format('opentype');
  font-weight: 500; font-style: normal;
}
@font-face {
  font-family: 'HelveticaNeue';
  src: url('../fonts/HelveticaNeueMediumItalic.otf') format('opentype');
  font-weight: 500; font-style: italic;
}
@font-face {
  font-family: 'HelveticaNeue';
  src: url('../fonts/HelveticaNeueBold.otf') format('opentype');
  font-weight: 700; font-style: normal;
}
@font-face {
  font-family: 'HelveticaNeue';
  src: url('../fonts/HelveticaNeueBoldItalic.otf') format('opentype');
  font-weight: 700; font-style: italic;
}
@font-face {
  font-family: 'HelveticaNeue';
  src: url('../fonts/HelveticaNeueHeavy.otf') format('opentype');
  font-weight: 800; font-style: normal;
}
@font-face {
  font-family: 'HelveticaNeue';
  src: url('../fonts/HelveticaNeueBlack.otf') format('opentype');
  font-weight: 900; font-style: normal;
}


/* =============================================
   2. RESET & BASE
   Removes all default browser margins/padding and
   sets box-sizing to border-box (padding and border
   are included in an element's declared width/height,
   which prevents layout surprises).
============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px; /* Base unit — rem values are calculated from this */
  scroll-behavior: smooth; /* Smooth scrolling for anchor links */
}

body {
  font-family: var(--kc-body-font, 'HelveticaNeue'), 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 500; /* Medium weight as the default body weight */
  color: var(--kc-text-color, #000);
  background: var(--kc-bg-color, #fff);
  /* Improves font rendering on Mac/WebKit and Firefox */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

body.kc-night-mode {
  --kc-bg-color: #161416;
  --kc-text-color: #fff;
  background: var(--kc-bg-color);
  color: #fff;
}

body.kc-night-mode .site-header,
body.kc-night-mode .portal-gate,
body.kc-night-mode .rates-page,
body.kc-night-mode .client-page {
  background: var(--kc-bg-color);
  color: #fff;
}

body.kc-night-mode .site-rule,
body.kc-night-mode .project-title-row,
body.kc-night-mode .project-body,
body.kc-night-mode .client-info,
body.kc-night-mode .client-side,
body.kc-night-mode .client-comments {
  border-color: rgba(255,255,255,0.32);
}

/* Remove underline and inherit color on all links by default */
a {
  color: inherit;
  text-decoration: none;
}

/* Prevent images from overflowing their containers */
img {
  display: block;
  max-width: 100%;
  border-radius: 0;
}

button,
input,
textarea {
  font: inherit;
}


/* =============================================
   3. PLACEHOLDER UTILITY — .ph
   Grey boxes used everywhere real images haven't
   been placed yet. To replace a placeholder:
     1. Remove <div class="ph" style="...">
     2. Add <img src="assets/images/..." alt="...">
   The grey color (#d4d4d4) and square corners
   match the rounded corners used on all image tiles.
   width: 100% makes it fill its parent container.
============================================= */
.ph {
  background-color: #d4d4d4;
  display: block;
  width: 100%;
  border-radius: 0;
}


/* =============================================
   4. HEADER
   The site header is shared by all pages.
   It has three layout zones stacked vertically:
     a) .header-top  — 3-column grid (logo | info | deco)
     b) .site-rule   — horizontal divider line
     c) .nav-row     — 2-column grid (spacer | nav links)

   .is-sticky (added on project pages only):
     Makes the header stick to the top of the viewport
     while the user scrolls through long project content.
     z-index: 50 keeps it above images when scrolling.
============================================= */
.site-header {
  background: var(--kc-bg-color, #fff);
}

.home-page .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Applied only on project.html — makes header follow scroll */
.site-header.is-sticky {
  position: sticky;
  top: 0;
  z-index: 50;
}

/*
  Header top row: 3-column CSS grid
    Column 1: 420px  — logo
    Column 2: 1fr    — bio paragraph + contact links (takes remaining space)
    Column 3: 180px  — decorative image / mascot
  align-items: end  — content anchors to the bottom of each column
  padding: 16px 40px 10px — top, sides, bottom
*/
.header-top {
  display: grid;
  grid-template-columns: 420px 1fr 180px;
  align-items: end;
  padding: 22px 40px 10px;
}

.home-page .header-top {
  padding-top: 14px;
  padding-bottom: var(--homepage-mascot-rule-gap, 18px);
}

/* Logo column — matches the contact row baseline above the divider */
.header-brand {
  align-self: end;
  padding-bottom: 4px;
}

.site-header.is-sticky .header-brand {
  transform: none;
  padding-bottom: 6px;
}

.site-header.is-sticky .header-deco {
  align-self: end;
  padding-bottom: 3px;
}

/* Logo text — DirtyBleedDisplay, 24px, tight tracking */
.site-logo {
  font-family: var(--kc-title-font, 'DirtyBleedDisplay'), sans-serif;
  font-size: 24px;
  letter-spacing: -0.72px;
  color: #000;
  line-height: 1;
  display: inline-block;
}

/* Logo doesn't change color on hover — just stays black */
.site-logo:hover {
  color: #ff0a0a;
}

/* Bio/contact column — slight padding-bottom to breathe above divider */
.header-info {
  align-self: end;
  padding-bottom: 10px;
}

/* Bio paragraph — only shown on index.html, hidden on all other pages */
.header-bio {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.42px;
  line-height: 1.0; /* Tight line height for editorial feel */
  color: #000;
  margin-bottom: 8px;
}

/* Contact line — shown on all pages */
.header-contact {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.42px;
  line-height: 1;
  color: #000;
}

/* The colon-separated label before the links */
.header-contact strong {
  font-weight: 700;
}

/* EMAIL / INSTAGRAM / LINKEDIN link styling */
.header-contact a {
  font-weight: 700;
  transition: color 0.12s ease; /* Fast hover transition */
}

/* Links turn red on hover — brand accent color */
.header-contact a:hover {
  color: #ff0a0a;
}

/*
  Deco column — decorative image top-right of header.
  justify-self: end aligns it to the right edge of its grid cell.
  align-self: start anchors it to the top (so it hangs from the top
  while the logo and bio text anchor from the bottom).
*/
.header-deco {
  align-self: start;
  justify-self: end;
}

.header-deco img {
  width: auto;
  height: 28px;
  max-width: 160px;
  object-fit: contain;
}

.home-page .header-deco img {
  height: var(--homepage-mascot-height, 84px);
  max-width: 180px;
  transform: none;
}

/* Remove border-radius and fixed width from .ph inside deco — image handles its own sizing */
.header-deco .ph {
  border-radius: 0;
  width: auto;
}

/* Mobile mascot — hidden on desktop, shown at page bottom on mobile */
.mascot-mobile {
  display: none;
}

/*
  Horizontal rule dividers.
  border-top gives a 1px solid line; border: none removes the
  default <hr> border so we can control it precisely.
  40px side margins match the header padding.
*/
.site-rule {
  border: none;
  border-top: 1px solid #000;
  margin: 0 40px;
}

/*
  Nav row — 2-column grid matching the header:
    Column 1: 420px — empty spacer (.nav-offset) so nav aligns with
              the bio/contact text in the column above
    Column 2: 1fr   — the actual nav links
*/
.nav-row {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  align-items: center;
  padding: 0 40px;
}

/* .nav-offset — empty spacer div, no styles needed; pushes nav into the right column */

/* Nav link row — evenly spaces links across the column width */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0 5px;
  overflow: hidden;
}

/* Individual nav link — DirtyBleedDisplay to match logo */
.nav-link {
  font-family: var(--kc-title-font, 'DirtyBleedDisplay'), sans-serif;
  font-size: 16px;
  letter-spacing: -0.48px;
  color: #000;
  line-height: 1.35;
  display: inline-block;
  transform: none;
  white-space: nowrap; /* Prevent link text from wrapping */
  transition: color 0.12s ease;
}

/*
  Active state — the current page's nav link turns red.
  Applied manually in HTML via class="nav-link active".
  Also applies on hover for interactive feedback.
*/
.nav-link:hover,
.nav-link.active {
  color: #ff0a0a;
}

/*
  PROJECT TITLE ROW — unique to project.html.
  An extra row below the nav that shows the current project name.
  Same 2-column grid as .nav-row so the title aligns with the nav.
  A .site-rule <hr> appears above and below this row.
*/
.project-title-row {
  display: grid;
  grid-template-columns: 420px 1fr;
  padding: 20px 40px 12px;
}

/* .project-title-row-offset — empty spacer div, no styles needed; mirrors .nav-offset */

/* Project name in the header bar — DirtyBleedDisplay 24px, same as logo */
.project-header-name {
  font-family: var(--kc-title-font, 'DirtyBleedDisplay'), sans-serif;
  font-size: 24px;
  letter-spacing: -0.72px;
  line-height: 1;
  display: inline-block;
  color: #000;
  padding: 0;
}

.project-header-year {
  color: #8b8b8b;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.28px;
  line-height: 1;
  margin-left: 12px;
  white-space: nowrap;
}


/* =============================================
   5. HOMEPAGE IMAGE STRIP
   A horizontally scrolling strip of work photos.
   Images are built and shuffled by js/main.js using
   HOMEPAGE_IMAGES from js/homepage-images.js.

   HOW THE LOOP WORKS:
     JS appends a clone of every item so the track has
     2× the content. The CSS animation translates from 0
     to -50% (the exact midpoint / start of the clone),
     then snaps back to 0 invisibly.

   Items have variable heights set inline by JS from the
   responsive strip height. Their width is driven by the
   image's natural aspect ratio: img { height:100%; width:auto }.
============================================= */
.marquee-section {
  padding-top: var(--homepage-marquee-top, 100px);
  overflow: hidden;
  position: relative;
  min-height: calc(100svh - var(--homepage-header-height, 0px));
  --homepage-strip-height: clamp(
    280px,
    calc(100svh - var(--homepage-header-height, 0px) - (var(--homepage-marquee-top, 100px) * 2)),
    720px
  );
}

.marquee-section.is-grid-mode {
  padding: var(--homepage-grid-top, 100px) 40px 60px;
  overflow: visible;
  min-height: 0;
}

.marquee-section.is-slideshow-mode {
  padding: var(--homepage-slideshow-top, 14px) 40px 60px;
  overflow: visible;
  min-height: 0;
}

.marquee-hold {
  position: absolute;
  left: 50%;
  top: calc(var(--homepage-marquee-top, 100px) + (var(--homepage-strip-height, 430px) / 2));
  transform: translate(-50%, -50%);
  font-family: var(--kc-title-font, 'DirtyBleedDisplay'), sans-serif;
  font-size: 22px;
  letter-spacing: -0.66px;
  color: #000;
  z-index: 20;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.14s linear;
}

.marquee-hold.is-hidden {
  opacity: 0;
}

.marquee-track {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  height: var(--homepage-strip-height, 430px);
  width: max-content;
  will-change: transform;
}

.marquee-track.is-scrolling {
  animation: marquee-scroll var(--homepage-marquee-speed, 20s) linear infinite;
}

.marquee-track.is-scrolling:hover {
  animation-play-state: paused;
}

.marquee-track.is-loading .marquee-item {
  opacity: 0;
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(var(--marquee-shift, -50%)); }
}

/* Individual strip item — height set inline by JS, width from image ratio */
.marquee-item {
  flex-shrink: 0;
  border-radius: 0;
  overflow: hidden;
  display: block;
  position: relative;
}

.marquee-track.is-intro .marquee-item {
  animation: none;
}

.marquee-track.is-intro .marquee-item:not(.is-intro-card) {
  opacity: 0;
}

.marquee-item.is-intro-card {
  z-index: var(--intro-z, 1);
  opacity: 0;
  transform-origin: center center;
  transform: translate3d(var(--intro-x, 0), var(--intro-y, 0), 0) rotate(var(--intro-rotate, 0deg));
  transition:
    transform 1.25s cubic-bezier(0.19, 1, 0.22, 1),
    opacity 0.09s linear;
  transition-delay: var(--intro-delay, 0ms);
  will-change: transform;
}

.marquee-track.is-intro:not(.is-stacking) .marquee-item.is-intro-card {
  transition: none;
}

.marquee-track.is-stacking .marquee-item.is-intro-card,
.marquee-track.is-cascading .marquee-item.is-intro-card {
  opacity: 1;
}

.marquee-track.is-cascading .marquee-item.is-intro-card {
  transform: translate3d(0, 0, 0) rotate(0deg);
}

.marquee-track.is-scrolling .marquee-item {
  opacity: 1;
}

.marquee-track.is-scrolling {
  opacity: 1;
}

.home-photo-grid {
  display: block;
  columns: 4;
  column-gap: 16px;
  width: 100%;
  height: auto;
  transform: none;
  will-change: auto;
}

.home-photo-grid .marquee-item {
  break-inside: avoid;
  width: 100% !important;
  height: auto !important;
  margin-bottom: 16px;
}

.home-photo-grid .marquee-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.home-slideshow {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  height: auto;
  transform: none;
  will-change: auto;
}

.home-slideshow-figure {
  width: 100%;
  max-width: calc(100vw - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-slideshow-figure img {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 280px);
  object-fit: contain;
  cursor: pointer;
}

.home-slideshow-figure figcaption {
  margin-top: 10px;
  min-height: 18px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.42px;
  line-height: 1;
  text-align: center;
}

.home-slideshow-figure figcaption a {
  font-weight: 700;
  transition: color 0.12s ease;
}

.home-slideshow-figure figcaption a:hover {
  color: #ff0a0a;
}

/* Image fills item height; width scales naturally with aspect ratio */
.marquee-item img {
  display: block;
  height: 100%;
  width: auto;
  border-radius: 0;
}

/* Linked items get a pointer cursor */
.marquee-item--linked {
  cursor: pointer;
}

/* Hover title overlay */
.marquee-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: flex-end;
  padding: 10px 12px;
  opacity: 0;
  transition: opacity 0.15s ease;
  border-radius: 0;
}

.marquee-item:hover .marquee-item-overlay,
.home-photo-grid .marquee-item:hover .marquee-item-overlay {
  opacity: 1;
}

.marquee-item-title {
  font-family: var(--kc-title-font, 'DirtyBleedDisplay'), sans-serif;
  font-size: 14px;
  letter-spacing: -0.42px;
  color: #fff;
  line-height: 1;
}

/* Placeholder fallback (kept for backwards compat if a .ph is ever used in the strip) */
.marquee-item .ph {
  border-radius: 0;
  width: 100%;
  height: 100%;
}


/* =============================================
   6. WORK GRID
   Used on category pages. JS places thumbnails into
   explicit columns so the top row aligns cleanly while
   images of different heights still pack tightly below.
   columns: 3 at desktop → 2 at tablet → 1 at mobile
============================================= */
.work-section {
  padding: 32px 40px 60px;
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  /* Match the desktop nav's 420px offset; the work grid stays full width. */
  margin: 0 0 24px 420px;
}

.project-filter {
  border: 0;
  padding: 0;
  background: transparent;
  color: #000;
  cursor: pointer;
  font-family: var(--kc-title-font, 'DirtyBleedDisplay'), sans-serif;
  font-size: 14px;
  line-height: 1;
  text-transform: lowercase;
}

.project-filter:hover,
.project-filter.active {
  color: #e00000;
}

/* 3-column masonry — JS places items into the shortest column */
.work-grid {
  --work-grid-columns: 3;
  display: grid;
  grid-template-columns: repeat(var(--work-grid-columns), minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.work-grid.is-arranging {
  opacity: 0;
}

.work-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/*
  Each work item is placed inside a .work-column by JS.
  The column flex gap controls the vertical spacing.
*/
.work-item {
  break-inside: avoid;
  display: block;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  width: 100%;
}

/* Placeholder/image inside a work item */
.work-item img,
.work-item .ph {
  width: 100%;
  height: auto;
  border-radius: 0;
  transition: opacity 0.18s ease; /* Fade on hover */
}

/* Slightly dims image on hover as a visual affordance */
.work-item:hover .ph {
  opacity: 0.8;
}

/* Hover title overlay — mirrors marquee overlay style */
.work-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: flex-end;
  padding: 10px 12px;
  opacity: 0;
  transition: opacity 0.15s ease;
  border-radius: 0;
}

.work-item:hover .work-item-overlay {
  opacity: 1;
}

.work-item-title {
  font-family: var(--kc-title-font, 'DirtyBleedDisplay'), sans-serif;
  font-size: 14px;
  letter-spacing: -0.42px;
  color: #fff;
  line-height: 1;
}

.fine-art-grid {
  columns: 3 240px;
  column-gap: 16px;
}

.fine-art-item {
  display: inline-block;
  width: 100%;
  margin: 0 0 16px;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: zoom-in;
}

.fine-art-item img {
  width: 100%;
  height: auto;
  display: block;
}

.fine-art-item span {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.55;
}

.fine-art-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 40px;
  cursor: zoom-out;
}

.fine-art-lightbox img {
  max-width: calc(100vw - 80px);
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.fine-art-lightbox p {
  color: #fff;
  font-size: 12px;
}

.fine-art-lightbox button {
  position: fixed;
  top: 20px;
  right: 28px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
}


/* =============================================
   7. PROJECT PAGE
   Used on project.html. Two-column layout:
     Column 1 (420px) — .project-sidebar: collapsible info
     Column 2 (auto)  — .project-images: flexible row layout
   align-items: start so the sidebar doesn't stretch to
   match the height of the image column.
============================================= */
.project-body {
  display: block;
  padding: 0 40px 60px;
  min-height: 80vh;
}

/* Text sidebar stays fixed on desktop so only the image column scrolls */
.project-sidebar {
  position: fixed;
  top: 108px;
  left: 40px;
  width: 420px;
  padding: 32px 48px 40px 0;
  max-height: none;
  overflow: visible;
}

/* Accordion toggle — hidden on desktop, visible on tablet/mobile */
.sidebar-toggle {
  display: none;
}

/* Project description paragraph */
.project-body-text {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.42px;
  line-height: 1.21;
  color: #000;
}

.project-downloads {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
}

.project-download-link {
  border-bottom: 1px solid currentColor;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-download-link:hover {
  color: #ff0a0a;
}

.project-text-view-button {
  margin-top: 18px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.project-text-view-button:hover {
  color: #ff0a0a;
}

.hidden-info-detail {
  border-top: 1px solid currentColor;
  padding: 18px 0;
}

.hidden-info-detail h2 {
  font-family: var(--kc-title-font, 'DirtyBleedDisplay'), sans-serif;
  font-size: 18px;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.hidden-info-detail p {
  font-size: 15px;
  line-height: 1.25;
}

.project-body.hidden-info-page {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 60px;
  padding: 0 40px 60px;
}

.hidden-info-page .project-sidebar {
  position: static;
  top: auto;
  left: auto;
  width: auto;
  padding: 32px 48px 40px 0;
}

.hidden-info-page .project-images {
  margin-left: 0;
  padding-top: 32px;
}

/* Image column — top padding separates rows from the header */
.project-images {
  padding: 32px 0 0;
  margin-left: 420px;
}

/* ── Flexible row layout ──────────────────── */
.project-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.project-row:not(.project-row--auto) {
  height: var(--project-row-height, 500px);
}
.project-row:last-child {
  margin-bottom: 0;
}

/* crop: equal flex slots, object-fit cover — images fill and get trimmed */
.project-row--crop img,
.project-row--crop .ph {
  flex: 1;
  min-width: 0;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

/* contain: ratio preserved — image box matches visible photo so corners round */
.project-row--contain {
  align-items: flex-start;
}
.project-row--contain img,
.project-row--contain .ph {
  flex: 0 1 auto;
  min-width: 0;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 0;
  display: block;
}

/* auto: no fixed row height, each image at its natural ratio */
.project-row--auto {
  align-items: flex-start;
}
.project-row--auto img,
.project-row--auto .ph {
  flex: 1;
  min-width: 0;
  height: auto;
  display: block;
  border-radius: 0;
}

.project-row--stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.project-stack-column {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-stack-slot {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.project-row--stack img,
.project-row--stack .ph {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 0;
}

.project-row--stack.project-row--contain img,
.project-row--stack.project-row--contain .ph {
  object-fit: contain;
}

.project-row--video {
  display: block;
}

.project-video {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 0;
  overflow: hidden;
}

.project-video iframe,
.project-video video,
.project-video-thumb,
.project-video-thumb img {
  width: 100%;
  height: 100%;
  display: block;
}

.project-video iframe {
  border: 0;
}

.project-video video,
.project-video-thumb img {
  object-fit: cover;
}

.project-video-thumb {
  position: relative;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
}

.project-video-thumb span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #000;
  color: #fff;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-row--auto .project-video {
  height: auto;
}

/* ── Project title row with back button ───── */
.project-title-right {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
}

.project-back-link {
  font-family: var(--kc-body-font, 'HelveticaNeue'), 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.36px;
  color: #000;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
  margin-left: auto;
  transition: color 0.12s ease;
}
.project-back-link:hover {
  color: #ff0a0a;
}

.back-short {
  display: none;
}


/* =============================================
   8. PUBLICATIONS PAGE
   Project-style publication layouts: static text
   column on desktop, scrolling image column.
============================================= */
.publications-projects {
  padding: 0 40px 60px;
}

.publication-project {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 48px;
  min-height: calc(100vh - 104px);
  align-items: start;
  border-bottom: 1px solid #000;
  box-sizing: border-box;
  padding: 28px 0;
}

.publication-project:last-child {
  border-bottom: 0;
}

.publication-sidebar {
  min-height: calc(100vh - 160px);
  padding: 0;
}

.publication-sidebar-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.publication-title {
  font-family: var(--kc-title-font, 'DirtyBleedDisplay'), sans-serif;
  font-size: 24px;
  letter-spacing: -0.72px;
  line-height: 1;
  color: #000;
  margin-bottom: 8px;
  display: block;
}

.publication-title-link {
  transition: color 0.12s ease;
}

.publication-title-link:hover {
  color: #ff0a0a;
}

.publication-meta,
.publication-text,
.publication-download {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.42px;
  line-height: 1.21;
  color: #000;
}

.publication-meta {
  opacity: 0.45;
  margin-bottom: 28px;
}

.publication-download {
  margin-top: 28px;
  font-weight: 700;
  text-transform: uppercase;
  transition: color 0.12s ease, opacity 0.12s ease;
}

.publication-download:hover {
  color: #ff0a0a;
}

.publication-download--disabled {
  opacity: 0.35;
}

.publication-images {
  padding: 0;
}

.publication-image-row {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

a.publication-image-row {
  cursor: pointer;
}

.publication-image-row img {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 160px);
  height: auto;
  object-fit: contain;
  border-radius: 0;
  display: block;
}

.publication-image-row .ph {
  width: min(100%, calc((100vh - 160px) * 0.75));
  aspect-ratio: 3 / 4;
  height: auto;
  max-height: calc(100vh - 160px);
  border-radius: 0;
  display: block;
}

.publication-pdf-row {
  width: 100%;
}

.publication-pdf-viewer {
  width: 100%;
  min-height: calc(100vh - 190px);
  border: 1px solid #000;
  display: block;
  background: #f4f4f4;
}


/* =============================================
   9. Portal / Rates / Client Pages
============================================= */
.portal-gate,
.rates-page,
.client-page {
  min-height: 100vh;
  padding: 40px;
  background: var(--kc-bg-color, #fff);
}

.portal-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  text-align: left;
}

.portal-menu-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

.portal-logo {
  font-family: var(--kc-title-font, 'DirtyBleedDisplay'), sans-serif;
  font-size: 24px;
  letter-spacing: -0.72px;
  line-height: 1;
  color: inherit;
  -webkit-text-fill-color: currentColor;
  -webkit-text-stroke: 0 currentColor;
  text-shadow: none;
}

.portal-logo:hover {
  color: #ff0a0a !important;
  -webkit-text-fill-color: #ff0a0a !important;
  -webkit-text-stroke: 0 #ff0a0a;
  text-shadow: none !important;
}

.portal-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
}

.portal-links a {
  font-family: var(--kc-title-font, 'DirtyBleedDisplay'), sans-serif;
  font-size: clamp(28px, 5vw, 56px);
  letter-spacing: 0;
  line-height: 0.95;
  color: inherit;
  -webkit-text-fill-color: currentColor;
  -webkit-text-stroke: 0 currentColor;
  text-shadow: none;
}

.portal-small-link:hover,
.client-download-link:hover {
  color: #ff0a0a;
  -webkit-text-fill-color: #ff0a0a;
  text-shadow: none;
}

.portal-links a:hover {
  color: #ff0a0a !important;
  -webkit-text-fill-color: #ff0a0a !important;
  -webkit-text-stroke: 0 #ff0a0a;
  text-shadow: none !important;
}

.portal-form {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 40px;
}

.portal-login-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
}

.portal-form label,
.client-services h2,
.client-downloads h2,
.client-todos h2,
.client-comments h2 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.portal-form input,
.client-comments textarea {
  border: 0;
  border-bottom: 1px solid #000;
  border-radius: 0;
  padding: 9px 0;
  outline: none;
  background: transparent;
}

.portal-form button,
.client-comments button,
.portal-small-link {
  border: 1px solid #000;
  background: #000;
  color: #fff;
  padding: 10px 14px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.portal-small-link {
  background: transparent;
  color: #000;
}

.portal-back-link {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #000;
}

.portal-back-link:hover {
  color: #ff0a0a;
  -webkit-text-fill-color: #ff0a0a;
  text-shadow: 0 0 0 #ff0a0a;
}

.portal-error {
  min-height: 18px;
  color: #cc0000;
  font-size: 12px;
}

.rates-content {
  max-width: 1080px;
}

.rates-head,
.client-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 40px;
}

.client-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #000;
  margin-bottom: 28px;
}

.client-tab {
  border: 1px solid #000;
  border-bottom: 0;
  background: transparent;
  color: #000;
  padding: 10px 14px;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.client-tab.is-active {
  background: #000;
  color: #fff;
}

.rates-content pre {
  white-space: pre-wrap;
  font-size: 18px;
  line-height: 1.25;
}

.rates-body {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(220px, 320px);
  gap: 48px;
  align-items: start;
}

.rates-download {
  display: inline-block;
  margin-top: 32px;
}

.rates-image {
  width: 100%;
}

.rates-image img {
  width: 100%;
  height: auto;
  border-radius: 0;
  display: block;
}

.client-layout {
  display: grid;
  grid-template-columns: minmax(280px, 440px) minmax(280px, 520px);
  gap: 32px;
  justify-content: center;
  align-items: start;
}

.client-info,
.client-side,
.client-comments {
  min-width: 0;
}

.client-image-frame {
  margin-bottom: 18px;
  max-width: 440px;
  position: relative;
}

.client-image-frame img,
.client-image-frame video,
.client-image-frame .ph {
  width: 100%;
  max-height: 420px;
  height: auto;
  object-fit: cover;
  border-radius: 0;
}

.client-kicker,
.client-status,
.client-empty,
.client-comment time {
  font-size: 12px;
  opacity: 0.45;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.client-info h1 {
  font-family: var(--kc-title-font, 'DirtyBleedDisplay'), sans-serif;
  font-size: 36px;
  line-height: 0.95;
  margin: 16px 0 12px;
}

.client-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.client-gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 0;
}

.client-thumb-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.client-hero-media,
.client-thumb,
.client-select-image,
.client-star-button,
.client-lightbox-close,
.client-lightbox-star {
  font: inherit;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.client-thumb {
  padding: 0;
}

.client-hero-media {
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  position: relative;
}

.client-hero-media img,
.client-hero-media video {
  display: block;
}

.client-thumb img,
.client-thumb video {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.client-thumb,
.client-select-image {
  position: relative;
}

.client-select-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  border-bottom: 1px solid #000;
  padding-bottom: 12px;
  margin-bottom: 18px;
}

.client-select-head h2 {
  font-family: var(--kc-title-font, 'DirtyBleedDisplay'), sans-serif;
  font-size: 32px;
  line-height: 1;
}

.client-select-head p {
  font-size: 12px;
  opacity: 0.45;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.client-selection-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.client-select-card {
  min-width: 0;
}

.client-select-image {
  display: block;
  width: 100%;
  padding: 0;
}

.client-select-image img,
.client-select-image video {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.client-portal-natural-grid .client-selection-grid {
  display: block;
  columns: 4 180px;
  column-gap: 14px;
}

.client-portal-natural-grid .client-select-card {
  break-inside: avoid;
  margin: 0 0 14px;
}

.client-portal-natural-grid .client-select-image img,
.client-portal-natural-grid .client-select-image video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

.client-video-thumb-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 1;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.client-star-button {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border-bottom: 1px solid #000;
  padding: 8px 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.client-select-card.is-starred .client-star-button,
.client-star-button:hover {
  color: #ff0a0a;
}

.client-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 56px 24px;
  background: rgba(255, 255, 255, 0.94);
}

.client-lightbox[hidden] {
  display: none;
}

.client-lightbox-frame {
  display: grid;
  place-items: center;
  position: relative;
}

.client-lightbox img,
.client-lightbox video {
  max-width: min(1100px, 92vw);
  max-height: 78vh;
  object-fit: contain;
}

.client-lightbox-close,
.client-lightbox-star {
  position: fixed;
  top: 20px;
  border: 1px solid #000;
  background: #fff;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.client-lightbox-close {
  right: 20px;
}

.client-lightbox-star {
  left: 20px;
}

.client-description,
.client-services p {
  font-size: 15px;
  line-height: 1.25;
  margin-top: 18px;
}

.client-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.client-tags span {
  border: 1px solid #000;
  padding: 3px 8px;
  font-size: 11px;
  text-transform: uppercase;
}

.client-payment {
  margin-top: 18px;
}

.client-payment:empty {
  display: none;
}

.client-payment-link {
  display: inline-flex;
  justify-content: center;
  border: 1px solid #000;
  background: #000;
  color: #fff;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.client-payment-link:hover {
  background: #ff0a0a;
  border-color: #ff0a0a;
  color: #fff;
}

.client-services,
.client-downloads,
.client-todos,
.client-comments {
  border-top: 1px solid #000;
  margin-top: 24px;
  padding-top: 16px;
}

.client-downloads {
  margin-top: 0;
}

.client-todos {
  margin-top: 24px;
}

.client-download-link {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #000;
  padding: 10px 0;
  font-size: 14px;
}

.client-download-all {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  background: #000;
  color: #fff;
  padding: 12px 14px;
  margin: 12px 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.client-download-all:hover {
  background: #ff0a0a;
}

.client-download-all-secondary {
  background: transparent;
  color: #000;
  border: 1px solid #000;
}

.client-download-all-secondary:hover {
  background: #000;
  color: #fff;
}

.client-video-wrap {
  border-bottom: 1px solid #000;
  padding: 12px 0;
}

.client-video-player {
  width: 100%;
  display: block;
  background: #000;
  margin-bottom: 8px;
}

.client-video-wrap .client-download-link {
  border-bottom: 0;
  padding: 4px 0 0;
  font-size: 12px;
  opacity: 0.6;
}

.client-video-wrap .client-download-link:hover {
  opacity: 1;
}

.client-todo {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #000;
  padding: 10px 0;
}

.client-todo p {
  font-size: 14px;
  line-height: 1.25;
}

.client-todo time,
.client-todo span {
  display: block;
  font-size: 11px;
  opacity: 0.45;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.client-todo span {
  white-space: nowrap;
}

.client-todo.is-done p {
  text-decoration: line-through;
  opacity: 0.5;
}

.client-comments {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 32px;
  margin-top: 40px;
}

.client-comment {
  border-bottom: 1px solid #ddd;
  padding: 12px 0;
}

.client-comment p {
  font-size: 14px;
  line-height: 1.25;
}

.client-comments form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.client-comments textarea {
  min-height: 140px;
  resize: vertical;
  border: 1px solid #000;
  padding: 12px;
}


/* =============================================
   10. INFO PAGE
   Used on info.html.
   Two-column CSS grid:
     Column 1 (420px) — .info-left: heading + bio
     Column 2 (auto)  — .info-right: contact + credits
   gap: 60px creates the space between columns.
   align-items: start prevents columns from stretching.
============================================= */
.info-section {
  display: grid;
  grid-template-columns: 420px 1fr;
  padding: 40px 40px 60px;
  gap: 60px;
  min-height: 80vh;
  align-items: start;
}

/* Large display heading "info." */
.info-heading {
  font-family: var(--kc-title-font, 'DirtyBleedDisplay'), sans-serif;
  font-size: 64px;
  line-height: 67px;
  letter-spacing: -1.92px;
  color: #000;
  margin-bottom: 28px;
}

.info-portrait {
  width: min(100%, 320px);
  aspect-ratio: 4 / 5;
  margin: 0 0 28px;
}

.info-portrait img,
.info-portrait .ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Bio paragraph in left column */
.info-about {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.42px;
  line-height: 1.21;
  color: #000;
}

/*
  Contact list — no default list bullets.
  Each item is a flex row: label (fixed width) | value.
  border-top on each item + border-bottom on :last-child
  creates a bordered table-like appearance.
*/
.info-contact-list {
  list-style: none;
  margin-bottom: 48px; /* Space between contact list and credits below */
}

.info-contact-item {
  display: flex;
  align-items: baseline; /* Aligns text baselines across label and value */
  gap: 24px;
  padding: 14px 0;
  border-top: 1px solid #000;
}

/* Last item gets a bottom border to close the table */
.info-contact-item:last-child {
  border-bottom: 1px solid #000;
}

/* Label (e.g. "email", "instagram") — DirtyBleedDisplay, fixed width so values align */
.info-contact-label {
  font-family: var(--kc-title-font, 'DirtyBleedDisplay'), sans-serif;
  font-size: 16px;
  letter-spacing: -0.48px;
  color: #000;
  min-width: 110px; /* Keeps values in a consistent column */
}

/* Contact value (actual email/handle/link) — bold */
.info-contact-value {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.42px;
  color: #000;
}

/* Links inside contact values turn red on hover */
.info-contact-value a:hover {
  color: #ff0a0a;
  transition: color 0.12s ease;
}

/* "selected clients & credits" label */
.info-credits-heading {
  font-family: var(--kc-title-font, 'DirtyBleedDisplay'), sans-serif;
  font-size: 16px;
  letter-spacing: -0.48px;
  color: #000;
  margin-bottom: 14px;
}

/* Credits list — no bullets, line-height: 1.8 for comfortable reading */
.info-credits-list {
  list-style: none;
}

.info-credits-list li {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.42px;
  line-height: 1.8;
  color: #000;
}


/* =============================================
   10. RESPONSIVE — TABLET
   Applied below 1100px wide.
   Shrinks the fixed left column from 420px → 300px,
   reduces horizontal padding, and collapses multi-
   column grids from 3 columns to 2.
============================================= */
@media (max-width: 1100px) {

  /* Header 3-col shrinks: 300px | auto | 100px */
  .header-top {
    grid-template-columns: 300px 1fr 100px;
    padding: 26px 28px 8px;
  }

  /* Mascot scales down on tablet */
  .header-deco img {
    height: 22px;
    max-width: 80px;
  }

  /* Nav and project title row: 300px spacer | auto */
  .nav-row,
  .project-title-row {
    grid-template-columns: 300px 1fr;
    padding: 0 28px;
  }

  .project-title-row {
    padding: 20px 28px 12px;
  }

  /* Dividers match new side padding */
  .site-rule {
    margin: 0 28px;
  }

  /* Work and publications sections reduce padding */
  .work-section {
    padding: 28px 28px 48px;
  }

  /* Keep filter links aligned with the tablet navigation column. */
  .project-filters {
    margin-left: 300px;
  }

  /* Work grid: 3 → 2 columns */
  .work-grid {
    --work-grid-columns: 2;
  }

  .publications-projects {
    padding: 0 28px 48px;
  }

  .publication-project {
    grid-template-columns: 300px 1fr;
  }

  /* Project body: project information above photos */
  .project-body {
    display: grid;
    grid-template-columns: 1fr;
    padding: 0 28px 48px;
  }

  .project-body.hidden-info-page {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 40px;
    padding: 0 28px 48px;
  }

  .project-sidebar {
    position: static;
    width: 100%;
    max-height: none;
    overflow: visible;
    padding: 24px 0 0;
    order: 1;
  }

  .project-images {
    order: 2;
    margin-left: 0;
  }

  .hidden-info-page .project-sidebar {
    padding: 24px 0 0;
  }

  .hidden-info-page .project-images {
    padding-top: 24px;
  }

  .project-row:not(.project-row--auto) {
    height: min(var(--project-row-height, 500px), calc((100vw - 56px) * 0.62));
  }

  /* Project information appears inline on tablet/mobile */
  .sidebar-toggle {
    display: none;
  }

  .sidebar-content {
    display: block;
    width: 100%;
    padding: 16px 0 24px;
    border-bottom: 1px solid #000;
  }

  /* Info page: smaller left column, tighter padding and gap */
  .info-section {
    grid-template-columns: 300px 1fr;
    padding: 32px 28px 48px;
    gap: 40px;
  }
}


/* =============================================
   11. RESPONSIVE — MOBILE / SKINNY VIEWPORTS
   Applied below 900px wide.
   Header collapses to a single column (logo on top,
   bio below, contact below that, deco hidden).
   Nav, project, work, pubs, info all go single-column.
============================================= */
@media (max-width: 900px) {

  /* Header: single column stack, items aligned to start (top) */
  .header-top {
    grid-template-columns: 1fr;
    padding: 20px 20px 10px;
    row-gap: 10px;
    align-items: start;
  }

  /* Remove bottom padding that was used to align to the grid baseline */
  .header-brand {
    padding-bottom: 0;
  }

  .site-header.is-sticky .header-brand {
    transform: none;
  }

  .header-info {
    padding-bottom: 0;
  }

  /* Hide the mascot/deco image entirely on mobile */
  .header-deco {
    display: none;
  }

  /* Show mobile mascot centered at page bottom */
  .mascot-mobile {
    display: flex;
    justify-content: center;
    padding: 90px 20px 32px;
  }

  .mascot-mobile img {
    max-width: 120px;
    width: 100%;
    border-radius: 0;
  }

  /* Dividers use narrower mobile padding */
  .site-rule {
    margin: 0 20px;
  }

  /* Nav and project title row: single column, no spacer needed */
  .nav-row,
  .project-title-row {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }

  .project-title-row {
    padding: 20px 20px 12px;
  }

  /* The empty spacer columns aren't needed in single-column layout */
  .nav-offset,
  .project-title-row-offset {
    display: none;
  }

  /* Mobile navigation has no offset, so neither do the filter links. */
  .project-filters {
    margin-left: 0;
  }

  /*
    Nav links: switch from space-between to flex-start + gap,
    enable horizontal scroll for overflow. Hides scrollbar visually
    while keeping scroll functionality.
  */
  .site-nav {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch; /* Momentum scrolling on iOS */
    justify-content: flex-start;
    gap: 24px;
    padding: 12px 0 5px;
  }

  /* Hide scrollbar in WebKit (Chrome, Safari) */
  .site-nav::-webkit-scrollbar { display: none; }

  /* Keep the marquee gap consistent while the viewport narrows */
  .marquee-section {
    padding-top: var(--homepage-marquee-top, 100px);
  }

  .marquee-section.is-grid-mode {
    padding: var(--homepage-grid-top, 100px) 20px 40px;
  }

  .marquee-section.is-slideshow-mode {
    padding: var(--homepage-slideshow-top, 14px) 20px 40px;
  }

  .home-photo-grid {
    columns: 2;
    column-gap: 10px;
  }

  .home-photo-grid .marquee-item {
    margin-bottom: 10px;
  }

  .home-slideshow-figure {
    max-width: calc(100vw - 40px);
  }

  .home-slideshow-figure img {
    max-height: calc(100vh - 260px);
  }

  /* Work section: tighter mobile padding */
  .work-section {
    padding: 24px 20px 40px;
  }

  /* Work grid stays at 2 columns on mobile (drops to 1 at 480px below) */
  .work-grid {
    --work-grid-columns: 2;
    gap: 10px;
  }

  .work-column {
    gap: 10px;
  }

  .publications-projects {
    padding: 0 20px 40px;
  }

  .publication-project {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .publication-sidebar {
    position: static;
    min-height: 0;
    padding: 24px 0 0;
  }

  .publication-sidebar-content {
    min-height: 0;
  }

  .publication-download {
    margin-top: 28px;
  }

  .publication-images {
    padding: 24px 0 40px;
  }

  .portal-gate,
  .rates-page,
  .client-page {
    padding: 24px 20px;
  }

  .client-layout,
  .client-comments {
    grid-template-columns: 1fr;
  }

  .portal-links a {
    font-size: clamp(28px, 12vw, 52px);
  }

  .portal-login-head {
    gap: 14px;
  }

  .rates-body {
    display: block;
  }

  .rates-image {
    display: none;
  }

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

  .client-thumb-strip,
  .client-selection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-portal-natural-grid .client-selection-grid {
    columns: 2 140px;
  }

  .client-select-head {
    display: block;
  }

  .client-select-head p {
    margin-top: 8px;
  }

  /* Project body: single column stack */
  .project-body {
    display: grid;
    grid-template-columns: 1fr;
    padding: 0 20px 40px;
  }

  .project-body.hidden-info-page {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 20px 40px;
  }

  .project-row:not(.project-row--auto) {
    height: min(var(--project-row-height, 500px), calc((100vw - 40px) * 0.62));
  }

  /* Info page: single column, tighter spacing */
  .info-section {
    grid-template-columns: 1fr;
    padding: 24px 20px 40px;
    gap: 32px;
  }

  /* Info heading scales down on mobile */
  .info-heading {
    font-size: 48px;
    line-height: 52px;
  }

  /* Project header name scales down on mobile */
  .project-header-name {
    font-size: 20px;
  }

  .project-header-year {
    font-size: 13px;
    margin-left: 9px;
  }
}


/* =============================================
   12. RESPONSIVE — SMALL MOBILE
   Applied below 480px (e.g. iPhone SE).
   Collapses remaining 2-column grids to 1 column.
============================================= */
@media (max-width: 480px) {

  .back-full {
    display: none;
  }

  .back-short {
    display: inline;
  }

  /* Work grid: 2 → 1 column on very small screens */
  .work-grid {
    --work-grid-columns: 1;
  }

}


/* =============================================
   13. LIGHTBOX
   Click-to-enlarge overlay for project images.
   Controlled by LIGHTBOX_ENABLED in main.js.
   To disable: set LIGHTBOX_ENABLED = false in main.js.
   To remove entirely: delete this CSS block and
   the lightbox IIFE in main.js.
============================================= */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  cursor: zoom-out;
}

#lightbox.is-open {
  display: flex;
  opacity: 1;
}

#lightbox-img {
  max-width: calc(100vw - 100px);
  max-height: calc(100vh - 100px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0;
  display: block;
  cursor: zoom-out;
}

#lightbox-close {
  position: fixed;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  font-family: var(--kc-body-font, 'HelveticaNeue'), 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
  opacity: 0.7;
  transition: opacity 0.12s ease;
  z-index: 1001;
}

#lightbox-close:hover {
  opacity: 1;
}

#projectImages img {
  cursor: zoom-in;
  border-radius: 0;
}

#projectImages .project-video img {
  cursor: pointer;
}


/* =============================================
   14. FOOTER
   Shared by all pages.
============================================= */
/* COPYRIGHT FOOTER — currently hidden. Remove display:none to restore. */
.site-footer {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  padding: 20px 40px;
  pointer-events: none;
}

.site-copyright {
  font-family: var(--kc-body-font, 'HelveticaNeue'), 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.42px;
  color: #888;
  font-style: italic;
  opacity: 0.5;
}

body.kc-night-mode a,
body.kc-night-mode p,
body.kc-night-mode span,
body.kc-night-mode h1,
body.kc-night-mode h2,
body.kc-night-mode pre,
body.kc-night-mode label,
body.kc-night-mode input,
body.kc-night-mode textarea,
body.kc-night-mode button {
  color: inherit;
}

body.kc-night-mode input,
body.kc-night-mode textarea {
  border-bottom-color: rgba(255,255,255,0.72);
}

body.kc-night-mode .site-logo,
body.kc-night-mode .nav-link,
body.kc-night-mode .project-header-name,
body.kc-night-mode .header-contact,
body.kc-night-mode .portal-logo,
body.kc-night-mode .portal-links a,
body.kc-night-mode .portal-back-link,
body.kc-night-mode .portal-small-link {
  color: #fff;
}

body.kc-night-mode .nav-link:hover,
body.kc-night-mode .nav-link.active,
body.kc-night-mode .site-logo:hover,
body.kc-night-mode .portal-logo:hover,
body.kc-night-mode .portal-links a:hover,
body.kc-night-mode .portal-back-link:hover,
body.kc-night-mode .portal-small-link:hover {
  color: #ff0a0a;
  -webkit-text-fill-color: #ff0a0a;
  text-shadow: none;
}
