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

:root {
  --bg: #0d0d0d;
  --fg: #ffffff;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', 'DM Sans', system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --bubble-bg: rgba(255,255,255,0.95);
  --bubble-color: #0d0d0d;
  --bubble-hover-bg: #0d0d0d;
  --bubble-hover-color: #ffffff;
}

html {
  background: var(--bg);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar { display: none; }

body {
  width: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

#index-nav > * { pointer-events: auto; }

.nav-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-name {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

a.nav-name:hover {
  opacity: 0.7;
}

.nav-role {
  font-size: 11px;
  font-weight: 300;
  opacity: 0.4;
  letter-spacing: 0.02em;
}

/* ── Center nav pills — elegant floating container ── */
.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-pill {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 0;
  transition: all 0.35s var(--ease);
  cursor: pointer;
}

.nav-pill:hover {
  color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.08);
}

.nav-pill.is-active {
  color: #fff;
  background: rgba(255,255,255,0.08);
  pointer-events: none;
}

.nav-pill:active {
  transform: scale(0.97);
}

/* ── Right nav buttons ── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* User profile in nav */
.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-user__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
  display: block;
}

.nav-user__name {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.01em;
  line-height: 1;
}

.nav-user .nav-btn {
  margin-left: 4px;
  font-size: 12px;
  padding: 8px 16px;
}

/* Logout button — icon + text */
.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.55);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.logout-btn svg {
  flex-shrink: 0;
  opacity: 0.8;
  transition: transform 0.3s var(--ease);
}

.logout-btn:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.08), 0 8px 24px -12px rgba(239, 68, 68, 0.4);
}

.logout-btn:hover svg {
  transform: translateX(2px);
  opacity: 1;
  color: #f87171;
}

.logout-btn:active {
  transform: scale(0.97);
}

#proj-nav .logout-btn {
  color: inherit;
  opacity: 0.6;
  border-color: rgba(0,0,0,0.1);
}

#proj-nav .logout-btn:hover {
  opacity: 1;
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.06);
  border-color: rgba(185, 28, 28, 0.4);
  box-shadow: 0 0 0 1px rgba(185, 28, 28, 0.06), 0 8px 24px -12px rgba(185, 28, 28, 0.3);
}

#proj-nav .logout-btn:hover svg {
  color: #b91c1c;
}

#proj-nav .nav-user__name {
  color: inherit;
  opacity: 0.8;
}

#proj-nav .nav-user__avatar {
  border-color: rgba(0,0,0,0.1);
}

.nav-btn {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: all 0.4s var(--ease);
  border-radius: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Ghost button — minimal presence */
.nav-btn--ghost {
  background: transparent;
  color: rgba(255,255,255,0.45);
  padding: 10px 20px;
  border: 1px solid transparent;
}

.nav-btn--ghost:hover {
  color: rgba(255,255,255,0.9);
}

.nav-btn--ghost:active {
  transform: scale(0.97);
}

/* Primary button — Elegant white CTA */
.nav-btn--primary {
  background: #fff;
  color: #0a0a0a;
  padding: 10px 24px;
  border: 1px solid #fff;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.nav-btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 0;
  transform: scale(1);
  transition: transform 0.4s var(--ease), background 0.4s var(--ease);
  z-index: -1;
}

.nav-btn--primary:hover {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}

.nav-btn--primary:active {
  transform: scale(0.98);
}

/* ── Project view nav overrides ── */
#proj-nav .nav-center {
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.08);
}

#proj-nav .nav-pill {
  color: inherit;
  opacity: 0.45;
}

#proj-nav .nav-pill:hover {
  opacity: 1;
  background: rgba(0,0,0,0.1);
}

#proj-nav .nav-btn--ghost {
  color: inherit;
  opacity: 0.45;
}

#proj-nav .nav-btn--ghost:hover {
  opacity: 1;
}

#proj-nav .nav-btn--primary {
  background: rgba(0,0,0,0.75);
  color: #fff;
  border-color: rgba(0,0,0,0.15);
  box-shadow: 
    0 2px 12px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

#proj-nav .nav-btn--primary:hover {
  background: rgba(0,0,0,0.88);
  box-shadow: 
    0 6px 24px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.footer {
  position: fixed;
  bottom: 32px;
  left: 36px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}

.footer-label,
.footer-date {
  font-size: 11.5px;
  font-weight: 300;
  opacity: 0.4;
}

.progress {
  position: fixed;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  transition: background 0.35s, transform 0.35s;
}

.dot.is-active {
  background: rgba(255,255,255,0.88);
  transform: scale(1.5);
}

.dot:hover:not(.is-active) {
  background: rgba(255,255,255,0.5);
}

/* ── Project section: centered 3D curved card with parallax image ── */
.ps-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
}

/* 3D curved frame — the "card" that holds the parallax image */
.ps-frame-track {
  will-change: transform;
}

.ps-frame {
  width: min(60vw, 1100px);
  /* Always leave a 40px gutter on each side so the 3D-rotated frame
     and ±mouse parallax never collide with the viewport edge. */
  max-width: calc(100vw - 80px);
  aspect-ratio: 4 / 3;
  /* Subtle corner softening — gives an editorial card feel without breaking
     the architectural cleanliness of the rest of the UI. */
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* Layered shadow + soft inner light edge for a more refined card silhouette */
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 8px 24px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

@media (max-width: 900px) {
  .ps-frame {
    width: min(80vw, calc(100vw - 48px));
  }
}

@media (max-width: 600px) {
  .ps-frame {
    width: calc(100vw - 32px);
    aspect-ratio: 3 / 4;
  }
}

/* Parallax image — taller than its container for vertical scroll movement */
.ps-frame__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 130%;
  object-fit: cover;
  will-change: transform;
  pointer-events: none;
  user-select: none;
}

/* ── Volume title — simple white text ── */
.ps-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 50;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 6vw, 96px);
  font-weight: 400;
  line-height: 0.93;
  letter-spacing: -0.025em;
  white-space: nowrap;
  pointer-events: none;
  color: #f5f5f5;
}

.ps-text__overlay { display: none; }
.ps-text__inner { display: none; }
.ps-text__cat { display: none; }
.ps-text__char { display: none; }

/* Mask container — clips the title slide-up reveal */
.ps-text__mask {
  overflow: hidden;
}

/* Section number */
.ps-num {
  position: absolute;
  top: 28px;
  right: 36px;
  font-size: 10.5px;
  font-weight: 300;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.12em;
  z-index: 10;
  pointer-events: none;
}

/* ─────────────────────────────────────────────────────────────────────────
   Volume CTA — gooey blob button
   Adapted from Uiverse.io by dpaulos6 (white-on-dark for SLUR theme)
   Requires the #goo SVG filter defined once globally in the page body.
   ───────────────────────────────────────────────────────────────────────── */
.ps-arrow-group {
  position: absolute;
  bottom: 48px;
  left: 50%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.ps-arrow-group__row {
  display: flex;
  flex-direction: row;
  gap: 14px;
  align-items: center;
}

.ps-arrow-group .ps-arrow {
  position: static;
}

.ps-arrow {
  position: absolute;
  bottom: 48px;
  left: 50%;
  z-index: 20;

  display: inline-block;
  vertical-align: middle;
  padding: 0.95em 1.9em;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: transparent;
  border: 3px solid #fff;
  border-radius: 999px;
  cursor: pointer;
  outline: none;
  transition: color 480ms ease, border-color 480ms ease;
  will-change: transform;
}

.ps-arrow__blobs {
  position: absolute;
  top: 0;
  left: 0;
  bottom: -3px;
  right: -1px;
  height: 100%;
  filter: url(#goo);
  overflow: hidden;
  z-index: -1;
  border-radius: 999px;
  pointer-events: none;
}

.ps-arrow__blobs span {
  position: absolute;
  width: 34%;
  height: 100%;
  background: #fff;
  border-radius: 100%;
  transform: scale(1.4) translateY(125%) translateZ(0);
  transition: transform 480ms ease;
}

.ps-arrow__blobs span:nth-child(1) { left: -5%; }
.ps-arrow__blobs span:nth-child(2) { left: 30%; transition-delay: 42ms; }
.ps-arrow__blobs span:nth-child(3) { left: 66%; transition-delay: 17ms; }

.ps-arrow:hover {
  color: #0a0a0a;
}

.ps-arrow:hover .ps-arrow__blobs span {
  transform: scale(1.4) translateY(0) translateZ(0);
}

.ps-arrow:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  .ps-arrow,
  .ps-arrow__blobs span {
    transition: none !important;
  }
}

/* ── Project view: fixed overlay ── */
#project-view {
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow: hidden;
  background: #f5ddd5;
}

#proj-nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 210;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
}

.proj-hero {
  display: none;
}

.proj-cat {
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 18px;
  align-self: center;
}

.proj-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(52px, 8vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: inherit;
}

.proj-meta {
  display: flex;
  gap: 56px;
  margin-top: 40px;
}

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

.meta-key {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.45;
}

.meta-val {
  font-size: 12.5px;
  font-weight: 400;
}

.proj-cover {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.proj-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.55) 70%, rgba(0,0,0,0.85) 100%);
  z-index: 1;
}

.proj-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  filter: blur(2px) saturate(0.85);
  transform: scale(1.05);
}

/* ── Back bubble ── */
.back-bubble {
  position: absolute;
  bottom: 36px;
  left: 36px;
  z-index: 210;
  width: 54px;
  height: 54px;
  border-radius: 0;
  background: rgba(0,0,0,0.88);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.5s cubic-bezier(0.32, 0.72, 0, 1),
    background 0.5s cubic-bezier(0.32, 0.72, 0, 1),
    color 0.5s cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 0.5s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

.back-bubble:hover {
  transform: scale(1.1) translateY(-1px);
  background: #fff;
  color: #000;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55);
}

.back-bubble:active { transform: scale(0.95); }

/* ── Entrance animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* The home-reveal.js script handles the entrance for these elements
   and toggles body.is-ready when its curtain has begun to lift.
   The legacy fadeUp keyframe is kept as a fallback for browsers
   that load the page without the reveal script. */
body.no-reveal #index-nav { animation: fadeUp 0.8s var(--ease) both; }
body.no-reveal .footer    { animation: fadeUp 0.8s var(--ease) 0.12s both; }
body.no-reveal .progress  { animation: fadeUp 0.8s var(--ease) 0.22s both; }


/* ═══════════════════════════════════════════════════════════════════════════
   Modal Dialog
   Editorial confirmation modal — accessible, animated, on-brand
   ═══════════════════════════════════════════════════════════════════════════ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Overlay — dark blur backdrop */
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

/* Container */
.modal__container {
  position: relative;
  width: 100%;
  max-width: 440px;
  transform: translateY(16px) scale(0.96);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
}

.modal.is-open .modal__container {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Content card */
.modal__content {
  position: relative;
  background: linear-gradient(145deg, #111 0%, #0a0a0a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 48px 40px 32px;
  text-align: center;
  overflow: hidden;
}

/* Editorial corner brackets */
.modal__content::before,
.modal__content::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: rgba(255, 255, 255, 0.2);
  border-style: solid;
}

.modal__content::before {
  top: -1px;
  left: -1px;
  border-width: 1px 0 0 1px;
}

.modal__content::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 1px 1px 0;
}

/* Title */
.modal__title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 12px;
}

.modal__message {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
  max-width: 320px;
  margin: 0 auto 32px;
}

/* Actions row */
.modal__actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.modal__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

/* Cancel — outlined ghost */
.modal__btn--cancel {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.15);
}

.modal__btn--cancel:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Confirm — solid white that inverts */
.modal__btn--confirm {
  background: #fff;
  color: #0a0a0a;
  border-color: #fff;
}

.modal__btn--confirm::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #0a0a0a;
  transform: translateY(100%);
  transition: transform 0.4s var(--ease);
}

.modal__btn--confirm > * {
  position: relative;
  z-index: 1;
  transition: color 0.4s var(--ease);
}

.modal__btn--confirm:hover:not(:disabled)::before {
  transform: translateY(0);
}

.modal__btn--confirm:hover:not(:disabled) {
  color: #fff;
  border-color: #fff;
}

.modal__btn:active:not(:disabled) {
  transform: scale(0.98);
}

.modal__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.modal__btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 3px;
}

.modal__btn-loader {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__btn-loader .spinner {
  animation: spin 0.8s linear infinite;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  .modal__content {
    padding: 36px 24px 24px;
  }
  
  .modal__title {
    font-size: 24px;
  }
  
  .modal__actions {
    flex-direction: column-reverse;
  }
  
  .modal__btn {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Reduced Motion
   ═══════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .modal,
  .modal__container,
  .modal__btn,
  .modal__btn--confirm::before {
    transition: none;
  }
  
  .modal.is-open .modal__container {
    transform: none;
  }
  
  .modal__btn-loader .spinner {
    animation: none;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   Coming Soon — editorial panel inside the project view
   ═══════════════════════════════════════════════════════════════════════════ */

.coming-soon {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 32px 80px;
  pointer-events: none;
}

.coming-soon__inner {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  pointer-events: auto;
  color: inherit;
}

/* Editorial corner brackets around the whole card */
.coming-soon__inner::before,
.coming-soon__inner::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: currentColor;
  border-style: solid;
  opacity: 0.35;
}

.coming-soon__inner::before {
  top: -16px;
  left: -16px;
  border-width: 1px 0 0 1px;
}

.coming-soon__inner::after {
  bottom: -16px;
  right: -16px;
  border-width: 0 1px 1px 0;
}

/* Top row: eyebrow text + Roman numeral */
.coming-soon__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  margin-bottom: 36px;
}

.coming-soon__eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  opacity: 0.55;
}

.coming-soon__roman {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

/* Title */
.coming-soon__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(64px, 10vw, 140px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
  color: inherit;
}

.coming-soon__title-line {
  display: block;
}

.coming-soon__title-line em {
  font-style: italic;
  font-weight: 400;
  opacity: 0.92;
}

/* Lede / tagline */
.coming-soon__lede {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 44px;
  opacity: 0.75;
}

/* Ornamental divider */
.coming-soon__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 280px;
  margin-bottom: 44px;
  opacity: 0.45;
}

.coming-soon__divider-line {
  flex: 1;
  height: 1px;
  background: currentColor;
}

.coming-soon__divider-mark {
  font-size: 11px;
  letter-spacing: 0;
  opacity: 0.8;
}

/* Meta strip */
.coming-soon__meta {
  display: flex;
  gap: 56px;
  margin-bottom: 48px;
  flex-wrap: wrap;
  justify-content: center;
}

.coming-soon__meta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.coming-soon__meta-key {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.45;
}

.coming-soon__meta-val {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.coming-soon__caption {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.4;
}

/* ── Reveal animation when project view opens ── */
#project-view.is-open .coming-soon__eyebrow,
#project-view.is-open .coming-soon__roman,
#project-view.is-open .coming-soon__title-line,
#project-view.is-open .coming-soon__lede,
#project-view.is-open .coming-soon__divider,
#project-view.is-open .coming-soon__meta-item,
#project-view.is-open .coming-soon__caption {
  animation: comingSoonRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.coming-soon__eyebrow                      { animation-delay: 0.55s !important; }
.coming-soon__roman                        { animation-delay: 0.65s !important; }
.coming-soon__title-line:nth-child(1)      { animation-delay: 0.75s !important; }
.coming-soon__title-line:nth-child(2)      { animation-delay: 0.85s !important; }
.coming-soon__lede                         { animation-delay: 0.95s !important; }
.coming-soon__divider                      { animation-delay: 1.05s !important; }
.coming-soon__meta-item:nth-child(1)       { animation-delay: 1.15s !important; }
.coming-soon__meta-item:nth-child(2)       { animation-delay: 1.22s !important; }
.coming-soon__meta-item:nth-child(3)       { animation-delay: 1.29s !important; }
.coming-soon__caption                      { animation-delay: 1.4s !important; }

.coming-soon__eyebrow,
.coming-soon__roman,
.coming-soon__title-line,
.coming-soon__lede,
.coming-soon__divider,
.coming-soon__meta-item,
.coming-soon__caption {
  opacity: 0;
}

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

@media (prefers-reduced-motion: reduce) {
  #project-view.is-open .coming-soon__eyebrow,
  #project-view.is-open .coming-soon__roman,
  #project-view.is-open .coming-soon__title-line,
  #project-view.is-open .coming-soon__lede,
  #project-view.is-open .coming-soon__divider,
  #project-view.is-open .coming-soon__meta-item,
  #project-view.is-open .coming-soon__caption {
    animation: none;
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .coming-soon {
    padding: 100px 24px 64px;
  }
  .coming-soon__meta {
    gap: 32px;
  }
  .coming-soon__inner::before,
  .coming-soon__inner::after {
    width: 20px;
    height: 20px;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   Chapters view — shown inside project-view when a volume has chapters
   ═══════════════════════════════════════════════════════════════════════════ */

.chapters-view {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 32px 80px;
  pointer-events: none;
  overflow-y: auto;
}

.chapters-view__inner {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: auto;
  color: inherit;
}

.chapters-view__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 48px;
}

.chapters-view__eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  opacity: 0.55;
}

.chapters-view__vol-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.chapters-list {
  list-style: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 44px;
}

.chapter-item__btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 16px 20px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  color: inherit;
  text-align: left;
  transition: background 0.2s ease;
  border-radius: 2px;
}

.chapter-item__btn:first-child {
  border-top: 1px solid rgba(255,255,255,0.08);
}

.chapter-item__btn:hover {
  background: rgba(255,255,255,0.05);
}

.chapter-item__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  opacity: 0.45;
  width: 36px;
  flex-shrink: 0;
}

.chapter-item__name {
  flex: 1;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.chapter-item__status {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.38;
}

.chapters-view__caption {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.4;
}

/* Reveal animation */
.chapters-view__eyebrow,
.chapters-view__vol-num,
.chapter-item,
.chapters-view__caption {
  opacity: 0;
}

#project-view.is-open .chapters-view__eyebrow,
#project-view.is-open .chapters-view__vol-num,
#project-view.is-open .chapter-item,
#project-view.is-open .chapters-view__caption {
  animation: comingSoonRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.chapters-view__eyebrow { animation-delay: 0.55s !important; }
.chapters-view__vol-num { animation-delay: 0.65s !important; }
.chapter-item:nth-child(1) { animation-delay: 0.75s !important; }
.chapter-item:nth-child(2) { animation-delay: 0.83s !important; }
.chapter-item:nth-child(3) { animation-delay: 0.91s !important; }
.chapter-item:nth-child(4) { animation-delay: 0.99s !important; }
.chapter-item:nth-child(5) { animation-delay: 1.07s !important; }
.chapter-item:nth-child(6) { animation-delay: 1.15s !important; }
.chapter-item:nth-child(7) { animation-delay: 1.23s !important; }
.chapters-view__caption    { animation-delay: 1.35s !important; }

@media (prefers-reduced-motion: reduce) {
  #project-view.is-open .chapters-view__eyebrow,
  #project-view.is-open .chapters-view__vol-num,
  #project-view.is-open .chapter-item,
  #project-view.is-open .chapters-view__caption {
    animation: none;
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .chapters-view {
    padding: 100px 20px 64px;
  }
}

/* Art gallery page-transition overlay */
#art-gallery-transition {
  position: fixed;
  inset: 0;
  background: #0a0805;
  z-index: 500;
  transform: translateX(100%);
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Nav dropdown — Legal (Terms / Privacy)
   ═══════════════════════════════════════════════════════════════════════════ */

.nav-dropdown {
  position: relative;
  display: inline-flex;
}

.nav-dropdown__trigger {
  /* Inherits .nav-pill base via shared class but is a button */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  cursor: pointer;
}

/* Active dropdown trigger must remain clickable (overrides .nav-pill.is-active).
   Important is necessary because nav-pill.is-active sets pointer-events: none
   and the dropdown trigger is the only nav-pill that should keep accepting clicks. */
.nav-pill.nav-dropdown__trigger.is-active {
  pointer-events: auto !important;
  cursor: pointer !important;
}

.nav-pill.nav-dropdown__trigger.is-active * {
  pointer-events: auto !important;
}

.nav-dropdown__trigger svg {
  opacity: 0.6;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.nav-dropdown[data-open="true"] .nav-dropdown__trigger svg {
  transform: rotate(180deg);
  opacity: 1;
}

/* Menu surface */
.nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 160px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: rgba(10, 10, 10, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.28s var(--ease);
  z-index: 30;
  box-shadow: 0 16px 48px -16px rgba(0, 0, 0, 0.6);
}

.nav-dropdown[data-open="true"] .nav-dropdown__menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Bridge so hover doesn't break in the gap */
.nav-dropdown__menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.nav-dropdown__item {
  display: block;
  padding: 9px 16px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav-dropdown__item:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.06);
}

.nav-dropdown__item.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

/* Project view (potentially light bg): keep menu dark for contrast */
#proj-nav .nav-dropdown__menu {
  background: rgba(10, 10, 10, 0.96);
  color: #fff;
}

#proj-nav .nav-dropdown__item {
  color: rgba(255, 255, 255, 0.6);
}

#proj-nav .nav-dropdown__item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

#proj-nav .nav-dropdown__item.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}


/* ═══════════════════════════════════════════════════════════════════════════
   Page reveal curtain — matches auth/about/legal pages
   ═══════════════════════════════════════════════════════════════════════════ */

.page-curtain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  display: flex;
}

.page-curtain__panel {
  flex: 1;
  background: #0a0a0a;
  transform-origin: top;
  will-change: transform;
  transform: scaleY(1);
}

/* Initial hidden state for content the curtain will reveal.
   The reveal script overrides these via inline style as it animates. */
body:not(.is-ready) #index-nav,
body:not(.is-ready) .footer,
body:not(.is-ready) .progress,
body:not(.is-ready) .ps-section .ps-text__cat,
body:not(.is-ready) .ps-section .ps-arrow {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .page-curtain {
    display: none !important;
  }
  body:not(.is-ready) #index-nav,
  body:not(.is-ready) .footer,
  body:not(.is-ready) .progress,
  body:not(.is-ready) .ps-section .ps-text__cat,
  body:not(.is-ready) .ps-section .ps-arrow {
    opacity: 1 !important;
  }
}
