/* ──────────────────────────────────────────────────────────
   Joline.S — Portfolio · Design tokens & global styles
   ────────────────────────────────────────────────────── */

:root {
  /* Default palette: 米白 / 深棕 (cream & deep brown) */
  --bg:        #efe7d8;
  --bg-soft:   #e8ddc8;
  --paper:     #f5efe1;
  --ink:       #3a261a;
  --ink-soft:  #6b513f;
  --ink-mute:  #a3917b;
  --line:      #c8b89a;
  --accent:    #8a4a2a;
  --shadow:    rgba(58, 38, 26, 0.10);

  --serif-zh:  "Noto Serif SC", "Songti SC", "FangSong", "STSong", serif;
  --serif-en:  "EB Garamond", "Cormorant Garamond", "Georgia", serif;
  --sans-zh:   "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --mono:      "Fira Code", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif-zh);
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: default;
}

/* Subtle paper grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(rgba(0,0,0,.025) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 3px 3px, 5px 5px;
  background-position: 0 0, 1px 2px;
  mix-blend-mode: multiply;
  opacity: .8;
}

/* ──────────────── Typography ──────────────── */

.zh { font-family: var(--serif-zh); }
.en { font-family: var(--serif-en); font-style: italic; letter-spacing: .02em; }
.mono { font-family: var(--mono); letter-spacing: .04em; }

.h-display {
  font-family: var(--serif-zh);
  font-weight: 300;
  letter-spacing: .08em;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

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

/* ──────────────── App shell ──────────────── */

#root { position: relative; z-index: 2; }

.stage {
  min-height: 100vh;
  width: 100%;
  position: relative;
}

/* Top frame */
.top-frame {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 36px;
  z-index: 100;
  pointer-events: none;
  mix-blend-mode: multiply;
}
.top-frame > * { pointer-events: auto; }

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand .name {
  font-family: var(--serif-zh);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: .12em;
}
.brand .name-en {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: .05em;
  margin-top: 2px;
}

.lang-toggle {
  display: flex;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--ink-mute);
  align-items: center;
}
.lang-toggle .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--ink);
  display: inline-block;
  margin: 0 6px;
  opacity: .35;
}

.year-mark {
  position: fixed;
  bottom: 22px; left: 36px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--ink-mute);
  z-index: 100;
  mix-blend-mode: multiply;
}

.page-counter {
  position: fixed;
  bottom: 22px; right: 36px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--ink-mute);
  z-index: 100;
  mix-blend-mode: multiply;
}

/* ──────────────── Home — water + works list ──────────────── */

.home {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: stretch;
  gap: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
}

/* ── Full-bleed star canvases (cover the whole .home section) ── */
.sf-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.sf-bg { z-index: 0; }
.sf-fx { z-index: 6; }

.home-left {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 60px;
}

.home-right {
  position: relative;
  z-index: 2;
  background: var(--bg);
  padding: 110px 80px 80px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
}
.hr-head { margin-bottom: 28px; }
.hr-title {
  margin: 18px 0 0;
  font-family: var(--serif-zh);
  font-weight: 300;
  font-size: 56px;
  letter-spacing: .3em;
  line-height: 1;
}
.hr-title small {
  display: block;
  margin-top: 8px;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-soft);
  letter-spacing: .04em;
}

.works-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}
.work-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1.6fr) 1fr 50px;
  align-items: baseline;
  gap: 18px;
  padding: 22px 4px 22px;
  border-bottom: 1px solid rgba(58, 38, 26, .10);
  cursor: pointer;
  position: relative;
  transition: padding-left .35s cubic-bezier(.2,.7,.2,1), color .25s;
}
.work-row::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .55s cubic-bezier(.2,.7,.2,1);
}
.work-row:hover {
  padding-left: 18px;
  color: var(--accent);
}
.work-row:hover::before { transform: scaleX(1); }
.work-row .wr-num {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .2em;
  color: var(--ink-mute);
}
.work-row .wr-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.work-row .wr-title .zh {
  font-family: var(--serif-zh);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: .12em;
}
.work-row .wr-title .en {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--ink-mute);
}
.work-row .wr-medium {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.work-row .wr-medium .zh {
  font-family: var(--serif-zh);
  font-size: 13px;
  letter-spacing: .15em;
  color: var(--ink-soft);
}
.work-row .wr-medium .en {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.work-row .wr-meta {
  text-align: right;
}
.work-row .wr-year {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--ink-mute);
}

.hr-foot { margin-top: 26px; }
.hr-cta {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  padding: 14px 22px;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  transition: background .25s, color .25s, border-color .25s;
}
.hr-cta:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.hr-cta span {
  font-family: var(--serif-zh);
  font-size: 14px;
  letter-spacing: .12em;
}
.hr-cta small {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: .7;
}

/* ── Left panel variants ── */
.lp {
  position: relative;
  max-width: 520px;
  width: 100%;
  color: var(--ink);
}
.lp-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 40px;
}
.lp-eyebrow .ln { flex: 0 0 40px; height: 1px; background: currentColor; opacity: .5; }

/* — Verse — */
.lp-verse-stage {
  animation: verse-in 1s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes verse-in {
  from { opacity: 0; transform: translateY(10px); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
.lp-verse-zh {
  font-family: var(--serif-zh);
  font-weight: 300;
  font-size: clamp(28px, 3.6vw, 48px);
  letter-spacing: .14em;
  line-height: 1.6;
  white-space: pre-wrap;
}
.lp-verse-en {
  margin-top: 26px;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: clamp(13px, 1.1vw, 16px);
  color: var(--ink-soft);
  line-height: 1.8;
  max-width: 440px;
  letter-spacing: .03em;
}
.lp-verse-dots {
  margin-top: 56px;
  display: flex;
  gap: 8px;
}
.lp-verse-dots span {
  width: 16px; height: 1px;
  background: var(--ink-mute);
  opacity: .35;
  transition: opacity .4s, width .4s;
}
.lp-verse-dots span.on { opacity: 1; width: 32px; background: var(--accent); }

/* — Monogram — */
.lp-monogram .mono-cn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--serif-zh);
  font-weight: 300;
  font-size: clamp(80px, 11vw, 160px);
  line-height: 1;
  letter-spacing: 0;
  margin-top: 10px;
}
.lp-monogram .mono-cn span {
  display: block;
  animation: mono-rise .8s cubic-bezier(.2,.7,.2,1) both;
}
.lp-monogram .mono-cn span:nth-child(2) { animation-delay: .1s; padding-left: 0.4em; }
.lp-monogram .mono-cn span:nth-child(3) { animation-delay: .2s; padding-left: 0.8em; }
@keyframes mono-rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
.lp-monogram .mono-en {
  margin-top: 30px;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: clamp(24px, 2.4vw, 36px);
  color: var(--ink-soft);
  letter-spacing: .04em;
}
.lp-monogram .mono-stamp {
  margin-top: 50px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.lp-monogram .stamp-circle {
  width: 88px; height: 88px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--accent);
  line-height: 1.6;
  transform: rotate(-6deg);
  flex-shrink: 0;
}
.lp-monogram .mono-line {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--serif-zh);
  font-size: 14px;
  letter-spacing: .15em;
  color: var(--ink-soft);
}
.lp-monogram .mono-line .en {
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--ink-mute);
}

/* — Featured — */
.lp-featured {
  display: flex;
  flex-direction: column;
}
.lp-feat-frame {
  background: var(--paper);
  padding: 18px;
  width: 76%;
  align-self: center;
  box-shadow: 0 1px 2px rgba(58,38,26,.08),
              0 40px 80px -30px rgba(58,38,26,.45);
  animation: feat-in .8s cubic-bezier(.2,.7,.2,1) both;
  transform-origin: center;
}
.lp-feat-frame .img {
  animation: feat-zoom 6s cubic-bezier(.4,.1,.4,1) both;
  transform-origin: center;
}
@keyframes feat-in {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
@keyframes feat-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}
.lp-feat-meta {
  margin-top: 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 0 6px;
}
.lp-feat-meta .ft-num {
  font-size: 10.5px;
  letter-spacing: .22em;
  color: var(--ink-mute);
}
.lp-feat-meta .ft-ttl {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: center;
}
.lp-feat-meta .ft-ttl .zh {
  font-family: var(--serif-zh);
  font-size: 18px;
  letter-spacing: .15em;
}
.lp-feat-meta .ft-ttl .en {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-mute);
  letter-spacing: .03em;
}
.lp-feat-meta .ft-yr {
  font-size: 10.5px;
  letter-spacing: .2em;
  color: var(--ink-mute);
}

/* — Map (constellation of moods) — */
.lp-map { width: 100%; max-width: 600px; }
.lp-map .map-svg {
  width: 100%;
  aspect-ratio: 1 / 1;
  color: var(--ink);
  display: block;
  margin: 10px 0 20px;
}
.lp-map .map-svg g { transition: opacity .25s; }
.lp-map .map-svg g:hover { color: var(--accent); }
.lp-map .map-hint {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lp-map .map-hint .zh {
  font-family: var(--serif-zh);
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--ink-soft);
}
.lp-map .map-hint .en {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-mute);
}

@media (max-width: 960px) {
  .lp-feat-frame { width: 100%; }
}

@media (max-width: 960px) {
  .home { grid-template-columns: 1fr; }
  .home-left { min-height: 50vh; height: 50vh; padding: 40px 30px; }
  .home-right { padding: 80px 36px 60px; min-height: auto; }
  .work-row { grid-template-columns: 28px 1fr 40px; gap: 14px; }
  .work-row .wr-medium { display: none; }
}

/* ──────────────── Mood view — scattered cards ──────────────── */

.mood-view {
  min-height: 100vh;
  padding: 110px 80px 80px;
  position: relative;
}

.mood-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 60px;
}
.mood-head h1 {
  margin: 0;
  font-family: var(--serif-zh);
  font-weight: 300;
  font-size: 72px;
  letter-spacing: .3em;
  line-height: 1;
}
.mood-head .h-en {
  margin-top: 12px;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 22px;
  color: var(--ink-soft);
  letter-spacing: .05em;
}
.mood-head .blurb {
  max-width: 360px;
  font-family: var(--serif-zh);
  font-size: 14px;
  line-height: 2;
  color: var(--ink-soft);
}
.mood-head .blurb .en {
  display: block;
  margin-top: 10px;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-mute);
  line-height: 1.7;
}

.scatter {
  position: relative;
  min-height: 720px;
  padding: 40px 0;
}

.scard {
  position: absolute;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(58,38,26,.08),
              0 18px 40px -16px rgba(58,38,26,.30);
  border: 1px solid rgba(58,38,26,.06);
  padding: 14px 14px 16px;
  cursor: pointer;
  transform-origin: center center;
  transition: transform .5s cubic-bezier(.2,.7,.2,1),
              box-shadow .4s, z-index 0s;
  will-change: transform;
}
.scard:hover {
  transform: translate(var(--tx,0), var(--ty,0)) rotate(var(--r,0deg)) scale(1.04) translateY(-6px);
  box-shadow: 0 2px 4px rgba(58,38,26,.10),
              0 30px 60px -20px rgba(58,38,26,.4);
  z-index: 5;
}
.scard .img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 5;
  background-size: cover;
  background-position: center;
}
.scard .meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 10px;
  padding: 0 2px;
}
.scard .meta .ttl {
  font-family: var(--serif-zh);
  font-size: 13px;
  letter-spacing: .1em;
}
.scard .meta .ttl small {
  display: block;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 2px;
  letter-spacing: .04em;
}
.scard .meta .yr {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: .12em;
}
.scard .tag {
  position: absolute;
  top: 8px; left: 10px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .2em;
  color: var(--paper);
  background: var(--ink);
  padding: 2px 6px;
  text-transform: uppercase;
  opacity: .85;
}

/* tape decoration */
.scard.taped::before {
  content: "";
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%) rotate(var(--tape-r, -3deg));
  width: 48px; height: 16px;
  background: rgba(220,210,180,.7);
  border-left: 1px dashed rgba(0,0,0,.05);
  border-right: 1px dashed rgba(0,0,0,.05);
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

/* sidebar index variant */
.side-index {
  position: fixed;
  left: 36px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 90;
  mix-blend-mode: multiply;
}
.side-index .si-item {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: color .3s, gap .3s;
}
.side-index .si-item .num { opacity: .5; }
.side-index .si-item .ln { width: 14px; height: 1px; background: currentColor; opacity: .5; transition: width .3s; }
.side-index .si-item:hover, .side-index .si-item.active {
  color: var(--accent);
  gap: 18px;
}
.side-index .si-item:hover .ln, .side-index .si-item.active .ln {
  width: 30px;
}

/* ──────────────── Work detail ──────────────── */

.detail {
  min-height: 100vh;
  padding: 100px 0 60px;
  position: relative;
}
.detail-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 80px;
}
.crumb {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .2em;
  color: var(--ink-mute);
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
}
.crumb .arr { display: inline-block; transition: transform .3s; }
.crumb:hover .arr { transform: translateX(-4px); }

.detail-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: end;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 60px;
}
.detail-head h1 {
  margin: 0;
  font-family: var(--serif-zh);
  font-weight: 300;
  font-size: 96px;
  line-height: 1;
  letter-spacing: .12em;
}
.detail-head .h-en {
  margin-top: 16px;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 28px;
  color: var(--ink-soft);
  letter-spacing: .03em;
}
.detail-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--ink-mute);
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.detail-meta b { color: var(--ink); font-weight: 500; }

.detail-body {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  margin-bottom: 80px;
}
.detail-body .copy-zh {
  font-family: var(--serif-zh);
  font-size: 15px;
  line-height: 2.1;
  letter-spacing: .04em;
}
.detail-body .copy-en {
  margin-top: 28px;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--ink-soft);
}

/* Image gallery for photo works */
.gallery {
  display: grid;
  gap: 24px;
}
.gallery .g-row {
  display: grid;
  gap: 24px;
}
.gallery .g-row.r-2 { grid-template-columns: 1fr 1fr; }
.gallery .g-row.r-12 { grid-template-columns: 1fr 2fr; }
.gallery .g-row.r-21 { grid-template-columns: 2fr 1fr; }
.gallery .g-row.r-1 { grid-template-columns: 1fr; }
.gallery .frame {
  background: var(--paper);
  padding: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05),
              0 20px 50px -20px rgba(58,38,26,.25);
}
.gallery .img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
}
.gallery .img.tall { aspect-ratio: 3 / 4; }
.gallery .cap {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .15em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

/* Handmade book: drawer / spread layout */
.book-section {
  margin-top: 40px;
  padding-top: 60px;
  border-top: 1px solid var(--line);
}
.book-section h2 {
  margin: 0 0 4px;
  font-family: var(--serif-zh);
  font-weight: 300;
  font-size: 32px;
  letter-spacing: .2em;
}
.book-section h2 small {
  display: block;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-mute);
  margin-top: 2px;
  letter-spacing: .03em;
}
.book-stage {
  margin-top: 50px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}
.book-object {
  position: relative;
  background: var(--paper);
  padding: 36px;
  box-shadow: 0 30px 70px -25px rgba(58,38,26,.4);
}
.book-object .img {
  aspect-ratio: 1/1;
  background-size: cover;
  background-position: center;
}
.book-object .label {
  position: absolute;
  bottom: 12px; right: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .15em;
  color: var(--ink-mute);
}
.book-flip {
  perspective: 2000px;
  user-select: none;
}
.book-flip-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: var(--paper);
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.04),
    0 30px 70px -25px rgba(58,38,26,.35);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}
.book-flip-inner::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 30px; transform: translateX(-50%);
  background: linear-gradient(90deg,
    rgba(0,0,0,0), rgba(58,38,26,.18), rgba(0,0,0,0));
  pointer-events: none;
}
.book-flip-inner .page {
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.book-flip-inner .page .img {
  flex: 1;
  background-size: cover;
  background-position: center;
}
.book-flip-inner .page .ptext {
  font-family: var(--serif-zh);
  font-size: 13px;
  line-height: 2;
  color: var(--ink);
  align-self: stretch;
  padding: 24px 6px 6px;
}
.book-controls {
  display: flex;
  gap: 18px;
  margin-top: 20px;
  align-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .2em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.book-controls button {
  appearance: none;
  border: 1px solid var(--ink-mute);
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  color: var(--ink);
  padding: 6px 14px;
  cursor: pointer;
  transition: background .25s, color .25s;
}
.book-controls button:hover { background: var(--ink); color: var(--paper); }
.book-controls .num { margin-left: auto; }

/* ──────────────── About ──────────────── */

.about {
  min-height: 100vh;
  padding: 120px 80px 80px;
  max-width: 1100px;
  margin: 0 auto;
}
.about h1 {
  margin: 0 0 50px;
  font-family: var(--serif-zh);
  font-weight: 300;
  font-size: 56px;
  letter-spacing: .25em;
}
.about h1 small {
  display: block;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-soft);
  margin-top: 8px;
  letter-spacing: .04em;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}
.about-portrait {
  position: relative;
  background: var(--paper);
  padding: 18px;
  box-shadow: 0 30px 70px -25px rgba(58,38,26,.4);
}
.about-portrait .img {
  aspect-ratio: 3 / 4;
  background-size: cover;
  background-position: center;
}
.about-portrait .stamp {
  position: absolute;
  bottom: -20px; right: -20px;
  width: 90px; height: 90px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .2em;
  color: var(--accent);
  text-transform: uppercase;
  background: var(--bg);
  text-align: center;
  line-height: 1.4;
  transform: rotate(-6deg);
}

.about-text .bio-zh {
  font-family: var(--serif-zh);
  font-size: 17px;
  line-height: 2.1;
  letter-spacing: .04em;
}
.about-text .bio-en {
  margin-top: 32px;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 14px;
  line-height: 1.95;
  color: var(--ink-soft);
}
.about-meta {
  margin-top: 50px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 30px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.about-meta h3 {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
.about-meta ul {
  margin: 0; padding: 0; list-style: none;
  font-family: var(--serif-zh);
  font-size: 13.5px;
  line-height: 2;
}
.about-meta ul li small {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 11.5px;
  color: var(--ink-mute);
  margin-left: 8px;
}
.about-contact a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--ink);
  border-bottom: 1px solid var(--ink-mute);
  padding-bottom: 2px;
  transition: color .25s, border-color .25s;
}
.about-contact a:hover { color: var(--accent); border-color: var(--accent); }

/* ──────────────── Index View (chronology) ──────────────── */

.index-view {
  min-height: 100vh;
  padding: 110px 80px 80px;
}
.index-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.index-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 60px;
  padding-bottom: 50px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 70px;
}
.index-head h1 {
  margin: 14px 0 0;
  font-family: var(--serif-zh);
  font-weight: 300;
  font-size: 96px;
  letter-spacing: .3em;
  line-height: 1;
}
.index-head h1 small {
  display: block;
  margin-top: 14px;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 20px;
  color: var(--ink-soft);
  letter-spacing: .04em;
}
.index-note {
  font-family: var(--serif-zh);
  font-size: 15px;
  line-height: 2;
  color: var(--ink-soft);
  max-width: 460px;
  margin: 0;
}
.index-note .en {
  display: block;
  margin-top: 8px;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 12.5px;
  color: var(--ink-mute);
  letter-spacing: .03em;
  line-height: 1.7;
}

.index-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 80px;
  align-items: start;
}

.index-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.index-year-group + .index-year-group { margin-top: 50px; }
.index-year {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}
.index-year .yr-num {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 32px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: .04em;
}
.index-year .yr-ln {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.index-year .yr-count {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

.index-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.index-row {
  display: grid;
  grid-template-columns: 40px minmax(220px, 1.4fr) 1fr 1fr 30px;
  align-items: baseline;
  padding: 22px 4px;
  border-bottom: 1px solid rgba(58, 38, 26, 0.08);
  cursor: pointer;
  position: relative;
  transition: padding-left .35s cubic-bezier(.2,.7,.2,1),
              background .25s, color .25s;
  gap: 24px;
}
.index-row::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.index-row:hover {
  padding-left: 20px;
  color: var(--accent);
}
.index-row:hover::before { transform: scaleX(1); }
.index-row:hover .idx-arr { transform: translateX(4px); opacity: 1; }

.index-row .idx-num {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .2em;
  color: var(--ink-mute);
}
.index-row .idx-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.index-row .idx-title .zh {
  font-family: var(--serif-zh);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: .15em;
  color: inherit;
}
.index-row .idx-title .en {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--ink-mute);
}
.index-row .idx-mood,
.index-row .idx-medium {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--serif-zh);
  font-size: 13px;
  letter-spacing: .12em;
}
.index-row .idx-mood .en,
.index-row .idx-medium .en {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-style: normal;
}
.index-row .idx-arr {
  font-family: var(--serif-en);
  font-size: 18px;
  text-align: right;
  opacity: .35;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), opacity .25s;
}

/* preview pane */
.index-preview {
  position: sticky;
  top: 110px;
  align-self: start;
}
.ipv {
  background: var(--paper);
  padding: 14px;
  box-shadow: 0 1px 2px rgba(58,38,26,.08),
              0 30px 70px -25px rgba(58,38,26,.35);
  animation: ipv-in .5s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes ipv-in {
  from { opacity: 0; transform: translateY(8px) scale(.99); }
  to   { opacity: 1; transform: none; }
}
.ipv-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 12px;
  padding: 0 4px 4px;
}
.ipv-ttl {
  font-family: var(--serif-zh);
  font-size: 16px;
  letter-spacing: .12em;
}
.ipv-ttl small {
  display: block;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 2px;
  letter-spacing: .04em;
}
.ipv-yr {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--ink-mute);
  text-align: right;
}
.ipv-empty {
  aspect-ratio: 3/4;
  border: 1px dashed var(--line);
  background: transparent;
  box-shadow: none;
  display: grid;
  place-items: center;
  padding: 30px;
}
.ipv-empty-inner { text-align: center; }

@media (max-width: 960px) {
  .index-view { padding: 100px 36px 60px; }
  .index-head { grid-template-columns: 1fr; gap: 24px; }
  .index-head h1 { font-size: 60px; }
  .index-grid { grid-template-columns: 1fr; }
  .index-preview { display: none; }
  .index-row {
    grid-template-columns: 30px 1fr 30px;
    gap: 14px;
  }
  .index-row .idx-mood, .index-row .idx-medium { display: none; }
}

/* ──────────────── Lightbox / 大图查看 ──────────────── */

.lb-hint {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.25);
  font-family: var(--serif-zh);
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: .08em;
}
.lb-hint .mono { color: var(--accent); font-size: 12px; }
.lb-hint .en {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 11.5px;
  color: var(--ink-mute);
  letter-spacing: .04em;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 70px 24px 110px;
  animation: lb-in .35s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes lb-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.lb-bg {
  position: fixed;
  inset: 0;
  background: rgba(20, 14, 10, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: -1;
}

.lb-stage {
  position: relative;
  width: 100%;
  max-width: 1200px;
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.lb-frame {
  background: var(--paper);
  padding: 18px;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.6);
  max-width: 100%;
  animation: lb-pop .5s cubic-bezier(.2,.7,.2,1) both;
}
.lb-single { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.lb-single .img {
  /* honor the photo's true aspect ratio; cap on either axis.
     give an explicit width baseline so the empty div doesn't collapse,
     then let aspect-ratio + max-height shrink it for tall photos. */
  width: min(82vw, 1080px);
  height: auto;
  max-width: min(82vw, 1080px);
  max-height: 72vh;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

@keyframes lb-pop {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.lb-flip {
  animation: lb-pop .5s cubic-bezier(.2,.7,.2,1) both;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  width: min(94vw, 1200px);
}
.lb-flip-spread {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  height: min(64vh, 720px);
  background: var(--paper);
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.05),
    0 40px 100px -30px rgba(0,0,0,.6);
  overflow: hidden;
}
.lb-flip-spread::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 40px; transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(0,0,0,0), rgba(0,0,0,.28), rgba(0,0,0,0));
  pointer-events: none;
}
.lb-flip-page {
  padding: 22px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-flip-page .img {
  width: 100% !important;
  height: 100% !important;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.lb-follow {
  perspective: 1500px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-follow-frame {
  background: var(--paper);
  padding: 22px;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.6);
  transition: transform .15s ease-out;
  transform-style: preserve-3d;
  animation: lb-pop .5s cubic-bezier(.2,.7,.2,1) both;
}
.lb-follow-frame .img {
  width: auto !important;
  height: auto !important;
  max-width: min(70vw, 880px);
  max-height: 64vh;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.lb-cap {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .25em;
  text-align: center;
  color: rgba(255,255,255,.65);
}

.lb-close {
  position: fixed;
  top: 24px; right: 28px;
  z-index: 9100;
  appearance: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.85);
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  transition: background .25s, color .25s, border-color .25s;
}
.lb-close span {
  font-family: var(--serif-zh);
  font-size: 14px;
  letter-spacing: .15em;
}
.lb-close small {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .22em;
  opacity: .65;
}
.lb-close:hover { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.5); }

.lb-counter {
  position: fixed;
  top: 30px; left: 36px;
  z-index: 9100;
  color: rgba(255,255,255,.7);
  letter-spacing: .22em;
  font-size: 12px;
}

.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9100;
  appearance: none;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,.6);
  font: inherit;
  cursor: pointer;
  padding: 14px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: color .25s, transform .25s;
}
.lb-nav:hover { color: #fff; }
.lb-nav.prev { left: 28px; }
.lb-nav.next { right: 28px; }
.lb-nav.prev:hover { transform: translateY(-50%) translateX(-4px); }
.lb-nav.next:hover { transform: translateY(-50%) translateX(4px); }
.lb-nav .arr {
  font-family: var(--serif-en);
  font-size: 36px;
  font-style: italic;
  line-height: 1;
}
.lb-nav small {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .25em;
}

.lb-modes {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 9100;
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 4px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.lb-mode-btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  padding: 8px 18px;
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: background .3s, color .3s;
}
.lb-mode-btn .zh {
  font-family: var(--serif-zh);
  font-size: 13px;
  letter-spacing: .15em;
}
.lb-mode-btn small {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .2em;
  opacity: .7;
}
.lb-mode-btn:hover { color: #fff; }
.lb-mode-btn.active {
  background: rgba(255,255,255,.92);
  color: var(--ink);
}
.lb-mode-btn.active .zh { color: var(--ink); }

@media (max-width: 960px) {
  .lb-nav { padding: 10px; }
  .lb-flip-spread { grid-template-columns: 1fr; height: 50vh; }
  .lb-flip-spread::after { display: none; }
  .lb-flip-spread .lb-flip-page:nth-child(2) { display: none; }
  .lb-modes { bottom: 14px; }
  .lb-single .img { max-width: 88vw; max-height: 56vh; }
  .lb-follow .img { max-width: 84vw; max-height: 52vh; }
}

.page-enter {
  animation: page-in .9s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.fade-in-stagger > * {
  opacity: 0;
  animation: fade-up .8s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Cursor companion */
.cursor-ink {
  position: fixed;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
  opacity: .6;
  transform: translate(-50%, -50%);
  transition: width .25s, height .25s, opacity .3s;
}
.cursor-ink.expand { width: 36px; height: 36px; opacity: .25; }

/* Responsive — small adjustments */
@media (max-width: 960px) {
  .mood-view { padding: 100px 36px 60px; }
  .mood-head h1 { font-size: 48px; }
  .detail-inner { padding: 0 36px; }
  .detail-head { grid-template-columns: 1fr; gap: 20px; }
  .detail-head h1 { font-size: 56px; }
  .detail-body { grid-template-columns: 1fr; gap: 30px; }
  .book-stage { grid-template-columns: 1fr; }
  .about { padding: 100px 36px 60px; }
  .about-grid { grid-template-columns: 1fr; }
  .side-index { display: none; }
}
