/* ===========================================
   个人空间 · Personal Site
   一首歌的颜色：晨曦、薄云、远天、羽毛
   =========================================== */

:root {
  --c-sky-top: #f4eee4;       /* 晨光米白 */
  --c-sky-mid: #d9e6f2;       /* 浅天蓝 */
  --c-sky-bot: #a8c5e0;       /* 远天蓝 */
  --c-cloud: #ffffff;
  --c-ink: #243340;           /* 墨蓝（标题 / 主文字）*/
  --c-ink-soft: #46535f;      /* 次要文字：提到 WCAG AA 对比（原 #5b6c7d 在浅底上太淡）*/
  --c-ink-faint: #76828f;     /* 仅用于真正的辅助说明，不用于正文 */
  --c-accent: #6f9bc4;        /* 强调蓝（加深，原 #b8d0e6 对比不足）*/
  --c-accent-soft: #b8d0e6;   /* 柔和点缀蓝 */
  --c-accent-warm: #c98f73;   /* 黄昏暖粉（加深，可读）*/
  --c-line: rgba(43, 58, 74, 0.18);

  /* 语义字号阶梯（rem，尊重用户缩放；~1.25 模块化）*/
  --fs-body: 1rem;            /* 16 正文 */
  --fs-lead: 1.125rem;        /* 18 引导文 */
  --fs-small: 0.8125rem;      /* 13 标签 / 时间 */
  --fs-h3: 1.3rem;            /* ~21 小标题 */
  --fs-h2: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
  --fs-display: clamp(2.6rem, 1rem + 6vw, 5.5rem);

  --f-serif-cn: "Noto Serif SC", "Songti SC", serif;
  --f-serif-deco: "Noto Serif SC", "Songti SC", serif;   /* 原 Noto Serif JP 未在 index.html 加载，改用已加载 serif */
  --f-serif-en: "Cormorant Garamond", Georgia, serif;
  --f-sans: "Noto Sans SC", "PingFang SC", -apple-system, sans-serif;

  --content-width: 1080px;
  --reading-width: 62ch;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--f-sans);
  color: var(--c-ink);
  background: var(--c-sky-top);
  overflow-x: hidden;
  font-size: var(--fs-body);
  line-height: 1.8;
  font-weight: 400;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ============= 渐变天空背景 ============= */
.sky-bg {
  position: fixed;
  inset: 0;
  z-index: -10;
  background:
    radial-gradient(ellipse at top, #fdfaf3 0%, transparent 55%),
    linear-gradient(
      180deg,
      var(--c-sky-top) 0%,
      var(--c-sky-mid) 50%,
      var(--c-sky-bot) 100%
    );
}

.sky-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 220, 200, 0.25), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(200, 220, 240, 0.3), transparent 50%);
  mix-blend-mode: screen;
}

/* ============= 云 ============= */
.clouds {
  position: fixed;
  inset: 0;
  z-index: -5;
  pointer-events: none;
  overflow: hidden;
}

.cloud {
  position: absolute;
  background: radial-gradient(ellipse, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0) 70%);
  filter: blur(4px);
  animation: drift linear infinite;
}

.cloud-1 { width: 480px; height: 140px; top: 8%;  left: -200px; animation-duration: 90s; }
.cloud-2 { width: 360px; height: 110px; top: 30%; left: -200px; animation-duration: 110s; animation-delay: -30s; opacity: 0.7; }
.cloud-3 { width: 540px; height: 160px; top: 60%; left: -200px; animation-duration: 130s; animation-delay: -60s; opacity: 0.6; }
.cloud-4 { width: 300px; height: 90px;  top: 80%; left: -200px; animation-duration: 100s; animation-delay: -10s; opacity: 0.5; }

@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(100vw + 400px)); }
}

/* ============= 飘动羽毛 ============= */
.feathers {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  overflow: hidden;
}

.feather {
  position: absolute;
  font-size: 22px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 2px 8px rgba(120, 150, 180, 0.3);
  user-select: none;
  /* GSAP controls position and rotation */
}

@keyframes fall {
  0% {
    transform: translateY(-50px) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% { opacity: 0.9; }
  50% {
    transform: translateY(50vh) translateX(80px) rotate(180deg);
  }
  90% { opacity: 0.9; }
  100% {
    transform: translateY(110vh) translateX(-40px) rotate(360deg);
    opacity: 0;
  }
}

/* ============= 导航 ============= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 64px;
  backdrop-filter: blur(8px);
  background: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0));
  transition: padding 0.3s ease;
}

.nav.scrolled {
  padding: 16px 64px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 1px 30px rgba(120, 150, 180, 0.08);
}

.logo-mark {
  font-family: var(--f-serif-deco);
  font-size: 26px;
  font-weight: 500;
  color: var(--c-ink);
  position: relative;
  padding: 4px 14px;
  border: 1px solid var(--c-ink);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  color: var(--c-ink);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.15em;
  position: relative;
  padding: 4px 0;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--c-ink);
  transition: all 0.4s ease;
  transform: translateX(-50%);
}

.nav-links a:hover {
  color: #4a6b88;
}

.nav-links a:hover::after {
  width: 100%;
}

/* ============= Hero ============= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 32px 80px;
  position: relative;
}

.hero-inner {
  text-align: center;
  max-width: 780px;
}

.hero-jp {
  font-family: var(--f-serif-deco);
  font-size: 18px;
  letter-spacing: 0.6em;
  color: var(--c-ink-soft);
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp 1.2s ease 0.2s forwards;
}

.hero-title {
  font-family: var(--f-serif-cn);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.25;
  color: var(--c-ink);
  margin-bottom: 36px;
}

.title-line {
  display: block;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 1.2s ease forwards;
}

.title-line { animation-delay: 0.5s; }
.title-line--alt {
  animation-delay: 0.8s;
  font-style: italic;
  font-family: var(--f-serif-en);
  font-weight: 300;
  font-size: 0.85em;
  color: var(--c-ink-soft);
  letter-spacing: 0.12em;
}

.hero-sub {
  font-family: var(--f-serif-deco);
  font-size: 17px;
  font-weight: 300;
  line-height: 2;
  color: var(--c-ink-soft);
  margin-bottom: 56px;
  opacity: 0;
  animation: fadeUp 1.2s ease 1.1s forwards;
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--f-serif-en);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--c-ink-soft);
  opacity: 0;
  animation: fadeUp 1.2s ease 1.4s forwards;
}

.meta-dot {
  width: 4px;
  height: 4px;
  background: var(--c-ink-soft);
  border-radius: 50%;
}

.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-family: var(--f-serif-en);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--c-ink-soft);
  opacity: 0;
  animation: fadeUp 1.2s ease 1.7s forwards;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--c-ink-soft), transparent);
  animation: scrollLine 2.4s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
  50%      { transform: scaleY(1);   opacity: 1; }
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ============= Section 通用 ============= */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 140px 48px;
  position: relative;
}

.section-head {
  text-align: center;
  margin-bottom: 100px;
  position: relative;
}

.section-num {
  display: block;
  font-family: var(--f-serif-en);
  font-style: italic;
  font-size: 14px;
  color: var(--c-ink-soft);
  letter-spacing: 0.3em;
  margin-bottom: 12px;
}

.section-eyebrow {
  font-family: var(--f-serif-en);
  font-size: 13px;
  letter-spacing: 0.5em;
  color: var(--c-ink-soft);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.section-title {
  font-family: var(--f-serif-cn);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 400;
  letter-spacing: 0.4em;
  color: var(--c-ink);
  position: relative;
  display: inline-block;
}

.section-title::before,
.section-title::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40px;
  height: 1px;
  background: var(--c-line);
}
.section-title::before { right: calc(100% + 24px); }
.section-title::after  { left:  calc(100% + 24px); }

/* ============= About ============= */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 80px;
  align-items: center;
}

.portrait-frame {
  position: relative;
  aspect-ratio: 1;
  max-width: 320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portrait-circle {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, var(--c-accent-soft) 60%, var(--c-sky-bot) 100%);
  box-shadow:
    0 30px 80px rgba(120, 150, 180, 0.25),
    inset 0 -20px 40px rgba(120, 150, 180, 0.2);
  animation: floaty 6s ease-in-out infinite;
}

.portrait-circle::before {
  content: "";
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 1px dashed var(--c-line);
  animation: rotate 60s linear infinite;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

@keyframes rotate {
  to { transform: rotate(360deg); }
}

.portrait-feather {
  font-family: var(--f-serif-deco);
  font-size: 80px;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 4px 20px rgba(120, 150, 180, 0.3);
  position: relative;
  z-index: 1;
}

.portrait-caption {
  text-align: center;
  margin-top: 28px;
  font-family: var(--f-serif-cn);
  font-size: 14px;
  color: var(--c-ink-soft);
  letter-spacing: 0.2em;
}

.about-text {
  font-family: var(--f-serif-cn);
  font-size: 17px;
  line-height: 2.2;
  color: var(--c-ink);
}

.about-quote {
  font-family: var(--f-serif-cn);
  font-style: italic;
  font-size: 22px;
  font-weight: 400;
  color: #4a6b88;
  border-left: 2px solid var(--c-accent);
  padding-left: 24px;
  margin-bottom: 32px;
  line-height: 1.8;
}

.about-text p {
  margin-bottom: 18px;
}

.about-text strong {
  font-weight: 500;
  color: #2b3a4a;
  border-bottom: 1px solid var(--c-accent-warm);
  padding-bottom: 1px;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  list-style: none;
}

.about-tags li {
  font-family: var(--f-sans);
  font-size: 13px;
  padding: 6px 16px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  color: var(--c-ink-soft);
  letter-spacing: 0.1em;
  background: rgba(255,255,255,0.4);
  backdrop-filter: blur(4px);
  transition: all 0.4s ease;
}

.about-tags li:hover {
  background: rgba(255,255,255,0.8);
  color: var(--c-ink);
  transform: translateY(-2px);
  border-color: var(--c-accent);
}

/* ============= Works ============= */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 28px;
}

.work-card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 4px;
  padding: 40px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInCard 0.8s ease forwards;
  animation-delay: var(--delay);
}

@keyframes fadeInCard {
  to { opacity: 1; transform: translateY(0); }
}

.work-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(184, 208, 230, 0.2));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.work-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(120, 150, 180, 0.2);
  border-color: rgba(184, 208, 230, 0.6);
}

.work-card:hover::before { opacity: 1; }

.card-icon {
  font-family: var(--f-serif-en);
  font-size: 44px;
  color: var(--c-ink);
  margin-bottom: 20px;
  font-weight: 300;
  display: inline-block;
  transition: transform 0.4s ease;
}

.work-card:hover .card-icon {
  transform: rotate(-8deg) scale(1.1);
  color: #4a6b88;
}

.work-card h3 {
  font-family: var(--f-serif-cn);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}

.work-card p {
  font-size: 14px;
  color: var(--c-ink-soft);
  line-height: 1.8;
  margin-bottom: 20px;
}

.card-tag {
  font-family: var(--f-serif-en);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--c-ink-soft);
  text-transform: uppercase;
  padding-top: 14px;
  border-top: 1px solid var(--c-line);
  display: block;
}

/* ============= 信 ============= */
.letter-paper {
  max-width: 720px;
  margin: 0 auto;
  background: linear-gradient(180deg, #fffdf7, #fbf6e8);
  padding: 70px 80px;
  border-radius: 2px;
  box-shadow:
    0 1px 1px rgba(0,0,0,0.05),
    0 30px 60px rgba(120, 110, 80, 0.12);
  position: relative;
  font-family: var(--f-serif-cn);
  font-size: 16px;
  line-height: 2.2;
  color: #4a4030;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 38px,
      rgba(180, 160, 120, 0.1) 38px,
      rgba(180, 160, 120, 0.1) 39px
    ),
    linear-gradient(180deg, #fffdf7, #fbf6e8);
}

.letter-paper::before,
.letter-paper::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  background: rgba(220, 180, 140, 0.3);
  border-radius: 50%;
}
.letter-paper::before { top: -10px; left: 30px; }
.letter-paper::after  { bottom: -10px; right: 30px; }

.letter-line {
  font-size: 18px;
  margin-bottom: 24px;
  letter-spacing: 0.1em;
}

.letter-paper p {
  margin-bottom: 18px;
}

.letter-sign {
  text-align: right;
  font-style: italic;
  font-family: var(--f-serif-en), var(--f-serif-cn);
  margin-top: 36px;
  color: #6b5a3a;
}

/* ============= 页脚 ============= */
.footer {
  text-align: center;
  padding: 80px 32px 60px;
  color: var(--c-ink-soft);
  font-size: 13px;
  letter-spacing: 0.15em;
}

.footer-line {
  width: 80px;
  height: 1px;
  background: var(--c-line);
  margin: 0 auto 32px;
}

.footer-bgm {
  font-family: var(--f-serif-en), var(--f-serif-cn);
  margin-bottom: 12px;
  font-size: 14px;
}

.bgm-title {
  font-family: var(--f-serif-deco);
  color: var(--c-ink);
  font-weight: 400;
}

.footer-copy {
  font-family: var(--f-serif-en);
  font-size: 12px;
  letter-spacing: 0.2em;
  opacity: 0.7;
}

/* ============= 音乐控件 ============= */
.music-iframe-wrap {
  position: fixed;
  bottom: 100px;
  right: 30px;
  z-index: 90;
  width: 330px;
  height: 86px;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(120, 150, 180, 0.3);
}

.music-iframe-wrap.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.music-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 95;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #fff, var(--c-accent-soft));
  color: var(--c-ink);
  font-size: 22px;
  cursor: pointer;
  box-shadow:
    0 10px 30px rgba(120, 150, 180, 0.35),
    inset 0 -3px 8px rgba(120, 150, 180, 0.2);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-toggle:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 40px rgba(120, 150, 180, 0.45);
}

.music-toggle.active .music-toggle-icon {
  animation: spin 4s linear infinite;
}

.music-toggle-icon {
  display: inline-block;
  font-family: var(--f-serif-deco);
}

.music-toggle-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--c-accent);
  animation: pulse 2s ease-out infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%   { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ============= 入口门 ============= */
.enter-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background:
    radial-gradient(ellipse at top, #fdfaf3 0%, transparent 55%),
    linear-gradient(180deg, #f4eee4 0%, #d9e6f2 50%, #a8c5e0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  transition: opacity 1.4s ease, visibility 1.4s ease;
}

.enter-gate.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-inner {
  text-align: center;
  max-width: 520px;
  animation: gateIn 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes gateIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gate-jp {
  font-family: var(--f-serif-deco);
  font-size: 18px;
  letter-spacing: 0.6em;
  color: var(--c-ink-soft);
  margin-bottom: 36px;
}

.gate-title {
  font-family: var(--f-serif-cn);
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 400;
  letter-spacing: 0.4em;
  color: var(--c-ink);
  margin-bottom: 28px;
}

.gate-sub {
  font-family: var(--f-serif-cn);
  font-size: 16px;
  line-height: 2;
  color: var(--c-ink-soft);
  margin-bottom: 56px;
  letter-spacing: 0.1em;
}

.gate-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 44px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(43, 58, 74, 0.2);
  border-radius: 999px;
  color: var(--c-ink);
  font-family: var(--f-serif-cn);
  font-size: 16px;
  letter-spacing: 0.4em;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.gate-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(184, 208, 230, 0.4));
  opacity: 0;
  transition: opacity 0.5s ease;
}

.gate-btn:hover {
  transform: translateY(-3px);
  border-color: var(--c-ink);
  box-shadow: 0 20px 40px rgba(120, 150, 180, 0.3);
}

.gate-btn:hover::before { opacity: 1; }

.gate-btn-mark {
  font-family: var(--f-serif-deco);
  font-size: 18px;
  position: relative;
  z-index: 1;
}

.gate-btn-text { position: relative; z-index: 1; }

.gate-tip {
  margin-top: 32px;
  font-family: var(--f-serif-en), var(--f-serif-cn);
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--c-ink-soft);
  opacity: 0.7;
}

/* ============= 进入动画 ============= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease, transform 1s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ============= 响应式 ============= */
@media (max-width: 900px) {
  .nav { padding: 20px 24px; }
  .nav.scrolled { padding: 14px 24px; }
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 12px; }

  .section { padding: 100px 24px; }
  .section-head { margin-bottom: 64px; }
  .section-title::before,
  .section-title::after { display: none; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .letter-paper { padding: 48px 32px; }

  .music-iframe-wrap {
    right: 16px;
    width: calc(100vw - 32px);
    max-width: 330px;
  }
  .music-toggle { right: 16px; bottom: 20px; }
}

@media (max-width: 560px) {
  .hero-jp { letter-spacing: 0.4em; font-size: 14px; }
  .hero-sub { font-size: 15px; }
  .nav-links { gap: 14px; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(120, 150, 180, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(120, 150, 180, 0.5); }

/* 文字选区颜色 */
::selection {
  background: rgba(184, 208, 230, 0.6);
  color: var(--c-ink);
}

/* =====================================================================
   新增样式（v2 重构）
   - 移除显式日文，加入 Hero 个人信息层
   - 风吹文字、滚动方向感知、羽毛指示器、卡片增强等
   ===================================================================== */

/* ---------- 导航 logo + 名字组合 ---------- */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--c-ink);
}

.logo-name {
  font-family: var(--f-serif-cn);
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--c-ink-soft);
  font-weight: 400;
  opacity: 0.85;
  transition: opacity 0.4s ease;
}

.nav-logo:hover .logo-name { opacity: 1; }

/* ---------- 导航：滚动方向感知 ---------- */
.nav {
  transition: padding 0.3s ease, transform 0.4s ease, opacity 0.4s ease;
}
.nav.hide {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* ---------- Hero 个人信息层 ---------- */
.hero-byline {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 56px;
  font-family: var(--f-serif-en);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--c-ink-soft);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 1.4s ease 1.4s, transform 1.4s ease 1.4s;
}
.hero-byline.in,
.hero-byline.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.byline-name {
  font-family: var(--f-serif-cn);
  font-size: 15px;
  letter-spacing: 0.18em;
  color: var(--c-ink);
}
.byline-tag {
  font-family: var(--f-serif-cn);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--c-ink-soft);
  font-weight: 300;
}
.byline-dot {
  color: var(--c-ink-soft);
  opacity: 0.55;
}

@media (max-width: 560px) {
  .hero-byline {
    flex-direction: column;
    gap: 8px;
    margin-top: 40px;
  }
  .hero-byline .byline-dot { display: none; }
}

/* ---------- 风吹文字（hero 标题）---------- */
.title-line[data-wind] { animation: none; opacity: 1; transform: none; }
.title-line[data-wind] .wind-char {
  display: inline-block;
  opacity: 0;
  transform: translate3d(40px, -10px, 0) rotate(8deg);
  filter: blur(8px);
  transition:
    opacity 0.9s cubic-bezier(.2,.7,.25,1),
    transform 1.1s cubic-bezier(.2,.7,.25,1),
    filter 0.9s ease;
  transition-delay: calc(var(--i, 0) * 0.06s);
}
.hero.wind-on .title-line[data-wind] .wind-char {
  opacity: 1;
  transform: translate3d(0, 0, 0) rotate(0deg);
  filter: blur(0);
}

/* 鼠标经过单个字时被"轻吹"开 */
.title-line[data-wind] .wind-char:hover {
  transform: translate3d(0, -6px, 0) rotate(-2deg);
  transition: transform 0.4s ease;
}

/* ---------- 章节进入动效（reveal）增强 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 滚动方向感知影响羽毛速度 ---------- */
.feather {
  animation-duration: calc(var(--feather-base, 22s) * var(--feather-speed, 1));
}

/* ---------- 右侧滚动羽毛指示器 ---------- */
.scroll-feather {
  position: fixed;
  right: 36px;
  top: 100px;
  bottom: 100px;
  width: 24px;
  z-index: 50;
  pointer-events: none;
  --scroll-ratio: 0;
}
.scroll-feather-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--c-line) 12%, var(--c-line) 88%, transparent);
  transform: translateX(-50%);
}
.scroll-feather-mark {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  top: calc(var(--scroll-ratio, 0) * 100%);
  font-size: 18px;
  color: var(--c-ink);
  opacity: 0.55;
  text-shadow: 0 2px 6px rgba(120,150,180,0.25);
  transition: top 0.3s cubic-bezier(.2,.7,.25,1);
}
@media (max-width: 760px) {
  .scroll-feather { display: none; }
}

/* ---------- 作品卡片：增强（封面 / tags / hover 掀起一角）---------- */
.card-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px 14px 6px 6px;
  margin-bottom: 18px;
  overflow: hidden;
  background: rgba(43, 58, 74, 0.06);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(.2, .7, .25, 1);
}
.work-card:hover .card-cover img,
.blog-card:hover .card-cover img { transform: scale(1.05); }

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.card-tag {
  font-family: var(--f-serif-en);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--c-ink-soft);
  border: 1px solid var(--c-line);
  border-radius: 999px;
  padding: 3px 12px;
  background: rgba(255,255,255,0.6);
}

/* 信纸掀起一角效果（替代 3D 旋转）*/
.work-card {
  position: relative;
  transition: transform 0.5s cubic-bezier(.2,.7,.25,1), box-shadow 0.5s ease;
}
.work-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 0 0;
  border-color: transparent transparent transparent transparent;
  transition: all 0.4s ease;
  pointer-events: none;
  border-top-right-radius: 14px;
}
.work-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -28px rgba(60, 90, 120, 0.35);
}
.work-card:hover::before {
  border-width: 22px 22px 0 0;
  border-color: rgba(232, 220, 200, 0.85) transparent transparent transparent;
  filter: drop-shadow(-2px 2px 3px rgba(0,0,0,0.08));
}

/* ---------- about-text 动态渲染的段落样式 ---------- */
#aboutIntro p {
  margin-bottom: 14px;
  line-height: 1.85;
  color: var(--c-ink-soft);
}
#aboutIntro strong {
  color: var(--c-ink);
  font-weight: 500;
}

/* ---------- 链接 hover "一笔写出"下划线（适用于正文链接，不影响 nav）---------- */
.about-text a, #aboutIntro a, .letter-paper a {
  color: var(--c-ink);
  text-decoration: none;
  background-image: linear-gradient(var(--c-ink), var(--c-ink));
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.5s cubic-bezier(.2,.7,.25,1);
  padding-bottom: 1px;
}
.about-text a:hover, #aboutIntro a:hover, .letter-paper a:hover {
  background-size: 100% 1px;
}

/* ---------- 图片"显影"加载（给所有 img 默认）---------- */
img {
  filter: blur(8px);
  opacity: 0;
  transition: filter 0.8s ease, opacity 0.8s ease;
}
img.loaded, img[src] {
  filter: blur(0);
  opacity: 1;
}

/* =====================================================================
   SPA 子页通用样式
   ===================================================================== */

#view-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  transition: opacity 0.35s ease, transform 0.45s ease;
}
#view-container.view-leaving { opacity: 0; transform: translateY(8px); }
#view-container.view-entering { opacity: 0; transform: translateY(8px); }

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 140px 32px 100px;
  position: relative;
}
.page-head {
  text-align: center;
  margin-bottom: 80px;
}
.page-eyebrow {
  font-family: var(--f-serif-en);
  font-size: 13px;
  letter-spacing: 0.5em;
  color: var(--c-ink-soft);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.page-title {
  font-family: var(--f-serif-cn);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 400;
  letter-spacing: 0.4em;
  color: var(--c-ink);
  margin-bottom: 18px;
}
.page-lede {
  font-family: var(--f-serif-cn);
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--c-ink-soft);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.9;
}

.subsection-title {
  font-family: var(--f-serif-cn);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.4em;
  color: var(--c-ink);
  text-align: center;
  margin: 80px 0 12px;
}
.subsection-lede {
  text-align: center;
  color: var(--c-ink-soft);
  font-size: 14px;
  letter-spacing: 0.18em;
  margin-bottom: 50px;
}

.section-divider {
  text-align: center;
  margin: 80px 0;
  color: var(--c-ink-soft);
  opacity: 0.4;
  font-size: 22px;
  letter-spacing: 1em;
}

.muted {
  color: var(--c-ink-soft);
  opacity: 0.65;
  font-style: italic;
}
.center { text-align: center; }
.muted.small { font-size: 12px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-serif-cn);
  font-size: 14px;
  letter-spacing: 0.25em;
  color: var(--c-ink);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 999px;
  transition: all 0.4s cubic-bezier(.2,.7,.25,1);
}
.back-link:hover {
  background: rgba(43, 58, 74, 0.06);
  transform: translateX(-4px);
}
.back-link.bottom { margin-top: 80px; display: inline-flex; }

.lost-back {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 14px 36px;
  border: 1px solid var(--c-ink);
  border-radius: 999px;
  color: var(--c-ink);
  text-decoration: none;
  font-family: var(--f-serif-cn);
  letter-spacing: 0.4em;
  font-size: 14px;
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(8px);
  transition: all 0.4s cubic-bezier(.2,.7,.25,1);
}

.teaser-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  font-family: var(--f-serif-cn);
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--c-ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 4px;
  transition: border-color 0.4s ease, transform 0.4s ease;
}
.teaser-more:hover {
  border-color: var(--c-ink);
  transform: translateX(4px);
}
.teaser-more.center { display: block; text-align: center; margin: 40px auto 0; width: max-content; }

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  margin: 6px;
  font-family: var(--f-serif-cn);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--c-ink);
  text-decoration: none;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
  transition: all 0.4s ease;
}
.link-btn:hover { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
.link-btn.primary { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
.link-btn.primary:hover { background: transparent; color: var(--c-ink); }
.link-btn.big { padding: 18px 56px; font-size: 16px; letter-spacing: 0.4em; margin-top: 24px; }

/* ============= 子页过场：云朵覆盖 ============= */
.cloud-cover {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.95), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.85), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.8), transparent 60%);
  transition: opacity 0.5s ease;
}
body.cloud-transition .cloud-cover { opacity: 1; }

/* ============= 七项导航更紧凑 ============= */
.nav-links { gap: 28px; }
.nav-links a {
  font-size: 13px;
  letter-spacing: 0.12em;
}
.nav-links a.active { color: #4a6b88; font-weight: 500; }
.nav-links a.active::after { width: 100%; }

@media (max-width: 1000px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 12px; letter-spacing: 0.08em; }
}
@media (max-width: 760px) {
  .nav { padding: 16px 20px; }
  .nav.scrolled { padding: 12px 20px; }
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 11px; }
}

/* =====================================================================
   首页：teaser 节
   ===================================================================== */
.teaser-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
  max-width: 980px;
  margin: 0 auto;
  align-items: start;
}
.teaser-portrait .portrait-frame {
  width: 220px; height: 220px;
  position: relative;
  margin: 0 auto;
}
.teaser-text .about-quote { font-size: 17px; margin-bottom: 18px; }
.teaser-intro p { margin-bottom: 12px; line-height: 1.85; color: var(--c-ink-soft); }

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}
.skill-bubble {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--c-line);
  font-family: var(--f-serif-cn);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--c-ink);
  transition: all 0.3s ease;
}
.skill-bubble:hover {
  background: var(--c-ink);
  color: #fff;
  transform: translateY(-2px);
}

.blog-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 980px;
  margin: 0 auto;
}
.blog-teaser-card {
  display: block;
  padding: 24px 28px;
  background: rgba(255,255,255,0.7);
  border-radius: 12px;
  border: 1px solid var(--c-line);
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.blog-teaser-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -24px rgba(60,90,120,0.3);
}
.blog-teaser-card .blog-date {
  font-family: var(--f-serif-en);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--c-ink-soft);
}
.blog-teaser-card h4 {
  font-family: var(--f-serif-cn);
  font-size: 18px;
  font-weight: 500;
  margin: 8px 0 6px;
}
.blog-teaser-card .blog-summary {
  font-size: 13px;
  color: var(--c-ink-soft);
  line-height: 1.7;
}

.letter-cta { margin-top: 24px; display: inline-flex; }

@media (max-width: 760px) {
  .teaser-row { grid-template-columns: 1fr; gap: 30px; }
}

/* =====================================================================
   作品集子页：错落瀑布流
   ===================================================================== */
.works-waterfall {
  columns: 3 280px;
  column-gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
}
.works-waterfall .waterfall-card {
  break-inside: avoid;
  margin-bottom: 28px;
  display: block;
  padding: 22px 24px;
  background: rgba(255,255,255,0.8);
  border-radius: 14px;
  border: 1px solid var(--c-line);
  color: inherit;
  text-decoration: none;
  transition: transform 0.5s cubic-bezier(.2,.7,.25,1), box-shadow 0.5s ease;
  position: relative;
}
.works-waterfall .waterfall-card .card-cover { height: 180px; margin-bottom: 14px; border-radius: 10px; }
.works-waterfall .waterfall-card.tall .card-cover { height: 240px; }
.works-waterfall .waterfall-card.short .card-cover { height: 130px; }
.works-waterfall .waterfall-card .card-icon {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 14px; opacity: 0.7;
}
.works-waterfall .waterfall-card .card-date {
  font-family: var(--f-serif-en);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--c-ink-soft);
  margin-bottom: 8px;
}
.works-waterfall .waterfall-card h3 {
  font-family: var(--f-serif-cn);
  font-size: 19px;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 0.1em;
}
.works-waterfall .waterfall-card .card-summary {
  font-size: 13px;
  color: var(--c-ink-soft);
  line-height: 1.7;
  margin-bottom: 14px;
}
.works-waterfall .waterfall-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -24px rgba(60, 90, 120, 0.35);
}

/* 作品详情 */
.works-detail .detail-head { text-align: center; margin: 40px 0; }
.works-detail .detail-date { font-family: var(--f-serif-en); font-size: 13px; letter-spacing: 0.3em; color: var(--c-ink-soft); margin-bottom: 14px; }
.works-detail .detail-title { font-family: var(--f-serif-cn); font-size: clamp(36px, 5vw, 56px); font-weight: 400; letter-spacing: 0.3em; margin-bottom: 18px; }
.works-detail .card-tags { justify-content: center; }
.works-detail .detail-cover {
  width: 100%;
  aspect-ratio: 21 / 9;
  border-radius: 16px;
  margin: 40px auto;
  max-width: var(--content-width);
  overflow: hidden;
  background: rgba(43, 58, 74, 0.06);
}
.works-detail .detail-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.works-detail .detail-summary {
  max-width: 720px; margin: 30px auto;
  font-size: 18px;
  font-style: italic;
  color: var(--c-ink-soft);
  line-height: 1.9;
  text-align: center;
  font-family: var(--f-serif-cn);
}
.works-detail .detail-body {
  max-width: 720px; margin: 40px auto;
  line-height: 1.95;
}
.works-detail .detail-body p { margin-bottom: 16px; color: var(--c-ink-soft); }
.works-detail .detail-body h2, .works-detail .detail-body h3 {
  font-family: var(--f-serif-cn);
  margin: 30px 0 12px;
  color: var(--c-ink);
}
.works-detail .detail-links {
  text-align: center;
  margin: 50px 0;
}

/* =====================================================================
   技能子页：按类别分组 + 熟练度（默认全部可见，不再藏 hover）
   ===================================================================== */
.skills-page .skill-groups {
  max-width: var(--content-width);
  margin: 56px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 26px;
}
.skill-group {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--c-line);
  border-top: 3px solid var(--cat-color, var(--c-accent));
  border-radius: 16px;
  padding: 28px 28px 18px;
  backdrop-filter: blur(6px);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.skill-group:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px -30px rgba(60, 90, 120, 0.35);
}
.skill-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.skill-group-mark { color: var(--cat-color, var(--c-accent)); font-size: 14px; opacity: 0.85; }
.skill-group-title {
  font-family: var(--f-serif-cn);
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--c-ink);
}
.skill-group-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--c-line), transparent); }
.skill-group-count {
  font-family: var(--f-serif-en);
  font-size: var(--fs-small);
  color: var(--c-ink-faint);
  letter-spacing: 0.1em;
}
.skill-list { list-style: none; }
.skill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--c-line);
}
.skill-row:last-child { border-bottom: none; }
.skill-name {
  font-family: var(--f-sans);
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--c-ink);
  letter-spacing: 0.02em;
}
.skill-meta { display: inline-flex; align-items: center; gap: 14px; flex-shrink: 0; }
.skill-dots { display: inline-flex; gap: 5px; }
.skill-dots i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-line); display: inline-block;
  transition: background 0.3s ease;
}
.skill-dots i.on { background: var(--cat-color, var(--c-accent)); }
.skill-years {
  font-family: var(--f-serif-en);
  font-size: var(--fs-small);
  color: var(--c-ink-faint);
  min-width: 2.6em;
  text-align: right;
}
@media (max-width: 420px) {
  .skill-row { gap: 10px; }
  .skill-meta { gap: 10px; }
}

/* ---------- 通用空状态（证书 / 博客 / 技能内容少时优雅兜底）---------- */
.empty-state {
  max-width: 480px;
  margin: 72px auto;
  text-align: center;
  color: var(--c-ink-soft);
  line-height: 2;
}
.empty-state .empty-mark {
  display: block;
  font-size: 30px;
  color: var(--c-accent);
  opacity: 0.55;
  margin-bottom: 18px;
}
.empty-state p { font-size: var(--fs-lead); }

/* =====================================================================
   证书子页：时间线 + 卡片
   ===================================================================== */
.certs-page .cert-timeline {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  padding: 20px 0;
}
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--c-line) 6%, var(--c-line) 94%, transparent);
  transform: translateX(-50%);
}
.cert-row {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  gap: 0;
  margin-bottom: 50px;
  align-items: center;
}
.cert-row.right .cert-card { grid-column: 3 / 4; }
.cert-row.left .cert-card { grid-column: 1 / 2; text-align: right; }
.cert-row .timeline-dot {
  grid-column: 2 / 3;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--c-ink);
  box-shadow: 0 0 0 6px rgba(255,255,255,0.7), 0 0 18px rgba(120,150,180,0.4);
  margin: 0 auto;
}
.cert-card {
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--c-line);
  border-radius: 14px;
  padding: 18px 22px;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(.2,.7,.25,1), box-shadow 0.4s ease;
}
.cert-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px -20px rgba(60, 90, 120, 0.3);
}
.cert-thumb {
  width: 100%;
  height: 110px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  margin-bottom: 12px;
}
.cert-meta .cert-date { font-family: var(--f-serif-en); font-size: 11px; letter-spacing: 0.3em; color: var(--c-ink-soft); }
.cert-meta h3 { font-family: var(--f-serif-cn); font-size: 17px; font-weight: 500; margin: 6px 0; }
.cert-meta .cert-issuer { font-size: 12px; color: var(--c-ink-soft); letter-spacing: 0.1em; }
.cert-meta .cert-desc { font-size: 12px; color: var(--c-ink-soft); margin-top: 8px; line-height: 1.6; }

@media (max-width: 760px) {
  .cert-row { grid-template-columns: 30px 1fr; gap: 16px; }
  .cert-row .timeline-dot { grid-column: 1 / 2; }
  .cert-row.right .cert-card,
  .cert-row.left .cert-card { grid-column: 2 / 3; text-align: left; }
  .timeline-line { left: 14px; transform: none; }
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(20, 30, 50, 0.85);
  backdrop-filter: blur(10px);
  z-index: 300;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px;
  padding: 40px;
}
.lightbox[hidden] { display: none !important; }
.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.lightbox-close {
  position: absolute; top: 24px; right: 32px;
  font-size: 36px;
  color: #fff;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-caption { color: rgba(255,255,255,0.85); font-family: var(--f-serif-cn); letter-spacing: 0.3em; }
body.lightbox-open { overflow: hidden; }

/* =====================================================================
   关于子页：飞行轨迹 + 我喜欢的
   ===================================================================== */
.about-page .about-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
  max-width: 980px;
  margin: 0 auto;
  align-items: start;
}
.about-page .portrait-frame.large { width: 240px; height: 240px; }
.self-desc { color: var(--c-ink-soft); font-size: 13px; letter-spacing: 0.3em; margin-bottom: 14px; }
.about-page .about-name-block .about-quote { font-size: 19px; margin-bottom: 18px; }
.about-page .about-intro p { margin-bottom: 14px; line-height: 1.95; color: var(--c-ink-soft); }

.flight-path {
  position: relative;
  max-width: 920px;
  margin: 40px auto;
}
.flight-path .path-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.5;
}
.tl-node {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  margin-bottom: 60px;
  align-items: center;
}
.tl-node.right .tl-card { grid-column: 3 / 4; text-align: left; }
.tl-node.left .tl-card { grid-column: 1 / 2; text-align: right; }
.tl-dot {
  grid-column: 2 / 3;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--c-ink);
  margin: 0 auto;
  box-shadow: 0 0 0 6px rgba(255,255,255,0.7), 0 0 16px rgba(120,150,180,0.5);
  z-index: 2;
}
.tl-card {
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--c-line);
  border-radius: 14px;
  padding: 18px 22px;
}
.tl-card .tl-year { font-family: var(--f-serif-en); font-size: 13px; letter-spacing: 0.3em; color: var(--c-ink-soft); }
.tl-card h4 { font-family: var(--f-serif-cn); font-size: 18px; font-weight: 500; margin: 6px 0; }
.tl-card p { font-size: 13px; color: var(--c-ink-soft); line-height: 1.7; }

@media (max-width: 760px) {
  .about-page .about-hero { grid-template-columns: 1fr; gap: 30px; }
  .tl-node { grid-template-columns: 30px 1fr; gap: 16px; }
  .tl-node .tl-dot { grid-column: 1 / 2; }
  .tl-node.right .tl-card,
  .tl-node.left .tl-card { grid-column: 2 / 3; text-align: left; }
}

.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 920px;
  margin: 0 auto;
}
.interest-card {
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--c-line);
  border-radius: 12px;
  padding: 24px 28px;
  text-align: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.interest-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -20px rgba(60, 90, 120, 0.25);
}
.interest-card .interest-cat {
  font-family: var(--f-serif-en);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--c-ink-soft);
  margin-bottom: 10px;
}
.interest-card .interest-val {
  font-family: var(--f-serif-cn);
  font-size: 17px;
  color: var(--c-ink);
}

/* =====================================================================
   联系子页：夜空 + 信纸 + 图标
   ===================================================================== */
.contact-page.night-mode {
  background: linear-gradient(180deg, #1d2942 0%, #0d162b 100%);
  color: #f4eee4;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
.contact-page .page-title { color: #f4eee4; }
.contact-page .page-eyebrow { color: rgba(244,238,228,0.65); }
.stars-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.bg-star {
  position: absolute;
  background: rgba(255, 250, 240, 0.85);
  border-radius: 50%;
  animation: twinkle-bg 4s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(255,250,220,0.5);
}
@keyframes twinkle-bg {
  0%,100% { opacity: 0.3; }
  50% { opacity: 1; }
}
.moon {
  position: absolute;
  top: 12%;
  right: 8%;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle at 65% 35%, #fdfaf3 0%, #e8dfb8 60%, transparent 80%);
  box-shadow: 0 0 80px rgba(248, 230, 180, 0.6);
  opacity: 0.85;
}

.letter-paper.night {
  background: rgba(244, 238, 228, 0.92);
  color: var(--c-ink);
  max-width: 660px;
  margin: 0 auto;
  padding: 40px 50px;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  position: relative;
  z-index: 2;
  font-family: var(--f-serif-cn);
}

.contact-icons {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin-top: 60px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}
.contact-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 32px;
  border: 1px solid rgba(244,238,228,0.3);
  border-radius: 14px;
  color: #f4eee4;
  text-decoration: none;
  background: rgba(244,238,228,0.05);
  backdrop-filter: blur(8px);
  transition: all 0.4s ease;
  cursor: pointer;
  min-width: 120px;
}
.contact-icon:hover {
  background: rgba(244,238,228,0.15);
  transform: translateY(-4px);
  border-color: rgba(244,238,228,0.7);
}
.contact-icon .icon-glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}
.contact-icon .icon-glyph svg { width: 26px; height: 26px; display: block; }
.contact-icon .icon-text {
  font-family: var(--f-serif-cn);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.25em;
}

.contact-coda {
  text-align: center;
  margin-top: 80px;
  font-family: var(--f-serif-cn);
  font-size: 13px;
  letter-spacing: 0.5em;
  color: rgba(244,238,228,0.82);
  position: relative;
  z-index: 2;
}

body.bgm-soft .music-toggle { opacity: 0.5; }

/* =====================================================================
   博客子页：卡片 / 详情页
   ===================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
}
.blog-card {
  display: block;
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--c-line);
  border-radius: 14px;
  padding: 24px 28px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.5s cubic-bezier(.2,.7,.25,1), box-shadow 0.5s ease;
}
.blog-card .card-cover {
  height: 160px;
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}
.blog-card .card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card .card-date {
  font-family: var(--f-serif-en);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--c-ink-soft);
}
.blog-card h3 {
  font-family: var(--f-serif-cn);
  font-size: 20px;
  font-weight: 500;
  margin: 8px 0;
  letter-spacing: 0.1em;
}
.blog-card .card-summary {
  font-size: 13px;
  color: var(--c-ink-soft);
  line-height: 1.7;
  margin-bottom: 14px;
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -24px rgba(60, 90, 120, 0.35);
}

.blog-detail .detail-summary {
  text-align: center;
  font-style: italic;
  color: var(--c-ink-soft);
  margin: 20px auto 30px;
  max-width: 720px;
  line-height: 1.8;
}

/* 飞书 inline 嵌入 */
.feishu-embed {
  position: relative;
  width: 100%;
  height: 80vh;
  min-height: 600px;
  max-width: 1100px;
  margin: 40px auto;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--c-line);
  background: rgba(255,255,255,0.5);
}
.feishu-embed .embed-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.feishu-embed .embed-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(255,255,255,0.95);
  z-index: 2;
}
.feishu-embed .loading-feather {
  font-size: 32px;
  animation: float-skill 4s ease-in-out infinite;
}
.feishu-embed .embed-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: rgba(255,255,255,0.95);
  text-align: center;
  z-index: 3;
  padding: 32px;
}
.feishu-embed .embed-fallback[hidden] { display: none !important; }
.enter-gate[hidden] { display: none !important; }
.music-iframe-wrap[hidden] { display: none !important; }
.feishu-embed .embed-fallback p {
  color: var(--c-ink-soft);
  font-family: var(--f-serif-cn);
  font-size: 16px;
  letter-spacing: 0.15em;
}

/* 博客 external 卡片 */
.external-card {
  max-width: 720px;
  margin: 50px auto;
  text-align: center;
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--c-line);
  border-radius: 16px;
  padding: 50px 40px;
}
.external-cover {
  width: 100%;
  height: 280px;
  border-radius: 10px;
  margin-bottom: 30px;
  overflow: hidden;
}
.external-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.external-hint {
  font-family: var(--f-serif-cn);
  font-size: 16px;
  color: var(--c-ink-soft);
  letter-spacing: 0.2em;
  margin-bottom: 20px;
}

/* =====================================================================
   序曲（首次访问）
   ===================================================================== */
.prelude-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(180deg, #fdfaf3, #f4eee4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 1.2s ease;
}
.prelude-overlay.fade-out { opacity: 0; pointer-events: none; }
.prelude-feather {
  font-size: 60px;
  color: var(--c-ink);
  animation: prelude-fall 3.5s ease-in-out;
}
@keyframes prelude-fall {
  0% { transform: translateY(-300px) rotate(-15deg); opacity: 0; }
  20% { opacity: 1; }
  60% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(20px) rotate(8deg); opacity: 0.6; }
}
.prelude-skip {
  position: fixed;
  top: 30px;
  right: 30px;
  background: transparent;
  border: 1px solid var(--c-ink);
  color: var(--c-ink);
  padding: 8px 18px;
  border-radius: 999px;
  font-family: var(--f-serif-cn);
  font-size: 12px;
  letter-spacing: 0.3em;
  cursor: pointer;
  transition: background 0.3s ease;
}
.prelude-skip:hover { background: var(--c-ink); color: #fff; }

/* =====================================================================
   副歌触发瞬间的视觉
   ===================================================================== */
body.chorus-burst {
  animation: chorus-flash 3s cubic-bezier(.2,.7,.25,1) forwards;
}
body.chorus-burst .sky-bg {
  animation: chorus-sky 3s ease forwards;
}
body.chorus-burst .clouds {
  animation: chorus-clouds 3s ease forwards;
}
body.chorus-burst .hero-title,
body.chorus-burst .section-title {
  animation: chorus-title 3s ease forwards;
}

@keyframes chorus-flash {
  0%   { filter: brightness(1) saturate(1); }
  20%  { filter: brightness(1.16) saturate(1.1); }
  100% { filter: brightness(1) saturate(1); }
}
@keyframes chorus-sky {
  0%   { filter: brightness(1); }
  25%  { filter: brightness(1.25) blur(0); }
  100% { filter: brightness(1); }
}
@keyframes chorus-clouds {
  0%   { transform: scale(1); opacity: 1; }
  30%  { transform: scale(1.04); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes chorus-title {
  0%   { text-shadow: 0 0 0 transparent; }
  30%  { text-shadow: 0 0 32px rgba(255, 235, 200, 0.6); }
  100% { text-shadow: 0 0 0 transparent; }
}

/* =====================================================================
   Three.js 粒子背景
   ===================================================================== */
canvas[style*="z-index: -8"] {
  mix-blend-mode: screen;
}

/* =====================================================================
   无障碍：尊重 prefers-reduced-motion，关掉重动效
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .feather, .cloud, .skill-star { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

