/* ==================== zhuyuxin.com — Editorial Gallery ==================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f4f1ea;          /* warm paper */
  --bg-deep: #ebe6dc;     /* deeper paper */
  --ink: #1a1814;         /* sumi ink */
  --ink-soft: #3a352c;
  --ink-dim: #6b6457;
  --ink-faint: #a89e8a;
  --accent: #8b1a1a;      /* seal red */
  --accent-soft: #b85450;
  --gold: #a8843a;
  --rule: rgba(26, 24, 20, 0.12);
  --rule-soft: rgba(26, 24, 20, 0.06);

  --serif: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --serif-display: 'Instrument Serif', 'Cormorant Garamond', serif;
  --sans: 'Inter Tight', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --cn: 'Noto Serif SC', 'Songti SC', serif;

  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1440px;
}

html { scroll-behavior: smooth; }

/* ── Themed cursor ── */
.themed-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 64px; height: 64px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.22s ease;
  filter: drop-shadow(0 4px 10px rgba(26, 24, 20, 0.18));
  will-change: transform, opacity;
}
.themed-cursor.is-visible { opacity: 1; }
.themed-cursor svg { width: 100%; height: 100%; display: block; }
/* When themed cursor active over a node, hide the system cursor */
[data-cursor]:hover { cursor: none; }
[data-cursor]:hover * { cursor: none; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 350;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
}
@media (max-width: 900px) { body { cursor: auto; } }

::selection { background: var(--ink); color: var(--bg); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(26,24,20,0.25); border-radius: 3px; }
/* Firefox: standard scrollbar styling — matches the WebKit thumb above */
html { scrollbar-color: rgba(26,24,20,0.25) var(--bg); scrollbar-width: thin; }

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }

/* ==================== WebGL Backdrop ==================== */
#ink-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; opacity: 0.55;
}

/* paper grain */
#paper-grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  mix-blend-mode: multiply; opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* ==================== Custom Cursor ==================== */
.cursor {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 99999;
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 6px; height: 6px; background: #fff; border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s;
}
.cursor-ring {
  width: 36px; height: 36px; border: 1px solid rgba(255,255,255,0.6);
  border-radius: 50%; transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s, opacity 0.3s;
}
.cursor.hover .cursor-dot { width: 0; height: 0; }
.cursor.hover .cursor-ring { width: 60px; height: 60px; border-color: rgba(255,255,255,0.9); }

/* ==================== Loading ==================== */
#loader {
  position: fixed; inset: 0; z-index: 10000; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 24px;
  transition: opacity 0.9s cubic-bezier(0.7, 0, 0.3, 1), visibility 0.9s;
}
#loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
#loader .seal {
  width: 80px; height: 80px;
  background: var(--accent); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--bg); font-family: var(--cn); font-size: 28px;
  letter-spacing: 0.05em;
  animation: sealIn 1s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(139, 26, 26, 0.2);
}
#loader .ldr-name {
  font-family: var(--serif-display); font-style: italic;
  font-size: 36px; color: var(--ink);
  opacity: 0; animation: fadeIn 0.8s 0.4s forwards;
}
#loader .ldr-bar {
  width: 80px; height: 1px; background: var(--rule);
  position: relative; overflow: hidden;
}
#loader .ldr-bar::after {
  content: ''; position: absolute; left: 0; top: 0; width: 0; height: 100%;
  background: var(--ink); animation: progress 2s 0.6s forwards;
}

/* Loader entry buttons — fade in once the seal + progress bar finish, so the
   visitor explicitly chooses sound on/off (no autoplay friction, no surprise).
   Buttons set `aria-hidden=false` and `is-ready` from JS once BGM is buffered. */
#loader .ldr-actions {
  margin-top: 18px;
  display: flex; gap: 14px; align-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.6s ease;
}
#loader .ldr-actions.is-ready {
  opacity: 1; pointer-events: auto;
}
#loader .ldr-btn {
  appearance: none; -webkit-appearance: none;
  font: inherit; cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  display: inline-flex; flex-direction: column; align-items: center;
  line-height: 1.2;
}
#loader .ldr-btn-primary {
  background: var(--accent); color: var(--bg);
  border: 1px solid var(--accent);
  padding: 12px 22px;
  font-family: var(--sans); font-size: 14px; letter-spacing: 0.02em;
  box-shadow: 0 6px 18px rgba(139, 26, 26, 0.18);
}
#loader .ldr-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(139, 26, 26, 0.26); }
#loader .ldr-btn-primary:active { transform: translateY(0); }
#loader .ldr-btn-primary .ldr-btn-emph { font-style: italic; font-family: var(--serif-display); font-size: 16px; margin-left: 2px; }
#loader .ldr-btn-primary .ldr-btn-hint {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em;
  text-transform: uppercase; opacity: 0.75; margin-top: 4px;
}
#loader .ldr-btn-ghost {
  background: transparent; color: var(--ink-dim);
  border: 1px solid var(--rule);
  padding: 12px 18px;
  font-family: var(--sans); font-size: 13px; letter-spacing: 0.02em;
}
#loader .ldr-btn-ghost:hover { color: var(--ink); border-color: var(--ink-dim); }
#loader .ldr-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 600px) {
  #loader .ldr-actions { flex-direction: column; gap: 10px; width: 80%; max-width: 280px; }
  #loader .ldr-btn { width: 100%; }
}
@keyframes sealIn {
  from { transform: scale(0.6) rotate(-10deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes fadeIn { to { opacity: 1; } }
@keyframes progress { to { width: 100%; } }

/* ==================== Nav ==================== */
nav.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.5s, backdrop-filter 0.5s, padding 0.4s;
  border-bottom: 1px solid transparent;
}
nav.top.scrolled {
  background: rgba(244, 241, 234, 0.85);
  backdrop-filter: blur(20px) saturate(1.1);
  border-bottom-color: var(--rule);
  padding: 14px var(--gutter);
}
nav.top .brand {
  display: flex; align-items: center; gap: 10px;
}
nav.top .brand .name {
  font-family: var(--serif-display); font-style: italic;
  font-size: 22px; color: var(--ink);
  line-height: 1;
}
nav.top .brand .name .zhu { color: var(--accent); }
.hero-name .zhu { color: var(--accent); }
nav.top .brand .seal-mark {
  width: 18px; height: 18px; background: var(--accent); border-radius: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--cn); color: #f8f3e8;
  font-size: 11px; line-height: 1; letter-spacing: 0;
  flex: none;
}
nav.top .links { display: flex; gap: 28px; align-items: center; }
nav.top .links a {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-dim);
  position: relative; transition: color 0.3s;
}
nav.top .links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 1px;
  background: var(--ink); transition: width 0.3s;
}
nav.top .links a:hover, nav.top .links a.active { color: var(--ink); }
nav.top .links a:hover::after, nav.top .links a.active::after { width: 100%; }
/* Hamburger button — desktop hides it, mobile shows it. */
.nav-burger {
  display: none;
  appearance: none; -webkit-appearance: none;
  background: transparent; border: 1px solid var(--rule);
  width: 40px; height: 40px;
  border-radius: 6px;
  padding: 0; margin-left: auto;
  cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav-burger:hover { border-color: var(--ink-dim); }
.nav-burger span {
  display: block; width: 18px; height: 1.5px;
  background: var(--ink); border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.2s ease;
  transform-origin: center;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-burger { display: inline-flex; }
  /* Collapse the desktop link row off-canvas; the menu opens as a drop-down. */
  nav.top .links {
    position: absolute;
    top: calc(100% + 1px); right: 12px; left: 12px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg);
    border: 1px solid var(--rule);
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(20, 18, 14, 0.18);
    padding: 8px;
    opacity: 0; transform: translateY(-8px); pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    max-height: calc(100vh - 80px); overflow-y: auto;
  }
  nav.top .links.is-open {
    opacity: 1; transform: translateY(0); pointer-events: auto;
  }
  nav.top .links a {
    display: block; padding: 12px 14px; font-size: 14px;
    border-radius: 4px;
    color: var(--ink);
  }
  nav.top .links a::after { display: none; } /* drop the hover underline on mobile */
  nav.top .links a:hover, nav.top .links a:focus-visible { background: var(--bg-deep); }
  nav.top .links a.cta {
    margin-top: 4px; padding: 12px 14px;
    color: var(--accent);
  }
  nav.top .links .amb-nav-toggle {
    margin-top: 6px; align-self: stretch; justify-content: center;
  }
}

/* Ambient sound toggle in nav */
.amb-nav-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--rule);
  padding: 6px 12px 6px 10px; border-radius: 999px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-dim);
  cursor: pointer; transition: all 0.3s ease;
  margin-left: 4px;
}
.amb-nav-toggle:hover { color: var(--ink); border-color: var(--ink); }
.amb-nav-toggle.is-on { color: var(--accent); border-color: rgba(139,26,26,0.35); }
.amb-nav-toggle .amb-nav-wave {
  display: inline-flex; align-items: center; gap: 2px; height: 12px;
}
.amb-nav-toggle .amb-nav-wave i {
  width: 2px; height: 4px; background: currentColor; border-radius: 1px;
  opacity: 0.5; transition: height 0.3s, opacity 0.3s;
}
.amb-nav-toggle.is-on .amb-nav-wave i {
  opacity: 1;
  animation: ambWave 1.4s ease-in-out infinite;
}
.amb-nav-toggle.is-on .amb-nav-wave i:nth-child(1) { animation-delay: 0s; }
.amb-nav-toggle.is-on .amb-nav-wave i:nth-child(2) { animation-delay: 0.2s; }
.amb-nav-toggle.is-on .amb-nav-wave i:nth-child(3) { animation-delay: 0.4s; }
.amb-nav-toggle.is-on .amb-nav-wave i:nth-child(4) { animation-delay: 0.6s; }
@keyframes ambWave {
  0%, 100% { height: 3px; }
  50%      { height: 11px; }
}
@media (max-width: 768px) {
  .amb-nav-toggle .amb-nav-label { display: none; }
  .amb-nav-toggle { padding: 6px 10px; }
}

/* ==================== Layout ==================== */
#content { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; }

section {
  padding: clamp(80px, 14vh, 160px) var(--gutter);
  position: relative;
}
#hero { padding: 0 !important; }
section + section { border-top: 1px solid var(--rule-soft); }

.section-meta {
  display: flex; align-items: center; gap: 16px; margin-bottom: 32px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-dim);
}
.section-meta .num { color: var(--accent); font-weight: 500; }
.section-meta .rule { flex: 1; height: 1px; background: var(--rule); max-width: 80px; }

h1, h2, h3 { font-family: var(--serif-display); font-weight: 400; letter-spacing: -0.01em; }
h1 { font-size: clamp(56px, 9vw, 140px); line-height: 0.95; font-style: italic; }
h2 { font-size: clamp(40px, 5.5vw, 80px); line-height: 1.05; }
h3 { font-size: clamp(22px, 2vw, 30px); line-height: 1.2; font-style: italic; }

.body-text { font-size: clamp(15px, 1.1vw, 18px); line-height: 1.75; color: var(--ink-soft); max-width: 56ch; font-weight: 350; }
.tagline { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2vw, 26px); line-height: 1.45; color: var(--ink-soft); max-width: 36ch; }

/* ==================== Hero (with integrated 3D) ==================== */
#hero {
  /* Landing (1vh) + morph zone (3vh) */
  position: relative;
  padding: 0;
}

/* Zone 1: hero landing — architectural calligraphy stage */
#hero .hero-landing {
  position: relative;
  height: 100vh;
  height: 100dvh; /* iOS Safari: dvh excludes the address bar so the hero doesn't jump on scroll */
  display: flex; flex-direction: column;
  padding: clamp(120px, 20vh, 200px) var(--gutter) 0;
  background:
    radial-gradient(ellipse 80% 60% at 30% 30%, rgba(255,250,240,0.6) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(139,26,26,0.04) 0%, transparent 60%),
    linear-gradient(180deg, #f6f2ea 0%, #efe9dd 100%);
  z-index: 2;
  overflow: hidden;
  isolation: isolate;
}

/* Architectural calligraphy grid SVG behind everything. */
#hero .hero-grid-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
  animation: hgbDrift 22s ease-in-out infinite alternate;
}
#hero .hero-grid-bg .hgb-frame {
  stroke: #1a1814;
  stroke-opacity: 0.18;
  stroke-width: 1.2;
  stroke-dasharray: 920;
  stroke-dashoffset: 920;
  animation: hgbDraw 3.5s cubic-bezier(0.6,0,0.2,1) 0.3s forwards;
}
#hero .hero-grid-bg .hgb-h,
#hero .hero-grid-bg .hgb-v {
  stroke: #1a1814;
  stroke-opacity: 0.12;
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: hgbDraw 2.4s cubic-bezier(0.6,0,0.2,1) 0.9s forwards;
}
#hero .hero-grid-bg .hgb-d1,
#hero .hero-grid-bg .hgb-d2 {
  stroke: #8b1a1a;
  stroke-opacity: 0.18;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: hgbDraw 3s cubic-bezier(0.6,0,0.2,1) 1.4s forwards;
}
#hero .hero-grid-bg .hgb-cells > g:nth-child(2) .hgb-frame { animation-delay: 0.6s; }
#hero .hero-grid-bg .hgb-cells > g:nth-child(3) .hgb-frame { animation-delay: 0.9s; }
#hero .hero-grid-bg .hgb-cells > g:nth-child(2) .hgb-h,
#hero .hero-grid-bg .hgb-cells > g:nth-child(2) .hgb-v { animation-delay: 1.2s; }
#hero .hero-grid-bg .hgb-cells > g:nth-child(3) .hgb-h,
#hero .hero-grid-bg .hgb-cells > g:nth-child(3) .hgb-v { animation-delay: 1.5s; }

@keyframes hgbDraw {
  to { stroke-dashoffset: 0; }
}
@keyframes hgbDrift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-12px, -8px) scale(1.015); }
}

/* Ink-wash ambient — diluted sumi washes drifting on damp paper.
   Organic, asymmetric shapes in warm grey-brown tones. */
#hero .hero-orbs {
  position: absolute; inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
#hero .hero-orbs .ho {
  position: absolute;
  filter: blur(80px);
  mix-blend-mode: multiply;
  opacity: 0.3;
}
/* Top-left: large warm sumi wash, slightly elongated */
#hero .hero-orbs .ho-1 {
  width: 600px; height: 420px;
  left: -140px; top: -80px;
  border-radius: 58% 42% 65% 35% / 45% 55% 45% 55%;
  background: radial-gradient(ellipse at 40% 50%, rgba(62, 52, 38, 0.28), rgba(62, 52, 38, 0) 72%);
  animation: inkWash1 28s ease-in-out infinite;
}
/* Right side: lighter diluted wash, almost breath-like */
#hero .hero-orbs .ho-2 {
  width: 480px; height: 360px;
  right: 4%; top: 22%;
  border-radius: 42% 58% 35% 65% / 55% 40% 60% 45%;
  background: radial-gradient(ellipse at 55% 45%, rgba(88, 76, 58, 0.18), rgba(88, 76, 58, 0) 70%);
  animation: inkWash2 34s ease-in-out infinite;
}
/* Bottom: faint cinnabar echo — nods to 朱 without being obvious */
#hero .hero-orbs .ho-3 {
  width: 340px; height: 280px;
  left: 32%; bottom: -60px;
  border-radius: 55% 45% 50% 50% / 40% 60% 40% 60%;
  background: radial-gradient(ellipse at 50% 50%, rgba(120, 48, 32, 0.12), rgba(120, 48, 32, 0) 68%);
  animation: inkWash3 40s ease-in-out infinite;
}
/* Top-right edge: barely-there warm mist */
#hero .hero-orbs .ho-4 {
  width: 280px; height: 200px;
  right: -40px; top: -20px;
  border-radius: 45% 55% 48% 52% / 52% 48% 55% 45%;
  background: radial-gradient(ellipse at 60% 40%, rgba(168, 148, 110, 0.14), rgba(168, 148, 110, 0) 65%);
  animation: inkWash4 26s ease-in-out infinite;
}

/* Paper grain — subtle noise texture over the hero */
#hero .hero-grain {
  position: absolute; inset: 0;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  mix-blend-mode: multiply;
}

/* Ink diffusion keyframes — slow, organic, asymmetric drift */
@keyframes inkWash1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  33%      { transform: translate(40px, 20px) rotate(2deg) scale(1.04); }
  66%      { transform: translate(-20px, 35px) rotate(-1deg) scale(0.97); }
}
@keyframes inkWash2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  40%      { transform: translate(-50px, 18px) rotate(-2deg); }
  70%      { transform: translate(-20px, -15px) rotate(1.5deg); }
}
@keyframes inkWash3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(30px, -25px) scale(1.06); }
}
@keyframes inkWash4 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50%      { transform: translate(-15px, 12px) rotate(3deg); }
}

/* Vertical 朱雨芯 seal column — right edge, like a hanging scroll signature. */
#hero .hero-vcolumn {
  position: absolute;
  right: clamp(20px, 4vw, 56px);
  top: clamp(140px, 18vh, 220px);
  bottom: clamp(140px, 16vh, 200px);
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  z-index: 1;
  pointer-events: none;
}
#hero .hero-vcolumn .hvc-line {
  width: 1px; flex: 0 0 60px;
  background: linear-gradient(180deg, transparent, var(--ink-faint));
  animation: hvcLineGrow 2s 0.4s cubic-bezier(0.6,0,0.2,1) backwards;
  transform-origin: top;
}
#hero .hero-vcolumn .hvc-stamp {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 14px;
  background: rgba(248, 244, 235, 0.42);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.7),
    inset 0 -1px 0 rgba(26,24,20,0.04),
    0 8px 32px rgba(26,24,20,0.06);
}
#hero .hero-vcolumn .hvc-ch {
  font-family: var(--cn);
  font-size: clamp(20px, 2vw, 26px);
  color: var(--ink-soft);
  line-height: 1;
  opacity: 0;
  animation: hvcChIn 0.8s cubic-bezier(0.16,1,0.3,1) forwards;
}
#hero .hero-vcolumn .hvc-ch:nth-child(1) { animation-delay: 1.4s; }
#hero .hero-vcolumn .hvc-ch:nth-child(2) { animation-delay: 1.7s; }
#hero .hero-vcolumn .hvc-ch:nth-child(3) { animation-delay: 2.0s; }
#hero .hero-vcolumn .hvc-ch.hvc-ch-zhu {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.4em; height: 1.4em;
  background: var(--accent);
  color: #f8f3e8;
  border-radius: 3px;
  font-size: clamp(15px, 1.5vw, 18px);
  box-shadow: 0 4px 12px rgba(139,26,26,0.25);
}
#hero .hero-vcolumn .hvc-line + .hvc-stamp + .hvc-meta {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.25em;
  color: var(--ink-faint);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  opacity: 0;
  animation: hvcChIn 0.8s 2.4s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes hvcLineGrow {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}
@keyframes hvcChIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (max-width: 1100px) {
  #hero .hero-vcolumn { display: none; }
}

#hero .hero-landing .hero-grid {
  flex: 1;
  display: grid; grid-template-columns: 1fr; gap: 40px;
  align-items: end; align-content: end;
  padding-bottom: 12vh;
  position: relative;
  z-index: 2;
}
@media (min-width: 900px) {
  #hero .hero-landing .hero-grid { grid-template-columns: 1.4fr 1fr; gap: 80px; }
}

/* Liquid glass treatment on the tagline panel. */
#hero .hero-tagline-glass {
  position: relative;
  padding: clamp(20px, 2.5vw, 32px) clamp(22px, 2.5vw, 36px);
  background: linear-gradient(135deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.15) 100%);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    inset 0 -1px 0 rgba(26,24,20,0.04),
    0 12px 40px -8px rgba(26,24,20,0.10);
  overflow: hidden;
}
#hero .hero-tagline-glass::before {
  /* Specular highlight — Apple-ish "liquid" sheen along the top-left edge. */
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.45) 0%, transparent 35%);
  pointer-events: none;
}
#hero .hero-tagline-glass::after {
  /* Removed — was a faint red wash in the bottom-right corner. */
  display: none;
}

/* Zone 2: morph zone — tall scroll area; #name-3d sticks inside */
#hero .hero-morph {
  position: relative;
  height: 300vh;
}

/* Ambient sound toggle — sits sticky in the morph zone, quiet until hovered. */
#hero .amb-toggle {
  position: sticky;
  top: 24px;
  margin-left: 24px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 10px;
  background: rgba(248, 244, 235, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--ink-faint);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.3s, color 0.3s, border-color 0.3s, transform 0.3s;
  float: left;
}
#hero .amb-toggle:hover { opacity: 1; color: var(--ink); }
#hero .amb-toggle.is-on {
  opacity: 1;
  color: var(--accent);
  border-color: color-mix(in oklch, var(--accent) 50%, transparent);
}
#hero .amb-toggle .amb-icon { flex: none; }
#hero .amb-toggle .amb-label { line-height: 1; }
@media (max-width: 700px) {
  #hero .amb-toggle { top: 14px; margin-left: 14px; padding: 6px 10px 6px 8px; }
  #hero .amb-toggle .amb-label { display: none; }
}

#hero .hero-morph #name-3d {
  position: sticky; top: 0;
  width: 100%; height: 100vh;
  height: 100dvh;
  z-index: 0;
  pointer-events: none;
}
#hero .etym-readout {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  margin-top: -100vh;
  margin-top: -100dvh;
  z-index: 2;
  pointer-events: auto;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 80px var(--gutter) 64px;
  gap: 28px;
}

#hero .hero-left { position: relative; }
#hero .hero-right { align-self: end; padding-bottom: 8px; }
#hero .hero-name {
  font-family: var(--serif-display); font-style: italic; font-weight: 400;
  font-size: clamp(72px, 11vw, 180px); line-height: 0.92;
  letter-spacing: -0.02em; color: var(--ink);
  /* Italic capital Z's bottom-left swash drops below the line-height: 0.92 box.
     Without this padding the red 朱 seal in .hero-cn (which is the first char
     and sits at the left edge, right below the Z) overlaps and visually clips
     that swash, especially on mobile where the layout is tightest. */
  padding-bottom: 0.18em;
}
@media (max-width: 700px) {
  /* Mobile needs much more room: the italic Z swash is generous in this font
     and the 朱 seal sits directly below at the left edge. Be aggressive. */
  #hero .hero-name { padding-bottom: 0.55em; }
  #hero .hero-cn { margin-top: 32px; }
}
#hero .hero-cn {
  font-family: var(--cn); font-style: normal; font-weight: 400;
  font-size: clamp(24px, 3vw, 40px); letter-spacing: 0.2em;
  color: var(--ink-faint); margin-top: 12px;
  display: inline-block; position: relative;
}
#hero .hero-cn .seal {
  display: inline-block; width: 18px; height: 18px; background: var(--accent);
  border-radius: 2px; margin-left: 14px; vertical-align: middle;
  font-family: var(--cn); color: var(--bg); font-size: 11px;
  text-align: center; line-height: 18px; letter-spacing: 0;
}
#hero .hero-meta {
  margin-top: clamp(24px, 4vh, 48px);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-dim);
  display: flex; gap: 16px; flex-wrap: wrap;
}
#hero .hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
#hero .hero-meta .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
#hero .hero-tagline {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(22px, 2.4vw, 32px); line-height: 1.4;
  color: var(--ink-soft); max-width: 22ch;
}
#hero .hero-cn .ch {
  display: inline-block; transition: color 0.5s, opacity 0.5s, transform 0.5s;
  margin-right: 4px;
}
#hero .hero-cn .ch.is-active { color: var(--accent); transform: translateY(-2px); }
/* First character rendered as a red seal square containing white 朱 */
#hero .hero-cn .ch-seal {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 1em; height: 1em;
  background: var(--accent);
  color: #f8f3e8;
  border-radius: 3px;
  font-size: 1em;
  margin-right: 14px;
  vertical-align: -0.08em;
  line-height: 1;
  letter-spacing: 0;
}
#hero .hero-cn .ch-seal > i {
  font-style: normal;
  font-size: 0.78em;
  line-height: 1;
}
#hero .hero-cn .ch-seal.is-active {
  color: #f8f3e8;
  transform: translateY(-2px) scale(1.04);
}

/* Etymology readout — pinned in morph zone (positioning lives in #hero block above) */
.etym-readout .er-track {
  position: relative; min-height: 180px;
}
.etym-readout .er-step {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center;
  opacity: 0; transform: translateY(20px); transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
}
.etym-readout .er-step.is-active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.etym-readout .er-glyph {
  font-family: var(--cn); font-size: clamp(96px, 12vw, 160px); line-height: 0.9;
  color: var(--accent);
  text-shadow: 0 4px 24px rgba(139,26,26,0.15);
}
.etym-readout .er-info { display: flex; flex-direction: column; gap: 10px; max-width: 56ch; }
.etym-readout .er-key {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-dim);
  display: inline-flex; gap: 10px; align-items: center;
}
.etym-readout .er-key .pin { color: var(--ink); font-weight: 500; }
.etym-readout .er-key .dot-sep { color: var(--accent); }
.etym-readout .er-meaning {
  font-family: var(--serif-display); font-style: italic;
  font-size: clamp(22px, 2.4vw, 32px); line-height: 1.3; color: var(--ink);
}
.etym-readout .er-meaning em { color: var(--accent); font-style: italic; font-weight: 500; }
.etym-readout .er-role {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-faint);
  margin-top: 4px;
}
.etym-readout .er-progress {
  display: flex; align-items: center; gap: 16px;
}
.etym-readout .er-bar {
  flex: 1; height: 1px; background: var(--rule); position: relative;
}
.etym-readout .er-fill {
  position: absolute; left: 0; top: 0; height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.1s linear;
}
.etym-readout .er-pips {
  display: flex; gap: 14px;
  font-family: var(--cn); font-size: 14px;
}
.etym-readout .er-pips .pip {
  color: var(--ink-faint); transition: color 0.3s, transform 0.3s;
  cursor: default;
}
.etym-readout .er-pips .pip.is-active { color: var(--accent); transform: scale(1.2); }

#hero .hero-landing .scroll-cue {
  position: absolute; bottom: 32px; left: var(--gutter);
  width: max-content;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-dim);
  z-index: 3;
}
#hero .scroll-cue.hidden { opacity: 0; transition: opacity 0.4s; }
#hero .scroll-cue .line {
  width: 32px; height: 1px; background: var(--ink-dim);
  transform-origin: left;
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(0.4); opacity: 0.3; }
}

/* ==================== NOW Section ==================== */
#now { background: var(--bg-deep); }
#now .now-grid {
  display: grid; grid-template-columns: 1fr; gap: 40px;
}
@media (min-width: 900px) {
  #now .now-grid { grid-template-columns: 1fr 1.2fr; gap: 80px; }
}
#now .now-statement {
  font-family: var(--serif-display); font-style: italic;
  font-size: clamp(28px, 3.5vw, 44px); line-height: 1.3;
  color: var(--ink); max-width: 24ch;
}
#now .now-statement em { color: var(--accent); font-style: italic; }
#now .now-detail { font-size: 17px; line-height: 1.8; color: var(--ink-soft); max-width: 54ch; }
#now .now-tags { margin-top: 24px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 6px 12px;
  border: 1px solid var(--rule); border-radius: 999px;
  color: var(--ink-soft); transition: all 0.3s; text-decoration: none;
}
.tag.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tag.accent { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.tag-flag { position: relative; overflow: hidden; }
.tag-flag::after {
  content: attr(data-flag);
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%) scale(0.6);
  font-size: 14px; opacity: 0; transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.tag-flag:hover { padding-right: 28px; }
.tag-flag:hover::after { opacity: 1; transform: translateY(-50%) scale(1); }

/* ==================== Featured Project Strip ==================== */
.proj-strip {
  margin-top: 56px;
  display: grid; grid-template-columns: 1fr; gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
@media (min-width: 700px) {
  .proj-strip { grid-template-columns: repeat(3, 1fr); }
}
.proj-strip .item {
  background: var(--bg-deep); padding: 32px 28px;
  display: flex; flex-direction: column; gap: 12px;
  cursor: pointer; transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), background 0.3s;
  position: relative; overflow: hidden;
  transform-style: preserve-3d;
}
.proj-strip .item::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(139,26,26,0.08), transparent 60%);
  pointer-events: none; opacity: 0; transition: opacity 0.4s;
}
.proj-strip .item:hover { background: var(--bg); }
.proj-strip .item:hover::after { opacity: 1; }
.proj-strip .item .num {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.15em;
  color: var(--accent);
}
.proj-strip .item .title {
  font-family: var(--serif-display); font-style: italic;
  font-size: 28px; line-height: 1.1; color: var(--ink);
}
.proj-strip .item .desc {
  font-size: 14px; line-height: 1.6; color: var(--ink-dim); margin-top: 4px;
}
.proj-strip .item .arrow {
  margin-top: auto; font-family: var(--mono); font-size: 11px;
  color: var(--ink); display: flex; align-items: center; gap: 8px;
  letter-spacing: 0.1em; text-transform: uppercase;
}

/* ==================== Work List (full STEM list) ==================== */
.work-list {
  margin-top: 24px;
  border-top: 1px solid var(--rule);
}
.work-row {
  display: grid; grid-template-columns: 60px 1fr 100px 80px;
  gap: 24px; align-items: center; padding: 28px 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer; transition: padding 0.4s;
  position: relative;
}
@media (max-width: 700px) {
  .work-row { grid-template-columns: 40px 1fr; }
  .work-row .yr, .work-row .arr { display: none; }
}
.work-row:hover { padding-left: 16px; }
.work-row::before {\n  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 0;\n  transition: width 0.4s;\n}
.work-row:hover::before { width: 3px; }
.work-row .num { font-family: var(--mono); font-size: 11px; }
.work-row .title-block { display: flex; flex-direction: column; gap: 4px; }
.work-row .title-block .ttl {
  font-family: var(--serif-display); font-style: italic; font-size: clamp(22px, 2vw, 30px);
  color: var(--ink); line-height: 1.15;
}
.work-row .title-block .sub {
  font-size: 13px; color: var(--ink-dim); line-height: 1.5;
}
.work-row .yr { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--ink-dim); }
.work-row .arr {
  font-family: var(--mono); font-size: 18px; color: var(--ink-faint);
  text-align: right; transition: transform 0.3s, color 0.3s;
}
.work-row:hover .arr { transform: translateX(4px); }
.work-row.locked .arr::before { content: '·'; }

/* ==================== Art Gallery ==================== */
.art-tabs {
  display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 32px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0;
}
.art-tab {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-dim);
  padding: 14px 18px; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s; background: none; border-top: 0; border-left: 0; border-right: 0;
  font-weight: 500;
}
.art-tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.art-tab:hover:not(.active) { color: var(--ink-soft); }

.art-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.art-item {
  position: relative; overflow: hidden; cursor: pointer;
  background: var(--bg-deep);
  break-inside: avoid;
}
.art-item img {
  width: 100%; height: auto; display: block;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.art-item:hover img { transform: scale(1.04); }
.art-item .caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 18px; color: var(--bg);
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  opacity: 0; transition: opacity 0.4s;
  font-family: var(--serif-display); font-style: italic; font-size: 18px;
}
.art-item:hover .caption { opacity: 1; }
.art-item .corner-mark {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 24px; height: 24px; background: var(--accent);
  border-radius: 2px; display: flex; align-items: center; justify-content: center;
  font-family: var(--cn); color: var(--bg); font-size: 11px;
  opacity: 0; transition: opacity 0.4s;
}
.art-item:hover .corner-mark { opacity: 1; }

/* Variable heights for masonry feel */
.art-grid.masonry {
  columns: 4 240px;
  column-gap: 24px;
}
.art-grid.masonry .art-item {
  margin-bottom: 24px;
  display: inline-block; width: 100%;
}

/* ── 3D gallery wall ── */
.gw-wrap {
  margin-top: 48px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 32px 0 24px;
  background: linear-gradient(180deg, transparent 0%, rgba(216, 210, 196, 0.18) 50%, transparent 100%);
}
.gw-meta {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 20px;
}
.gw-tag {
  font-family: var(--serif-display); font-style: italic; font-size: 24px;
  color: var(--ink);
}
.gw-hint {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-faint);
}
.gallery-3d {
  width: 100%; height: 480px;
  position: relative;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
}
.gw-loading {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-faint);
}

/* ==================== Music ==================== */
#music { background: var(--bg-deep); }
.music-grid {
  display: grid; grid-template-columns: 1fr; gap: 32px;
  margin-top: 24px;
}
@media (min-width: 700px) {
  .music-grid { grid-template-columns: 1fr 1fr; }
}
.track-card {
  display: grid; grid-template-columns: 80px 1fr; gap: 20px;
  padding: 20px; border: 1px solid var(--rule);
  background: var(--bg); transition: all 0.3s; cursor: pointer;
  align-items: center;
}
.track-card:hover { border-color: var(--ink); }
/* Narrow phones: tighten the play button so the title + waveform + seek bar
   have room to breathe instead of being squashed against the right edge. */
@media (max-width: 480px) {
  .track-card { grid-template-columns: 60px 1fr; gap: 14px; padding: 16px; }
  .track-card .play-btn { width: 50px; height: 50px; font-size: 16px; }
}
.track-card .play-btn {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--ink); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; transition: all 0.3s;
  position: relative;
}
.track-card.playing .play-btn { background: var(--accent); }
.track-card .meta .ttl {
  font-family: var(--serif-display); font-style: italic;
  font-size: 22px; color: var(--ink); line-height: 1.2; margin-bottom: 4px;
}
.track-card .meta .artist {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  color: var(--ink-dim); text-transform: uppercase;
}
.track-card .waveform {
  margin-top: 10px; display: flex; align-items: end; gap: 2px; height: 16px;
}
.track-card .waveform .bar {
  flex: 1; background: var(--ink-faint); border-radius: 1px;
  height: 30%;
  transition: background 0.3s, height 0.2s;
  transform-origin: bottom;
}
.track-card.playing .waveform .bar {
  background: var(--accent);
  animation: track-wave 0.9s ease-in-out infinite alternate;
}
/* Stagger the bars so the waveform looks like it's actually moving with audio */
.track-card.playing .waveform .bar:nth-child(3n)   { animation-duration: 0.7s; animation-delay: -0.10s; }
.track-card.playing .waveform .bar:nth-child(3n+1) { animation-duration: 1.1s; animation-delay: -0.35s; }
.track-card.playing .waveform .bar:nth-child(3n+2) { animation-duration: 0.85s; animation-delay: -0.55s; }
.track-card.playing .waveform .bar:nth-child(5n)   { animation-duration: 1.25s; animation-delay: -0.20s; }
.track-card.playing .waveform .bar:nth-child(7n)   { animation-duration: 0.6s; animation-delay: -0.45s; }
@keyframes track-wave {
  0%   { height: 22%; }
  25%  { height: 92%; }
  50%  { height: 38%; }
  75%  { height: 78%; }
  100% { height: 50%; }
}
.track-card .play-btn { user-select: none; }
audio.track-audio { display: none; }

/* Music seek bar — thin track underneath the waveform with current/total time. */
.track-progress {
  margin-top: 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.track-seek {
  appearance: none; -webkit-appearance: none;
  width: 100%; height: 14px; background: transparent; cursor: pointer;
  --fill: 0%;
}
.track-seek::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(to right, var(--accent) var(--fill), rgba(26,24,20,0.18) var(--fill));
  border-radius: 1px;
}
.track-seek::-moz-range-track {
  height: 2px;
  background: linear-gradient(to right, var(--accent) var(--fill), rgba(26,24,20,0.18) var(--fill));
  border-radius: 1px;
}
.track-seek::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px;
  margin-top: -5px;
  border-radius: 50%; border: 0;
  background: var(--accent);
  box-shadow: 0 1px 4px rgba(139, 26, 26, 0.35);
  transition: transform 0.15s ease;
}
.track-seek::-moz-range-thumb {
  width: 12px; height: 12px;
  border-radius: 50%; border: 0;
  background: var(--accent);
  box-shadow: 0 1px 4px rgba(139, 26, 26, 0.35);
}
/* Larger thumb + taller track on touch devices for reliable dragging. */
@media (hover: none) {
  .track-seek { height: 28px; }
  .track-seek::-webkit-slider-thumb { width: 20px; height: 20px; margin-top: -9px; }
  .track-seek::-moz-range-thumb { width: 20px; height: 20px; }
}
.track-seek:hover::-webkit-slider-thumb { transform: scale(1.18); }
.track-seek:focus-visible { outline: none; }
.track-seek:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(139,26,26,0.25); }
.track-times {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  color: var(--ink-faint);
}

/* ──────── Fragments — scattered wall of micro-poems ──────── */
.fragments {
  margin-top: clamp(56px, 8vw, 88px);
  padding-top: clamp(40px, 6vw, 64px);
  border-top: 1px solid var(--rule);
}
.fr-head {
  margin-bottom: clamp(28px, 4vw, 44px);
  max-width: 720px;
}
.fr-title {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 3.5vw, 40px);
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--ink);
  margin: 0 0 14px;
}
.fr-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 400;
}

/* Stage — full-width scatter container */
.fr-stage {
  position: relative;
  width: 100%;
  height: 1500px;
  margin-bottom: clamp(40px, 6vw, 80px);
  --parallax-x: 0px;
  --parallax-y: 0px;
  transition: filter 0.4s ease;
}
.fr-stage.is-dimmed {
  filter: blur(8px) brightness(0.5);
  pointer-events: none;
}

/* Card — absolutely positioned, parchment paper, uniform size */
.fr-card {
  position: absolute;
  width: 280px;
  height: 320px;
  background: #f5f0e8;
  color: #1a1a1a;
  border-radius: 4px;
  padding: 22px 24px 14px;
  box-shadow:
    0 1px 2px rgba(20, 18, 14, 0.18),
    0 8px 22px -10px rgba(20, 18, 14, 0.32);
  cursor: pointer;
  opacity: 0;
  transform: rotate(var(--rot)) translate(var(--parallax-x), var(--parallax-y)) translateY(8px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  user-select: none;
  overflow: hidden;
  will-change: transform;
}
.fr-card.fr-in {
  opacity: 0.92;
  transform: rotate(var(--rot)) translate(var(--parallax-x), var(--parallax-y)) translateY(0);
}
.fr-card:hover,
.fr-card:focus-visible {
  opacity: 1;
  transform: rotate(var(--rot)) translate(var(--parallax-x), calc(var(--parallax-y) - 4px));
  box-shadow:
    0 2px 4px rgba(20, 18, 14, 0.22),
    0 14px 32px -10px rgba(20, 18, 14, 0.42);
  z-index: 5;
  outline: none;
}
.fr-card:focus-visible {
  box-shadow:
    0 2px 4px rgba(20, 18, 14, 0.22),
    0 14px 32px -10px rgba(20, 18, 14, 0.42),
    0 0 0 2px var(--accent);
}

/* Card body */
.fr-body {
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.75;
  color: #1a1a1a;
  letter-spacing: 0.005em;
  flex: 1;
  overflow: hidden;
}
.fr-body .fr-line {
  display: block;
  min-height: 1.75em;
  flex: 0 0 auto;
}
.fr-body .fr-line em {
  font-style: italic;
  color: inherit;
}

/* Fade gradient at bottom of card body — signals "more to read" */
.fr-fade {
  position: absolute;
  left: 0; right: 0;
  bottom: 54px;
  height: 56px;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(245, 240, 232, 0) 0%,
    rgba(245, 240, 232, 0.85) 60%,
    #f5f0e8 100%);
}

/* Footer — glass badge + heart count */
.fr-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  position: relative;
  z-index: 1;
}

/* Liquid glass song badge — frosted, translucent, premium */
.fr-badge {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.015em;
  color: rgba(26, 24, 20, 0.72);
  background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 1px 2px rgba(20, 18, 14, 0.06);
  border-radius: 999px;
  padding: 4px 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 50px);
  text-transform: none;
}

.fr-likes {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.fr-heart {
  width: 13px;
  height: 13px;
  fill: #ef4444;
  stroke: none;
  transition: transform 0.15s ease;
}
.fr-count {
  color: #1a1a1a;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-size: 11px;
}

/* Likeable heart button — visually identical to the old static badge,
   but hoverable, focusable, and animates on like. */
.fr-like-btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  padding: 2px 4px;
  margin: -2px -4px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s ease;
}
.fr-like-btn:hover { background: rgba(239, 68, 68, 0.08); }
.fr-like-btn:hover .fr-heart { transform: scale(1.18); }
/* Bigger tap target on touch devices (Apple HIG: 44×44 min) without changing
   the visual size of the heart + count badge. */
@media (hover: none) {
  .fr-like-btn { padding: 10px 12px; margin: -10px -12px; }
}
.fr-like-btn:focus-visible {
  outline: 2px solid rgba(239, 68, 68, 0.55);
  outline-offset: 2px;
}
.fr-like-btn.is-liked {
  cursor: default;
  background: rgba(239, 68, 68, 0.10);
}
.fr-like-btn.is-liked .fr-heart { animation: fr-heart-pop 0.42s ease; }
@keyframes fr-heart-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.55); }
  70%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}

/* ── Modal & backdrop ── */
.fr-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 14, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  z-index: 9000;
  transition: opacity 0.35s ease;
}
.fr-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.fr-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  width: min(620px, 92vw);
  max-height: 86vh;
  background: #f5f0e8;
  color: #1a1a1a;
  border-radius: 4px;
  padding: clamp(36px, 5vw, 56px) clamp(36px, 5vw, 56px) clamp(28px, 3.5vw, 36px);
  box-shadow:
    0 4px 12px rgba(20, 18, 14, 0.3),
    0 28px 80px -20px rgba(20, 18, 14, 0.55);
  opacity: 0;
  pointer-events: none;
  z-index: 9001;
  transition:
    opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.fr-modal.is-open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}
.fr-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
  color: #1a1a1a;
  opacity: 0.45;
  cursor: pointer;
  transition: opacity 0.2s;
  z-index: 2;
}
.fr-modal-close:hover { opacity: 1; }

.fr-modal-body {
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.85;
  color: #1a1a1a;
  letter-spacing: 0.005em;
  overflow-y: auto;
  margin-bottom: 22px;
  padding-right: 6px;
}
.fr-modal-body::-webkit-scrollbar { width: 5px; }
.fr-modal-body::-webkit-scrollbar-thumb {
  background: rgba(20, 18, 14, 0.2);
  border-radius: 4px;
}
.fr-modal-body .fr-line {
  display: block;
  min-height: 1.85em;
}
.fr-modal-body .fr-line em {
  font-style: italic;
  color: inherit;
}

.fr-modal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(20, 18, 14, 0.12);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.fr-modal-date {
  color: rgba(20, 18, 14, 0.5);
  flex-shrink: 0;
}
.fr-modal-badge {
  /* Inherits .fr-badge glass treatment */
  flex: 0 1 auto;
  text-transform: none;
}
.fr-modal-mid {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}
.fr-spotify {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.015em;
  text-transform: none;
  color: rgba(160, 150, 140, 0.6);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.fr-spotify:hover,
.fr-spotify:focus-visible {
  color: rgba(160, 150, 140, 0.9);
  border-bottom-color: rgba(160, 150, 140, 0.5);
  outline: none;
}
.fr-modal-likes {
  flex-shrink: 0;
}
.fr-modal-likes .fr-heart { width: 14px; height: 14px; }
.fr-modal-likes .fr-count { color: #ef4444; font-size: 11px; }

/* ── Mobile fallback: stack instead of scatter ── */
@media (max-width: 720px) {
  .fr-stage {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 4px;
  }
  .fr-card {
    position: relative;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 280px !important;
    transform: rotate(var(--rot)) translateY(8px);
    padding: 20px 22px 14px;
  }
  .fr-card.fr-in {
    transform: rotate(var(--rot)) translateY(0);
  }
  .fr-card:hover,
  .fr-card:focus-visible {
    transform: rotate(var(--rot)) translateY(-3px);
  }
  .fr-modal {
    padding: 36px 26px 24px;
  }
  .fr-modal-body { font-size: 15px; line-height: 1.78; }
  .fr-modal-foot {
    flex-wrap: wrap;
    gap: 10px;
  }
}

/* ==================== Writing ==================== */
.writing-list { margin-top: 16px; }
.writing-item {
  display: grid; grid-template-columns: 1fr; gap: 6px;
  padding: 24px 0; border-bottom: 1px solid var(--rule);
  cursor: pointer; transition: padding 0.4s;
}
@media (min-width: 700px) {
  .writing-item { grid-template-columns: 80px 1fr 120px; gap: 32px; align-items: baseline; }
}
.writing-item:hover { padding-left: 12px; }
.writing-item .yr { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); letter-spacing: 0.08em; }
.writing-item .ttl {
  font-family: var(--serif-display); font-style: italic;
  font-size: clamp(22px, 2.2vw, 30px); color: var(--ink); line-height: 1.25;
}
.writing-item .sub { font-size: 14px; color: var(--ink-dim); margin-top: 2px; }
.writing-item .kind {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); text-align: right;
}
@media (max-width: 700px) {
  .writing-item .kind { text-align: left; }
}

/* ==================== About — Two-Thread Timeline ==================== */
#about {
  background: var(--bg-deep);
  --thread-eng: #2c4a6e;     /* indigo ink — engineering */
  --thread-eng-soft: #5b7a9e;
  --thread-eng-glow: rgba(44,74,110,0.14);
  --thread-art: #a8843a;     /* gold ink — art */
  --thread-art-soft: #c9a560;
  --thread-art-glow: rgba(168,132,58,0.14);
}

.about-intro { margin-top: 24px; max-width: 720px; }
.about-lede {
  font-family: var(--serif-display); font-style: normal; font-weight: 400;
  font-size: clamp(40px, 5.5vw, 80px); line-height: 1.05;
  color: var(--ink); letter-spacing: -0.01em;
}
.about-lede .lede-soft { color: var(--ink-faint); }

.thread-filter {
  margin-top: 56px; margin-bottom: 56px;
  display: flex; gap: 6px; flex-wrap: wrap;
  border-bottom: 1px solid var(--rule); padding-bottom: 18px;
}
.tf-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--rule);
  padding: 8px 14px; border-radius: 999px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-dim); cursor: pointer;
  transition: all 0.3s ease;
}
.tf-btn:hover { color: var(--ink); border-color: var(--ink-faint); }
.tf-btn.is-active { color: var(--ink); border-color: var(--ink); background: var(--bg); }
.tf-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.tf-dot-eng { background: var(--thread-eng); }
.tf-dot-art { background: var(--thread-art); }

/* ── Work filter (section 02) ────────────────────── */
#work {
  --wc-products: #2c4a6e;    /* indigo — same as thread-eng */
  --wc-research: #7a3e50;    /* mulberry */
  --wc-prototypes: #a8843a;  /* gold — same as thread-art */
}
.work-filter {
  margin-top: 40px; margin-bottom: 40px;
  display: flex; gap: 6px; flex-wrap: wrap;
  padding-bottom: 18px;
}
.tf-dot-products  { background: var(--wc-products); }
.tf-dot-research  { background: var(--wc-research); }
.tf-dot-prototypes{ background: var(--wc-prototypes); }

/* Category accent on rows */
.work-row { --row-cat-color: var(--ink-faint); }
.work-row[data-work-cat="products"]   { --row-cat-color: var(--wc-products); }
.work-row[data-work-cat="research"]   { --row-cat-color: var(--wc-research); }
.work-row[data-work-cat="prototypes"] { --row-cat-color: var(--wc-prototypes); }

.work-list .work-row {
  transition: opacity 0.45s ease, padding 0.4s, background 0.35s ease;
  background: transparent;
}
.work-row .num { color: var(--row-cat-color) !important; }
.work-row::before { background: var(--row-cat-color); }
.work-row:hover .arr { color: var(--row-cat-color); }
.work-row:hover {
  background: color-mix(in oklch, var(--row-cat-color) 5%, transparent);
}

/* Filter dimming */
.work-list.wf-active .work-row.wf-dim {
  opacity: 0.15; pointer-events: none;
}
.work-list.wf-active .work-row:not(.wf-dim) {
  background: color-mix(in oklch, var(--row-cat-color) 4%, transparent);
}
.work-list.wf-active .work-row:not(.wf-dim):hover {
  background: color-mix(in oklch, var(--row-cat-color) 10%, transparent);
}

/* ── Thread layout ───────────────────────────────── */
.threads {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 24px 0 80px;
}
@media (min-width: 760px) {
  .threads {
    grid-template-columns: 1fr 80px 1fr;
    column-gap: 0;
  }
}

/* Vertical rails */
.threads-rail {
  display: none;
  position: absolute; top: 0; bottom: 80px;
  width: 1px;
  pointer-events: none;
}
@media (min-width: 760px) {
  .threads-rail { display: block; }
  .threads-rail-eng {
    left: calc(50% - 40px);
    background: linear-gradient(180deg, transparent 0%, var(--thread-eng-soft) 8%, var(--thread-eng-soft) 92%, transparent 100%);
  }
  .threads-rail-art {
    left: calc(50% + 40px);
    background: linear-gradient(180deg, transparent 0%, var(--thread-art-soft) 8%, var(--thread-art-soft) 92%, transparent 100%);
  }
}

/* ── Nodes ───────────────────────────────────────── */
.thread-node {
  position: relative;
  padding: 28px 0;
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 16px; align-items: start;
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
/* "Ongoing" is much wider than the 4-digit years above; shrink the label so
   it fits the year column instead of bleeding into the card text on mobile. */
@media (max-width: 759px) {
  .thread-node[data-year="ongoing"] .tn-year {
    font-size: 18px; line-height: 1.2; padding-top: 4px;
  }
}
.thread-node.is-in { opacity: 1; transform: translateY(0); }

@media (min-width: 760px) {
  .thread-node {
    grid-column: 1 / 2;
    padding: 22px 32px 22px 0;
    grid-template-columns: 1fr;
    gap: 6px;
    text-align: right;
  }
  .thread-node.thread-art {
    grid-column: 3 / 4;
    padding: 22px 0 22px 32px;
    text-align: left;
  }
}

/* Year */
.tn-year {
  font-family: var(--serif-display); font-style: italic;
  font-size: clamp(28px, 3vw, 42px); line-height: 1;
  color: var(--ink); letter-spacing: -0.01em;
}
.tn-year .yr-soft {
  font-size: 0.55em; color: var(--ink-faint); letter-spacing: 0;
  margin-left: 2px;
}
.thread-eng .tn-year { color: var(--thread-eng); }
.thread-art .tn-year { color: var(--thread-art); }

/* Card */
.tn-card { position: relative; }
.tn-title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(16px, 1.2vw, 19px); line-height: 1.4;
  color: var(--ink); margin-bottom: 6px;
  letter-spacing: -0.005em;
}
.tn-desc {
  font-family: var(--serif); font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.65; color: var(--ink-soft); font-weight: 350;
}
.tn-desc em { font-style: italic; font-weight: 400; }
.thread-eng .tn-desc em { color: var(--thread-eng); }
.thread-art .tn-desc em { color: var(--thread-art); }

/* Node dot on rail */
@media (min-width: 760px) {
  .thread-node::before {
    content: ''; position: absolute; top: 30px;
    width: 9px; height: 9px; border-radius: 50%;
    transition: transform 0.4s, box-shadow 0.4s;
  }
  .thread-node.thread-eng::before {
    right: -44px;
    background: var(--thread-eng);
    box-shadow: 0 0 0 3px var(--bg-deep), 0 0 0 4px var(--thread-eng-glow);
  }
  .thread-node.thread-art::before {
    left: -44px;
    background: var(--thread-art);
    box-shadow: 0 0 0 3px var(--bg-deep), 0 0 0 4px var(--thread-art-glow);
  }
  .thread-node.is-in:hover::before { transform: scale(1.4); }
}

/* ── Crossing — where art and engineering meet ── */
@media (min-width: 760px) {
  .thread-node.thread-cross::after {
    content: ''; position: absolute; top: 34px;
    height: 1px;
    background: linear-gradient(90deg,
      var(--thread-eng-soft) 0%,
      color-mix(in oklch, var(--thread-eng) 60%, var(--thread-art) 40%) 50%,
      var(--thread-art-soft) 100%);
    opacity: 0; transition: opacity 1.2s ease 0.3s;
  }
  .thread-node.thread-cross.thread-eng::after { right: -40px; width: 80px; }
  .thread-node.thread-cross.thread-art::after { left: -40px; width: 80px; }
  .thread-node.thread-cross.is-in::after { opacity: 0.55; }

  .thread-node.thread-cross::before { width: 11px; height: 11px; }
  .thread-node.thread-cross.thread-eng::before {
    box-shadow: 0 0 0 3px var(--bg-deep),
                0 0 16px 2px var(--thread-eng-glow),
                0 0 32px 4px var(--thread-art-glow);
  }
  .thread-node.thread-cross.thread-art::before {
    box-shadow: 0 0 0 3px var(--bg-deep),
                0 0 16px 2px var(--thread-art-glow),
                0 0 32px 4px var(--thread-eng-glow);
  }
}

/* ── End node ── */
.thread-node.thread-end {
  margin-top: 60px;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  gap: 14px;
}
@media (min-width: 760px) {
  .thread-node.thread-end {
    grid-column: 1 / -1;
    padding: 60px 0 0;
    grid-template-columns: 1fr;
  }
  .thread-node.thread-end::before { display: none; }
}
.tn-year-end {
  font-family: var(--serif-display);
  font-size: clamp(40px, 5vw, 64px);
  color: var(--ink-faint);
  font-style: normal;
}
.tn-title-end {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(18px, 1.6vw, 24px);
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

/* ── Filter dimming ─────────────────────────────── */
.threads.filter-eng .thread-node.thread-art:not(.thread-end) { opacity: 0.12; pointer-events: none; }
.threads.filter-art .thread-node.thread-eng:not(.thread-end) { opacity: 0.12; pointer-events: none; }
.threads.filter-eng .thread-node.thread-art:not(.thread-end).is-in,
.threads.filter-art .thread-node.thread-eng:not(.thread-end).is-in { opacity: 0.12; }

/* ==================== Contact / Footer ==================== */
#contact { padding-bottom: 80px; }
.contact-grid {
  display: grid; grid-template-columns: 1fr; gap: 28px;
  margin-top: 32px; max-width: 720px;
}
@media (min-width: 700px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
.contact-link {
  display: flex; flex-direction: column; gap: 4px; padding: 18px 0;
  border-top: 1px solid var(--rule); transition: padding 0.3s;
}
.contact-link:hover { padding-left: 12px; }
.contact-link .lbl {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-dim);
}
.contact-link .val {
  font-family: var(--serif-display); font-style: italic; font-size: 24px;
  color: var(--ink); line-height: 1.2;
}

/* Cinnabar contact seals */
.contact-grid.contact-seals {
  display: grid; grid-template-columns: 1fr; gap: 18px;
  max-width: 720px; margin-top: 36px;
}
@media (min-width: 700px) {
  .contact-grid.contact-seals { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; max-width: none; }
}
.contact-seal {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  text-decoration: none; color: inherit;
  cursor: pointer; font: inherit; text-align: left;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
  position: relative;
}
.contact-seal:hover {
  background: rgba(139,26,26,0.04);
  border-color: rgba(139,26,26,0.18);
  transform: translateY(-2px);
}
.contact-seal:hover .seal-stamp {
  transform: rotate(-3deg) scale(1.04);
  box-shadow: 0 8px 22px rgba(139,26,26,0.32);
}
.contact-seal .seal-stamp {
  flex: 0 0 auto;
  width: 64px; height: 64px;
  background: var(--accent);
  border-radius: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #f8f3e8;
  box-shadow: 0 4px 14px rgba(139,26,26,0.25);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
  position: relative;
  overflow: hidden;
}
.contact-seal .seal-stamp::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(248,243,232,0.08), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(0,0,0,0.12), transparent 60%);
  mix-blend-mode: overlay;
  pointer-events: none;
}
.contact-seal .seal-glyph {
  font-size: 26px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.contact-seal .seal-glyph.cn { font-family: var(--cn); font-weight: 500; }
.contact-seal .seal-icon {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  color: #f8f3e8;
}
.contact-seal .seal-icon svg { width: 100%; height: 100%; }
.contact-seal .seal-en {
  font-family: var(--mono);
  font-size: 7px; letter-spacing: 0.2em;
  margin-top: 4px;
  opacity: 0.78;
}
.contact-seal .seal-meta {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.contact-seal .seal-lbl {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-dim);
}
.contact-seal .seal-val {
  font-family: var(--serif-display); font-style: italic;
  font-size: 18px; color: var(--ink); line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  /* Italic forward-lean clips the leading character ("/" in /in/zhuyuxin)
     and descenders ('g' in github.com) against the overflow:hidden box.
     A few pixels of padding gives glyphs room without affecting layout. */
  padding: 2px 4px 4px 4px;
  margin: -2px -4px -4px -4px;
}
.contact-seal .seal-hint {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-faint);
  margin-top: 4px;
  transition: opacity 0.3s, color 0.3s;
}
.contact-seal .seal-hint.copied { color: var(--accent); display: none; }
.contact-seal[data-copied="true"] .seal-hint:not(.copied) { display: none; }
.contact-seal[data-copied="true"] .seal-hint.copied { display: inline; }
.footer-bottom {
  margin-top: 80px; padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--ink-faint); flex-wrap: wrap; gap: 12px;
}

/* ==================== Modal ==================== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 5000;
  background: rgba(20, 18, 14, 0.92);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
}
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg);
  width: 100%; max-width: 1280px;
  max-height: 92vh; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr;
  position: relative;
  transform: translateY(40px); opacity: 0;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--rule);
}
.modal-backdrop.open .modal { transform: translateY(0); opacity: 1; }
.modal-header {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 24px 32px; border-bottom: 1px solid var(--rule);
  gap: 16px;
}
.modal-header .ttl {
  font-family: var(--serif-display); font-style: italic;
  font-size: clamp(24px, 3vw, 36px); color: var(--ink); line-height: 1.15;
}
.modal-header .meta {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  color: var(--ink-dim); text-transform: uppercase;
}
.modal-close {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--rule); background: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.3s; font-size: 18px; color: var(--ink);
  flex-shrink: 0;
}
.modal-close:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.modal-body {
  overflow-y: auto; padding: 0;
  display: grid; grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .modal-body.two-col { grid-template-columns: 1.5fr 1fr; }
}
.modal-media {
  background: var(--bg-deep); padding: 24px;
  display: flex; align-items: center; justify-content: center;
  min-height: 320px;
}
.modal-media img, .modal-media video, .modal-media iframe {
  max-width: 100%; max-height: 70vh; object-fit: contain;
}
.modal-info { padding: 32px; overflow-y: auto; }
.modal-info p { font-size: 15px; line-height: 1.7; color: var(--ink-soft); margin-bottom: 14px; }
.modal-info p:first-child { font-size: 17px; color: var(--ink); }
.modal-info .meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px;
  padding-top: 24px; border-top: 1px solid var(--rule);
}
.modal-info .meta-grid > div {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-dim);
}
.modal-info .meta-grid > div strong { display: block; color: var(--ink); margin-top: 4px; font-weight: 500; }
.modal-info .links { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.modal-info .links a {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 10px 16px;
  border: 1px solid var(--ink); transition: all 0.3s; color: var(--ink);
}
.modal-info .links a:hover { background: var(--ink); color: var(--bg); }

/* ERCOT modal media: image + looping video stack */
.ercot-media {
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(26,24,20,0.04), rgba(26,24,20,0.01));
}
.ercot-media .ercot-stack { display: flex; flex-direction: column; gap: 10px; }
.ercot-media .ercot-hero {
  width: 100%; height: auto; display: block;
  border-radius: 4px;
  background: var(--bg-deep);
  box-shadow: 0 4px 18px rgba(26,24,20,0.08);
}
.ercot-media .ercot-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.ercot-media .ercot-row img {
  width: 100%; height: 100%; display: block;
  border-radius: 4px;
  object-fit: cover;
  background: #0d1218;
  box-shadow: 0 4px 14px rgba(26,24,20,0.10);
  aspect-ratio: 16 / 9;
}
.ercot-media .ercot-overlay {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-soft);
  padding-top: 4px;
}
.ercot-media .lap-ok { color: var(--accent); }

.modal-gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px;
  margin-top: 20px;
}
.modal-gallery img {
  width: 100%; aspect-ratio: 1; object-fit: cover; cursor: pointer;
  border: 1px solid var(--rule); transition: border-color 0.3s;
}
.modal-gallery img:hover { border-color: var(--ink); }

/* PDF embed */
.pdf-frame { width: 100%; height: 70vh; border: 0; background: var(--bg-deep); }

/* ==================== Reveal animations ==================== */
.rv {
  opacity: 0; transform: translateY(40px);
  transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1), transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.rv.vis { opacity: 1; transform: none; }
.rv.d1 { transition-delay: 0.08s; }
.rv.d2 { transition-delay: 0.16s; }
.rv.d3 { transition-delay: 0.24s; }
.rv.d4 { transition-delay: 0.32s; }

/* ==================== Section dots ==================== */
.section-dots {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%);
  z-index: 50; display: flex; flex-direction: column; gap: 14px;
}
@media (max-width: 1100px) { .section-dots { display: none; } }
.section-dots a {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-faint); transition: all 0.4s;
  position: relative;
}
.section-dots a.active { background: var(--accent); height: 24px; border-radius: 3px; }
.section-dots a:hover::after {
  content: attr(data-label); position: absolute; right: 16px; top: 50%;
  transform: translateY(-50%); white-space: nowrap;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-soft);
  background: var(--bg); padding: 4px 10px; border: 1px solid var(--rule);
}


/* ==================== 3D Laptop Project Cards ==================== */
.lap-strip { perspective: 1400px; padding: 24px; gap: 24px; background: transparent; border: 0; }
@media (min-width: 700px) { .lap-strip { grid-template-columns: repeat(3, 1fr); } }

.lap-strip .item {
  background: transparent !important;
  padding: 0 !important;
  overflow: visible !important;
  display: flex; flex-direction: column;
  gap: 0;
  cursor: pointer;
  transform-style: preserve-3d !important;
}
.lap-strip .item .laptop {
  position: relative;
  aspect-ratio: 16 / 11;
  transform-style: preserve-3d;
  transform: rotateX(18deg) rotateZ(-2deg);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 4px;
}
.lap-strip .item:hover .laptop {
  transform: rotateX(8deg) rotateZ(-1deg) translateY(-6px) scale(1.02);
}
.lap-strip .item .laptop-screen {
  position: absolute; inset: 0 0 14% 0;
  background: var(--bg-deep);
  border: 1px solid var(--rule);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    0 16px 40px -16px rgba(26,24,20,0.45),
    0 8px 20px -10px rgba(26,24,20,0.3);
  transform: translateZ(0);
}
.lap-strip .item .laptop-screen::after {
  content: ''; position: absolute; left: 50%; top: 8px;
  width: 32px; height: 4px; background: var(--ink-faint); opacity: 0.4;
  border-radius: 2px; transform: translateX(-50%);
  display: none;
}
.lap-strip .item .laptop-base {
  position: absolute; left: -2%; right: -2%; bottom: 0; height: 14%;
  background: linear-gradient(180deg, #d8d2c4 0%, #b8b0a0 60%, #8a8474 100%);
  border-radius: 0 0 14px 14px;
  border: 1px solid rgba(26,24,20,0.18);
  box-shadow: 0 12px 24px -10px rgba(26,24,20,0.4);
}
.lap-strip .item .laptop-base::before {
  content: ''; position: absolute; left: 50%; top: 14%; width: 14%; height: 4px;
  background: rgba(26,24,20,0.25); border-radius: 0 0 6px 6px; transform: translateX(-50%);
}

.lap-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px;
  background: rgba(26,24,20,0.04);
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.04em;
  color: var(--ink-dim);
}
.lap-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.lap-dot.r { background: #e06049; } .lap-dot.y { background: #d9a64e; } .lap-dot.g { background: #6fa362; }
.lap-url { margin-left: 8px; opacity: 0.7; }

.lap-body { flex: 1; padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 7px; }
.lap-body--polytope { color: var(--accent); }
/* Video fills the screen edge-to-edge below the URL bar (no padding). */
.lap-body--video { padding: 0; gap: 0; overflow: hidden; }
.lap-body--video .lap-video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  background: var(--bg-deep);
}
.lap-body--ercot     { color: #2b4f9a; }
.lap-body--polymarket{ color: #2c6e58; }

.lap-row {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em;
  color: var(--ink-soft); padding: 2px 0;
  border-bottom: 1px dotted rgba(26,24,20,0.06);
}
.lap-row .lap-ok { color: currentColor; }
.lap-mono { font-family: var(--mono); }

.lap-bar { height: 5px; background: rgba(26,24,20,0.06); position: relative; border-radius: 1px; overflow: hidden; }
.lap-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: currentColor; opacity: 0.85; display: block; }

.lap-graph { width: 100%; height: 60px; color: currentColor; }

.lap-book {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  font-family: var(--mono); font-size: 9px;
}
.lap-book-side { display: grid; grid-template-columns: auto 1fr; gap: 4px 6px; align-items: center; }
.lap-book-side i { display: block; height: 6px; border-radius: 1px; }
.lap-book-side.bid i { background: #6fa362; opacity: 0.7; }
.lap-book-side.ask i { background: #c0633e; opacity: 0.7; }
.lap-book-side span { color: var(--ink-dim); }

.lap-meta {
  padding-top: 14px;
  display: flex; flex-direction: column; gap: 6px;
  position: static;
}
.lap-meta .num { font-family: var(--mono); font-size: 10px; letter-spacing: 0.15em; color: var(--accent); margin-top: 0 !important; }
.lap-meta .title { font-family: var(--serif-display); font-style: italic; font-size: 26px; color: var(--ink); line-height: 1.1; margin-top: 0 !important; }
.lap-strip .item .desc, .lap-meta .desc { font-size: 13px; color: var(--ink-dim); line-height: 1.5; margin-top: 0 !important; }
.lap-strip .item .arrow, .lap-meta .arrow {
  margin-top: 8px !important; font-family: var(--mono); font-size: 10px; color: var(--ink);
  letter-spacing: 0.1em; text-transform: uppercase;
  position: static !important;
  opacity: 0.7; transition: opacity 0.3s, transform 0.3s;
}
.lap-strip .item:hover .lap-meta .arrow { opacity: 1; transform: translateX(4px); }
.lap-strip a.item { text-decoration: none; color: inherit; }
.lap-body--fluorion {
  padding: 0 !important;
  display: block !important;
  position: relative;
  overflow: hidden;
  background: #fff;
}
.lap-body--fluorion .lap-fluorion-hero {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.lap-body--ercot-img {
  padding: 0 !important;
  display: block !important;
  position: relative;
  overflow: hidden;
  background: #fff;
}
.lap-body--ercot-img .lap-ercot-hero {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.lap-strip .item[data-swap-poly] { order: 2; }
.lap-strip .item[data-swap-ercot] { order: 3; }

/* ==================== Secret fun-fact (2017 dictation) ==================== */
.thread-node.thread-secret .tn-card {
  display: flex;
  justify-content: flex-end;
}
@media (min-width: 760px) {
  .thread-node.thread-secret { padding-top: 14px; padding-bottom: 14px; }
  .thread-node.thread-secret .tn-card { justify-content: flex-start; }
}
.secret-trigger {
  display: inline-flex; align-items: center; gap: 12px;
  background: transparent; border: none; cursor: pointer;
  padding: 10px 14px;
  border: 1px dashed color-mix(in oklch, var(--thread-art) 40%, transparent);
  border-radius: 999px;
  color: var(--ink-soft);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font: inherit;
}
.secret-trigger:hover {
  border-color: var(--thread-art);
  background: color-mix(in oklch, var(--thread-art) 6%, transparent);
  transform: translateY(-1px);
}
.secret-glyph {
  font-family: var(--cn);
  font-size: 22px; line-height: 1;
  color: var(--thread-art);
  position: relative;
  display: inline-block;
}
/* Gentle pulse — every 4s, just enough to hint */
.secret-glyph::after {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--thread-art);
  opacity: 0;
  animation: secretPulse 4.5s ease-out infinite;
}
@keyframes secretPulse {
  0%   { opacity: 0; transform: scale(0.7); }
  20%  { opacity: 0.5; }
  60%  { opacity: 0; transform: scale(1.6); }
  100% { opacity: 0; transform: scale(1.6); }
}
.secret-hint {
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color 0.3s;
}
.secret-trigger:hover .secret-hint { color: var(--thread-art); }

/* ── Backdrop + card ── */
.secret-backdrop {
  position: fixed; inset: 0;
  background: rgba(26, 24, 20, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.secret-backdrop.is-open {
  opacity: 1; pointer-events: auto;
}
.secret-card {
  position: relative;
  background: var(--bg);
  color: var(--ink);
  max-width: 580px; width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 56px 48px 40px;
  border: 1px solid var(--rule);
  box-shadow: 0 30px 80px -20px rgba(26,24,20,0.25),
              0 8px 24px -8px rgba(26,24,20,0.12);
  font-family: var(--serif);
  transform: translateY(16px) scale(0.985);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.05s,
              opacity 0.5s ease 0.05s;
}
.secret-backdrop.is-open .secret-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.secret-close {
  position: absolute; top: 14px; right: 18px;
  background: transparent; border: none;
  color: var(--ink-faint);
  font-size: 26px; line-height: 1;
  cursor: pointer; padding: 4px 10px;
  transition: color 0.3s;
}
.secret-close:hover { color: var(--ink); }

/* ESC hint position alongside .secret-close */
.secret-close-esc {
  position: absolute;
  top: 22px;
  right: 60px;
}

/* ESC hint sits to the left of .modal-close inside .modal-close-group */
.modal-close-group {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.secret-meta {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 20px;
}
.secret-meta .secret-meta-dot { color: var(--thread-art); margin: 0 8px; }
.secret-title {
  font-family: var(--cn);
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.15;
  color: var(--ink);
  font-weight: 400;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.secret-subtitle {
  font-family: var(--serif-display); font-style: italic;
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 28px;
  font-weight: 400;
}
.secret-rule {
  height: 1px;
  background: linear-gradient(90deg, var(--thread-art) 0%, transparent 60%);
  margin-bottom: 28px;
}
.secret-body p {
  font-family: var(--serif); font-weight: 350;
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.75;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.secret-body p:last-child { margin-bottom: 0; }
.secret-body strong {
  color: var(--ink);
  font-weight: 500;
  background: linear-gradient(180deg, transparent 70%, color-mix(in oklch, var(--thread-art) 35%, transparent) 70%);
  padding: 0 2px;
}
.secret-foot {
  margin-top: 32px; padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-family: var(--serif); font-style: italic;
  font-size: 13px; line-height: 1.55;
  color: var(--ink-faint);
}

/* Mobile bottom-sheet variant */
@media (max-width: 640px) {
  .secret-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .secret-card {
    max-width: 100%;
    max-height: 88vh;
    padding: 40px 24px 28px;
    border-bottom: none;
    transform: translateY(40px);
  }
  .secret-backdrop.is-open .secret-card {
    transform: translateY(0);
  }
}

/* ==================== E-commerce showcase modal ==================== */
.ec-backdrop {
  position: fixed; inset: 0;
  background: rgba(20, 18, 14, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.ec-backdrop.is-open { opacity: 1; pointer-events: auto; }

.ec-modal {
  position: relative;
  width: min(48vw, 780px);
  max-width: 100%;
  display: flex; flex-direction: column; align-items: center;
  gap: 22px;
  transform: translateY(14px) scale(0.985);
  opacity: 0;
  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.05s,
    opacity 0.45s ease 0.05s;
}
.ec-backdrop.is-open .ec-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Close button lives on the backdrop, not inside the transformed modal */
.ec-backdrop .ec-close-group {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9002;
}
.ec-close {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--rule); background: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.3s; font-size: 18px; color: var(--ink);
  flex-shrink: 0;
}
.ec-close:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ec-backdrop .ec-close-group .esc-key {
  border-color: var(--rule);
  color: var(--ink-dim);
}
.ec-backdrop .ec-close-group .esc-hint {
  color: var(--ink-dim);
}

/* Laptop frame — reuses the .laptop-screen / .laptop-base look from
   the Currently strip but sized for hero playback inside the modal. */
.ec-laptop {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  transform-style: preserve-3d;
  filter: drop-shadow(0 32px 60px rgba(0, 0, 0, 0.55));
}
.ec-laptop .laptop-screen {
  position: absolute; inset: 0 0 14% 0;
  background: var(--bg-deep);
  border-radius: 10px 10px 4px 4px;
  border: 1px solid rgba(244, 241, 234, 0.12);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.ec-laptop .laptop-screen::after {
  content: ''; position: absolute; left: 50%; top: 8px;
  width: 32px; height: 4px; background: rgba(244, 241, 234, 0.18);
  border-radius: 999px; transform: translateX(-50%);
}
.ec-laptop .lap-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: rgba(20, 18, 14, 0.55);
  border-bottom: 1px solid rgba(244, 241, 234, 0.08);
  flex-shrink: 0;
}
.ec-video {
  flex: 1 1 auto;
  width: 100%; height: 100%;
  object-fit: contain;
  background: #0c0a08;
  display: block;
  background: #0c0a08;
  pointer-events: none;
}
.ec-laptop .laptop-base {
  position: absolute; left: -2%; right: -2%; bottom: 0; height: 14%;
  background: linear-gradient(180deg, #d8d2c4 0%, #b8b0a0 60%, #8a8474 100%);
  border-radius: 0 0 14px 14px;
  box-shadow: 0 12px 24px -10px rgba(26,24,20,0.4);
}
.ec-laptop .laptop-base::before {
  content: ''; position: absolute; left: 50%; top: 14%; width: 14%; height: 4px;
  background: rgba(26,24,20,0.25); border-radius: 0 0 6px 6px; transform: translateX(-50%);
}

.ec-text {
  font-family: var(--serif);
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.7;
  color: rgba(244, 241, 234, 0.86);
  text-align: center;
  max-width: 62ch;
  margin: 0;
  text-wrap: pretty;
}
.ec-tags {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px;
}
.ec-tags .tag {
  border-color: rgba(244, 241, 234, 0.32);
  color: rgba(244, 241, 234, 0.78);
  background: transparent;
}

/* Mobile: laptop scales to ~90vw, text + tags stack underneath */
@media (max-width: 720px) {
  .ec-backdrop { padding: 16px; }
  .ec-modal {
    width: min(88vw, 600px);
    gap: 18px;
  }
  .ec-backdrop .ec-close-group {
    top: 16px;
    right: 16px;
  }
  .ec-text {
    font-size: 15px;
    line-height: 1.65;
    max-width: 100%;
  }
}
