:root {
  --bg: #081527;
  --bg-soft: #0a1a31;
  --bg-card: rgba(255, 255, 255, 0.06);
  --text: #eef3f8;
  --text-dim: rgba(238, 243, 248, 0.65);
  --text-faint: rgba(238, 243, 248, 0.42);
  --accent: #7ec8ff;
  --accent-warm: #f6b8a8;
  --border: rgba(255, 255, 255, 0.1);
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Cormorant Garamond", "Noto Serif SC", "Times New Roman", serif;
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(46, 96, 168, 0.35), transparent 60%),
    radial-gradient(ellipse 70% 50% at 85% 105%, rgba(38, 74, 128, 0.28), transparent 65%),
    linear-gradient(180deg, #0a1b33 0%, #07142a 55%, #050e1e 100%);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; animation: imgFade 0.6s ease; }
@keyframes imgFade { from { opacity: 0; } }

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

::selection { background: var(--accent); color: var(--bg); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  transition: background 0.35s ease, box-shadow 0.35s ease;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 17, 32, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header.scrolled {
  background: rgba(5, 12, 24, 0.82);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.logo span { color: var(--accent); }

.nav { display: flex; gap: 32px; }

.nav a {
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  transition: color 0.25s;
  position: relative;
}
.nav a:hover,
.nav a.active { color: var(--text); }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 86vh;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: #081527;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(5, 12, 26, 0.58) 0%,
    rgba(7, 20, 42, 0.32) 50%,
    rgba(5, 12, 26, 0.66) 100%
  );
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
  filter: brightness(0.88) saturate(1.02);
  animation: heroZoom 22s var(--ease) forwards;
}
@keyframes heroZoom {
  from { transform: scale(1.02); }
  to { transform: scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 24px;
}

.hero-kicker {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0.85;
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
  color: #ffffff;
}
.hero-divider {
  width: 54px;
  height: 1px;
  margin: 0 auto 16px;
  background: linear-gradient(90deg, transparent, rgba(238, 243, 248, 0.85), transparent);
}
.hero-jp {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  color: rgba(238, 243, 248, 0.72);
  margin: 0 0 26px;
}

.hero-sub {
  font-size: 1.05rem;
  color: #d8d4cc;
  max-width: 520px;
  margin: 0 auto 36px;
}

.btn {
  display: inline-block;
  padding: 13px 34px;
  border: 1px solid var(--text);
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  text-transform: uppercase;
  transition: all 0.3s var(--ease);
  cursor: pointer;
}
.btn:hover {
  background: var(--text);
  color: var(--bg);
}
.btn.btn-accent {
  border-color: var(--accent);
  color: var(--accent);
}
.btn.btn-accent:hover {
  background: var(--accent);
  color: var(--bg);
}

.hero .btn.btn-accent {
  border-color: #ffffff;
  color: #ffffff;
}
.hero .btn.btn-accent:hover {
  background: #ffffff;
  color: #0a1b33;
}

.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: #cfcbc2;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  animation: bob 2.4s infinite;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- Section ---------- */
.section { padding: 96px 0; }

.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.section-head .tag {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 500;
}
.section-head p {
  color: var(--text-dim);
  margin-top: 14px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Home gallery preview ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  cursor: pointer;
  background: var(--bg-soft);
  border-radius: 10px;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.card:hover img { transform: scale(1.06); }
.card figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px 20px 18px;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.4s var(--ease);
}
.card:hover figcaption { opacity: 1; transform: translateY(0); }
.card figcaption .card-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: #ffffff;
}
.card figcaption .card-meta {
  font-size: 0.78rem;
  color: rgba(246, 184, 168, 0.92);
  letter-spacing: 0.08em;
}

.section-more {
  text-align: center;
  margin-top: 56px;
}

/* ---------- Featured work (home) ---------- */
.featured-work {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.featured-work .card {
  width: 100%;
  aspect-ratio: 3 / 4;
}


/* ---------- 作品页：深蓝星空背景 ---------- */
body.gallery-page {
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(46, 96, 168, 0.35), transparent 60%),
    radial-gradient(ellipse 70% 50% at 85% 105%, rgba(38, 74, 128, 0.28), transparent 65%),
    linear-gradient(180deg, #0a1b33 0%, #07142a 55%, #050e1e 100%);
  color: #eef3f8;
}
body.gallery-page .site-header {
  background: rgba(7, 17, 32, 0.55);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
body.gallery-page .logo { color: #f2f6fb; }
body.gallery-page .logo span { color: #7ec8ff; }
body.gallery-page .nav a { color: rgba(238, 243, 248, 0.7); }
body.gallery-page .nav a:hover,
body.gallery-page .nav a.active { color: #ffffff; }
body.gallery-page .nav a.active::after { background: #7ec8ff; }
body.gallery-page .nav-toggle { color: #eef3f8; }
body.gallery-page .page-head .tag { color: #7ec8ff; }
body.gallery-page .page-head h1 { color: #ffffff; }
body.gallery-page .page-head p { color: rgba(238, 243, 248, 0.6); }
body.gallery-page .site-footer { border-top-color: rgba(255, 255, 255, 0.08); }
body.gallery-page .footer-links a { color: rgba(238, 243, 248, 0.7); }
body.gallery-page .footer-links a:hover { color: #ffffff; }
body.gallery-page .footer-inner .copy { color: rgba(238, 243, 248, 0.4); }
body.gallery-page .page-head,
body.gallery-page .section,
body.gallery-page .site-footer {
  position: relative;
  z-index: 1;
}

/* ---------- 星星 ---------- */
.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.starfield .star {
  position: absolute;
  border-radius: 50%;
  background: #ffffff;
  animation: twinkle var(--dur, 3.5s) ease-in-out infinite;
}
.starfield .star.big { box-shadow: 0 0 6px 1px rgba(180, 210, 255, 0.8); }
@keyframes twinkle {
  0%, 100% { opacity: calc(var(--o, 1) * 0.18); transform: scale(0.75); }
  50% { opacity: calc(var(--o, 1) * 0.95); transform: scale(1.2); }
}

/* ---------- 流星（方向/长度用 CSS 变量随机化） ---------- */
.shooting-star {
  position: absolute;
  width: var(--len, 190px);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 55%, rgba(255, 255, 255, 0.95) 80%, #ffffff 100%);
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 14px rgba(160, 210, 255, 0.65));
  opacity: 0;
  transform: rotate(var(--angle, 35deg));
  animation: shoot var(--dur, 10s) linear infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform, opacity;
}
@keyframes shoot {
  0%   { transform: rotate(var(--angle, 35deg)) translateX(-220px); opacity: 0; }
  4%   { opacity: 1; }
  30%  { transform: rotate(var(--angle, 35deg)) translateX(calc(100vw + 260px)); opacity: 1; }
  36%  { opacity: 0; }
  100% { transform: rotate(var(--angle, 35deg)) translateX(calc(100vw + 260px)); opacity: 0; }
}

.page-head,
.section,
.site-footer {
  position: relative;
  z-index: 1;
}

.article-body pre {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  padding: 18px 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0 0 22px;
}
.article-body pre code {
  background: none;
  padding: 0;
  color: #cfe3f7;
}

/* ---------- 作品页：散落的系列「星星灯箱」 ---------- */
.collection-field {
  position: relative;
  height: 74vh;
  min-height: 560px;
  max-width: 1120px;
  margin: 0 auto;
}
.collection-card {
  position: absolute;
  z-index: 1;
  width: clamp(180px, 22vw, 244px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  cursor: pointer;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 30px rgba(110, 170, 255, 0.16);
  transition: transform 0.55s var(--ease), box-shadow 0.55s var(--ease);
}
/* 星系连接线图层（白色发光，置于卡片下层） */
.collection-field .constellation-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}
/* 灯棒：亮白细核心 + 高斯模糊光晕，边缘自然柔化 */
.constellation-line line {
  stroke: #ffffff;
  stroke-linecap: round;
}
.constellation-line .cl-glow {
  stroke-width: 10;
  stroke-opacity: 0.35;
  filter: url(#cl-glow-blur);
}
.constellation-line .cl-soft {
  stroke-width: 4;
  stroke-opacity: 0.7;
  filter: url(#cl-soft-blur);
}
.constellation-line .cl-core {
  stroke-width: 1.6;
  stroke-opacity: 1;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.9));
}
/* 孤独星球（第 1 个）再往左移 */
.collection-card:nth-of-type(1) { left: 3%;  top: 16%; rotate: -5deg; }
.collection-card:nth-of-type(2) { left: 65%; top: 8%;  rotate: 4deg; }
.collection-card:nth-of-type(3) { left: 38%; top: 56%; rotate: -3deg; }
.collection-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  pointer-events: none;
  z-index: 1;
}
.collection-card:hover {
  transform: scale(1.06);
  box-shadow:
    0 32px 72px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.22),
    0 0 48px rgba(140, 200, 255, 0.38);
}
.collection-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.collection-card:hover img { transform: scale(1.06); }
.collection-card figcaption {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 48px 18px 18px;
  text-align: center;
  color: #ffffff;
  background: linear-gradient(to top, rgba(4, 10, 22, 0.88) 0%, rgba(4, 10, 22, 0.35) 55%, transparent 100%);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.collection-card:hover figcaption { opacity: 1; transform: translateY(0); }
.collection-card .collection-type {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(160, 210, 255, 0.85);
  margin-bottom: 8px;
}
.collection-card .collection-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 8px;
}
.collection-card .collection-count {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.78);
}

/* ---------- Series view (inside a collection) ---------- */
.series-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 44px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.series-back {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(238, 243, 248, 0.85);
  padding: 9px 20px;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all 0.25s;
}
.series-back:hover { border-color: #ffffff; color: #ffffff; }
.series-head-text { text-align: right; }
.series-type {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #7ec8ff;
  margin-bottom: 6px;
}
.series-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  color: #ffffff;
}
.series-count {
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  color: rgba(238, 243, 248, 0.55);
}
body.gallery-page .card { background: rgba(255, 255, 255, 0.06); }

@media (max-width: 860px) {
  .collection-field {
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 34px;
    padding: 8px 0 24px;
  }
  .collection-card { position: static; width: min(240px, 74vw); }
  .collection-card:nth-of-type(1) { rotate: -3deg; }
  .collection-card:nth-of-type(2) { rotate: 2deg; }
  .collection-card:nth-of-type(3) { rotate: -2deg; }
  .collection-field .constellation-lines { display: none; }
  body.gallery-page .nav {
    background: #0a1b33;
    border-color: rgba(255, 255, 255, 0.1);
  }
  .series-view-head { justify-content: center; text-align: center; }
  .series-head-text { text-align: center; width: 100%; }
}


/* ---------- Filters ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 44px;
}
.filter-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 22px;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all 0.25s;
}
.filter-btn:hover { border-color: var(--accent-warm); color: var(--accent-warm); }
.filter-btn.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.grid-item { animation: fadeUp 0.6s var(--ease); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Lightbox (horizontal slide) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(1200px 600px at 50% 18%, rgba(20, 30, 40, 0.35), rgba(5, 5, 5, 0.97) 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.lightbox.open { opacity: 1; pointer-events: auto; }

.lb-stage {
  position: relative;
  width: 100%;
  max-width: 860px;
  height: 78vh;
  perspective: 1400px;
  perspective-origin: 50% 42%;
  overflow: hidden;
}

.lb-card {
  --cw: min(400px, 70vw);
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--cw);
  height: calc(var(--cw) * 4 / 3);
  margin-left: calc(var(--cw) / -2);
  margin-top: calc(var(--cw) * -2 / 3);
  border-radius: 12px;
  overflow: hidden;
  background: #0d0d0d;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  transition: transform 0.7s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.5s ease;
  will-change: transform, opacity;
}
.lb-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.lb-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

/* --- 静止位置：中间最前，两侧向后倾斜、缩小、半透明 --- */
.lb-card.p-2 { transform: translateX(-32vw) rotateY(52deg) scale(0.58); opacity: 0.22; z-index: 3; }
.lb-card.p-1 { transform: translateX(-17vw) rotateY(36deg) scale(0.78); opacity: 0.5;  z-index: 4; }
.lb-card.p0  { transform: translateX(0) rotateY(0) scale(1); opacity: 1; z-index: 5; }
.lb-card.p1  { transform: translateX(17vw) rotateY(-36deg) scale(0.78); opacity: 0.5;  z-index: 4; }
.lb-card.p2  { transform: translateX(32vw) rotateY(-52deg) scale(0.58); opacity: 0.22; z-index: 3; }
.lb-card.hide { transform: translateX(0) translateZ(-1000px) scale(0.3); opacity: 0; z-index: 1; }

/* --- 下一张：整体左移，新照片从右侧进入 --- */
.lb-stage.anim-next .p-2 { transform: translateX(-48vw) rotateY(64deg) scale(0.48); opacity: 0; z-index: 1; }
.lb-stage.anim-next .p-1 { transform: translateX(-32vw) rotateY(52deg) scale(0.58); opacity: 0.22; z-index: 3; }
.lb-stage.anim-next .p0  { transform: translateX(-17vw) rotateY(36deg) scale(0.78); opacity: 0.5;  z-index: 4; }
.lb-stage.anim-next .p1  { transform: translateX(0) rotateY(0) scale(1); opacity: 1; z-index: 5; }
.lb-stage.anim-next .p2  { transform: translateX(17vw) rotateY(-36deg) scale(0.78); opacity: 0.5;  z-index: 4; }
.lb-stage.anim-next .hide { transform: translateX(32vw) rotateY(-52deg) scale(0.58); opacity: 0.22; z-index: 3; }

/* --- 上一张：整体右移，新照片从左侧进入 --- */
.lb-stage.anim-prev .p2 { transform: translateX(48vw) rotateY(-64deg) scale(0.48); opacity: 0; z-index: 1; }
.lb-stage.anim-prev .p1 { transform: translateX(32vw) rotateY(-52deg) scale(0.58); opacity: 0.22; z-index: 3; }
.lb-stage.anim-prev .p0 { transform: translateX(17vw) rotateY(-36deg) scale(0.78); opacity: 0.5;  z-index: 4; }
.lb-stage.anim-prev .p-1 { transform: translateX(0) rotateY(0) scale(1); opacity: 1; z-index: 5; }
.lb-stage.anim-prev .p-2 { transform: translateX(-17vw) rotateY(36deg) scale(0.78); opacity: 0.5;  z-index: 4; }
.lb-stage.anim-prev .hide { transform: translateX(-32vw) rotateY(52deg) scale(0.58); opacity: 0.22; z-index: 3; }

.lb-stage.no-anim .lb-card { transition: none; }

.lightbox-caption {
  margin-top: 8px;
  text-align: center;
  padding: 0 24px;
}
.lightbox-caption .lb-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
}
.lightbox-caption .lb-meta {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.lb-close,
.lb-prev,
.lb-next {
  position: absolute;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  z-index: 10;
}
.lb-close {
  top: 20px;
  right: 24px;
  font-size: 2rem;
  line-height: 1;
  padding: 8px 12px;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.lb-close:hover { opacity: 1; }

.lb-prev,
.lb-next {
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0.7;
  transition: opacity 0.2s, background 0.2s;
}
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-prev:hover, .lb-next:hover { opacity: 1; background: rgba(255, 255, 255, 0.22); }

.lb-counter {
  margin-top: 12px;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

@media (max-width: 560px) {
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.about-photo {
  position: relative;
  aspect-ratio: 3 / 4;
  width: 360px;
  margin-left: auto; /* 靠右，贴近文字 */
  padding: 12px;
  border: 2px solid #efe9db; /* 细窄米白边框 */
  background: #f6f2e9; /* 米白相纸衬底 */
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35), 0 4px 14px rgba(0, 0, 0, 0.18);
}
.about-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* 整面淡淡的相纸颗粒 */
.about-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='480'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  opacity: 0.7;
}
/* 最外层相纸毛边（有机不规则边缘） */
.about-photo::after {
  content: "";
  position: absolute;
  inset: -7px -9px -8px -6px;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5), 0 0 14px 2px rgba(255, 255, 255, 0.14);
  -webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='800'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.02 0.045' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='800'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.02 0.045' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mask-size: 100% 100%;
}

.about-text h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 24px;
}
.about-text p { color: var(--text-dim); margin-bottom: 18px; }
.about-text p strong { color: var(--text); font-weight: 600; }

.contact-list { margin-top: 36px; list-style: none; }
.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.contact-list .label {
  color: var(--text-faint);
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  text-transform: uppercase;
  width: 90px;
  flex-shrink: 0;
}
.contact-list a:hover { color: var(--accent); }

/* ---------- Blog ---------- */
.blog-list { display: grid; grid-template-columns: 1fr; gap: 20px; max-width: 780px; margin: 0 auto; }

.post-card {
  display: block;
  padding: 30px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.post-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.post-card .post-date {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.post-card h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  margin: 10px 0 12px;
  transition: color 0.3s;
}
.post-card:hover h3 { color: var(--accent-warm); }
.post-card .post-excerpt { color: var(--text-dim); font-size: 0.95rem; }
.post-card .read-more {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
}

/* ---------- Article ---------- */
.article { max-width: 720px; margin: 0 auto; }
.article-head { margin-bottom: 48px; text-align: center; }
.article-head .post-date {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.article-head h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 500;
  margin: 18px 0 10px;
}
.article-head .post-excerpt { color: var(--text-dim); }

.article-body p {
  color: var(--text-dim);
  margin-bottom: 22px;
  font-size: 1.02rem;
}
.article-body h2, .article-body h3 {
  font-family: var(--font-serif);
  color: var(--text);
  margin: 40px 0 16px;
}
.article-body h2 { font-size: 1.6rem; }
.article-body h3 { font-size: 1.25rem; }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px 22px;
  margin: 28px 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
}
.article-body ul, .article-body ol { color: var(--text-dim); margin: 0 0 22px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--accent); border-bottom: 1px solid transparent; }
.article-body a:hover { border-color: var(--accent); }
.article-body img {
  margin: 32px auto;
  border-radius: 4px;
}
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }
.article-body code {
  background: var(--bg-card);
  padding: 2px 7px;
  font-size: 0.9em;
  border-radius: 3px;
}

.article-nav {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.9rem;
}
.article-nav a { color: var(--text-dim); }
.article-nav a:hover { color: var(--accent); }

/* ---------- Page hero (small) ---------- */
.page-head {
  padding: 110px 0 56px;
  text-align: center;
}
.page-head .tag {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.page-head h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 500;
}
.page-head p { color: var(--text-dim); margin-top: 14px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-inner .copy { font-family: var(--font-display); color: var(--text-faint); font-size: 0.85rem; letter-spacing: 0.1em; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--text-dim); font-size: 0.85rem; }
.footer-links a:hover { color: var(--accent); }

/* ---------- 背景音乐按钮 ---------- */
.music-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(238, 243, 248, 0.9);
  background: rgba(10, 26, 49, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(126, 200, 255, 0.12),
    0 0 18px rgba(126, 200, 255, 0.18);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.music-btn:hover {
  transform: translateY(-2px) scale(1.06);
  color: #ffffff;
  border-color: rgba(126, 200, 255, 0.6);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(126, 200, 255, 0.3),
    0 0 28px rgba(126, 200, 255, 0.38);
}
.music-btn.on {
  color: #081527;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow:
    0 8px 26px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(126, 200, 255, 0.5),
    0 0 30px rgba(126, 200, 255, 0.55);
}
.music-btn.on::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(126, 200, 255, 0.55);
  animation: music-pulse 2.4s ease-out infinite;
}
@keyframes music-pulse {
  0%   { transform: scale(0.85); opacity: 0.8; }
  100% { transform: scale(1.4);  opacity: 0; }
}

/* 背景音乐署名（CC-BY 4.0） */
.footer-inner .music-credit {
  width: 100%;
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-top: 14px;
}

/* ---------- 滚动渐入 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  img { animation: none; }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 24px; }
.hidden { display: none !important; }

/* ---------- 触屏设备常显卡片标题 ---------- */
@media (hover: none) {
  .card figcaption,
  .collection-card figcaption {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav {
    position: fixed;
    top: 68px;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-soft);
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    width: 220px;
    padding: 12px 0;
    transform: translateX(100%);
    transition: transform 0.3s var(--ease);
  }
  .nav.open { transform: translateX(0); }
  .nav a { padding: 14px 26px; }
  .nav-toggle { display: block; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-photo { width: 100%; max-width: 360px; margin-left: 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .featured-work { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 64px 0; }
}

@media (max-width: 560px) {
  .featured-work { grid-template-columns: 1fr; }
}
