@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Noto+Serif+SC:wght@400;500&family=Playfair+Display:ital,wght@0,400;0,500;1,400;1,500&display=swap');

:root {
  --paper: #f2eee8;
  --muted: rgba(242, 238, 232, .68);
  --line: rgba(242, 238, 232, .28);
  --world-accent: #dbaaff;
  --world-rgb: 165, 104, 255;
  --pointer-x: 0px;
  --pointer-y: 0px;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; margin: 0; background: #090a0d; }
body { font-family: "Noto Serif SC", serif; color: var(--paper); }

.app {
  width: 100%;
  height: 100%;
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #090a0d;
}

.scene, .world-bg, .world-color, .wind-layer, .mist, .water-shimmer,
.scene-vignette, .scene-grain, .petals, .dust {
  position: absolute;
  inset: 0;
}

.scene { z-index: 1; overflow: hidden; background: #090a0d; }

/* 修改点：优化画布基础样式，交由 WebGL 统一管理宽高比例与视差效果 */
.world-bg {
  width: 100%;
  height: 100%;
  display: block;
  transition: opacity 560ms ease;
}

.world-color {
  background:
    radial-gradient(circle at 50% 45%, rgba(var(--world-rgb), .14), transparent 38%),
    linear-gradient(120deg, rgba(4, 5, 10, .32), transparent 53%, rgba(5, 3, 10, .20));
  mix-blend-mode: screen;
  pointer-events: none;
  transition: background .8s ease;
}

.scene-vignette {
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 46%, transparent 28%, rgba(0, 0, 0, .17) 60%, rgba(0,0,0,.58) 100%),
    linear-gradient(90deg, rgba(0,0,0,.22), transparent 28%, transparent 72%, rgba(0,0,0,.22));
}

.scene-grain {
  z-index: 5; opacity: .11; pointer-events: none; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.66'/%3E%3C/svg%3E");
}

/* Window-curtain wind: shown in Buffer */
.wind-layer--curtain {
  z-index: 2;
  pointer-events: none;
  display: none;
  right: -10%;
  left: auto;
  width: 46%;
  background: linear-gradient(90deg, transparent, rgba(243, 238, 227, .04) 55%, rgba(255,255,255,.12));
  overflow: hidden;
  mix-blend-mode: screen;
}
.wind-layer--curtain span {
  position: absolute; inset: -8% -14%;
  border-radius: 54% 48% 42% 50%;
  border-left: 1px solid rgba(255,255,255,.22);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.075), transparent 70%);
  filter: blur(.3px);
  transform-origin: 100% 0;
  animation: curtainWind 8.2s cubic-bezier(.42,.04,.36,.98) infinite alternate;
}
.wind-layer--curtain span:nth-child(2) { animation-duration: 11.7s; animation-delay: -4s; opacity: .63; left: 16%; }
.wind-layer--curtain span:nth-child(3) { animation-duration: 6.4s; animation-delay: -2s; opacity: .45; left: 31%; }
@keyframes curtainWind {
  from { transform: translateX(3%) skewX(-2deg) scaleX(.94); opacity: .35; }
  to { transform: translateX(-5%) skewX(4deg) scaleX(1.1); opacity: .84; }
}

/* Grass wind: shown in Afterlight */
.wind-layer--grass { z-index: 2; pointer-events: none; display: none; overflow: hidden; opacity: .62; }
.grass-wave {
  position: absolute; left: -12%; right: -12%; bottom: -5%;
  height: 49%;
  border-radius: 50% 50% 0 0 / 12% 12% 0 0;
  background:
    repeating-linear-gradient(100deg,
      transparent 0 5px,
      rgba(227, 255, 225, .09) 5px 7px,
      transparent 7px 12px);
  mix-blend-mode: screen;
  filter: blur(1.4px);
  transform-origin: 50% 100%;
  animation: grassWind 11s ease-in-out infinite alternate;
}
.grass-wave--two { bottom: 4%; opacity:.48; animation-duration: 15s; animation-delay: -5s; transform: scaleX(1.1); }
.grass-wave--three { bottom: 10%; opacity:.25; animation-duration: 8s; animation-delay: -2s; transform: scaleX(.85); }
@keyframes grassWind {
  from { transform: translateX(-4%) skewX(-2.2deg) scaleY(.95); }
  to { transform: translateX(6%) skewX(2.3deg) scaleY(1.08); }
}

.mist { z-index: 2; pointer-events: none; opacity: 0; transition: opacity .8s ease; overflow: hidden; }
.mist span {
  position:absolute; width:72vw; height:18vw; border-radius:50%;
  background: radial-gradient(ellipse, rgba(255, 221, 242, .18), transparent 66%);
  filter: blur(23px); mix-blend-mode: screen;
  animation: mistDrift 19s ease-in-out infinite alternate;
}
.mist span:first-child { left:-28vw; bottom:4%; }
.mist span:last-child { right:-32vw; bottom:18%; animation-duration:27s; animation-delay:-8s; opacity:.63; }
@keyframes mistDrift { to { transform: translate3d(22vw,-2vw,0) scale(1.15); } }

.water-shimmer {
  z-index: 2; pointer-events: none; opacity: 0; transition: opacity .8s ease;
  background:
    linear-gradient(100deg, transparent 30%, rgba(255,255,255,.16) 48%, transparent 63%) 0 76% / 165% 7% no-repeat,
    repeating-linear-gradient(0deg, transparent 0 9px, rgba(255,255,255,.075) 10px 11px, transparent 13px) bottom / 100% 35% no-repeat;
  mix-blend-mode: screen;
  animation: waterShimmer 8.5s ease-in-out infinite alternate;
}
@keyframes waterShimmer { to { background-position: 100% 77%, bottom; opacity: .75; } }

.petals, .dust { z-index:3; pointer-events:none; overflow:hidden; }
.petal {
  position:absolute; top:-10vh; width:var(--s); height:calc(var(--s) * 1.45);
  border-radius: 75% 25% 70% 30%;
  background: linear-gradient(135deg, rgba(255,217,212,.95), rgba(var(--world-rgb),.30));
  box-shadow: 0 0 10px rgba(255,255,255,.17);
  opacity:var(--o);
  animation: petalFall var(--d) linear infinite;
  animation-delay:var(--delay);
}
@keyframes petalFall {
  from { transform: translate3d(0,-12vh,0) rotate(0deg); }
  to { transform: translate3d(var(--drift),112vh,0) rotate(520deg); }
}
.dust-dot {
  position:absolute; width:var(--s);height:var(--s);border-radius:50%;
  background:rgba(255,255,255,.84);opacity:var(--o);filter:blur(.3px);
  box-shadow: 0 0 13px rgba(var(--world-rgb),.74);
  animation:dustFloat var(--d) ease-in-out infinite alternate;
}
@keyframes dustFloat { to { transform:translate3d(var(--x),var(--y),0); opacity:.1; } }

.topbar {
  position:absolute; z-index:8; inset:0 0 auto;
  display:flex; justify-content:space-between; align-items:center;
  padding:31px 43px;
}
.brand {
  display:flex; align-items:baseline; text-decoration:none; color:var(--paper);
  font-family:"Playfair Display", Georgia, serif; font-style:italic; font-weight:400;
  line-height:.8; white-space:nowrap;
}
.brand__nyan { font-size:clamp(22px,1.7vw,29px); letter-spacing:-.08em; }
.brand__archive { margin-left:1px; font-size:clamp(13px,1.02vw,17px); letter-spacing:-.065em; opacity:.82; }
.world-meta {
  position:absolute; left:50%; transform:translateX(-50%);
  display:flex; align-items:center; gap:13px;
  font-family:"Cormorant Garamond",serif; letter-spacing:.15em; font-size:12px; color:var(--muted);
}
.meta-line { display:block;width:38px;height:1px;background:var(--line); }
.sound-toggle {
  display:flex; gap:8px; align-items:center; border:0; background:transparent;
  font-family:"Cormorant Garamond",serif; font-size:12px; letter-spacing:.16em;
  color:var(--muted); cursor:pointer; padding:8px 0;
}
.sound-toggle i { width:6px;height:6px;border-radius:99px;border:1px solid var(--paper); opacity:.7; }
.sound-toggle[aria-pressed="true"] i { background:var(--paper); box-shadow:0 0 10px #fff; }

.scene-copy {
  position:absolute; z-index:7; left:7.6vw; top:50%; transform:translateY(-50%);
  max-width:430px; pointer-events:none;
}
.eyebrow {
  margin:0 0 15px; font-size:12px; letter-spacing:.2em; color:var(--muted);
}
.scene-copy h1 {
  margin:0; font-family:"Cormorant Garamond",serif; font-weight:500;
  font-size:clamp(68px, 8vw, 138px); line-height:.82; letter-spacing:.075em;
  color:var(--paper); text-shadow:0 8px 35px rgba(0,0,0,.18);
}
.scene-description { margin:24px 0 0; font-size:13px; line-height:2; color:var(--muted); }

.scroll-hint, .click-hint {
  position:absolute; z-index:8; margin:0; letter-spacing:.18em;
  font-family:"Cormorant Garamond",serif; font-size:12px; color:rgba(255,255,255,.74);
}
.scroll-hint { left:43px; bottom:31px; }
.scroll-hint span { margin-left:9px; font-size:18px; vertical-align:-2px; animation: scrollPulse 2.5s ease-in-out infinite; }
@keyframes scrollPulse { 50% { transform:translateY(5px); opacity:.45; } }
.click-hint { left:50%; bottom:8.5vh; transform:translateX(-50%); font-size:11px; opacity:.0; transition:opacity .5s ease; white-space:nowrap; }
.app.butterfly-hover .click-hint { opacity:.86; }

.butterfly {
  --butterfly-scale: 1;
  position:absolute; z-index:10; left:50%; top:51%;
  width:clamp(130px, 13vw, 205px); aspect-ratio:1;
  padding:0; border:0; background:transparent; cursor:pointer;
  transform:translate(-50%,-50%) scale(var(--butterfly-scale));
  filter: drop-shadow(0 0 10px rgba(255,255,255,.62)) drop-shadow(0 0 30px rgba(var(--world-rgb),.35));
  transition:filter .55s ease, opacity .25s ease;
}
.butterfly::before {
  content:""; position:absolute; inset:15%; border-radius:50%;
  background:radial-gradient(circle, rgba(var(--world-rgb),.32), transparent 68%);
  filter:blur(16px); opacity:.8; transform: scale(1.2);
}

/* Main butterfly: transparent asset, no rectangular black background */
.butterfly-wing,
.butterfly-body {
  position: absolute;
  inset: 0;
  background: url("./assets/butterfly-clean.png") center / 100% 100% no-repeat;
}

.butterfly-wing {
  will-change: transform;
  filter: sepia(1) saturate(1.65) hue-rotate(var(--butterfly-hue, 0deg)) brightness(1.32);
}

.butterfly-wing--left {
  clip-path: inset(0 50% 0 0);
  transform-origin: 50.2% 50%;
  animation: wingLeft 2.65s cubic-bezier(.45,.03,.38,.98) infinite alternate;
}

.butterfly-wing--right {
  clip-path: inset(0 0 0 50%);
  transform-origin: 49.8% 50%;
  animation: wingRight 2.65s cubic-bezier(.45,.03,.38,.98) infinite alternate;
}

.butterfly-body {
  clip-path: inset(27% 43% 7% 43%);
  filter: sepia(1) saturate(1.85) hue-rotate(var(--butterfly-hue,0deg)) brightness(1.23) drop-shadow(0 0 7px rgba(255,255,255,.9));
}
.butterfly-glow { position:absolute;inset:34%;border-radius:50%;background:rgba(var(--world-rgb),.22);filter:blur(19px);z-index:-1; }
@keyframes wingLeft { to { transform:perspective(480px) rotateY(28deg) rotateZ(-1.5deg); } }
@keyframes wingRight { to { transform:perspective(480px) rotateY(-28deg) rotateZ(1.5deg); } }
.app.butterfly-hover .butterfly { --butterfly-scale:1.11; filter:drop-shadow(0 0 16px rgba(255,255,255,.87)) drop-shadow(0 0 47px rgba(var(--world-rgb),.60)); }
.app.butterfly-hover .butterfly-wing--left, .app.butterfly-hover .butterfly-wing--right { animation-duration:.75s; }

.dream-transition {
  position:fixed; z-index:20; inset:0; pointer-events:none; opacity:0; overflow:hidden;
  transition:opacity .28s ease;
}
.dream-transition.is-active { opacity:1; }
.transition-particles { position:absolute;inset:0; }
.transition-particle {
  position:absolute; width:var(--s);height:var(--s);border-radius:50%;
  left:var(--x);top:var(--y);background:rgba(255,255,255,.9);
  box-shadow:0 0 17px rgba(var(--world-rgb),.95);
  animation: intake var(--d) cubic-bezier(.4,.06,.1,1) forwards;
}
@keyframes intake {
  to { transform:translate3d(calc(50vw - var(--x)), calc(50vh - var(--y)), 0) scale(.05); opacity:0; }
}
.transition-stretch {
  position:absolute; inset:-20%;
  background:
    conic-gradient(from 0deg at 50% 50%, transparent, rgba(var(--world-rgb),.09), transparent 8%, rgba(255,255,255,.2), transparent 15%, rgba(var(--world-rgb),.09), transparent 30%);
  filter:blur(4px);
  transform:scale(.15); opacity:0;
}
.dream-transition.is-active .transition-stretch { animation: lightStretch 1.05s cubic-bezier(.2,.82,.18,1) forwards; }
@keyframes lightStretch {
  0% { transform:scale(.12) rotate(0deg); opacity:0; }
  28% { opacity:1; }
  100% { transform:scale(8) rotate(36deg); opacity:.04; }
}
.transition-blur { position:absolute;inset:0;background:radial-gradient(circle at center, transparent 0 4%, rgba(255,255,255,.08) 10%, rgba(5,4,13,.88) 60%);filter:blur(0);opacity:0; }
.dream-transition.is-active .transition-blur { animation: blurIn 1.02s ease forwards; }
@keyframes blurIn { 45% { opacity:.44; filter:blur(2px); } 100% { opacity:1; filter:blur(20px); } }

.subpage {
  position:fixed; inset:0; z-index:21; opacity:0; pointer-events:none;
  background:#090a0e; overflow:hidden;
  transition:opacity .58s cubic-bezier(.22,.72,.2,1);
}
.subpage.is-open { opacity:1; pointer-events:auto; }

/* 修改点：子页面背景同样升级为支持 WebGL 的画布布局样式 */
.subpage-bg { 
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
}
.subpage-shade { position:absolute;inset:0;background:linear-gradient(90deg,rgba(4,5,10,.86),rgba(4,5,10,.38) 63%,rgba(4,5,10,.6)),radial-gradient(circle at 68% 50%,transparent,rgba(0,0,0,.55)); }
.subpage-header { position:relative;z-index:2;display:flex;justify-content:space-between;padding:31px 43px;color:var(--muted);font-family:"Cormorant Garamond",serif;letter-spacing:.15em;font-size:12px; }
.subpage-header button{border:0;background:transparent;color:var(--paper);letter-spacing:.15em;font-family:inherit;font-size:12px;cursor:pointer;padding:0;}
.subpage-content { position:relative; z-index:2; padding:13vh 9vw; max-width:1040px; }
.subpage-eyebrow { margin:0;color:var(--muted);letter-spacing:.2em;font-size:11px; }
.subpage-content h2 { font-family:"Cormorant Garamond",serif;font-size:clamp(76px,11vw,160px);font-weight:500;letter-spacing:.08em;line-height:.83;margin:18px 0 23px; }
.subpage-content>p:not(.subpage-eyebrow) { max-width:430px; font-size:14px;line-height:2;color:var(--muted); }
.project-list { margin-top:48px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.project-list article { min-height:150px; padding:18px;border:1px solid rgba(255,255,255,.22);background:rgba(8,9,15,.22);backdrop-filter:blur(8px); }
.project-list span{font-family:"Cormorant Garamond",serif;color:var(--muted);font-size:13px;letter-spacing:.13em}
.project-list h3{font-family:"Cormorant Garamond",serif;font-size:24px;letter-spacing:.06em;font-weight:500;margin:34px 0 4px}
.project-list p{margin:0;color:var(--muted);font-size:11px}

/* 转场模糊状态现在交由 WebGL 着色器平滑插值，不再需要瞬间变动的 CSS blur 产生锯齿 */
.app.is-changing .scene-copy, .app.is-changing .topbar, .app.is-changing .scroll-hint { opacity:0; transform:translateY(8px); transition:opacity .35s ease, transform .35s ease; }

@media(max-width:720px) {
  .topbar { padding:20px 18px; }
  .brand__nyan { font-size:23px; }
  .brand__archive { font-size:14px; }
  .world-meta { display:none; }
  .scene-copy { left:7vw; top:58%; max-width:310px; }
  .scene-description { font-size:12px; }
  .scroll-hint { left:18px; bottom:19px; font-size:11px; }
  .click-hint { bottom:12vh; font-size:9px; }
  .butterfly { width:136px; top:45%; }
  .subpage-header { padding:20px 18px; font-size:10px; }
  .subpage-content { padding:17vh 8vw; }
  .project-list { grid-template-columns:1fr; margin-top:33px; }
}

@media (max-width: 820px) {
  .butterfly-wing,
  .butterfly-body,
  .return-butterfly__wing,
  .return-butterfly__body {
    background-image: url("./assets/mobile/butterfly-clean.png");
  }
}


/* ---------- Revision: visible wind-driven petal layers ---------- */
.petals { z-index: 6; }
.petal {
  top: -16vh;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(255, 206, 240, .42));
}
.petal--far {
  opacity: .28 !important;
  filter: blur(1.3px);
  animation-timing-function: linear;
}
.petal--mid {
  opacity: .72 !important;
  filter: drop-shadow(0 0 8px rgba(255, 181, 235, .52));
}
.petal--front {
  opacity: .92 !important;
  filter: blur(.15px) drop-shadow(0 0 12px rgba(255, 202, 249, .72));
  mix-blend-mode: screen;
}
.app[data-world="0"] .petal {
  background: linear-gradient(135deg, rgba(255, 197, 244, .98), rgba(173, 79, 255, .52));
}
.app[data-world="2"] .petal {
  background: linear-gradient(135deg, rgba(255, 232, 184, .98), rgba(255, 133, 175, .58));
}
.app[data-world="3"] .petal {
  background: linear-gradient(135deg, rgba(250, 255, 218, .88), rgba(186, 255, 187, .42));
}
@keyframes petalFall {
  0% {
    transform: translate3d(0, -16vh, 0) rotate(0deg) scale(.75);
    opacity: 0;
  }
  7% { opacity: var(--o); }
  72% { opacity: calc(var(--o) * .86); }
  100% {
    transform: translate3d(var(--drift), 118vh, 0) rotate(680deg) scale(1.1);
    opacity: 0;
  }
}

/* ---------- Revision: return through a distant butterfly ---------- */
.subpage-header {
  pointer-events: none;
}
.subpage-world-mark {
  margin-left: auto;
}
.return-butterfly {
  --return-x: 0px;
  --return-y: 0px;
  position: absolute;
  z-index: 5;
  right: clamp(9vw, 14vw, 19vw);
  top: 42%;
  width: clamp(78px, 7vw, 118px);
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: transparent;
  opacity: .66;
  transform: translate3d(var(--return-x), var(--return-y), 0);
  filter:
    drop-shadow(0 0 9px rgba(255,255,255,.65))
    drop-shadow(0 0 28px rgba(var(--world-rgb),.43));
  transition: opacity .55s ease, filter .55s ease, transform .7s cubic-bezier(.2,.8,.2,1);
  animation: returnFloat 5.5s ease-in-out infinite;
}
.return-butterfly::before {
  content: "";
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--world-rgb), .28), transparent 68%);
  filter: blur(14px);
  transform: scale(1.5);
}

.return-butterfly__wing,
.return-butterfly__body {
  position: absolute;
  inset: 0;
  background: url("./assets/butterfly-clean.png") center / 100% 100% no-repeat;
}

.return-butterfly__wing--left {
  clip-path: inset(0 50% 0 0);
  transform-origin: 50% 50%;
  filter: sepia(1) saturate(1.65) hue-rotate(var(--butterfly-hue, 0deg)) brightness(1.42);
  animation: returnWingLeft 4.6s cubic-bezier(.45,.03,.38,.98) infinite alternate;
}

.return-butterfly__wing--right {
  clip-path: inset(0 0 0 50%);
  transform-origin: 50% 50%;
  filter: sepia(1) saturate(1.65) hue-rotate(var(--butterfly-hue, 0deg)) brightness(1.42);
  animation: returnWingRight 4.6s cubic-bezier(.45,.03,.38,.98) infinite alternate;
}

.return-butterfly__body {
  clip-path: inset(27% 43% 7% 43%);
  filter: sepia(1) saturate(1.85) hue-rotate(var(--butterfly-hue, 0deg)) brightness(1.23) drop-shadow(0 0 7px rgba(255,255,255,.9));
}
.return-butterfly__whisper {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%);
  white-space: nowrap;
  color: rgba(255,255,255,.74);
  font-family: "Cormorant Garamond", serif;
  font-size: 10px;
  letter-spacing: .22em;
  opacity: 0;
  transition: opacity .35s ease;
}
.return-butterfly:hover,
.return-butterfly:focus-visible {
  opacity: 1;
  outline: none;
  filter:
    drop-shadow(0 0 15px rgba(255,255,255,.94))
    drop-shadow(0 0 44px rgba(var(--world-rgb),.75));
}
.return-butterfly:hover .return-butterfly__whisper,
.return-butterfly:focus-visible .return-butterfly__whisper {
  opacity: 1;
}
.subpage.is-returning .return-butterfly {
  right: 50%;
  top: 50%;
  --return-x: 50%;
  --return-y: -50%;
  transform: translate3d(50%, -50%, 0) scale(1.45);
  opacity: 1;
  animation-duration: .55s;
}
.subpage.is-returning .subpage-content,
.subpage.is-returning .subpage-header {
  opacity: 0;
  transform: scale(.965);
  filter: blur(6px);
  transition: opacity .65s ease, transform .65s ease, filter .65s ease;
}
@keyframes returnFloat {
  0%,100% { translate: 0 0; }
  50% { translate: -9px -15px; }
}
@keyframes returnWingLeft {
  to { transform: perspective(440px) rotateY(24deg) rotateZ(-1deg); }
}
@keyframes returnWingRight {
  to { transform: perspective(440px) rotateY(-24deg) rotateZ(1deg); }
}

@media(max-width:720px) {
  .return-butterfly {
    right: 11vw;
    top: 38%;
    width: 78px;
  }
}


/* ============================================================
   ARCHIVE LIST — 残留物档案样式
   ============================================================ */

.project-list {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 640px;
}

.project-list article {
  position: relative;
  padding: 40px 0;
  border: none;
  background: transparent;
  backdrop-filter: none;
  opacity: 0.35;
  filter: blur(1.2px);
  transition: opacity 1.2s ease, filter 1.2s ease, padding 0.8s ease;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.project-list article::before {
  content: attr(data-index);
  position: absolute;
  left: -48px;
  top: 40px;
  font-family: "Cormorant Garamond", serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  opacity: 0.5;
  transition: opacity 0.8s ease;
}

.project-list article:hover::before,
.project-list article.is-open::before {
  opacity: 1;
}

.project-list article:hover,
.project-list article:focus-visible,
.project-list article.is-open {
  opacity: 1;
  filter: blur(0);
  padding: 56px 0;
  outline: none;
}

.project-list:hover article:not(:hover):not(.is-open) {
  opacity: 0.12;
  filter: blur(2px);
}

.project-list h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  letter-spacing: 0.06em;
  font-weight: 500;
  margin: 0 0 8px;
  color: var(--paper);
  transition: color 0.8s ease;
}

.project-list .meta {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.project-list .meta span {
  position: relative;
}

.project-list .meta span:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.project-list .note {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 480px;
  margin: 0;
  transition: color 0.8s ease;
}

.project-list .content {
  max-height: 0;
  opacity: 0;
  filter: blur(4px);
  overflow: hidden;
  transition: max-height 1.5s cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity 1.2s ease 0.3s,
              filter 1.2s ease 0.3s;
  margin-top: 0;
}

.project-list article.is-open .content {
  max-height: 600px;
  opacity: 1;
  filter: blur(0);
  margin-top: 32px;
}

.project-list .content-inner {
  padding: 32px;
  background: rgba(8, 9, 15, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.project-list .content-inner::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(
    135deg,
    rgba(var(--world-rgb), 0.1),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

.project-list article.is-open .content-inner::before {
  opacity: 1;
}

.archive-footer {
  opacity: 0.25;
  font-size: 11px;
  letter-spacing: 0.15em;
  margin-top: 64px;
  color: var(--muted);
  font-family: "Cormorant Garamond", serif;
}

@media(max-width:720px) {
  .project-list {
    max-width: 100%;
    padding-left: 36px;
  }
  .project-list article::before { left: -36px; top: 40px; }
  .project-list article { padding: 32px 0; }
  .project-list article:hover, .project-list article.is-open { padding: 44px 0; }
  .project-list h3 { font-size: 19px; }
  .project-list .note { font-size: 12px; }
  .project-list .content-inner { padding: 20px; }
  .archive-footer { margin-top: 48px; }
}


/* ============================================================
   CLEAN RETURN HALO — does not override main butterfly opacity
   ============================================================ */
.return-butterfly {
  animation-duration: 8.5s;
  transition: opacity .7s ease, filter .7s ease, transform 1.1s cubic-bezier(.16,.82,.2,1);
}

.dream-transition.is-returning::before,
.dream-transition.is-returning::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(18vw, 180px);
  height: max(18vw, 180px);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.12);
}

.dream-transition.is-returning::before {
  border: 1px solid rgba(255,255,255,.55);
  box-shadow:
    0 0 24px rgba(255,255,255,.52),
    0 0 70px rgba(var(--world-rgb),.62),
    inset 0 0 34px rgba(var(--world-rgb),.26);
  animation: returnHaloOuter 1.95s cubic-bezier(.16,.8,.18,1) forwards;
}

.dream-transition.is-returning::after {
  background: radial-gradient(circle, rgba(255,255,255,.70) 0%, rgba(var(--world-rgb),.34) 14%, rgba(var(--world-rgb),.10) 36%, transparent 68%);
  filter: blur(8px);
  animation: returnHaloGlow 1.85s cubic-bezier(.16,.8,.18,1) forwards;
}

.dream-transition.is-returning .transition-stretch {
  opacity: 1;
  animation: returnLightOrbit 1.95s cubic-bezier(.16,.8,.18,1) forwards;
}

.dream-transition.is-returning .transition-blur {
  animation: returnBlur 1.95s ease forwards;
}

.subpage.is-returning .return-butterfly {
  right: 50%;
  top: 50%;
  transform: translate(50%, -50%) scale(1.25);
  opacity: 1;
  filter: drop-shadow(0 0 18px rgba(255,255,255,.96)) drop-shadow(0 0 54px rgba(var(--world-rgb),.80));
}

@keyframes returnHaloOuter {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.12); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(7.0); }
}
@keyframes returnHaloGlow {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.15); }
  28% { opacity: .9; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(5.5); }
}
@keyframes returnLightOrbit {
  0% { opacity: 0; transform: scale(.12) rotate(-22deg); }
  25% { opacity: 1; }
  100% { opacity: .04; transform: scale(7.5) rotate(120deg); }
}
@keyframes returnBlur {
  0% { opacity: 0; filter: blur(0); }
  35% { opacity: .52; filter: blur(4px); }
  100% { opacity: 1; filter: blur(20px); }
}


/* ============================================================
   HORIZONTAL DREAM TIMELINE
   Child interface inspired by the user's reference: one scene,
   one image, one date, one fragment at a time.
   ============================================================ */

.subpage {
  background: #0a0b11;
}

.subpage-shade {
  background:
    linear-gradient(90deg, rgba(4,5,10,.66), rgba(4,5,10,.15) 48%, rgba(4,5,10,.48)),
    radial-gradient(circle at 50% 50%, transparent 0 44%, rgba(0,0,0,.26) 100%);
}

.subpage-content.timeline-shell {
  position: absolute;
  z-index: 3;
  inset: 0;
  max-width: none;
  padding: 0;
  overflow: hidden;
}

.timeline-intro {
  position: absolute;
  z-index: 5;
  left: 8.7vw;
  top: 17vh;
  width: min(31vw, 490px);
  pointer-events: none;
  transition: opacity .65s ease, transform .65s ease, filter .65s ease;
}

.timeline-intro .subpage-eyebrow {
  margin: 0 0 13px;
  font-family: "Cormorant Garamond", serif;
  font-size: 11px;
  letter-spacing: .2em;
  color: rgba(255,255,255,.62);
}

.timeline-intro h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(64px, 7.1vw, 126px);
  line-height: .78;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--paper);
}

.timeline-intro > p:not(.subpage-eyebrow) {
  max-width: 350px;
  margin: 24px 0 0;
  color: rgba(255,255,255,.7);
  font-size: 13px;
  line-height: 2;
}

.timeline-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: ew-resize;
  touch-action: none;
}

.timeline-rail {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: min(10vw, 180px);
  padding: 0 14vw 0 42vw;
  will-change: transform;
}

.timeline-rail::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 58%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,.52) 11%,
    rgba(255,255,255,.22) 88%,
    transparent
  );
  pointer-events: none;
}

.timeline-item {
  position: relative;
  flex: 0 0 min(72vw, 1120px);
  height: min(59vh, 570px);
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 1.45fr) minmax(190px, .72fr);
  align-items: center;
  gap: clamp(22px, 3.5vw, 70px);
  padding: 0 clamp(24px, 3vw, 58px);
  opacity: .2;
  filter: blur(3px);
  transform: scale(.93);
  transition: opacity .8s ease, filter .8s ease, transform 1s cubic-bezier(.16,.8,.2,1);
}

.timeline-item.is-active {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}

.timeline-item__marker {
  position: absolute;
  left: clamp(24px, 3vw, 58px);
  top: calc(58% - 5px);
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.84);
  background: rgba(var(--world-rgb), .32);
  box-shadow: 0 0 20px rgba(var(--world-rgb), .76);
  transform: translateY(-50%);
}

.timeline-item__meta {
  align-self: start;
  padding-top: 14vh;
}

.timeline-item__date,
.timeline-item__index {
  display: block;
  font-family: "Cormorant Garamond", serif;
  letter-spacing: .16em;
  color: rgba(255,255,255,.74);
}

.timeline-item__date {
  font-size: clamp(15px, 1.25vw, 20px);
  margin-bottom: 19px;
}

.timeline-item__index {
  font-size: 10px;
  color: rgba(255,255,255,.42);
}

.timeline-item__title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(42px, 4.35vw, 78px);
  line-height: .88;
  letter-spacing: .035em;
  color: var(--paper);
}

.timeline-item__image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 4.15;
  overflow: hidden;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.24);
  box-shadow: 0 26px 70px rgba(0,0,0,.27);
  transform: translateY(-1.5vh);
}

.timeline-item__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(150deg, rgba(255,255,255,.14), transparent 38%),
    linear-gradient(0deg, rgba(0,0,0,.18), transparent 40%);
  pointer-events: none;
}

.timeline-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.055);
  transition: transform 1.4s cubic-bezier(.16,.8,.2,1), filter 1.2s ease;
  filter: saturate(.92) contrast(.98);
}

.timeline-item.is-active .timeline-item__image img {
  transform: scale(1.015);
  filter: saturate(1.05) contrast(1.02);
}

.timeline-item__copy {
  align-self: end;
  padding-bottom: 11vh;
}

.timeline-item__type {
  display: block;
  margin-bottom: 17px;
  font-family: "Cormorant Garamond", serif;
  font-size: 11px;
  letter-spacing: .18em;
  color: rgba(255,255,255,.62);
}

.timeline-item__description {
  margin: 0;
  max-width: 230px;
  color: rgba(255,255,255,.76);
  font-size: 13px;
  line-height: 1.85;
}

.timeline-status {
  position: absolute;
  z-index: 6;
  left: 8.7vw;
  bottom: 7.2vh;
  display: flex;
  gap: 12px;
  align-items: center;
  color: rgba(255,255,255,.62);
  font-family: "Cormorant Garamond", serif;
  font-size: 11px;
  letter-spacing: .16em;
  pointer-events: none;
}

.timeline-status__line {
  display: inline-block;
  width: 40px;
  height: 1px;
  background: rgba(255,255,255,.38);
}

.timeline-progress {
  position: absolute;
  z-index: 6;
  right: 8.7vw;
  bottom: 7.2vh;
  width: min(20vw, 290px);
  height: 1px;
  background: rgba(255,255,255,.22);
  pointer-events: none;
}

.timeline-progress span {
  position: absolute;
  left: 0;
  top: 0;
  height: 1px;
  width: 0%;
  background: rgba(255,255,255,.9);
  box-shadow: 0 0 10px rgba(var(--world-rgb), .92);
  transition: width .45s ease;
}

/* ARTIFACT: calmer editorial project cards. Every cover follows one 16:9 rule. */
.subpage[data-world="buffer"] .timeline-intro {
  top: 15vh;
  width: min(27vw, 410px);
}
.subpage[data-world="buffer"] .timeline-intro h2 {
  font-size: clamp(50px, 5.4vw, 92px);
}
.subpage[data-world="buffer"] .timeline-intro > p:not(.subpage-eyebrow) {
  max-width: 310px;
  margin-top: 18px;
  font-size: 11px;
  line-height: 1.8;
}
.subpage[data-world="buffer"] .timeline-item {
  flex-basis: min(76vw, 1180px);
  grid-template-columns: minmax(160px, .6fr) minmax(440px, 1.7fr) minmax(160px, .52fr);
  gap: clamp(18px, 2.6vw, 46px);
}
.subpage[data-world="buffer"] .timeline-item__title {
  font-size: clamp(30px, 3.25vw, 58px);
  line-height: .92;
}
.subpage[data-world="buffer"] .timeline-item__image,
.subpage[data-world="buffer"] .timeline-item:nth-child(1) .timeline-item__image,
.subpage[data-world="buffer"] .timeline-item:nth-child(2) .timeline-item__image,
.subpage[data-world="buffer"] .timeline-item:nth-child(3) .timeline-item__image {
  width: min(43vw, 680px);
  aspect-ratio: 16 / 9;
  height: auto;
  transform: none;
}
.subpage[data-world="buffer"] .timeline-item__copy { padding-bottom: 9vh; }
.subpage[data-world="buffer"] .timeline-item__type { margin-bottom: 11px; font-size: 9px; }
.subpage[data-world="buffer"] .timeline-item__description { max-width: 190px; font-size: 11px; line-height: 1.7; }

/* Submenus stay wordless: titles, images and motion are enough. */
.subpage #subpageBody,
.subpage .timeline-item__description { display: none; }

/* AFTERIMAGE stays nearly wordless: the image and two titles carry the page. */
.subpage[data-world="afterlight"] .subpage-header,
.subpage[data-world="afterlight"] .subpage-eyebrow,
.subpage[data-world="afterlight"] .timeline-intro > p,
.subpage[data-world="afterlight"] .timeline-item__date,
.subpage[data-world="afterlight"] .timeline-item__index,
.subpage[data-world="afterlight"] .timeline-item__type,
.subpage[data-world="afterlight"] .timeline-item__description,
.subpage[data-world="afterlight"] .timeline-item__marker,
.subpage[data-world="afterlight"] .timeline-item__enter,
.subpage[data-world="afterlight"] .timeline-status,
.subpage[data-world="afterlight"] .timeline-progress,
.subpage[data-world="afterlight"] .return-butterfly__whisper { display: none; }
.subpage[data-world="afterlight"] .timeline-intro h2,
.subpage[data-world="afterlight"] .timeline-item__title {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.07em;
}

@media (max-width: 820px) {
  .subpage[data-world="buffer"] .timeline-intro { width: 72vw; }
  .subpage[data-world="buffer"] .timeline-intro h2 { font-size: clamp(42px, 11vw, 68px); }
  .subpage[data-world="buffer"] .timeline-item { grid-template-columns: 1fr; }
  .subpage[data-world="buffer"] .timeline-item__image,
  .subpage[data-world="buffer"] .timeline-item:nth-child(1) .timeline-item__image,
  .subpage[data-world="buffer"] .timeline-item:nth-child(2) .timeline-item__image,
  .subpage[data-world="buffer"] .timeline-item:nth-child(3) .timeline-item__image { width: min(66vw, 360px); }
}

.subpage.is-returning .timeline-intro,
.subpage.is-returning .timeline-status,
.subpage.is-returning .timeline-progress,
.subpage.is-returning .timeline-item {
  opacity: 0;
  filter: blur(6px);
  transition: opacity .55s ease, filter .55s ease;
}

@media (max-width: 820px) {
  .timeline-intro {
    left: 7vw;
    top: 15vh;
    width: min(78vw, 430px);
  }

  .timeline-intro h2 {
    font-size: clamp(54px, 12vw, 90px);
  }

  .timeline-intro > p:not(.subpage-eyebrow) {
    font-size: 12px;
  }

  .timeline-rail {
    gap: 8vw;
    padding: 0 16vw 0 17vw;
  }

  .timeline-item {
    flex-basis: 82vw;
    height: 54vh;
    min-height: 390px;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 16px;
    padding: 50px 14px 20px;
  }

  .timeline-rail::before {
    top: 70%;
  }

  .timeline-item__marker {
    left: 14px;
    top: calc(70% - 5px);
  }

  .timeline-item__meta {
    padding: 0;
  }

  .timeline-item__title {
    font-size: 42px;
  }

  .timeline-item__image {
    width: min(54vw, 330px);
    justify-self: center;
    aspect-ratio: 1 / 1.05;
    transform: none;
  }

  .timeline-item__copy {
    padding: 0;
    justify-self: end;
    width: 52%;
  }

  .timeline-item__description {
    font-size: 11px;
  }

  .timeline-status {
    left: 7vw;
    bottom: 5.2vh;
    font-size: 9px;
  }

  .timeline-progress {
    right: 7vw;
    bottom: 5.2vh;
    width: 26vw;
  }
}


/* Main entrances: keep the world visual unobstructed. */
.scene-copy {
  display: none !important;
}


/* ============================================================
   TIMELINE COMPOSITION UPDATE
   Desktop: each chapter lands at a slightly different height.
   Mobile: cards become a vertical visual rhythm inside horizontal drift.
   ============================================================ */

/* Create a deliberate, quiet stagger — like fragments floating at different depths. */
.timeline-item:nth-child(1) {
  transform: translateY(-5.5vh) scale(.93);
}

.timeline-item:nth-child(2) {
  transform: translateY(4vh) scale(.93);
}

.timeline-item:nth-child(3) {
  transform: translateY(-1vh) scale(.93);
}

.timeline-item:nth-child(4) {
  transform: translateY(6vh) scale(.93);
}

.timeline-item:nth-child(5) {
  transform: translateY(-4vh) scale(.93);
}

.timeline-item:nth-child(1).is-active {
  transform: translateY(-5.5vh) scale(1);
}

.timeline-item:nth-child(2).is-active {
  transform: translateY(4vh) scale(1);
}

.timeline-item:nth-child(3).is-active {
  transform: translateY(-1vh) scale(1);
}

.timeline-item:nth-child(4).is-active {
  transform: translateY(6vh) scale(1);
}

.timeline-item:nth-child(5).is-active {
  transform: translateY(-4vh) scale(1);
}

/* A little more editorial imbalance in the image block itself. */
.timeline-item:nth-child(1) .timeline-item__image,
.timeline-item:nth-child(3) .timeline-item__image {
  transform: translateY(-3.5vh);
}

.timeline-item:nth-child(2) .timeline-item__image,
.timeline-item:nth-child(4) .timeline-item__image {
  transform: translateY(2.5vh);
}

/* Mobile timeline: preserve sideways travel, but make every chapter readable,
   centered and comfortably layered on a narrow screen. */
@media (max-width: 820px) {
  .subpage-header {
    padding: 18px 18px;
  }

  .timeline-intro {
    left: 7vw;
    top: 12vh;
    width: 76vw;
  }

  .timeline-intro h2 {
    font-size: clamp(50px, 13vw, 76px);
    line-height: .82;
  }

  .timeline-intro > p:not(.subpage-eyebrow) {
    display: none;
  }

  .timeline-viewport {
    top: 12vh;
  }

  .timeline-rail {
    align-items: center;
    gap: 9vw;
    padding: 0 18vw 0 11vw;
  }

  .timeline-rail::before {
    top: 73%;
    left: 5vw;
    right: 5vw;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(255,255,255,.38) 10%,
      rgba(255,255,255,.18) 92%,
      transparent
    );
  }

  .timeline-item {
    flex-basis: 78vw;
    min-height: 440px;
    height: 61vh;
    padding: 38px 8px 20px;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 10px;
  }

  .timeline-item:nth-child(1),
  .timeline-item:nth-child(2),
  .timeline-item:nth-child(3),
  .timeline-item:nth-child(4),
  .timeline-item:nth-child(5) {
    transform: translateY(0) scale(.93);
  }

  .timeline-item:nth-child(1).is-active,
  .timeline-item:nth-child(2).is-active,
  .timeline-item:nth-child(3).is-active,
  .timeline-item:nth-child(4).is-active,
  .timeline-item:nth-child(5).is-active {
    transform: translateY(0) scale(1);
  }

  .timeline-item__marker {
    left: 8px;
    top: calc(73% - 5px);
  }

  .timeline-item__meta {
    padding: 0 10px;
  }

  .timeline-item__date {
    margin-bottom: 10px;
    font-size: 13px;
  }

  .timeline-item__index {
    font-size: 9px;
  }

  .timeline-item__title {
    margin-top: 11px;
    font-size: clamp(36px, 10vw, 52px);
    line-height: .9;
    max-width: 95%;
  }

  .timeline-item__image,
  .timeline-item:nth-child(1) .timeline-item__image,
  .timeline-item:nth-child(2) .timeline-item__image,
  .timeline-item:nth-child(3) .timeline-item__image,
  .timeline-item:nth-child(4) .timeline-item__image {
    width: min(57vw, 308px);
    height: auto;
    justify-self: center;
    aspect-ratio: 1 / 1.03;
    transform: translateY(-1vh);
  }

  .timeline-item__copy {
    width: 70%;
    justify-self: end;
    padding: 0 8px 6px 0;
  }

  .timeline-item__type {
    margin-bottom: 9px;
    font-size: 9px;
    letter-spacing: .15em;
  }

  .timeline-item__description {
    font-size: 11px;
    line-height: 1.65;
    max-width: 100%;
  }

  .timeline-status {
    left: 7vw;
    bottom: 4.2vh;
    font-size: 9px;
  }

  .timeline-status__line {
    width: 24px;
  }

  .timeline-progress {
    right: 7vw;
    bottom: 4.2vh;
    width: 28vw;
  }

  /* Make return butterfly reachable and visually quiet on phones. */
  .return-butterfly {
    right: 7vw;
    top: 18vh;
    width: 68px;
  }

  .return-butterfly__whisper {
    font-size: 8px;
    top: calc(100% + 6px);
  }
}

@media (max-width: 430px) {
  .timeline-intro {
    top: 10vh;
  }

  .timeline-item {
    flex-basis: 81vw;
    min-height: 415px;
    height: 60vh;
  }

  .timeline-item__image,
  .timeline-item:nth-child(1) .timeline-item__image,
  .timeline-item:nth-child(2) .timeline-item__image,
  .timeline-item:nth-child(3) .timeline-item__image {
    width: 55vw;
  }

  .timeline-item__copy {
    width: 76%;
  }
}


/* Mobile background correction:
   keep the WebGL canvas full-screen and let the shader handle the portrait crop. */
@media (max-width: 820px) {
  .subpage-bg,
  .world-bg {
    width: 100vw;
    height: 100svh;
  }

  .timeline-viewport {
    top: 0;
    padding-top: 12vh;
  }
}


/* ============================================================
   BUFFER PROJECT PORTALS — 16:9 covers + black-hole intake
   ============================================================ */
.timeline-item--link { cursor: pointer; }
.timeline-item--link:focus-visible { outline: 1px solid rgba(255,255,255,.8); outline-offset: 8px; }

.timeline-item__image {
  overflow: hidden;
  background: rgba(5,6,13,.32);
}

.timeline-item__image--vimeo,
.timeline-item__image--liquid,
.timeline-item__image--placeholder {
  width: min(42vw, 680px);
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  position: relative;
  isolation: isolate;
  box-shadow: 0 18px 58px rgba(0,0,0,.25), 0 0 0 1px rgba(255,255,255,.14);
}

.timeline-item__image--vimeo iframe,
.timeline-item__image--liquid iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  transform: scale(1.012);
}

.timeline-item__image--liquid iframe {
  filter: saturate(1.18) contrast(1.08);
}

.timeline-item__image--vimeo::after,
.timeline-item__image--liquid::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(255,255,255,.08), transparent 30%, rgba(5,4,14,.22));
  pointer-events: none;
  transition: opacity .65s ease;
}

.timeline-item__hit {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: block;
  cursor: pointer;
}

.timeline-item__enter {
  position: absolute;
  z-index: 5;
  left: 18px;
  bottom: 16px;
  display: flex;
  gap: 9px;
  align-items: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 11px;
  letter-spacing: .18em;
  color: rgba(255,255,255,.88);
  text-shadow: 0 1px 12px rgba(0,0,0,.7);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .45s ease, transform .45s ease;
}

.timeline-item--link:hover .timeline-item__enter,
.timeline-item--link.is-active .timeline-item__enter,
.timeline-item--link:focus-visible .timeline-item__hit {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: block;
  cursor: pointer;
}

.timeline-item__enter {
  opacity: 1;
  transform: translateY(0);
}
.timeline-item__enter b { font-size: 16px; font-weight: 400; }

.timeline-item__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(221,185,255,.13), transparent 20%),
    linear-gradient(135deg, rgba(255,255,255,.035), transparent 42%, rgba(138,83,224,.12));
}
.timeline-item__placeholder::before,
.timeline-item__placeholder::after {
  content: "";
  position: absolute;
  width: 38%;
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.23);
  border-radius: 50%;
  animation: poemOrbit 9s linear infinite;
}
.timeline-item__placeholder::after { width: 70%; animation-duration: 14s; animation-direction: reverse; opacity: .38; }
.timeline-item__placeholder span {
  position: relative;
  z-index: 1;
  font-family: "Cormorant Garamond",serif;
  text-align: center;
  font-size: clamp(17px,1.6vw,24px);
  font-weight: 500;
  letter-spacing: .22em;
  line-height: 1.05;
  color: rgba(255,255,255,.75);
}
@keyframes poemOrbit { to { transform: rotate(360deg) scale(1.28); } }

.project-blackhole {
  position: fixed;
  z-index: 9999;
  left: var(--portal-x);
  top: var(--portal-y);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%,-50%) scale(.1);
  opacity: 0;
  background:
    radial-gradient(circle, #000 0 12%, rgba(0,0,0,.98) 22%, rgba(0,0,0,.92) 37%, rgba(30,8,47,.55) 48%, transparent 67%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.45),
    0 0 34px rgba(225,168,255,.7),
    0 0 120px rgba(55,0,90,.95);
  transition: transform .52s cubic-bezier(.64,0,.22,1), opacity .12s ease;
}
.project-blackhole::before {
  content: "";
  position:absolute;
  inset:-55%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, rgba(255,255,255,.9), transparent 12%, rgba(197,115,255,.48), transparent 35%, rgba(255,255,255,.7), transparent 62%);
  filter: blur(3px);
  animation: blackholeSpin .72s linear infinite;
}
.project-blackhole.is-opening { opacity: 1; transform: translate(-50%,-50%) scale(210); }
@keyframes blackholeSpin { to { transform: rotate(360deg); } }

@media(max-width:820px) {
  .timeline-item__image--vimeo,
  .timeline-item__image--liquid,
  .timeline-item__image--placeholder {
    width: min(67vw, 390px) !important;
    aspect-ratio: 16 / 9 !important;
    transform: translateY(-1vh) !important;
  }
}


/* CLICK FIX — each active Buffer work has a real full-card anchor.
   It sits above the preview iframe and is excluded from the timeline drag handler. */
.timeline-item__project-link {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: block;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.timeline-item--link > :not(.timeline-item__project-link) {
  pointer-events: none;
}
.timeline-item--link:focus-within {
  outline: 1px solid rgba(255,255,255,.9);
  outline-offset: 8px;
}

/* BUFFER / Concrete Poem cover */
.timeline-item__image--poem {
  overflow: hidden;
  background: radial-gradient(circle at 54% 44%, rgba(229,222,242,.12), rgba(10,10,15,.95) 60%);
}
.timeline-item__poem-cover { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.5vw; color:rgba(247,245,241,.86); font-family:"Cormorant Garamond",serif; overflow:hidden; }
.timeline-item__poem-cover span:first-child { font-size:clamp(24px,3.2vw,54px); letter-spacing:.18em; line-height:.8; }
.timeline-item__poem-cover span:nth-child(2) { font-size:clamp(11px,1.15vw,18px); letter-spacing:.24em; opacity:.6; }
.timeline-item__poem-cover::before { content:""; position:absolute; inset:-15%; background:radial-gradient(circle at 50% 50%, rgba(255,255,255,.18) 0 1px, transparent 2px) 0 0 / 26px 26px; opacity:.22; animation: poemField 13s linear infinite; }
.timeline-item__poem-cover i,.timeline-item__poem-cover b { position:absolute; border:1px solid rgba(255,255,255,.16); border-radius:50%; width:58%; aspect-ratio:1; animation: poemOrbit 10s linear infinite; }
.timeline-item__poem-cover b { width:82%; animation-duration:17s; animation-direction:reverse; opacity:.48; }
@keyframes poemField { to { transform:translate3d(-26px,-26px,0); } }
@keyframes poemOrbit { to { transform:rotate(360deg) scale(1.08); } }
