:root {
  color-scheme: light;
  --paper: #f6f3ec;
  --ink: #20251e;
  --muted: #626557;
  --line: #d6d2c6;
  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  --title: "Songti SC", "Noto Serif CJK SC", STSong, serif;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
html { scroll-behavior: smooth; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid #888460; outline-offset: 5px; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wrap { width: min(100%, 1550px); margin-inline: auto; padding-inline: var(--gutter); }
.site-header {
  padding: .85rem var(--gutter);
  min-height: 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-grid; gap: .12rem; white-space: nowrap; }
.brand b { font-size: 1.45rem; font-weight: 870; letter-spacing: -.055em; line-height: 1; }
.brand span { font-size: .53rem; letter-spacing: .15em; font-weight: 720; }
.site-header nav { display: flex; gap: clamp(1rem, 4vw, 3.25rem); }
.site-header nav a, .header-cta { font-size: .87rem; font-weight: 620; }
.site-header nav a:hover, .header-cta:hover, .text-link:hover { text-decoration: underline; text-underline-offset: .25rem; }
.header-cta { border-bottom: 1px solid #a19e8d; padding-block: .4rem; white-space: nowrap; }
.header-cta span, .text-link span { margin-left: .25rem; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 4vw, 5rem);
  align-items: center;
  padding-block: clamp(1.8rem, 4.5vw, 4.8rem);
}
.hero-copy { padding-block: 1rem; }
.eyeline { display: flex; align-items: center; gap: .65rem; color: var(--muted); font-size: .68rem; font-weight: 740; letter-spacing: .19em; line-height: 1.6; }
.eyeline span { width: 1.35rem; height: 1px; background: currentColor; }
.hero h1, .story-page h1 {
  margin-top: 1.3rem;
  font-family: var(--title);
  font-size: clamp(2rem, 4.7vw, 5.2rem);
  font-weight: 700;
  letter-spacing: -.07em;
  line-height: 1.1;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.hero-intro { margin-top: 1.5rem; color: var(--muted); line-height: 1.7; font-size: clamp(.86rem, 1.5vw, 1.03rem); }
.hero-links { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center; margin-top: 2rem; }
.button { display: inline-flex; justify-content: space-between; align-items: center; min-height: 2.8rem; padding: .6rem 1rem; gap: 1.15rem; background: var(--ink); color: white; font-size: .86rem; font-weight: 650; }
.button:hover { background: #485143; }
.text-link { font-weight: 630; font-size: .85rem; padding-block: .55rem; }
.hero-image { overflow: hidden; position: relative; height: clamp(25rem, 48vw, 43rem); background: #5f6857; }
.hero-image img { object-position: 76% 53%; }
figcaption { position: absolute; right: .65rem; bottom: .65rem; background: #22251cc4; color: white; padding: .3rem .5rem; font-size: .65rem; }
.portfolio { padding-block: 1rem clamp(3rem, 7vw, 6.5rem); scroll-margin: 1rem; }
.section-title { padding-top: 1.5rem; border-top: 1px solid var(--line); margin-bottom: 1.5rem; display: flex; gap: 1rem; align-items: end; justify-content: space-between; }
.section-title > p { color: var(--muted); font-size: .76rem; line-height: 1.5; }
h2 { font-family: var(--title); font-size: clamp(2rem, 4.2vw, 4rem); line-height: 1.14; letter-spacing: -.05em; margin-top: .4rem; }
.work-grid { display: grid; gap: clamp(1rem, 2vw, 1.8rem); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.work-card { min-width: 0; }
.work-card figure { aspect-ratio: 4 / 4.5; overflow: hidden; background: #bbb1a0; }
.work-card img { transition: transform .55s ease; }
.work-card:hover img { transform: scale(1.035); }
.work-info { border-bottom: 1px solid var(--line); display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .85rem 0 1rem; }
.work-info span { color: var(--muted); font-size: .73rem; }
.work-info h3 { font-family: var(--title); font-size: clamp(1.2rem, 2.3vw, 2rem); font-weight: 700; margin-top: .35rem; }
.about { background: #252d23; color: #faf8ef; }
.about-inner { display: grid; grid-template-columns: 1fr 1.05fr; gap: 2rem; align-items: center; padding-block: clamp(3rem, 7vw, 7rem); }
.about-inner > div > p { line-height: 1.8; }
.about .eyeline { color: #c4c5b5; }
.button-light { background: var(--paper); color: var(--ink); margin-top: 1.1rem; }
.button-light:hover { color: white; }
.site-foot { display: flex; gap: 2rem; align-items: center; padding: 2rem var(--gutter); justify-content: space-between; }
.legal { display: flex; gap: .5rem 1.2rem; flex-wrap: wrap; justify-content: flex-end; font-size: .76rem; color: var(--muted); }
.legal a:hover { text-decoration: underline; }
.preview { display: block; background: #252d23; color: white; text-align: center; padding: .55rem; font-size: .85rem; }
.story-page { padding-block: 2rem 4rem; }
.story-page .eyeline { margin-top: 1.75rem; }
.story-page > p:not(.eyeline) { max-width: 38rem; margin: 1.2rem 0; line-height: 1.7; color: var(--muted); }
.story-page figure { margin-block: 1.5rem; position: relative; max-width: 67rem; height: clamp(19rem, 65vw, 47rem); background: #615f51; }
@media (max-width: 850px) {
  .hero h1 { font-size: clamp(1.9rem, 4.9vw, 3rem); }
  .hero-image { height: clamp(21rem, 44vw, 34rem); }
  .hero-links { gap: .65rem 1rem; }
}
@media (max-width: 620px) {
  .site-header { min-height: 4rem; }
  .site-header nav { gap: .85rem; }
  .header-cta { font-size: .74rem; }
  .hero { grid-template-columns: 1fr; gap: .8rem; padding-top: 1rem; }
  .hero h1 { font-size: clamp(2.25rem, 9vw, 3.5rem); margin-top: .75rem; }
  .hero-intro { margin-top: .8rem; }
  .hero-links { margin-top: 1rem; }
  .hero-image { height: clamp(16rem, 75vw, 27rem); }
  .section-title { align-items: start; flex-direction: column; gap: .45rem; }
  .work-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .work-card figure { aspect-ratio: 5 / 4; }
  .about-inner { grid-template-columns: 1fr; }
  .site-foot { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .legal { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

/* ================= 作品详情页（故事页） ================= */
/* 开场：左文右图（竖版封面）或整屏大图（高清横版封面） */
.st-cover { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 6rem); align-items: center; min-height: calc(100svh - 5rem); padding: clamp(1.5rem, 3vw, 3rem) var(--gutter) clamp(3rem, 6vw, 6rem); }
.st-cover-copy { max-width: 34rem; }
.st-back { display: inline-flex; gap: .55rem; align-items: center; margin-bottom: clamp(2rem, 7vh, 4.5rem); color: var(--muted); font-size: .8rem; font-weight: 630; transition: color .3s, gap .3s; }
.st-back:hover { color: var(--ink); gap: .8rem; }
.st-kind { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .22em; }
.st-cover h1 { margin-top: 1rem; font-family: var(--title); font-size: clamp(3rem, 7vw, 7.4rem); font-weight: 700; letter-spacing: -.065em; line-height: 1.02; text-wrap: balance; }
.st-lede { margin-top: 1.6rem; max-width: 25em; color: var(--muted); font-size: clamp(.95rem, 1.2vw, 1.06rem); line-height: 1.95; }
.st-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 30rem; margin: clamp(2rem, 5vh, 3.2rem) 0 0; border-top: 1px solid var(--line); }
.st-meta div { padding-top: .95rem; }
.st-meta dt { color: var(--muted); font-size: .68rem; font-weight: 650; letter-spacing: .14em; }
.st-meta dd { margin: .4rem 0 0; font-family: var(--title); font-size: clamp(1.02rem, 1.4vw, 1.2rem); font-weight: 700; }
.st-actions { display: flex; flex-wrap: wrap; gap: .9rem 1.8rem; align-items: center; margin-top: clamp(2rem, 5vh, 3rem); }
.st-play { appearance: none; display: inline-flex; gap: 1rem; align-items: center; min-height: 3rem; padding: .75rem 1.25rem; border: 0; background: var(--ink); color: #fff; font: inherit; font-size: .86rem; font-weight: 650; cursor: pointer; transition: background .3s; }
.st-play[hidden] { display: none; }
.st-play:hover { background: #485143; }
.st-down { font-size: .85rem; font-weight: 630; border-bottom: 1px solid #a19e8d; padding-block: .4rem; }
.st-down span { display: inline-block; transition: transform .35s; }
.st-down:hover span { transform: translateY(3px); }

.st-cover-media { position: relative; justify-self: end; width: fit-content; max-width: 100%; margin: 0; overflow: hidden; background: #d9d4c7; cursor: zoom-in; }
.st-cover-media img { width: auto; max-width: 100%; height: min(calc(100svh - 9rem), 54rem); object-fit: cover; transition: transform 1.4s cubic-bezier(.2, .7, .2, 1); }
.st-cover-media:hover img { transform: scale(1.025); }

.st-cover.is-land { display: block; position: relative; min-height: 0; padding: 0; color: #faf8ef; }
.st-cover.is-land .st-cover-media { width: 100%; justify-self: auto; }
.st-cover.is-land .st-cover-media img { width: 100%; max-width: none; height: calc(100svh - 5rem); }
.st-cover.is-land .st-cover-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(17, 18, 15, .62) 0%, rgba(17, 18, 15, .18) 55%, transparent 100%), linear-gradient(0deg, rgba(17, 18, 15, .5) 0%, transparent 45%); pointer-events: none; }
.st-cover.is-land .st-cover-copy { position: absolute; z-index: 1; left: var(--gutter); bottom: clamp(2rem, 6vw, 5rem); max-width: 38rem; }
.st-cover.is-land .st-back, .st-cover.is-land .st-kind, .st-cover.is-land .st-lede, .st-cover.is-land .st-meta dt { color: rgba(250, 248, 239, .78); }
.st-cover.is-land .st-back:hover { color: #faf8ef; }
.st-cover.is-land .st-meta { border-color: rgba(250, 248, 239, .3); }
.st-cover.is-land .st-play { background: #f6f3ec; color: var(--ink); }
.st-cover.is-land .st-down { border-color: rgba(250, 248, 239, .5); }

/* 开场动画：照片像幕布一样展开，文字依次浮现 */
@keyframes st-unveil { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes st-settle { from { transform: scale(1.14); } to { transform: none; } }
@keyframes st-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.st-cover-media { animation: st-unveil 1.5s cubic-bezier(.7, 0, .2, 1) backwards; }
.st-cover-media img { animation: st-settle 2.4s cubic-bezier(.2, .7, .1, 1) backwards; }
.st-cover-copy > * { animation: st-rise 1.1s cubic-bezier(.2, .7, .2, 1) backwards; }
.st-cover-copy > :nth-child(2) { animation-delay: .25s; }
.st-cover-copy > :nth-child(3) { animation-delay: .35s; }
.st-cover-copy > :nth-child(4) { animation-delay: .5s; }
.st-cover-copy > :nth-child(5) { animation-delay: .62s; }
.st-cover-copy > :nth-child(6) { animation-delay: .74s; }

/* 画册式照片流 */
.st-flow { display: grid; gap: clamp(3.5rem, 8vw, 8rem); padding: clamp(2rem, 5vw, 5rem) var(--gutter) clamp(4.5rem, 9vw, 8rem); }
.st-block { display: flex; gap: clamp(.8rem, 1.6vw, 1.4rem); align-items: flex-start; width: 100%; max-width: 78rem; margin-inline: auto; }
.st-ph { position: relative; flex: 1 1 0; min-width: 0; margin: 0; overflow: hidden; background: #d9d4c7; cursor: zoom-in; }
.st-pair .st-ph { flex: var(--r, 1) 1 0; }
.st-pair:not(.st-offset) { max-width: 64rem; }
.st-ph img { width: 100%; height: auto; transition: transform 1.4s cubic-bezier(.2, .7, .2, 1); }
.st-full { max-width: none; width: auto; margin-inline: calc(var(--gutter) * -1); }
.st-offset { align-items: flex-start; }
.st-offset .st-ph:first-child { flex: 0 0 57%; }
.st-offset .st-ph:last-child { flex: 0 0 35%; margin: clamp(5rem, 16vw, 13rem) 0 0 auto; }
.st-solo .st-ph { flex: 0 1 auto; width: min(100%, 38rem); }
.st-left { padding-left: 7%; }
.st-right { justify-content: flex-end; padding-right: 7%; }
.has-cursor .st-ph, .has-cursor .st-cover-media { cursor: none; }

/* 滚动揭示：照片自下而上揭开，同时轻微收缩 */
.st-js .st-ph { clip-path: inset(100% 0 0 0); transition: clip-path 1.3s cubic-bezier(.7, 0, .2, 1); }
.st-js .st-ph img { transform: scale(1.14); transition: transform 1.9s cubic-bezier(.2, .7, .1, 1); }
.st-js .st-ph.is-in { clip-path: inset(0); }
.st-js .st-ph.is-in img { transform: none; }
.st-js .st-ph.is-in:hover img { transform: scale(1.03); }

/* 结尾 */
.st-cta { margin-inline: var(--gutter); padding: clamp(4rem, 10vw, 8.5rem) 0; border-top: 1px solid var(--line); text-align: center; }
.st-cta .eyeline { justify-content: center; }
.st-cta h2 { margin: .8rem 0 2.2rem; }
.st-next { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); gap: clamp(2rem, 6vw, 6rem); align-items: center; padding: clamp(3rem, 7vw, 6rem) var(--gutter); background: #252d23; color: #faf8ef; }
.st-next .eyeline { color: #c4c5b5; }
.st-next h2 { margin-top: .5rem; font-size: clamp(2.6rem, 6vw, 5.6rem); }
.st-next-copy > p:not(.eyeline) { margin-top: .8rem; color: #c4c5b5; font-size: .9rem; }
.st-next-go { display: inline-flex; gap: .7rem; margin-top: 2.2rem; padding-bottom: .4rem; border-bottom: 1px solid rgba(250, 248, 239, .4); font-size: .88rem; font-weight: 640; }
.st-next-go span { transition: transform .4s; }
.st-next:hover .st-next-go span { transform: translateX(.45rem); }
.st-next-media { margin: 0; overflow: hidden; aspect-ratio: 4 / 5; background: #3a4237; }
.st-next-media img { object-fit: cover; transition: transform 1.4s cubic-bezier(.2, .7, .2, 1); }
.st-next:hover .st-next-media img { transform: scale(1.05); }

/* 阅读进度线与跟随光标（由脚本创建） */
.st-progress { position: fixed; z-index: 90; top: 0; left: 0; right: 0; height: 2px; pointer-events: none; }
.st-progress i { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.st-cursor { position: fixed; z-index: 130; top: 0; left: 0; display: grid; place-items: center; width: 5.4rem; height: 5.4rem; margin: -2.7rem 0 0 -2.7rem; border-radius: 50%; background: rgba(246, 243, 236, .94); color: var(--ink); font-size: .74rem; font-weight: 700; letter-spacing: .14em; pointer-events: none; opacity: 0; scale: .3; transform: translate3d(-200px, -200px, 0); transition: opacity .3s ease, scale .4s cubic-bezier(.2, .7, .2, 1); }
.st-cursor.is-on { opacity: 1; scale: 1; }

/* 全屏大图 */
.lb-lock, .lb-lock body { overflow: hidden; }
.lb { position: fixed; z-index: 110; inset: 0; color: #efece3; }
.lb[hidden] { display: none; }
.lb-bg { position: absolute; inset: 0; background: #11120f; opacity: 0; transition: opacity .55s ease; }
.lb.is-on .lb-bg { opacity: 1; }
.lb-stage { position: absolute; inset: 4.6rem clamp(4rem, 7vw, 7.5rem) 7.6rem; display: grid; place-items: center; touch-action: pan-y; }
.lb-img { grid-area: 1 / 1; max-width: none; object-fit: contain; opacity: 0; transform: translateX(var(--dx, 0px)); transition: opacity .6s ease, transform .75s cubic-bezier(.2, .7, .2, 1); user-select: none; -webkit-user-drag: none; }
.lb-img.is-cur { opacity: 1; }
.lb-img.no-t { transition: none; }
.lb.has-cursor .lb-stage { cursor: none; }
.lb-ui { opacity: 0; transition: opacity .5s ease; }
.lb.is-on .lb-ui { opacity: 1; transition-delay: .2s; }
.lb.is-on.is-idle .lb-ui { opacity: 0; transition-delay: 0s; }
.lb-bar { position: absolute; top: 0; left: 0; right: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 4.6rem; padding: 0 clamp(1rem, 3vw, 2.2rem); }
.lb-title { font-family: var(--title); font-size: 1.05rem; font-weight: 700; letter-spacing: -.02em; }
.lb-count { font-family: var(--title); font-size: 1rem; color: #8f8d80; font-variant-numeric: tabular-nums; }
.lb-count b { color: #efece3; }
.lb-close { appearance: none; justify-self: end; display: inline-flex; gap: .7rem; align-items: center; padding: .4rem 0; border: 0; background: none; color: inherit; font: inherit; font-size: .8rem; font-weight: 640; letter-spacing: .12em; cursor: pointer; }
.lb-close span { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border: 1px solid rgba(239, 236, 227, .25); border-radius: 50%; transition: background .3s; }
.lb-close:hover span { background: rgba(239, 236, 227, .12); }
.lb-arrow { appearance: none; position: absolute; top: 50%; width: 3.1rem; height: 3.1rem; margin-top: -1.55rem; border: 1px solid rgba(239, 236, 227, .22); border-radius: 50%; background: rgba(17, 18, 15, .3); color: inherit; font-size: 1rem; cursor: pointer; transition: background .3s, opacity .5s; }
.lb-arrow:hover { background: rgba(239, 236, 227, .12); }
.lb-arrow[hidden] { display: none; }
.lb-prev { left: clamp(.6rem, 2vw, 1.8rem); }
.lb-next { right: clamp(.6rem, 2vw, 1.8rem); }
.lb-strip { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: .5rem; align-items: center; justify-content: safe center; height: 7rem; padding: 0 1.5rem; overflow-x: auto; scrollbar-width: none; }
.lb-strip::-webkit-scrollbar { display: none; }
.lb-strip[hidden] { display: none; }
.lb-strip button { flex: none; height: 3.5rem; padding: 0; border: 0; background: none; opacity: .35; cursor: pointer; transition: opacity .35s, transform .35s; }
.lb-strip button img { width: auto; height: 100%; object-fit: cover; }
.lb-strip button:hover { opacity: .75; }
.lb-strip button[aria-current="true"] { opacity: 1; transform: translateY(-5px); }
.lb-line { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: rgba(239, 236, 227, .1); }
.lb-line i { display: block; height: 100%; background: #efece3; transform-origin: left; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.lb-cap { position: absolute; left: 50%; bottom: 6rem; translate: -50% 0; color: #8f8d80; font-size: .72rem; white-space: nowrap; }
.lb button:focus-visible { outline: 2px solid #c4c5b5; outline-offset: 3px; }

@media (max-width: 900px) {
  .st-cover { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .st-cover-media img { height: min(calc(100svh - 10rem), 40rem); }
}

@media (max-width: 760px) {
  .st-cover { grid-template-columns: 1fr; gap: 1.8rem; min-height: 0; padding-top: 1rem; }
  .st-cover-media { order: -1; justify-self: stretch; width: 100%; }
  .st-cover-media img { width: 100%; height: auto; max-height: 76svh; }
  .st-back { margin-bottom: 1.4rem; }
  .st-cover h1 { font-size: clamp(2.7rem, 13vw, 3.8rem); }
  .st-meta { max-width: none; }
  .st-cover.is-land .st-cover-media img { height: 84svh; }
  .st-cover.is-land .st-cover-copy { right: var(--gutter); bottom: 1.8rem; }
  .st-cover.is-land .st-meta { display: none; }
  .st-flow { gap: 3rem; }
  .st-block { flex-direction: column; gap: 1rem; }
  .st-block .st-ph, .st-offset .st-ph:first-child { flex: none; width: 100%; margin: 0; }
  .st-offset .st-ph:last-child { flex: none; width: 78%; margin: 0 0 0 auto; }
  .st-solo .st-ph { width: 86%; }
  .st-left { padding-left: 0; }
  .st-right { padding-right: 0; align-items: flex-end; }
  .st-next { grid-template-columns: 1fr; }
  .st-next-media { order: -1; aspect-ratio: 3 / 2; }
  .lb-stage { inset: 4rem .4rem 5rem; }
  .lb-bar { grid-template-columns: 1fr auto; }
  .lb-title { display: none; }
  .lb-strip, .lb-cap { display: none; }
  .lb-arrow { top: auto; bottom: 1rem; margin-top: 0; }
  .lb-prev { left: calc(50% - 3.8rem); }
  .lb-next { right: calc(50% - 3.8rem); }
}

@media (prefers-reduced-motion: reduce) {
  .st-cover-media, .st-cover-media img, .st-cover-copy > * { animation: none; }
  .st-js .st-ph { clip-path: none; }
  .st-js .st-ph img { transform: none; }
}
