/* ─── HIDE SCROLLBAR ─────────────────────────────────────────────── */
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
 
/* ─── PROJECTS WRAPPER (sticky viewport) ────────────────────────── */
#projects-wrapper {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
 
#projects-inner {
  display: flex;
  flex-direction: column;
  gap: var(--gap-projects);
  will-change: transform;
}
 
/* ─── SINGLE PROJECT (full viewport) ─────────────────── */
.project {
  width: 100%;
  height: auto;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 360px 1fr;
  padding-right: var(--pad-x);
}
 
/* ─── INTERSTITIAL BLOCK ─────────────────────────────────────────── */
.interstitial {
  width: 100%;
  display: grid;
  grid-template-columns: 360px 1fr;
  padding: 0 var(--pad-x) 0 0;
  align-items: start;
}

.interstitial-left {
  padding: 10px var(--pad-x);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.interstitial-label {
  font-family: 'SuisseIntl';
  font-size: var(--text-base);
  line-height: var(--lh-body);
  color: var(--ink);
  text-transform: uppercase;
}

.interstitial-title {
  font-family: 'Mackay', serif;
  font-size: var(--text-display);
  line-height: var(--lh-display);
  color: var(--ink);
  max-width: 55%;
  
}

.interstitial-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  
}

.interstitial-text {
  font-family: 'SuisseIntl';
  font-size: var(--text-base);
  line-height: var(--lh-body);
  color: var(--ink);
  max-width: 45ch;
}

.interstitial-image img {
  width: 100%;
  max-width: 700px;
  height: auto;
  display: block;
}

/* ─── LEFT: INFO PANEL ───────────────────────────────────────────── */
.project-info {
  padding: 0px clamp(14px, 2vw, 18px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
 
.project-info-top {
  display: flex;
  flex-direction: column;
  gap: 15px;
  /*padding-right: 10%;*/
  max-width: 80%;
}
 
.project-title {
  font-family: 'SuisseIntl';
  font-size: var(--text-base);
  line-height: var(--lh-body);
  color: var(--ink);
  text-transform: uppercase;
}
 
.project-description {
  font-family: 'SuisseIntl';
  font-size: var(--text-base);
  line-height: var(--lh-body);
  color: var(--ink);
  /*max-width: 30ch;*/
  padding-top: 20px;
}
.project-description p + p { margin-top: 0.75em; }
.project-description-more > div { padding-top: 0.75em; }

.project-description-more {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease-in-out-expo);
  overflow: hidden;
}
.project-description-more > * {
  min-height: 0;
  opacity: 0;
  transition: opacity 0.3s var(--ease-in-out-expo);
}
.project-description.is-expanded .project-description-more {
  grid-template-rows: 1fr;
}
.project-description.is-expanded .project-description-more > * {
  opacity: 1;
  transition-delay: 0.15s;
}

.project-description-toggle {
  display: inline-block;
  margin-top: 8px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'SuisseIntl';
  font-size: var(--text-sm);
  color: var(--ink-muted);
  line-height: 1;
}
.project-description-toggle:hover { color: var(--ink); }

.project-meta-table {
  display: flex;
  flex-direction: column;
  
}
 
.meta-row {
  display: flex;
  align-items: baseline;
  padding: 2px 0;
  
}
 
.meta-value {
  font-family: 'SuisseIntl';
  font-size: var(--text-base);
  color: var(--ink);
  opacity: 50%;
}
 
/* ─── RIGHT: CAROUSEL ────────────────────────────────────────────── */
.project-carousel {
  position: relative;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  container-type: inline-size;
  touch-action: pan-y;
}
 
.project-carousel.is-dragging { cursor: grabbing; }
 
.carousel-track {
  display: flex;
  gap: 6px;
  will-change: transform;
}
 
.carousel-track.animating {
  transition: transform var(--duration-slide) var(--ease-out-expo);
}
 
.carousel-slide {
  flex: none;
  width: 100cqw;
  aspect-ratio: 15 / 9;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #e8e5de;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  opacity: 0;
  transition: opacity 0.5s ease,
              transform 0.6s var(--ease-out-expo),
              filter 0.5s ease;
}
.carousel-slide img.loaded { opacity: 1; }

.carousel-slide:hover img {
  transform: scale(1.015);
}

.carousel-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.carousel-slide video.loaded { opacity: 1; }

.carousel-slide iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
  pointer-events: auto;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: none;
  border: none;
  color: rgba(255,255,255,0.85);
  mix-blend-mode: difference;
  cursor: pointer;
  transition: opacity 0.25s ease, background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}
 
.project-carousel:hover .carousel-arrow { opacity: 1; pointer-events: auto; }

 
.carousel-arrow--prev { left: 12px; }
.carousel-arrow--next { right: 12px; }
 
/* ─── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 1024px) and (min-width: 861px) {
  .project,
  .interstitial {
    grid-template-columns: 280px 1fr;
  }
 
}
 
@media (max-width: 860px) {
  .project {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    padding-right: 0;
  }

  .interstitial {
    grid-template-columns: 1fr;
    padding: 60px var(--pad-x);
    border-top: 1px solid var(--border);
  }

  .interstitial-left { padding: 0 0 10px 0; }
  .interstitial-title { max-width: 100%; }
  
  .project-carousel { order: -1; }
  .project-info {
    padding: 15px var(--pad-x);
    gap: 10px;
  }

  .project-description { max-width: 100%; padding-top: 20px; }

  .carousel-slide { aspect-ratio: 4 / 3; }

  .carousel-arrow { display: none; }

  .interstitial { padding: 40px var(--pad-x); }

  #header { padding: 20px var(--pad-x); }
}