/* ============================================================
   YENNY KOH — Portfolio
   main.css: tokens, reset, base typography
   ============================================================ */

/* --- Tokens ------------------------------------------------ */
:root {
  --bg: #F2F1ED;
  --surface: #f5f5f5;
  --border: rgba(0,0,0,0.1);
  --text-primary: #111111;
  --text-muted: rgba(17,17,17,0.5);
  --text-label: rgba(17,17,17,0.7);
  --accent: #111111;
  --accent-dim: rgba(17,17,17,0.08);

  --font-sans: 'Inter', Arial, Helvetica, sans-serif;
  --font-serif: 'Inter', Arial, Helvetica, sans-serif;
  --parallax-x: 0;
  --parallax-y: 0;
  --carousel-card-width: 380px;
  --carousel-card-height: 255px;
  --carousel-radius: 800px;
  --carousel-title-reserve: 0px;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
  --transition-base: 0.6s var(--ease-out-expo);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: auto; /* we handle scroll manually */
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.5;
  overflow: hidden; /* carousel manages scroll */
  height: 100dvh;
  cursor: none; /* custom cursor */
}

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

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

/* --- Custom Cursor ----------------------------------------- */
#cursor {
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--text-primary);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-out-expo),
              height 0.3s var(--ease-out-expo),
              background 0.3s ease,
              opacity 0.3s ease;
  mix-blend-mode: normal;
}

#cursor.hovered {
  width: 40px;
  height: 40px;
  background: var(--text-primary);
}

#cursor.zoom {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.18);
  border: 1.5px solid rgba(17,17,17,0.68);
  backdrop-filter: blur(4px);
}

#cursor.zoom::before,
#cursor.zoom::after {
  content: '';
  position: absolute;
  display: block;
}

#cursor.zoom::before {
  inset: 10px;
  border: 1.5px solid rgba(17,17,17,0.78);
  border-radius: 50%;
}

#cursor.zoom::after {
  width: 12px;
  height: 1.5px;
  right: 6px;
  bottom: 8px;
  background: rgba(17,17,17,0.78);
  transform: rotate(45deg);
  transform-origin: center;
}

#cursor.clicking {
  width: 6px;
  height: 6px;
}

/* --- Nav --------------------------------------------------- */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 40px;
  pointer-events: none;
}

.nav-logo {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  pointer-events: all;
}

.nav-tagline {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  max-width: 240px;
  text-align: center;
}

.nav-links {
  display: flex;
  gap: 28px;
  pointer-events: all;
}

.nav-links a,
.nav-links button {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-label);
  text-transform: uppercase;
  transition: color 0.3s ease;
  background: none;
  border: none;
  cursor: none;
  font-family: inherit;
}

.nav-links a:hover,
.nav-links button:hover {
  color: var(--text-primary);
}

/* --- Location / Time bar ----------------------------------- */
#status-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
  pointer-events: none;
}

.status-left, .status-right {
  font-size: 11px;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-center {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* scroll hint */
.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.scroll-hint.hidden {
  opacity: 0;
}

.scroll-hint span {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.1); }
}

/* project counter */
.project-counter {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.project-counter .current {
  color: var(--accent);
  font-size: 16px;
}

/* ============================================================
   CAROUSEL SCENE
   ============================================================ */

#carousel-scene {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: var(--carousel-title-reserve);
  box-sizing: border-box;
  perspective: 1600px;
  perspective-origin: 50% 50%;
}

.carousel-orbit {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(82vw, 1120px);
  height: min(44vw, 560px);
  transform: translate(-50%, -50%) translate3d(calc(var(--parallax-x) * -8px), calc(var(--parallax-y) * -8px), 0);
  pointer-events: none;
  opacity: 1;
}

.carousel-orbit-ring,
.carousel-orbit-axis {
  position: absolute;
  inset: 0;
  border-radius: 999px;
}

.carousel-orbit-ring {
  border: 1px dashed rgba(0,0,0,0.08);
  opacity: 0.42;
  transform: rotate(-6deg);
}

.carousel-orbit-axis {
  inset: 50% 6%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0,0,0,0.08), transparent);
  opacity: 0.5;
}

#cylinder-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cards container — rotates on Y axis for cylindrical effect */
#cards-container {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.9s var(--ease-in-out-quart);
  will-change: transform;
}

/* Individual project card */
.project-card {
  position: absolute;
  width: var(--carousel-card-width);
  height: var(--carousel-card-height);
  left: calc(var(--carousel-card-width) / -2);
  top: calc(var(--carousel-card-height) / -2); /* center vertically */
  transform-style: preserve-3d;
  cursor: pointer;
  opacity: 1;
  transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter 0.65s ease,
              opacity 0.65s ease;
  will-change: transform;
  border-radius: 3px;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: -26px;
  border-radius: 36px;
  background: radial-gradient(circle at 50% 50%, rgba(0,0,0,0.08) 0%, transparent 70%);
  filter: blur(18px);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s var(--ease-out-expo);
  pointer-events: none;
  z-index: -1;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: inherit;
  background: transparent;
  transform: translate3d(calc(var(--parallax-x) * 4px), calc(var(--parallax-y) * -4px), 0);
  transition: transform 0.7s var(--ease-out-expo);
}

/* Thumbnail image */
.card-image {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transition: transform 0.8s var(--ease-out-expo);
  overflow: hidden;
}

.card-image img {
  transform: scale(1.0);
  transition: transform 0.8s var(--ease-out-expo);
  filter: brightness(0.75) saturate(0.85);
  transition: transform 0.8s var(--ease-out-expo), filter 0.8s ease;
}

/* Card overlay gradient */
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(255,255,255,0.32) 0%,
    rgba(255,255,255,0.12) 32%,
    rgba(255,255,255,0.04) 55%,
    transparent 100%
  );
  transition: opacity 0.5s ease;
}

.project-card::after {
  content: attr(data-nav-label);
  position: absolute;
  top: 50%;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.34);
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.35s ease, transform 0.5s var(--ease-out-expo);
  pointer-events: none;
}

/* ACTIVE card (center, facing user) */
.project-card.is-active .card-image img {
  transform: scale(1);
  filter: brightness(0.92) saturate(1);
}

.project-card.is-active::before {
  opacity: 1;
  transform: scale(1);
}

/* HOVER on active card */
.project-card.is-active:hover .card-image img {
  transform: scale(1.03);
  filter: brightness(1) saturate(1.05);
}

.project-card.is-active:hover::after {
  opacity: 0;
}

/* Side cards - dimmed */
.project-card.is-adjacent {
  opacity: 0.75;
  pointer-events: auto;
}

.project-card.is-adjacent .card-inner {
  transform: translate3d(calc(var(--parallax-x) * 2px), calc(var(--parallax-y) * -2px), 0);
}

.project-card.is-adjacent::after {
  opacity: 1;
}

.project-card.is-adjacent[data-nav-label="PREV"]::after {
  left: -52px;
}

.project-card.is-adjacent[data-nav-label="NEXT"]::after {
  right: -56px;
}

.project-card.is-far {
  opacity: 0.6;
  pointer-events: none;
}

/* Active card title bar (outside card, below) */
#active-title {
  position: fixed;
  left: 50%;
  bottom: 100px;
  width: min(90vw, 980px);
  transform: translateX(-50%) translate3d(calc(var(--parallax-x) * 7px), calc(var(--parallax-y) * -5px), 0);
  text-align: center;
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.4s ease, transform 0.6s var(--ease-out-expo);
}

#active-title .title-main {
  font-family: 'Zalando Sans Expanded', sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-weight: 400;
  font-size: clamp(1.9rem, 4.8vw, 3.3rem);
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: block;
  white-space: nowrap;
}

#active-title .title-sub {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.44);
  display: block;
  margin-top: 0.5rem;
}

@media (min-width: 901px) {
  :root {
    --carousel-title-reserve: 30px;
  }
}

@media (min-width: 901px) and (max-height: 820px) {
  #active-title {
    bottom: 64px;
    width: min(90vw, 900px);
  }

  #active-title .title-main {
    font-size: clamp(1.9rem, 4.2vw, 3rem);
  }
}

.carousel-left-zone {
  cursor: w-resize;
}

.carousel-right-zone {
  cursor: e-resize;
}

/* ============================================================
   PROJECT DETAIL PAGE OVERLAY
   ============================================================ */

#detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  overflow-y: auto;
  cursor: auto;
  transition: opacity 0.6s var(--ease-out-expo);
}

#detail-overlay.open {
  opacity: 1;
  pointer-events: all;
}

#info-overlay {
  position: fixed;
  inset: 0;
  z-index: 480;
  background: rgba(242,241,237,0.96);
  opacity: 0;
  pointer-events: none;
  overflow-y: auto;
  transition: opacity 0.45s var(--ease-out-expo);
}

#info-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.info-close {
  position: fixed;
  top: 28px;
  left: 40px;
  z-index: 560;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-label);
  cursor: none;
  transition: color 0.3s ease;
  background: none;
  border: none;
  padding: 8px 0;
}

.info-close:hover {
  color: var(--text-primary);
}

.info-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}

.info-content {
  max-width: 1120px;
  margin: 0 auto;
  padding: 120px 60px 100px;
}

.info-header {
  margin-bottom: 72px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

.info-title {
  font-family: 'Zalando Sans Expanded', sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.1;
  color: var(--text-primary);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px;
  margin-bottom: 72px;
}

.info-section {
  margin-bottom: 72px;
}

.info-grid .info-section {
  margin-bottom: 0;
}

.info-stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.info-entry-title {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.info-entry-body {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-label);
  white-space: pre-line;
}

.info-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-contact a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

/* Back button */
.detail-back {
  position: fixed;
  top: 28px; left: 40px;
  z-index: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-label);
  cursor: none;
  transition: color 0.3s ease;
  background: none;
  border: none;
  padding: 8px 0;
}

.detail-back:hover {
  color: var(--text-primary);
}

.detail-back svg {
  width: 20px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  transition: transform 0.3s var(--ease-out-expo);
}

.detail-back:hover svg {
  transform: translateX(-4px);
}

/* Detail content */
.detail-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 120px 60px 100px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease-out-expo),
              transform 0.65s var(--ease-out-expo);
}

/* Hero */
.detail-hero {
  width: 100%;
  height: auto;
  overflow: visible;
  border-radius: 4px;
  margin-bottom: 72px;
  position: relative;
}

.detail-hero-interactive {
  height: auto;
  aspect-ratio: var(--embed-aspect-ratio, 16 / 9);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
}

.detail-hero.detail-hero-chicago-sky {
  height: auto;
  overflow: visible;
  background: transparent;
}

.detail-hero.detail-hero-chicago-sky img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center center;
  background: transparent;
  transform: none;
}

.detail-hero img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center center;
  background: var(--surface);
  filter: brightness(1.0);
  transform: none;
  transition: transform 1.2s var(--ease-out-expo);
}

.zoomable-media {
  cursor: none;
}

#detail-overlay.open .detail-hero img {
  transform: none;
}

#detail-overlay.open .detail-content {
  opacity: 1;
  transform: translateY(0);
}

/* Header block */
.detail-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 80px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--border);
}

.detail-eyebrow {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.detail-title {
  font-family: 'Zalando Sans Expanded', sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.detail-intro {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-label);
  max-width: 460px;
  white-space: pre-line;
}

/* Meta info */
.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 44px;
}

.detail-meta-hidden {
  display: none;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.meta-value {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

/* Body copy sections */
.detail-section {
  margin-bottom: 72px;
}

.detail-subproject {
  margin-bottom: 72px;
}

.detail-subproject-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 72px;
  align-items: start;
}

.detail-subproject-meta {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 40px;
  padding-left: 8px;
}

.section-label {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.detail-subproject-title {
  font-family: 'Zalando Sans Expanded', sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.detail-subproject-intro {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-label);
  max-width: 720px;
  white-space: pre-line;
}

.section-body {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-label);
  max-width: 680px;
  white-space: pre-line;
}

/* Process images grid */
.process-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
  margin-bottom: 72px;
}

.process-grid .full-width {
  grid-column: 1 / -1;
}

.process-grid-three {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.process-grid-encrypted-78 {
  align-items: stretch;
  background: #000000;
}

.process-grid-encrypted-78 .process-img-encrypted-span-1 {
  grid-column: span 1;
}

.process-grid-encrypted-78 .process-img-encrypted-span-2 {
  grid-column: span 2;
}

.process-grid-encrypted-78 .process-img-encrypted-span-1,
.process-grid-encrypted-78 .process-img-encrypted-span-2 {
  height: 100%;
  background: #000000;
}

.process-grid-encrypted-78 .process-img-encrypted-span-1 img,
.process-grid-encrypted-78 .process-img-encrypted-span-1 video,
.process-grid-encrypted-78 .process-img-encrypted-span-2 img,
.process-grid-encrypted-78 .process-img-encrypted-span-2 video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.process-grid-two {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.process-grid-two.chicago-sky-pair {
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  height: 500px;
}

.process-grid-two.chicago-sky-pair .process-img {
  height: 100%;
  overflow: hidden;
}

.process-grid-two.chicago-sky-pair .process-img img,
.process-grid-two.chicago-sky-pair .process-img video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
}

.process-grid-two.chicago-sky-pair .process-img-chicago-shrink {
  width: 82%;
  height: auto;
  justify-self: center;
  align-self: center;
}

.process-grid-two.chicago-sky-pair .process-img-chicago-shrink img,
.process-grid-two.chicago-sky-pair .process-img-chicago-shrink video {
  height: auto;
  object-fit: contain;
}

.process-grid-encrypted-tail {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.process-grid-encrypted-tail .process-grid-two.process-grid-encrypted-pair {
  gap: 0;
  align-items: stretch;
}

.process-grid-encrypted-tail .process-grid-encrypted-pair-23 {
  grid-template-columns: 2fr 3fr;
}

.process-grid-encrypted-tail .process-grid-encrypted-pair-32 {
  grid-template-columns: 3fr 2fr;
}

.process-grid-encrypted-tail .process-img {
  height: auto;
  background: transparent;
}

.process-grid-encrypted-tail .process-img-encrypted-ratio-23,
.process-grid-encrypted-tail .process-img-encrypted-ratio-32 {
  aspect-ratio: auto;
}

.process-grid-encrypted-tail .process-img-encrypted-ratio-23 {
  aspect-ratio: 2 / 3;
}

.process-grid-encrypted-tail .process-img-encrypted-ratio-32 {
  aspect-ratio: 3 / 2;
}

.process-grid-encrypted-tail .process-img img,
.process-grid-encrypted-tail .process-img video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-divider {
  grid-column: 1 / -1;
  height: 1px;
  margin: 28px 0 32px;
  background: linear-gradient(to right, transparent, rgba(0,0,0,0.16), transparent);
}

.detail-divider {
  margin: 12px 0 72px;
}

.detail-hero-block {
  margin-bottom: 72px;
}

.interactive-shell {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.72);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: transform 0.3s var(--ease-out-expo),
              box-shadow 0.3s var(--ease-out-expo),
              border-color 0.3s ease;
}

.interactive-shell:hover {
  transform: translateY(-4px);
  border-color: rgba(0,0,0,0.16);
  box-shadow: 0 18px 36px rgba(0,0,0,0.1);
}

.interactive-shell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(244,242,237,0.88));
}

.interactive-shell-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.interactive-shell-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.interactive-shell-controls span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.16);
}

.interactive-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.62);
  padding: 6px 10px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.74);
  backdrop-filter: blur(8px);
}

.interactive-open {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.5);
  transition: color 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}

.interactive-open:hover {
  color: rgba(0,0,0,0.82);
  transform: translateX(2px);
}

.process-img {
  width: 100%;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface);
  position: relative;
}

.process-img-chicago {
  background: transparent;
}

.process-img-visual-system-transparent {
  background: transparent;
}

.process-img-resonate-transparent {
  background: transparent;
}

.process-caption {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.58);
  margin: 0 0 12px;
}

.process-img-third {
  min-width: 0;
}

.process-img::after {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px dashed rgba(0,0,0,0.28);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.process-embed {
  width: 100%;
  aspect-ratio: var(--embed-aspect-ratio, 16 / 9);
  overflow: hidden;
  border-radius: 0 0 10px 10px;
  background: #f4f2ed;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid rgba(0,0,0,0.05);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

.process-embed-block {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.process-caption-block {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.process-img img,
.process-img video {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.35s ease;
}

.process-img:hover img,
.process-img:hover video {
  transform: scale(1.005);
}

.process-grid-encrypted-tail .process-img:hover img,
.process-grid-encrypted-tail .process-img:hover video {
  transform: scale(1.01);
}

.process-img:hover::after {
  opacity: 1;
}

.process-embed iframe,
.detail-hero-interactive iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

.process-embed-preview-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}

.process-embed-scaled {
  --embed-scale: 0.68;
}

.process-embed-scaled .process-embed-frame,
.detail-hero-interactive .process-embed-frame {
  width: calc(100% / var(--embed-scale));
  height: calc(100% / var(--embed-scale));
  transform: scale(var(--embed-scale));
  transform-origin: center center;
  flex-shrink: 0;
}

.interactive-note {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 56px 28px 28px;
  background: rgba(242,241,237,0.94);
  backdrop-filter: blur(14px);
}

.image-lightbox.open {
  display: flex;
}

.image-lightbox-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-lightbox-media {
  max-width: min(92vw, 1440px);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 24px 60px rgba(0,0,0,0.12);
}

.image-lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  color: rgba(0,0,0,0.72);
  font-size: 28px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.image-lightbox-close:hover {
  background: rgba(255,255,255,0.92);
  color: rgba(0,0,0,0.92);
  transform: scale(1.04);
}

.process-group-note {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: none;
  color: var(--text-muted);
}

/* Navigation between projects */
.detail-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 60px;
  border-top: 1px solid var(--border);
}

.detail-nav-btn {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-label);
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.3s ease;
}

.detail-nav-btn.prev {
  justify-content: flex-start;
  text-align: left;
}

.detail-nav-btn.next {
  justify-content: flex-end;
  text-align: right;
}

.detail-nav-btn:hover {
  color: var(--text-primary);
}

.detail-nav-btn svg {
  width: 24px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}

.detail-nav-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: 16px;
  color: var(--text-primary);
  display: block;
  margin-top: 4px;
  text-align: left;
}

.detail-nav-btn.next .detail-nav-title {
  text-align: right;
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */
#loading {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  transition: opacity 0.8s var(--ease-out-expo);
}

#loading.done {
  opacity: 0;
  pointer-events: none;
}

.loading-name {
  font-family: 'Zalando Sans Expanded', sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-size: 28px;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.loading-bar-wrap {
  width: 120px;
  height: 1px;
  background: var(--border);
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 1.2s var(--ease-out-expo);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  :root {
    --carousel-card-width: 272px;
    --carousel-card-height: 183px;
    --carousel-radius: 520px;
  }

  .carousel-orbit {
    width: min(92vw, 620px);
    height: min(58vw, 360px);
  }

  .interactive-shell-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-header {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .detail-subproject-header {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .detail-subproject-meta {
    padding-top: 0;
  }

  .process-grid {
    grid-template-columns: 1fr;
  }

  .detail-content {
    padding: 100px 28px 80px;
  }

  .info-content {
    padding: 100px 28px 80px;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  #nav {
    padding: 20px 24px;
  }

  .nav-tagline {
    display: none;
  }

  .info-close {
    top: 20px;
    left: 24px;
  }

  #status-bar {
    padding: 20px 24px;
  }

  #active-title {
    bottom: 108px;
    width: min(70vw, 420px);
  }

  #active-title .title-main {
    font-size: 30px;
    white-space: normal;
  }

  #active-title .title-sub {
    font-size: 12px;
  }

  .project-card.is-adjacent[data-nav-label="PREV"]::after {
    left: -36px;
  }

  .project-card.is-adjacent[data-nav-label="NEXT"]::after {
    right: -40px;
  }
}

@media (max-width: 600px) {
  :root {
    --carousel-card-width: 244px;
    --carousel-card-height: 164px;
    --carousel-radius: 390px;
    --carousel-title-reserve: 30px;
  }

  #carousel-scene {
    transform: translateY(-40px);
  }

  .carousel-orbit {
    width: 94vw;
    height: 64vw;
  }

  .interactive-open {
    white-space: normal;
  }

  .process-embed-scaled .process-embed-frame,
  .detail-hero-interactive .process-embed-frame {
    width: 100%;
    height: 100%;
    transform: none;
  }

  .detail-back,
  .detail-nav-btn,
  .info-close {
    font-size: 11px;
  }

  .detail-eyebrow,
  .section-label,
  .meta-label,
  .interactive-note,
  .process-group-note,
  .process-caption {
    font-size: 9px;
  }

  .detail-title,
  .info-title {
    font-size: clamp(28px, 9vw, 42px);
  }

  .detail-subproject-title {
    font-size: clamp(24px, 8vw, 34px);
  }

  .detail-intro,
  .detail-subproject-intro,
  .section-body,
  .info-entry-body {
    font-size: 14px;
    line-height: 1.7;
  }

  .meta-value,
  .detail-nav-title {
    font-size: 13px;
  }

  .info-entry-title {
    font-size: 16px;
  }

  .detail-nav {
    gap: 16px;
    padding-top: 48px;
  }

  .detail-nav-btn svg,
  .detail-back svg {
    width: 20px;
  }

  #active-title {
    bottom: 116px;
    width: calc(100vw - 40px);
    min-height: 124px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    row-gap: 12px;
  }

  #active-title .title-main {
    font-size: 30px;
    line-height: 1.08;
    white-space: normal;
    max-width: min(88vw, 560px);
    text-wrap: balance;
  }

  #active-title .title-sub {
    font-size: 12px;
    margin-top: 0;
    line-height: 1.2;
    letter-spacing: 0.14em;
  }

  .project-card.is-adjacent::after {
    display: none;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
