/* ============================================================
   site.css
   ============================================================
   PURPOSE:  Site-specific styles built on top of Lumen tokens
             (colors_and_type.css). Owns layout, floating nav,
             caption-block, slide containers, chat overlay, cursor.

   CONSUMES: CSS custom properties from colors_and_type.css
             (--ink, --klein, --line, --font-serif, --font-mono, etc).

   PRODUCES: All visual styling for app.jsx components.

   LAYOUT MODEL:
     - .app          fixed full-viewport root
     - .stage        full-bleed viz area, bottom inset = caption block
     - .caption-block fixed bottom strip (3 lines: title / blurb / visit)
     - Floating chrome (avatar + sections + ops hint) at the top corners

   FLOATING CHROME TRANSPARENCY:
     Default ~ near-invisible.
     Hover: opacity rises to fully readable. This is the user's
     explicit ask — chrome stays out of the image's way.

   LAST EDIT: 2026-06-28 — Full restructure. Caption strictly 3 lines,
              ops hint moved above sections switcher, removed bottom
              works-rail and frosted bottom strip, made nav fade-on-rest.
   ============================================================ */

/* ============================================================
   Reset + body chrome
   ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow: hidden; height: 100%; width: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  position: relative;
}
button { font-family: inherit; font-size: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; color: inherit; }
img { display: block; max-width: 100%; }
a { color: inherit; }

/* ============================================================
   App shell — full viewport stage
   ============================================================ */
.app { position: fixed; inset: 0; background: var(--bg); }

:root {
  --nav-inset: 12px;           /* small breathing room from the very top */
  --bottom-rail-h: 0px;        /* floating rail, no layout reservation */
  --caption-h: 0px;            /* caption is a floating card too, no reservation */
  --chrome-rest-opacity: 0.32; /* near-invisible at rest */
  /* Stage + caption block is shifted LEFT — the previous layout
     centered the block too far right on wide viewports, so the
     Artist single-cell felt disconnected from the visual centerline.
     Now the entire visual block hugs the left side, while top/bottom
     nav stays anchored to its corners. */
  --cap-right: 240px;
  --cap-width: 360px;
  --stage-gap: 56px;
  --stage-right: calc(var(--cap-right) + var(--cap-width) + var(--stage-gap));
  --stage-top: 112px;
  --stage-bottom: 124px;
  --stage-left: 64px;
}

/* ============================================================
   STAGE — full-bleed viz.
   The viz lives inside a slight inset (left/right/top: nav area;
   bottom: room for the caption card + dots rail).
   On About the stage fills the viewport (no caption / no rail).
   ============================================================ */
.stage {
  position: absolute;
  /* Unified left visual container — identical width/height on every
     non-About slide. Driven by the --stage-* tokens above so any
     adjustment to the caption-card rail keeps the stage in sync. */
  top: var(--stage-top);
  right: var(--stage-right);
  bottom: var(--stage-bottom);
  left: var(--stage-left);
  background: var(--bg-alt);
  overflow: hidden;
}
.stage.no-caption {
  /* About: stage fills full viewport — about-view manages its own padding */
  inset: 0;
  background: var(--bg);
}

/* Stacked slides — only the active one is visible */
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms var(--ease);
}
.slide.in { opacity: 1; pointer-events: auto; }

/* ============================================================
   IFRAME slide — live website embed, with screenshot fallback
   ============================================================ */
.iframe-wrap {
  position: absolute;
  inset: 0;
  background: var(--bg-alt);
  overflow: hidden;
}
.viz-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--white);
  opacity: 0;
  transition: opacity 320ms var(--ease);
}
.viz-iframe.loaded { opacity: 1; }

/* Loading indicator — quiet bar */
.viz-loading {
  position: absolute; inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg-alt);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: opacity 280ms var(--ease);
}
.viz-loading.hide { opacity: 0; pointer-events: none; }
.viz-loading .bar { width: 80px; height: 2px; background: var(--line); position: relative; overflow: hidden; }
.viz-loading .bar::after {
  content: ""; position: absolute; inset: 0;
  background: var(--lavender-700); transform-origin: left;
  animation: bar-load 1.4s var(--ease) infinite;
}
@keyframes bar-load {
  0%   { transform: scaleX(0); }
  50%  { transform: scaleX(0.7); }
  100% { transform: scaleX(0); transform-origin: right; }
}

/* Fallback wrapper — shows the static screenshot if iframe blocked.
   This is a SCROLLABLE container so the user can scroll a long-form
   screenshot inside the slide area. */
.iframe-fallback {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
/* Bold purple scrollbar — visitors should clearly see they can scroll
   the embedded long-form screenshots. Square edges, no rounding. */
.iframe-fallback { scrollbar-width: auto; scrollbar-color: var(--lavender-700) var(--line); }
.iframe-fallback::-webkit-scrollbar { width: 12px; }
.iframe-fallback::-webkit-scrollbar-track { background: var(--line); }
.iframe-fallback::-webkit-scrollbar-thumb {
  background: var(--lavender-700);
  border-radius: 0;
}
.iframe-fallback::-webkit-scrollbar-thumb:hover { background: var(--lavender-500); }
.iframe-fallback img {
  display: block;
  width: 100%;
  height: auto;
}

/* "Static preview" label — tells the visitor it's a screenshot.
   Sits in the lower-left of the iframe-fallback area so it doesn't
   collide with the top-right floating chrome. */
.iframe-fallback-tag {
  position: absolute;
  left: 20px;
  bottom: 20px;
  padding: 8px 14px;
  background: var(--white);
  border: 1px solid var(--ink);
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 24;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-2);
  z-index: 2;
  pointer-events: none;
}

/* ============================================================
   PREVIEW slide — full-bleed poster image
   ============================================================ */
.preview-canvas {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  text-decoration: none !important;
}
.preview-img {
  width: 100%;
  height: 100%;
  object-position: center;
  transition: transform 600ms var(--ease);
}
.preview-canvas:hover .preview-img { transform: scale(1.015); }

/* Video preview — covers the stage, autoplay+loop+muted. */
.preview-canvas.video {
  display: block;
  overflow: hidden;
}
.viz-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Stacked preview — multiple images filling vertical slices of the
   slide, edge-to-edge. Used for Fortune-tell (GitHub repo screenshot
   on top + cropped bauhaus below) to fill the tall stage area without
   any grey frame. */
.preview-canvas.stacked {
  display: flex;
  flex-direction: column;
  background: var(--white);
}
.preview-canvas.stacked .stack-slot {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
.preview-canvas.stacked .stack-slot img {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 600ms var(--ease);
}
.preview-canvas.stacked:hover .stack-slot img { transform: scale(1.015); }

/* ============================================================
   COLLAGE slide — wordmark/quote/poster + platform-logo grid
   Two halves (50/50). The right half is the platform grid.
   ============================================================ */
.collage {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
}

/* Hero half — variant A: wordmark centered on white */
.collage-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.collage-hero.wordmark { background: var(--lavender-100); padding: 8%; }
.collage-hero.wordmark img { max-width: 80%; max-height: 80%; object-fit: contain; }

/* variant B: full-bleed poster */
.collage-hero.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* variant D: stacked — two (or more) images filling vertical slices
   of the hero half. Edge-to-edge, no lavender frame. Both images are
   constrained to the same visual width so the left column reads as a
   stacked RECTANGLE rather than a triangle (narrow logo on top, wide
   poster on bottom). */
.collage-hero.stacked {
  padding: 0;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
}
.collage-hero.stacked .stack-slot {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.collage-hero.stacked .stack-slot img {
  width: 100%;
  height: 100%;
  max-width: 86%;     /* both slots share this visual frame width */
  max-height: 92%;
  margin: 0 auto;
  display: block;
  transition: transform 600ms var(--ease);
}
.collage:hover .collage-hero.stacked .stack-slot img { transform: scale(1.01); }

/* variant C: quote (the innovation formula).
   Whole line in Fraunces, factors stacked one-per-line on the right
   so the left column uses its full vertical space. */
.collage-hero.quote {
  background: var(--white);
  padding: 8% 9%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
}
.collage-hero.quote .q-note {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 18;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-3);
}
.collage-hero.quote .q-equation {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 96;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.collage-hero.quote .q-lhs {
  /* Container-query font sizing — the phrase fits the actual hero
     half width, regardless of viewport. Wraps to 2 lines if it has
     to ("an economy's / innovation capacity ="). */
  font-size: clamp(24px, 6.2cqi, 44px);
  color: var(--ink);
  line-height: 1.04;
  text-wrap: balance;
}
.collage-hero.quote { container-type: inline-size; }
.collage-hero.quote .q-factors {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}
.collage-hero.quote .q-factor {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: clamp(22px, 5.4cqi, 36px);
  color: var(--klein);
  line-height: 1.05;
}
.collage-hero.quote .q-mul {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 72;
  font-weight: 400;
  color: var(--klein);
  flex-shrink: 0;
  width: 0.7em;
  text-align: center;
}
.collage-hero.quote .q-word {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 72;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* Platform grid (right half) */
.collage-grid {
  display: grid;
  background: var(--white);
  border-left: 1px solid var(--line);
}
.collage-grid.cols-1 { grid-template-columns: 1fr; }
.collage-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.collage-grid.rows-1 { grid-template-rows: 1fr; }
.collage-grid.rows-2 { grid-template-rows: 1fr 1fr; }
.collage-grid.rows-3 { grid-template-rows: 1fr 1fr 1fr; }
.collage-grid.rows-4 { grid-template-rows: 1fr 1fr 1fr 1fr; }
.collage-grid.cols-1 .collage-cell:not(:last-child) { border-bottom: 1px solid var(--line); }
.collage-grid.cols-2 .collage-cell:nth-child(odd) { border-right: 1px solid var(--line); }
.collage-grid.cols-2.rows-2 > .collage-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
/* 4-row stack — tighten each cell so all four fit the stage height. */
.collage-grid.rows-4 .collage-cell { padding: 20px 28px; gap: 28px; grid-template-columns: 96px 1fr; }
.collage-grid.rows-4 .cell-logo-wrap { width: 96px; height: 96px; }
.collage-grid.rows-4 .cell-logo-wrap .linkedin-mark { width: 88px; height: 88px; font-size: 48px; }
.collage-grid.rows-4 .cell-fans strong { font-size: 44px; }
.collage-grid.rows-4 .cell-meta { gap: 6px; }

/* 2×2 grid — cells are narrower than the row stack, so swap the
   horizontal logo|meta layout for a vertical logo-on-top stack and
   tighten paddings. Keeps each cell readable inside the smaller box. */
.collage-grid.cols-2.rows-2 .collage-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 28px;
}
.collage-grid.cols-2.rows-2 .cell-logo-wrap {
  width: 88px;
  height: 88px;
  justify-content: flex-start;
}
.collage-grid.cols-2.rows-2 .cell-logo-wrap .linkedin-mark {
  width: 80px; height: 80px; font-size: 44px;
}
.collage-grid.cols-2.rows-2 .cell-fans strong { font-size: 48px; }
.collage-grid.cols-2.rows-2 .cell-meta { gap: 10px; }

/* Cells use a two-column grid: LEFT = big logo block, RIGHT = the
   meta (name, follower count, visit pill). Both columns weighty
   enough that the cell never looks empty — logos fill a generous
   block and the follower numeral does the dominant talking. */
.collage-cell {
  position: relative;
  display: grid;
  grid-template-columns: 128px 1fr;
  align-items: center;
  gap: 32px;
  padding: 32px 36px;
  background: var(--white);
  text-decoration: none;
  color: var(--ink);
  transition: background 200ms var(--ease);
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  /* Enable container queries — the cell-name uses cqi so it can
     shrink as the cell width shrinks (smaller viewports / 2x2 grid). */
  container-type: inline-size;
}
.collage-cell:hover { background: var(--bg-alt); }
.collage-cell:hover .cell-cta { color: var(--lavender-700); }

/* Platform LOGO — large square block on the left of the cell. */
.cell-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 128px;
  height: 128px;
  flex-shrink: 0;
  padding: 0;
}
.cell-logo-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
/* LinkedIn typographic mark (no real image) */
.cell-logo-wrap .linkedin-mark {
  width: 118px; height: 118px;
  display: flex; align-items: center; justify-content: center;
  background: #0A66C2;
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 64px;
  line-height: 1;
}

.cell-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.cell-meta-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.cell-name {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 36;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ink);
}
/* Follower / fan count — big modern sans-serif numeral in Klein
   purple-blue. Number does the talking; the unit ("fans") is the
   small mono caption beside it. */
.cell-fans {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1;
}
.cell-fans strong {
  font-family: var(--font-sans);
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--lavender-700);
  line-height: 1;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}
.cell-fans span {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 18;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-3);
}
/* Visit pill inside collage cells — same black-filled treatment as the
   museum caption card's CTA. Consistency: every "Visit" on the site is
   a solid black pill that earns its weight. */
.cell-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 24;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  width: fit-content;
  transition: background 200ms var(--ease);
}
.collage-cell:hover .cell-cta { background: var(--lavender-700); color: var(--white); }

/* Single-cell collage (artist / hiphop) — hero-size the lone cell.
   Center stack: huge logo on top, name + fan count + visit beneath. */
.collage-grid.cols-1.rows-1 .collage-cell {
  display: flex;
  flex-direction: column;
  padding: 56px 40px;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 32px;
  position: relative;
  overflow: hidden;
}

/* Framed cell — a rotated bauhaus poster wraps the central content
   like a decorative pattern border, with a hollow centre (mask cut
   from the middle) so the logo / fans / visit content reads cleanly.
   Used on the Artist (Hiphop) cell. */
.collage-cell.framed { position: relative; overflow: hidden; }
.collage-cell.framed .cell-frame-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: block;
}
.collage-cell.framed .cell-frame-art img {
  position: absolute;
  top: 50%;
  left: 50%;
  /* Original poster is 1376×768 (landscape). Rotated 90deg, the
     visible shape becomes 768 tall × 1376 wide → translate so the
     rotated content fills the cell. */
  width: 130%;
  height: 130%;
  object-fit: cover;
  object-position: center;
  transform: translate(-50%, -50%) rotate(90deg);
  /* Mask cuts an elliptical "window" in the centre so the bauhaus
     pattern only shows as a frame around the content. */
  -webkit-mask-image: radial-gradient(ellipse 38% 42% at center, transparent 60%, black 100%);
          mask-image: radial-gradient(ellipse 38% 42% at center, transparent 60%, black 100%);
}
.collage-cell.framed .cell-logo-wrap,
.collage-cell.framed .cell-meta {
  position: relative;
  z-index: 1;
}
.collage-grid.cols-1.rows-1 .cell-logo-wrap {
  width: 160px;
  height: 160px;
  justify-content: center;
  padding: 0;
}
.collage-grid.cols-1.rows-1 .cell-logo-wrap img { max-width: 100%; max-height: 100%; }
.collage-grid.cols-1.rows-1 .cell-meta {
  align-items: center;
  text-align: center;
  gap: 20px;
}
.collage-grid.cols-1.rows-1 .cell-meta-row {
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.collage-grid.cols-1.rows-1 .cell-name {
  font-size: 28px;
  white-space: nowrap;
}
.collage-grid.cols-1.rows-1 .cell-fans { justify-content: center; gap: 12px; }
.collage-grid.cols-1.rows-1 .cell-fans strong {
  font-family: var(--font-sans);
  font-size: 96px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--lavender-700);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   CAPTION CARD — "museum gallery wall card"
   ============================================================
   Floats over the stage at the bottom-left, ABOVE the works rail.
   - It's a self-contained box: 1px hairline border, white bg.
   - Surrounded by stage on all sides (no full-width strip / hairline).
   - Three short lines, no extra keywords / language tags.
   - The Visit pill is the only black-filled element on the screen —
     it's the call-to-action that earns its weight.
   ============================================================ */
.caption-card {
  position: fixed;
  right: var(--cap-right);
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  width: var(--cap-width);
  max-width: calc(100vw - 48px);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 32px 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  /* Enable container queries — the title clamps font-size with cqi
     against the card's actual width, so single-line names shrink
     gracefully on narrow viewports instead of breaking. */
  container-type: inline-size;
  transition: border-color 200ms var(--ease);
}
.caption-card:hover { border-color: var(--line-3); }

.cap-title-line {
  /* Title font scales with the cap-width container so long single-line
     names ("Fortune-telling Experts", "Hip-hop Saved My Life") shrink
     to fit one line instead of wrapping. Container queries pick up
     the actual card width, not viewport width. Bumped +2 across the
     whole clamp range so titles read heavier. */
  font-family: var(--font-serif);
  font-size: clamp(26px, 8.2cqi, 46px);
  font-variation-settings: "opsz" 72;
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0;
  /* Allow explicit "\n" line breaks (OtherWise / 他山之玉) and natural
     wrapping for long titles. */
  white-space: pre-line;
  text-wrap: balance;
}
/* Kind line — small purple serif word above the title. Same single
   attribute word as appears in front of the bottom-rail label
   (Media / Writing / Music / Website / Agent Tools / Agent Skill). */
.cap-kind-line {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 24;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--lavender-700);
  margin: 0 0 -4px;
}
.work-kind {
  /* Attribute prefix (Media · / Writing · / Music · etc) — lavender
     since it's a category tag, not the key emphasis that blue is
     reserved for in .about-paras strong / .cap-blurb-line strong. */
  color: var(--lavender-700);
  font-weight: 600;
}
.cap-blurb-line {
  /* Match About body copy — Inter sans, dense paragraph text, with
     <strong> rendered in klein blue (handled below). */
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
  margin: 0;
}
.cap-blurb-line strong {
  color: var(--klein);
  font-weight: 600;
}

/* The Visit pill — solid black background, white text. The
   ONLY filled-dark element on the screen. Long URLs wrap inside
   the card so the pill never escapes the right-rail container. */
.cap-visit-line {
  align-self: stretch;
  max-width: 100%;
  display: inline-flex;
  align-items: baseline;
  /* Card is allowed to grow vertically — long URLs wrap onto a new
     line rather than getting truncated with ellipsis. */
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 14px 18px;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 24;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
  margin-top: 6px;
  overflow-wrap: anywhere;
  word-break: break-word;
  transition: background 200ms var(--ease), transform 120ms var(--ease);
}
.cap-visit-line:hover { background: var(--lavender-700); }
.cap-visit-line:active { transform: translateY(1px); }
.cap-visit-line .verb {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 24;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 15px;
  color: var(--lavender-300);  /* secondary tier on the dark pill */
  flex-shrink: 0;
}
.cap-visit-line .url {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 24;
  letter-spacing: 0;
  text-transform: none;
  color: var(--white);
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.cap-visit-line .arr { color: var(--white); flex-shrink: 0; }

/* ============================================================
   TOP-LEFT — Avatar (Chat entry).
   Hidden when section === "about" (the about hero already shows
   the same portrait, so this would be a duplicate).
   ============================================================ */
.avatar-zone {
  position: fixed;
  top: var(--nav-inset);
  left: var(--nav-inset);
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 14px;
  /* Match section-nav box height exactly so the two top corners line
     up across the horizontal axis. */
  padding: 8px 16px 8px 8px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  opacity: var(--chrome-rest-opacity);
  transition: opacity 220ms var(--ease), border-color 220ms var(--ease);
}
.avatar-zone:hover,
.avatar-zone:focus-within { opacity: 1; border-color: var(--lavender-700); }
.avatar-zone.hide { display: none; }
.avatar {
  width: 48px; height: 48px;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-meta { display: flex; flex-direction: column; gap: 2px; line-height: 1.1; }
.avatar-name {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 24;
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
}
.avatar-sub {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 18;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-3);
}

.avatar-tooltip {
  position: absolute;
  top: calc(100% + 6px); left: 0;
  background: var(--ink);
  color: var(--white);
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
.avatar-zone:hover .avatar-tooltip { opacity: 1; transform: translateY(0); }

/* ============================================================
   TOP-RIGHT corner cluster:
     - ops hint (sits above the sections switcher)
     - sections switcher
   Both fade to near-invisible at rest, full opacity on hover.
   ============================================================ */
.top-right {
  position: fixed;
  top: var(--nav-inset);
  right: var(--nav-inset);
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  opacity: var(--chrome-rest-opacity);
  transition: opacity 220ms var(--ease);
}
.top-right:hover,
.top-right:focus-within { opacity: 1; }

.ops-hint {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 18;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-3);
}
.ops-hint .group { display: inline-flex; align-items: center; gap: 8px; }
.ops-hint .key {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px;
  padding: 0 6px;
  border: 1px solid var(--line-3);
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--white);
}
.ops-hint .div { color: var(--ink-5); margin: 0 4px; }

.sections {
  display: flex;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
}
.section-link {
  display: flex;
  align-items: center;
  /* center text vertically AND horizontally — text reads centered
     inside each pill, no baseline misalignment with the number prefix. */
  justify-content: center;
  gap: 8px;
  /* 30% smaller font + correspondingly tighter padding so the box
     still feels balanced after the size cut. */
  padding: 14px 20px;
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 24;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-3);
  border-right: 1px solid var(--line);
  cursor: pointer;
  position: relative;
  transition: color 200ms var(--ease), background 200ms var(--ease);
}
.section-link:last-child { border-right: 0; }
.section-link .num {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 18;
  font-size: 10px;
  font-weight: 400;
  color: var(--ink-4);
}
.section-link:hover { color: var(--ink); background: rgba(0, 0, 0, 0.02); }
.section-link.active { color: var(--ink); }
.section-link.active::after {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--lavender-700);
}

/* ============================================================
   BOTTOM — Works rail (centered compact dots row).
   Each work is a small square dot. The dot under the active work
   is Klein-blue and slightly larger; others are inactive grey.
   The current work's title sits beside its dot.
   ============================================================ */
.works-rail {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 24px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  /* Cap width to viewport, scroll horizontally when labels overflow. */
  width: max-content;
  max-width: calc(100vw - 40px);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.works-rail::-webkit-scrollbar { height: 4px; }
.works-rail::-webkit-scrollbar-thumb {
  background: var(--line-3);
  border-radius: 0;
}
.works-rail.hide { display: none; }

.work-dot {
  position: relative;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 2px;
  white-space: nowrap;
  transition: color 200ms var(--ease);
}

/* The dot itself — small square */
.work-dot .sq {
  width: 8px; height: 8px;
  background: var(--ink-5);
  transition: background 200ms var(--ease), width 200ms var(--ease), height 200ms var(--ease);
  flex-shrink: 0;
}
.work-dot:hover .sq { background: var(--ink); }
.work-dot.active .sq { background: var(--lavender-700); width: 12px; height: 12px; }

/* Label sits to the right of the dot — ALWAYS shown so visitors can
   see every work's name at a glance, not just the active one. */
.work-dot .work-num { display: none; }
.work-dot .work-label {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 24;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color 200ms var(--ease);
}
.work-dot .work-label .work-kind {
  font-size: 0.92em;
  letter-spacing: 0.02em;
}
.work-dot:hover .work-label { color: var(--ink); }
.work-dot.active .work-label { color: var(--ink); font-weight: 500; }

/* ============================================================
   ABOUT view — bauhaus portrait left, journey + bio right.
   Lives inside .stage (so it respects caption-h bottom inset).
   ============================================================ */
.about-view {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  /* More breathing room from the top — About sits well below the
     floating top-right nav, not aligned with it. */
  padding: 160px 80px 80px;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms var(--ease);
  overflow-y: auto;
  scrollbar-width: auto;
  scrollbar-color: var(--lavender-700) var(--line);
}
.about-view::-webkit-scrollbar { width: 12px; }
.about-view::-webkit-scrollbar-track { background: var(--line); }
.about-view::-webkit-scrollbar-thumb { background: var(--lavender-700); border-radius: 0; }
.about-view::-webkit-scrollbar-thumb:hover { background: var(--lavender-500); }
.about-view.in { opacity: 1; pointer-events: auto; }

.about-inner {
  width: 100%;
  max-width: 1480px;
  display: grid;
  grid-template-columns: 440px 1fr;
  /* Generous column gap — left profile and right bio no longer
     crowd each other. */
  gap: 160px;
  align-items: start;
}

/* Left column wraps the portrait AND the section jumpers underneath. */
.about-left {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.about-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-alt);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Section jumpers — three rows: icon + label/caption + arrow.
   Bauhaus shape icons in the brand palette (klein blue / lavender /
   ink). Hover state lifts the row with a subtle background. */
.about-jumpers {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.about-jumper {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 22px 6px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 180ms var(--ease), padding 180ms var(--ease);
}
.about-jumper:hover { background: var(--bg-alt); padding-left: 14px; padding-right: 14px; }
.about-jumper-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.about-jumper-icon svg { width: 100%; height: 100%; display: block; }
.about-jumper-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.15;
}
.about-jumper-label {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 36;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.about-jumper-caption {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 18;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-3);
}
.about-jumper-arr {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink-4);
  transition: color 180ms var(--ease), transform 180ms var(--ease);
}
.about-jumper:hover .about-jumper-arr { color: var(--lavender-700); transform: translate(2px, -2px); }

.about-text { color: var(--ink-2); font-size: 19px; line-height: 1.65; text-wrap: pretty; }
.about-name {
  font-family: var(--font-serif);
  font-size: clamp(72px, 7vw, 108px);
  font-variation-settings: "opsz" 96;
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
.about-zh {
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 500;
  color: var(--ink-3);
  margin: 14px 0 0;
}
.about-paras { margin-top: 40px; display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.about-paras p { margin: 0; }
/* Emphasis: Klein-blue bold per Lumen accent rules. Used sparingly. */
.about-paras strong { color: var(--klein); font-weight: 600; }

/* City row (Bauhaus icons + city + heart phrase) */
.cities {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.city {
  padding: 24px 22px 24px 0;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.city:last-child { border-right: 0; padding-right: 0; }
.city-icon {
  width: 44px; height: 44px;
  display: block;
}
.city-icon svg { width: 100%; height: 100%; display: block; }
.city-name {
  font-family: var(--font-serif);
  font-size: 24px;
  font-variation-settings: "opsz" 36;
  color: var(--ink);
  line-height: 1.2;
  margin: 0;
}
.city-stage {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-4);
}
.city.active .city-name { color: var(--klein); }

/* Education table */
.about-edu { margin-top: 40px; }
.about-edu-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.about-edu-row:first-child { border-top: 1px solid var(--line); }
.about-edu-row .deg { color: var(--ink-3); }
.about-edu-row .school { color: var(--ink); }

/* ============================================================
   CHAT overlay
   ============================================================ */
.chat-overlay {
  position: fixed; inset: 0;
  z-index: 300;
  background: var(--white);
  display: flex; flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms var(--ease);
}
.chat-overlay.open { opacity: 1; pointer-events: auto; }

.chat-close {
  position: absolute;
  top: 32px; right: 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  cursor: pointer;
  display: flex; align-items: center;
  gap: 8px;
  z-index: 2;
}
.chat-close:hover { color: var(--ink); }
.chat-close .x {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border: 1px solid var(--line);
}

.chat-body {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  padding: 96px 32px 32px;
  overflow: hidden;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  position: relative;
}
.chat-header {
  display: flex; flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  text-align: center;
  transition: opacity 280ms var(--ease), transform 280ms var(--ease),
              max-height 280ms var(--ease), margin-bottom 280ms var(--ease);
  max-height: 280px;
  overflow: hidden;
  flex-shrink: 0;
}
.chat-header.dim { opacity: 0; transform: translateY(-12px); max-height: 0; margin-bottom: 0; pointer-events: none; }
.chat-header .avatar-lg {
  width: 72px; height: 72px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.chat-header .avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.chat-header .title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-variation-settings: "opsz" 48;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  white-space: nowrap;
  color: var(--ink);
}
.chat-header .sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 640px;
  margin: 0 auto 16px;
}
.chat-suggestion {
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 200ms var(--ease), color 200ms var(--ease), background 200ms var(--ease);
}
.chat-suggestion:hover { border-color: var(--lavender-700); color: var(--lavender-700); }

.chat-messages {
  flex: 1;
  width: 100%;
  max-width: 640px;
  overflow-y: auto;
  padding: 8px 0 24px;
  display: flex; flex-direction: column;
  gap: 20px;
  scrollbar-width: auto;
  scrollbar-color: var(--lavender-700) var(--line);
}
.chat-messages::-webkit-scrollbar { width: 12px; }
.chat-messages::-webkit-scrollbar-track { background: var(--line); }
.chat-messages::-webkit-scrollbar-thumb { background: var(--lavender-700); border-radius: 0; }
.chat-messages::-webkit-scrollbar-thumb:hover { background: var(--lavender-500); }
.msg { display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.65; }
.msg .role {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.msg.user .role { color: var(--lavender-700); }
.msg .body { color: var(--ink); white-space: pre-wrap; }
.msg.assistant .body { color: var(--ink-2); }

.chat-input-wrap {
  width: 100%;
  max-width: 640px;
  border-top: 2px solid var(--ink);
  display: flex; align-items: center; gap: 12px;
  padding-top: 12px;
}
.chat-input {
  flex: 1; border: 0; outline: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  padding: 8px 0;
}
.chat-input::placeholder { color: var(--ink-4); }
.chat-send {
  width: 36px; height: 36px;
  background: var(--lavender-700);
  color: var(--white);
  display: inline-flex;
  align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 200ms var(--ease);
}
.chat-send:hover { background: var(--lavender-500); }
.chat-send:disabled { background: var(--ink-5); cursor: not-allowed; }

/* ============================================================
   Splash
   ============================================================ */
.splash {
  position: fixed; inset: 0;
  z-index: 400;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  gap: 20px;
  transition: opacity 600ms var(--ease);
}
.splash.gone { opacity: 0; pointer-events: none; }
.splash-mark {
  width: 48px; height: 48px;
  border: 2px solid var(--ink);
  position: relative;
}
.splash-mark::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--lavender-700);
  transform: scaleY(0);
  transform-origin: bottom;
  animation: splash-fill 900ms var(--ease) 200ms forwards;
}
@keyframes splash-fill { to { transform: scaleY(1); } }
.splash-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-variation-settings: "opsz" 32;
  color: var(--ink);
  opacity: 0;
  animation: splash-fade 600ms var(--ease) 600ms forwards;
}
@keyframes splash-fade { to { opacity: 1; } }

/* ============================================================
   Cursor dot
   ============================================================ */
.cursor-dot {
  position: fixed;
  width: 14px; height: 14px;
  /* lavender triangle pointing up-right, no fill background */
  background: transparent;
  pointer-events: none;
  z-index: 999;
  top: 0; left: 0;
  /* Translate is composed in JS so we only set the static offset here */
  transition: width 120ms var(--ease), height 120ms var(--ease), opacity 120ms var(--ease);
}
.cursor-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  /* equilateral triangle pointing up via clip-path */
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  background: var(--lavender-700);
}
.cursor-dot.big { width: 22px; height: 22px; }
.cursor-dot.hidden { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button, .work-dot, .section-link, .avatar-zone, .chat-suggestion,
  .chat-send, .chat-close, .collage-cell, .preview-canvas { cursor: none; }
  input, textarea { cursor: text; }
}
@media (hover: none) { .cursor-dot { display: none; } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
  .about-inner { grid-template-columns: 280px 1fr; gap: 40px; }
}
@media (max-width: 900px) {
  :root { --nav-inset: 16px; --caption-h: 132px; }
  .caption-block { padding: 0 24px; }
  .cap-blurb-line { white-space: normal; -webkit-line-clamp: 2; overflow: hidden;
                    display: -webkit-box; -webkit-box-orient: vertical; }
  .about-view { padding: 64px 24px 32px; }
  .about-inner { grid-template-columns: 1fr; gap: 24px; }
  .about-photo { max-width: 240px; }
  .cities { grid-template-columns: repeat(2, 1fr); }
  .city:nth-child(2) { border-right: 0; }
  .city:nth-child(1), .city:nth-child(2) { border-bottom: 1px solid var(--line); }
  .collage { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .collage-grid { border-left: 0; border-top: 1px solid var(--line); }
  .top-right { gap: 6px; }
  .ops-hint { display: none; }
}
