@font-face {
  font-family: 'Black Mango';
  src: url('fonts/BlackMango-Thin.otf') format('opentype'),
       url('fonts/BlackMango-Thin.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Black Mango';
  src: url('fonts/BlackMango-ExtraLight.otf') format('opentype'),
       url('fonts/BlackMango-ExtraLight.ttf') format('truetype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Black Mango';
  src: url('fonts/BlackMango-Light.otf') format('opentype'),
       url('fonts/BlackMango-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Black Mango';
  src: url('fonts/BlackMango-Regular.otf') format('opentype'),
       url('fonts/BlackMango-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Black Mango';
  src: url('fonts/BlackMango-Medium.otf') format('opentype'),
       url('fonts/BlackMango-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Black Mango';
  src: url('fonts/BlackMango-SemiBold.otf') format('opentype'),
       url('fonts/BlackMango-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Black Mango';
  src: url('fonts/BlackMango-Bold.otf') format('opentype'),
       url('fonts/BlackMango-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Black Mango';
  src: url('fonts/BlackMango-ExtraBold.otf') format('opentype'),
       url('fonts/BlackMango-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Black Mango';
  src: url('fonts/BlackMango-Black.otf') format('opentype'),
       url('fonts/BlackMango-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f8f5f0;
  --text: #1a1a1a;
  --accent: #c9b99a;
  --grey: #e8e4df;
  --grey-dark: #b0aaa2;
  --white: #ffffff;
  --font-heading: 'Black Mango', Georgia, serif;
  --font-body: 'Black Mango', Helvetica, Arial, sans-serif;
  --nav-height: 72px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  letter-spacing: 0.03em;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

::selection {
  background-color: var(--accent);
  color: var(--text);
}

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

img {
  max-width: 100%;
  display: block;
}

.intro {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  overflow: hidden;
}

.intro.hidden {
  opacity: 0;
  transform: translateY(-30px);
  pointer-events: none;
}

.intro-manifesto {
  width: 100%;
  max-width: 800px;
  padding: 0 clamp(24px, 5vw, 60px);
  box-sizing: border-box;
}

.manifesto-text {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2.8vw, 2.4rem);
  font-weight: 400;
  color: var(--bg);
  line-height: 1.4;
  letter-spacing: 0.04em;
  overflow-wrap: break-word;
}

.manifesto-word {
  display: inline;
  opacity: 0;
  filter: blur(4px);
  transition: opacity 0.9s cubic-bezier(0.23, 1, 0.32, 1),
              filter 0.9s cubic-bezier(0.23, 1, 0.32, 1),
              color 1s;
}

.manifesto-word.show {
  opacity: 1;
  filter: blur(0);
}

.manifesto-word.dim {
  opacity: 0.35;
  filter: blur(0);
}

.manifesto-word.faded {
  opacity: 0.12;
  filter: blur(0.5px);
}

.manifesto-word.gone {
  opacity: 0;
  filter: blur(2px);
}

.manifesto-name {
  color: var(--accent);
}

.manifesto-name em {
  font-style: italic;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.intro-skip {
  position: absolute;
  top: clamp(16px, 3vh, 28px);
  right: clamp(16px, 4vw, 32px);
  appearance: none;
  background: transparent;
  border: 1px solid rgba(248, 245, 240, 0.35);
  color: var(--bg);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.6s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease);
  z-index: 2;
}

.intro-skip.show {
  opacity: 0.75;
}

.intro-skip:hover,
.intro-skip:focus-visible {
  opacity: 1;
  background: rgba(248, 245, 240, 0.08);
  border-color: rgba(248, 245, 240, 0.6);
  outline: none;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.scroll-indicator.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.scroll-dot {
  width: 1px;
  height: 40px;
  background: var(--accent);
  position: relative;
  overflow: hidden;
}

.scroll-dot::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  animation: scrollLine 1.8s var(--ease) 2s infinite;
}

@keyframes scrollLine {
  0% { top: -100%; }
  50% { top: 0; }
  100% { top: 100%; }
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  padding: 0 clamp(24px, 5vw, 60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 900;
  background: transparent;
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.navbar.scrolled {
  background: rgba(248, 245, 240, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(26, 26, 26, 0.06);
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--bg);
  transition: opacity 0.3s, color 0.4s var(--ease);
}

.navbar.scrolled .nav-logo {
  color: var(--text);
}

.nav-logo:hover {
  opacity: 0.6;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 910;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--bg);
  transition: transform 0.3s var(--ease), opacity 0.3s, background 0.4s var(--ease);
}

.navbar.scrolled .nav-toggle span {
  background: var(--text);
}

.nav-toggle.active span:first-child {
  transform: rotate(45deg) translate(3px, 3px);
}

.nav-toggle.active span:last-child {
  transform: rotate(-45deg) translate(3px, -3px);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 40px;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bg);
  position: relative;
  transition: opacity 0.3s, color 0.4s var(--ease);
}

.navbar.scrolled .nav-link {
  color: var(--text);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--bg);
  transition: width 0.3s var(--ease), background 0.4s var(--ease);
}

.navbar.scrolled .nav-link::after {
  background: var(--text);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover {
  opacity: 0.7;
}

.main-content {
  opacity: 0;
  transition: opacity 0.6s var(--ease) 0.3s;
}

.main-content.visible {
  opacity: 1;
}

.section {
  padding: clamp(80px, 10vw, 140px) clamp(24px, 5vw, 60px);
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--grey-dark);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: 60px;
}

.about-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-height) + clamp(40px, 5vw, 80px));
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

.about-photo {
  width: 100%;
  max-width: 450px;
  position: sticky;
  top: calc(var(--nav-height) + 40px);
  object-fit: cover;
}

.about-bio {
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  line-height: 1.8;
  color: #4a4a4a;
  margin-bottom: 36px;
}


.projects-section {
  padding: 0;
  background: var(--bg);
}

.projects-stack {
  position: relative;
  width: 100%;
}

.projects-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  /* `svh` = smallest viewport height — never changes when the mobile URL bar
     collapses, so the pinned section doesn't visually jump mid-scroll. */
  height: 100svh;
  overflow: hidden;
  background: var(--bg);
}

.projects-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #000000;
  pointer-events: none;
}

.projects-cards {
  position: relative;
  z-index: 1;
}

.projects-counter {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: var(--text);
  opacity: 0.55;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.projects-counter--left {
  left: clamp(16px, 3vw, 40px);
}

.projects-counter--right {
  right: clamp(16px, 3vw, 40px);
}

.projects-cards {
  position: relative;
  width: 100%;
  height: 100%;
}

.project-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(300px, 73vw, 1500px);
  height: 82vh;
  height: 82svh;
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  background-color: #1a1a1a;
  box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.45);
  will-change: transform, opacity;
  transform: translate(-50%, -50%);
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}

.project-card.is-active {
  pointer-events: auto;
}

.project-card-media {
  position: absolute;
  inset: 0;
  display: block;
}

.project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Most slide heroes have the subject's face/garment in the upper half.
     Bias the crop a touch above center so portrait phones don't cut faces
     off when the wide source is cropped to a narrow card. */
  object-position: center 35%;
}

.project-card-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top,
      rgba(20, 18, 15, 0.78) 0%,
      rgba(20, 18, 15, 0.35) 35%,
      rgba(20, 18, 15, 0.05) 60%,
      transparent 100%),
    linear-gradient(to bottom,
      rgba(20, 18, 15, 0.45) 0%,
      transparent 30%);
}

.project-card-recede {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-color: rgba(46, 38, 28, 0.55);
  opacity: 0;
  transition: opacity 0.25s linear;
}

.project-card-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: clamp(28px, 4vw, 56px) clamp(24px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  pointer-events: none;
}

.project-card-category {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(248, 245, 240, 0.92);
}

.project-card-title {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 8vw, 6rem);
  font-weight: 400;
  color: var(--bg);
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin: 0;
  align-self: center;
}

.project-card-caption {
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  font-weight: 300;
  color: rgba(248, 245, 240, 0.78);
  line-height: 1.5;
  max-width: 540px;
  margin: 0 auto;
}

.project-card--no-media {
  background-color: #1a1a1a;
}

.project-card--no-media .project-card-shade {
  background:
    radial-gradient(ellipse at center, rgba(201, 185, 154, 0.08), transparent 65%),
    linear-gradient(to top, rgba(20,18,15,0.6), transparent 60%);
}

.project-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@media (max-width: 900px) {
  .project-card {
    width: clamp(280px, 86vw, 700px);
    height: 78vh;
    height: 78svh;
    border-radius: 18px;
  }

  .project-card-content {
    padding: clamp(20px, 5vw, 36px);
  }

  .projects-counter {
    font-size: 0.68rem;
  }
}

@media (max-width: 640px) {
  .project-card {
    width: 92vw;
    height: 80vh;
    height: 80svh;
    border-radius: 16px;
  }

  .project-card-title {
    font-size: clamp(2.2rem, 11vw, 3.5rem);
  }

  /* Per-slide crop tweaks so the important part of each hero photo stays
     visible when the wide source is cropped into a narrow portrait card. */
  .project-card[data-project="magazine-hip"] .project-card-media img,
  .project-card[data-project="ntf-krim"] .project-card-media img,
  .project-card[data-project="trapped"] .project-card-media img {
    object-position: center 30%;
  }
  .project-card[data-project="flower-power"] .project-card-media img {
    object-position: center 40%;
  }
  .project-card[data-project="dazzle"] .project-card-media img {
    object-position: center center;
  }
  .project-card[data-project="je-ne-sais-quoi"] .project-card-media img {
    object-position: center 30%;
  }
  .project-card[data-project="digital-projects-clo3d"] .project-card-media img {
    object-position: center 45%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card {
    transition: none !important;
  }
}

.contact-section {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.contact-section .section-title {
  font-size: clamp(1.4rem, 2vw, 1.7rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 32px;
}

.contact-subtext {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #6a6a6a;
  margin-top: 0;
  margin-bottom: 40px;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 56px;
}

.contact-link {
  text-align: center;
  transition: opacity 0.3s;
}

.contact-link:hover {
  opacity: 0.7;
}

.contact-link-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.23em;
  text-transform: uppercase;
  color: var(--grey-dark);
  margin-bottom: 6px;
}

.contact-link-value {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 400;
}


.footer {
  padding: 40px clamp(24px, 5vw, 60px);
  text-align: center;
  font-size: 0.75rem;
  color: var(--grey-dark);
  letter-spacing: 0.11em;
  border-top: 1px solid var(--grey);
}


.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 950;
  background: rgba(248, 245, 240, 0.98);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
  overflow-y: auto;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(80px, 8vw, 120px) clamp(24px, 5vw, 60px) 80px;
  position: relative;
}

.modal-back {
  position: fixed;
  top: 24px;
  left: clamp(24px, 5vw, 60px);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  font-size: 2rem;
  font-weight: 300;
  color: var(--text);
  cursor: pointer;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 960;
  line-height: 1;
}

.modal-back:hover {
  opacity: 0.5;
  transform: translateX(-4px);
}

.modal-close {
  position: fixed;
  top: 24px;
  right: clamp(24px, 5vw, 60px);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  font-size: 2rem;
  font-weight: 300;
  color: var(--text);
  cursor: pointer;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 960;
  line-height: 1;
}

.modal-close:hover {
  opacity: 0.5;
  transform: rotate(90deg);
}

.modal-category {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--grey-dark);
  margin-bottom: 12px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  margin-bottom: 12px;
  line-height: 1.1;
}

.modal-tagline {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--grey-dark);
  margin-bottom: 40px;
  line-height: 1.4;
}

.modal-description {
  font-size: clamp(0.92rem, 1.1vw, 1.02rem);
  line-height: 1.9;
  color: #4a4a4a;
  margin-bottom: 48px;
  max-width: 720px;
}

.modal-description + .modal-description {
  margin-top: -28px;
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.modal-gallery img {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
}

.modal-gallery-interactive {
  margin-bottom: 48px;
  outline: none;
}

.gallery-featured {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-bottom: 16px;
}

.gallery-featured-stage {
  position: absolute;
  inset: 0;
}

.gallery-featured-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
  pointer-events: none;
}

.gallery-featured-img.is-active {
  opacity: 1;
  pointer-events: auto;
}

.gallery-featured-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
  pointer-events: none;
}

.gallery-featured-video.is-active {
  opacity: 1;
  pointer-events: auto;
}

.gallery-thumb {
  position: relative;
}

.gallery-thumb-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  line-height: 28px;
  text-align: center;
  pointer-events: none;
  padding-left: 2px;
  box-sizing: border-box;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.gallery-arrow:hover,
.gallery-arrow:focus-visible {
  background: var(--text);
  color: var(--white);
  border-color: var(--text);
  outline: none;
}

.gallery-arrow--prev {
  left: 14px;
}

.gallery-arrow--next {
  right: 14px;
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--grey-dark) transparent;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.gallery-thumbs::-webkit-scrollbar {
  height: 6px;
}

.gallery-thumbs::-webkit-scrollbar-track {
  background: transparent;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
  background: var(--grey);
  border-radius: 3px;
}

.gallery-thumb {
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  padding: 0;
  border: 1px solid transparent;
  background: var(--grey);
  cursor: pointer;
  overflow: hidden;
  opacity: 0.55;
  transition: opacity 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-featured-stage picture,
.gallery-thumb picture {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-thumb:hover,
.gallery-thumb:focus-visible {
  opacity: 0.9;
  outline: none;
}

.gallery-thumb.is-active {
  opacity: 1;
  border-color: var(--text);
}

@media (max-width: 720px) {
  .gallery-arrow {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .gallery-arrow--prev {
    left: 8px;
  }

  .gallery-arrow--next {
    right: 8px;
  }

  .gallery-thumb {
    width: 64px;
    height: 64px;
  }

  .gallery-thumbs {
    gap: 8px;
  }
}

.modal-credits {
  border-top: 1px solid var(--grey);
  padding-top: 32px;
}

.modal-module-credit {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--grey);
  font-size: 0.78rem;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--grey-dark);
  font-style: italic;
}

.modal-module-inline-caption {
  margin-top: 10px;
  margin-bottom: 12px;
  font-size: 0.78rem;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--grey-dark);
  font-style: italic;
  text-align: center;
}

.modal-credits p {
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--grey-dark);
}

.modal-credits strong {
  color: var(--text);
  font-weight: 500;
}

.hip-flipbook-wrap {
  margin: 0 auto 56px;
  max-width: 100%;
  background: transparent;
  padding: clamp(8px, 2vw, 20px) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hip-flipbook-loading {
  color: var(--grey-dark);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 40px 20px;
  text-align: center;
}

.hip-flipbook-loading.error {
  color: #a8554a;
}

.hip-flipbook-container {
  width: 100%;
  max-width: 1100px;
  min-height: 200px;
  margin: 0 auto;
  touch-action: pan-y;
}

.hip-flip-page {
  background: #fff;
  overflow: hidden;
}

.hip-flip-page img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.hip-flipbook-controls {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hip-flip-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(26, 26, 26, 0.2);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.25s var(--ease-out), transform 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.hip-flip-btn:hover {
  background: rgba(26, 26, 26, 0.05);
  border-color: rgba(26, 26, 26, 0.45);
  transform: translateY(-1px);
}

.hip-flip-counter {
  font-variant-numeric: tabular-nums;
  min-width: 60px;
  text-align: center;
}

@media (max-width: 768px) {
  .hip-flipbook-wrap {
    padding: 16px 10px;
  }
  .hip-flipbook-controls {
    gap: 16px;
    font-size: 0.72rem;
  }
}

/* je-ne-sais-quoi single-page flipbook — same visual language as HIP,
   but sized to display ONE page at a time at full width, never a spread. */
.jnsq-flipbook-wrap {
  margin: 0 auto 56px;
  max-width: 100%;
  background: transparent;
  padding: clamp(8px, 2vw, 20px) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.jnsq-flipbook-loading {
  color: var(--grey-dark);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 40px 20px;
  text-align: center;
}

.jnsq-flipbook-loading.error {
  color: #a8554a;
}

.jnsq-flipbook-container {
  width: 100%;
  max-width: 720px;
  min-height: 200px;
  margin: 0 auto;
  touch-action: pan-y;
}

.jnsq-flip-page {
  background: #fff;
  overflow: hidden;
}

.jnsq-flip-page img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #fff;
  user-select: none;
  -webkit-user-drag: none;
}

.jnsq-flipbook-controls {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.jnsq-flip-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(26, 26, 26, 0.2);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.25s var(--ease-out), transform 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.jnsq-flip-btn:hover {
  background: rgba(26, 26, 26, 0.05);
  border-color: rgba(26, 26, 26, 0.45);
  transform: translateY(-1px);
}

.jnsq-flip-counter {
  font-variant-numeric: tabular-nums;
  min-width: 60px;
  text-align: center;
}

@media (max-width: 768px) {
  .jnsq-flipbook-wrap {
    padding: 16px 10px;
  }
  .jnsq-flipbook-container {
    max-width: 100%;
  }
  .jnsq-flipbook-controls {
    gap: 16px;
    font-size: 0.72rem;
  }
}

.modal-modules {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.modal-module-block {
  border-top: 1px solid var(--grey);
  padding: 24px 0;
  cursor: pointer;
}

.modal-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-module-header-text {
  flex: 1;
}

.modal-module-toggle {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--grey-dark);
  transition: transform 0.3s var(--ease-out);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-module-block.open .modal-module-toggle {
  transform: rotate(45deg);
}

.modal-module-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.4vw, 1.3rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  transition: color 0.2s;
}

.modal-module-block:hover .modal-module-title {
  color: var(--accent, #555);
}

.modal-module-subtitle {
  font-size: 0.88rem;
  color: var(--grey-dark);
  font-style: italic;
  margin-bottom: 0;
}

.modal-module-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out), opacity 0.3s var(--ease-out);
  opacity: 0;
}

.modal-module-block.open .modal-module-body {
  max-height: 7000px;
  opacity: 1;
  margin-top: 20px;
}

.modal-module-description {
  font-size: clamp(0.92rem, 1.1vw, 1.02rem);
  line-height: 1.9;
  color: #4a4a4a;
}

.modal-module-description + .modal-module-description {
  margin-top: 20px;
}

.modal-module-image,
.modal-module-image-item {
  margin: 0;
}

.modal-module-image {
  margin: 28px 0;
}

.modal-module-image img,
.modal-module-image-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.modal-module-image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.6vw, 20px);
  margin: 28px 0;
}

.modal-module-image-grid-7 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  .modal-module-image-grid-7 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .modal-module-image-grid {
    grid-template-columns: 1fr;
  }
  .modal-module-image-grid-7 {
    grid-template-columns: 1fr;
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.2s; }
.fade-in:nth-child(4) { transition-delay: 0.25s; }

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-photo {
    max-width: 100%;
    position: relative;
    top: 0;
  }

  .modal-gallery {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }

  .manifesto-word,
  .manifesto-word.show,
  .manifesto-word.dim,
  .manifesto-word.faded,
  .manifesto-word.gone {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
    padding: 0 24px;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  /* Slide-in menu sits on the cream bg — force dark text regardless of
     the navbar's transparent/scrolled state. */
  .nav-links .nav-link,
  .navbar.scrolled .nav-links .nav-link {
    color: var(--text);
    font-size: 1rem;
    letter-spacing: 0.23em;
  }

  .nav-links .nav-link::after {
    background: var(--text);
  }

  .contact-links {
    flex-direction: column;
    gap: 24px;
  }

  .section-title {
    margin-bottom: 40px;
  }
}

/* ============================================================
   Mobile responsiveness — task #105 consolidation
   ============================================================ */

/* Modal: tighter padding, reachable close/back buttons, no clipped
   content under iOS notch/home indicator. */
.modal-back,
.modal-close {
  top: max(24px, env(safe-area-inset-top));
}

.modal {
  padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 720px) {
  .modal-inner {
    padding: 72px 20px 64px;
  }

  .modal-back,
  .modal-close {
    width: 44px;
    height: 44px;
    font-size: 1.75rem;
    top: max(14px, env(safe-area-inset-top));
  }

  .modal-back {
    left: 12px;
  }

  .modal-close {
    right: 12px;
  }

  .modal-title {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
    margin-bottom: 8px;
  }

  .modal-tagline {
    font-size: 1rem;
    margin-bottom: 28px;
  }

  .modal-description {
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 32px;
  }

  .modal-description + .modal-description {
    margin-top: -16px;
  }

  .modal-modules {
    margin-top: 28px;
  }

  .modal-module-block {
    padding: 18px 0;
  }

  /* On portrait phones, drop the forced 4/3 frame: gallery photos come in
     mixed orientations and a fixed aspect ratio either letterboxes wide shots
     or squeezes portraits into a tiny crop. Use a flexible height window
     anchored to `svh` (which doesn't jump with the URL bar) so the stage
     always feels generous without forcing a single shape. */
  .gallery-featured {
    aspect-ratio: auto;
    min-height: 55svh;
    max-height: 75svh;
  }

  .gallery-thumbs {
    -webkit-overflow-scrolling: touch;
  }

  /* Make sure flipbook controls and thumbnails sit above iOS home indicator. */
  .jnsq-flipbook-wrap,
  .hip-flipbook-wrap {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }

  /* Footer breathing room above home indicator. */
  .footer {
    padding-bottom: max(40px, calc(40px + env(safe-area-inset-bottom)));
  }
}

/* Small phones: trim oversized typography & padding further. */
@media (max-width: 480px) {
  .section {
    padding: 80px 20px;
  }

  .project-card-category {
    font-size: 0.62rem;
    letter-spacing: 0.22em;
  }

  .project-card-caption {
    font-size: 0.8rem;
  }

  .project-card-content {
    padding: 22px 18px;
  }

  /* Inline image grids that already collapse to 1 col stay at 1 col;
     this rule just makes the rule explicit and applies to the 7-up too. */
  .modal-module-image-grid,
  .modal-module-image-grid-7 {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .about-photo {
    max-width: 320px;
    margin: 0 auto;
  }

  .about-section {
    padding-top: calc(var(--nav-height) + 24px);
  }

  .contact-link-value {
    font-size: 1rem;
  }

  .modal-back,
  .modal-close {
    font-size: 1.5rem;
  }
}

/* Very narrow phones — keep manifesto + slide hero legible at 320–360px. */
@media (max-width: 380px) {
  .intro-manifesto {
    padding: 0 18px;
  }

  .manifesto-text {
    line-height: 1.45;
  }

  .project-card-title {
    font-size: 2rem;
  }

  .projects-counter {
    font-size: 0.6rem;
  }

  .projects-counter--left {
    left: 12px;
  }

  .projects-counter--right {
    right: 12px;
  }
}

/* Landscape phones (short viewports): keep intro/manifesto from overflowing
   and let the project slide breathe vertically. */
@media (max-height: 480px) and (orientation: landscape) {
  .manifesto-text {
    font-size: clamp(1rem, 3.2vh, 1.6rem);
    line-height: 1.35;
  }

  .project-card {
    height: 88vh;
    height: 88svh;
  }

  .about-section {
    min-height: auto;
    padding-top: calc(var(--nav-height) + 24px);
    padding-bottom: 48px;
  }
}
