/* ==================== 基础 ==================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: #0e2440;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 560px at 82% -12%, rgba(33, 196, 230, 0.12), transparent 60%),
    radial-gradient(1000px 620px at -6% 8%, rgba(29, 111, 242, 0.12), transparent 55%),
    linear-gradient(180deg, #f4f9ff 0%, #e9f1fe 46%, #f7fbff 100%);
  background-attachment: fixed;
}
a { color: #1d6ff2; text-decoration: none; }
a:hover { color: #0b57d0; }

/* ==================== 语言切换（默认英文） ==================== */
html.lang-en .lang-zh { display: none !important; }
html.lang-zh .lang-en { display: none !important; }

/* ==================== 视差背景层 ==================== */
.bg-far, .bg-near {
  position: fixed; inset: -10%;
  pointer-events: none; will-change: transform;
}
.bg-far {
  z-index: -3;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(29, 111, 242, 0.10) 0%, transparent 44%),
    radial-gradient(circle at 82% 58%, rgba(33, 196, 230, 0.10) 0%, transparent 48%),
    radial-gradient(circle at 45% 90%, rgba(74, 158, 255, 0.08) 0%, transparent 44%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.bg-near {
  z-index: -2;
  background-image:
    linear-gradient(rgba(29, 111, 242, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 111, 242, 0.06) 1px, transparent 1px),
    repeating-linear-gradient(45deg,
      transparent 0, transparent 80px,
      rgba(29, 111, 242, 0.025) 80px,
      rgba(29, 111, 242, 0.025) 81px);
  background-size: 60px 60px, 60px 60px, auto;
}

/* ==================== 帷幕 ==================== */
/* 欢迎页背景：细胞谱系树动画 */
.curtain-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block; z-index: 0; pointer-events: none;
}
.curtain {
  height: 100vh; height: 100dvh;
  display: flex; align-items: flex-start; justify-content: center;
  overflow: hidden;
  touch-action: none;
  background:
    linear-gradient(180deg,
      rgba(5, 10, 20, 0.95) 0%,
      rgba(10, 20, 36, 0.88) 50%,
      rgba(5, 10, 20, 0.95) 100%),
    linear-gradient(135deg,
      #050a14 0%, #0a1424 25%, #0f1e3a 50%, #0a1424 75%, #050a14 100%);
  background-size: 100% 100%, 400% 400%;
  animation: gradientFlow 18s ease infinite;
  position: relative;
}
@keyframes gradientFlow {
  0%, 100% { background-position: 0% 0%, 0% 50%; }
  50%      { background-position: 0% 0%, 100% 50%; }
}
.stars { position: absolute; inset: 0; pointer-events: none; }
.curtain .stars { display: none; }   /* 欢迎页改用 canvas 里的星空 */
.star {
  position: absolute; border-radius: 50%; background: #fff;
  animation: float linear infinite, twinkle ease-in-out infinite;
}
@keyframes float {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(12px, -18px); }
  50%  { transform: translate(-8px, -28px); }
  75%  { transform: translate(-14px, -12px); }
  100% { transform: translate(0, 0); }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.15; }
  50%      { opacity: 0.85; }
}
.curtain-content {
  position: relative; z-index: 2; text-align: center; padding: 20px;
  margin-top: 10vh;                  /* 桌面端文案位置（更靠上） */
  transition: transform 0.6s cubic-bezier(0.6, 0, 0.4, 1),
              opacity 0.6s ease;
}
.curtain.leaving .curtain-content {
  transform: scale(0.94) translateY(-8px);
  opacity: 0.35;
}
.curtain.entering .curtain-content { animation: curtainReturn 0.6s ease-out; }
@keyframes curtainReturn { 0% { opacity: 0; } 100% { opacity: 1; } }
html.skip-curtain .curtain { display: none !important; }
.curtain-name {
  font-size: 3.2rem; font-weight: 600; margin: 0 0 0.9rem;
  letter-spacing: 0.03em; min-height: 1.35em;
  background: linear-gradient(90deg,
    #ffffff 0%, #7cb8ff 25%, #c8a8ff 50%, #7cb8ff 75%, #ffffff 100%);
  background-size: 300% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 300% center; } }
.typed-caret {
  display: inline-block; width: 3px; height: 0.92em;
  margin-left: 3px; vertical-align: -0.1em;
  background: #7cb8ff;
  animation: caretBlink 1s steps(1) infinite;
}
@keyframes caretBlink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
.curtain-tagline {
  color: rgba(150, 190, 240, 0.75); font-size: 1rem;
  letter-spacing: 0.15em; margin: 0 0 3.5rem;
  animation: fadeInUp 1.4s 0.3s both cubic-bezier(0.16, 1, 0.3, 1);
}
.swipe-cue {
  position: absolute; left: 50%; bottom: 2.2rem;
  width: 88px; height: 96px; margin-left: -44px;
  z-index: 3; pointer-events: none; text-align: center;
}
.swipe-ring {
  position: absolute; left: 50%; bottom: 28px;
  width: 26px; height: 26px; margin-left: -13px;
  border-radius: 50%; border: 1.5px solid rgba(124, 184, 255, 0.75);
  opacity: 0; animation: haloUp 2.4s ease-out infinite;
}
.swipe-ring:nth-child(2) { animation-delay: 0.8s; }
.swipe-ring:nth-child(3) { animation-delay: 1.6s; }
@keyframes haloUp {
  0%   { transform: translateY(16px) scale(0.4); opacity: 0; }
  25%  { opacity: 0.85; }
  100% { transform: translateY(-42px) scale(1.3); opacity: 0; }
}
.swipe-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: 0.72rem; letter-spacing: 0.22em;
  color: rgba(170, 205, 250, 0.8);
  animation: hintPulse 2.4s ease-in-out infinite;
}
@media (hover: hover) and (pointer: fine) {
  .curtain { cursor: pointer; }
}
@keyframes hintPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.85; } }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==================== 吸顶导航（首页） ==================== */
.sticky-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(29, 111, 242, 0.12);
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.sticky-nav.visible { transform: translateY(0); }

/* 子页顶部栏（常驻） */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(29, 111, 242, 0.12);
}

.nav-inner {
  max-width: 900px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  height: 58px;
}
.nav-name {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 1rem; font-weight: 600; color: #0e2440;
  text-decoration: none; cursor: pointer;
}
.nav-name:hover { color: #1d6ff2; }
.nav-logo { width: 26px; height: 26px; display: block; flex-shrink: 0; }
.nav-links { display: flex; gap: 0.15rem; }
.nav-links a {
  padding: 0.5rem 0.9rem; color: #3a5473; text-decoration: none;
  font-size: 0.9rem; border-radius: 6px; position: relative;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: #1d6ff2; background: rgba(29, 111, 242, 0.07); }
.nav-links a.active { color: #1d6ff2; font-weight: 600; }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0.9rem; right: 0.9rem;
  bottom: -1px; height: 2px;
  background: linear-gradient(90deg, #0b57d0, #3f8ef7);
  border-radius: 1px;
  box-shadow: 0 2px 8px rgba(29, 111, 242, 0.4);
}
.nav-controls { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.lang-switch, .theme-switch {
  position: relative; display: inline-flex; align-items: center; flex-shrink: 0;
  padding: 2px; border-radius: 2rem; cursor: pointer;
  border: 1px solid rgba(29, 111, 242, 0.28);
  background: rgba(29, 111, 242, 0.06);
  font-family: inherit; font-size: 0.78rem; font-weight: 600; line-height: 1;
}
.lang-switch .ls-knob, .theme-switch .ls-knob {
  position: absolute; top: 2px; left: 2px; bottom: 2px; width: 34px;
  border-radius: 2rem; background: #1d6ff2;
  transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}
.lang-switch .ls-zh, .lang-switch .ls-en,
.theme-switch .ts-light, .theme-switch .ts-dark {
  position: relative; width: 34px; text-align: center; padding: 0.32rem 0;
  color: #1d6ff2; transition: color 0.2s;
}
html.lang-en .lang-switch .ls-knob,
html.theme-dark .theme-switch .ls-knob { transform: translateX(34px); }
html.lang-en .lang-switch .ls-en,
html.lang-zh .lang-switch .ls-zh,
html.theme-light .theme-switch .ts-light,
html.theme-dark .theme-switch .ts-dark { color: #fff; }
.curtain-lang {
  position: absolute; top: 1.4rem; right: 1.6rem; z-index: 3;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(150, 190, 240, 0.4);
}
.curtain-lang .ls-knob { background: #7cb8ff; }
.curtain-lang .ls-zh, .curtain-lang .ls-en { color: rgba(206, 224, 255, 0.9); }
html.lang-en .curtain-lang .ls-en,
html.lang-zh .curtain-lang .ls-zh { color: #0a1424; }

/* 欢迎页左上角品牌（始终用深色背景适用的 logo + 浅色文字） */
.curtain-brand {
  position: absolute; top: 1.3rem; left: 1.5rem; z-index: 3;
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: #e8eef8; font-size: 1rem; font-weight: 600; letter-spacing: 0.02em;
}
.curtain-brand img { width: 28px; height: 28px; display: block; }

/* 主题 Logo 显隐 */
.nav-logo.logo-dark, .section-emblem.logo-dark { display: none; }
html.theme-dark .nav-logo.logo-light,
html.theme-dark .section-emblem.logo-light { display: none; }
html.theme-dark .nav-logo.logo-dark,
html.theme-dark .section-emblem.logo-dark { display: block; }

/* ==================== 主页 ==================== */
.home { max-width: 900px; margin: 0 auto; padding: 60px 28px 120px; }
.section {
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.62) 0%,
    rgba(255, 255, 255, 0.38) 55%,
    rgba(255, 255, 255, 0.54) 100%);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 20px;
  padding: 2rem 2.2rem;
  margin-bottom: 2rem;
  box-shadow:
    0 18px 40px rgba(19, 58, 120, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(255, 255, 255, 0.3);
  scroll-margin-top: 80px;
  position: relative;
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.8rem;
}
.section-title {
  font-size: 1.35rem; font-weight: 600; margin: 0; color: #0e2440;
  display: flex; align-items: center; gap: 0.7rem;
}
.section-title::before {
  content: ''; width: 4px; height: 18px;
  background: linear-gradient(180deg, #3f8ef7, #0b57d0);
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(29, 111, 242, 0.4);
}
.section-subtitle {
  color: #6b83a3; font-size: 0.85rem; margin: 0;
  font-family: "SF Mono", "Consolas", monospace;
  letter-spacing: 0.05em;
}
.section-emblem {
  width: 60px; height: 60px; display: block; flex-shrink: 0;
  filter: drop-shadow(0 6px 14px rgba(29, 111, 242, 0.14));
}

/* ---------- 简介 ---------- */
.about-header { display: flex; gap: 1.6rem; align-items: center; margin-bottom: 1.6rem; }
.avatar {
  width: 108px; height: 108px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  background: linear-gradient(135deg, #0b57d0, #3f8ef7);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; font-weight: 500;
  box-shadow: 0 0 0 3px #ffffff, 0 10px 26px rgba(19, 58, 120, 0.18);
}
.about-header h1, .about-header h2 { font-size: 1.5rem; font-weight: 600; margin: 0 0 0.4rem; color: #0e2440; }
.muted { color: #3a5473; font-size: 0.95rem; margin: 0.2rem 0; }
.muted a { color: #1d6ff2; text-decoration: none; }
.muted a:hover { color: #0b57d0; }
.links { margin-top: 0.7rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.links a {
  color: #1d6ff2; text-decoration: none; font-size: 0.9rem;
  padding-bottom: 1px; border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.links a:hover { border-bottom-color: #1d6ff2; }
.bio { margin: 0; color: #29405f; font-size: 0.98rem; text-align: justify; text-justify: inter-ideograph; }
.bio p { margin: 0 0 0.8em; }
.bio p:last-child { margin-bottom: 0; }
.bio strong { color: #0e2440; }
.bio em { color: #0b57d0; font-style: italic; }

/* ---------- 研究轮播 ---------- */
.carousel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.8rem;
}
.carousel-count {
  font-family: "SF Mono", "Consolas", monospace;
  font-size: 0.9rem; color: #6b83a3; letter-spacing: 0.05em;
}
.carousel-count .current { color: #1d6ff2; font-weight: 600; font-size: 1.1rem; }
.carousel-viewport {
  overflow: hidden; border-radius: 14px;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
  cursor: grab;
}
.carousel-viewport:active { cursor: grabbing; }
.carousel-track {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide {
  flex: 0 0 100%;
  padding: 2.2rem 2.2rem 1.8rem;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  border: 1px solid rgba(29, 111, 242, 0.16);
  border-radius: 14px; position: relative; overflow: hidden;
  min-height: 260px;
  box-shadow: 0 8px 24px rgba(19, 58, 120, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.slide::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 60px; height: 60px;
  border-top: 1px solid rgba(29, 111, 242, 0.35);
  border-left: 1px solid rgba(29, 111, 242, 0.35);
  border-radius: 14px 0 0 0; pointer-events: none;
}
.slide::after {
  content: '';
  position: absolute; bottom: 0; right: 0;
  width: 60px; height: 60px;
  border-bottom: 1px solid rgba(29, 111, 242, 0.35);
  border-right: 1px solid rgba(29, 111, 242, 0.35);
  border-radius: 0 0 14px 0; pointer-events: none;
}
.slide-num {
  position: absolute; top: 1rem; right: 1.8rem;
  font-family: "SF Mono", "Consolas", monospace;
  font-size: 4rem; font-weight: 700;
  color: rgba(29, 111, 242, 0.10);
  line-height: 1; letter-spacing: -0.03em;
  user-select: none; pointer-events: none;
}
.slide-title { font-size: 1.35rem; font-weight: 600; color: #0e2440; margin: 0 0 0.9rem; position: relative; }
.slide-desc {
  font-size: 0.94rem; color: #3a5473;
  line-height: 1.8; margin: 0 0 1.4rem;
  max-width: 92%; position: relative;
  text-align: justify; text-justify: inter-ideograph;
}
.slide-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0; position: relative; }
.slide-tags li {
  font-size: 0.78rem; padding: 0.28rem 0.85rem;
  background: rgba(29, 111, 242, 0.08); color: #0b57d0;
  border: 1px solid rgba(29, 111, 242, 0.18);
  border-radius: 1rem; font-family: "SF Mono", "Consolas", monospace;
}
.carousel-controls {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 1.6rem;
}
.dots { display: flex; gap: 0.5rem; align-items: center; }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(29, 111, 242, 0.20);
  border: none; padding: 0; cursor: pointer;
  transition: all 0.25s;
}
.dot:hover { background: rgba(29, 111, 242, 0.45); }
.dot.active {
  background: #1d6ff2;
  box-shadow: 0 0 10px rgba(29, 111, 242, 0.5);
  width: 24px; border-radius: 4px;
}
.arrows { display: flex; gap: 0.5rem; }
.arrow {
  width: 38px; height: 38px; border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(29, 111, 242, 0.28);
  color: #1d6ff2; cursor: pointer;
  font-size: 1rem; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(19, 58, 120, 0.07);
  transition: all 0.2s;
}
.arrow:hover {
  background: #1d6ff2;
  border-color: #1d6ff2;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(29, 111, 242, 0.3);
}
.arrow:active { transform: scale(0.95); }
.progress-bar {
  margin-top: 1.2rem; height: 2px;
  background: rgba(29, 111, 242, 0.12);
  border-radius: 1px; overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0b57d0, #21c4e6);
  border-radius: 1px; width: 0;
  box-shadow: 0 0 8px rgba(29, 111, 242, 0.5);
}

/* ---------- 论文列表 ---------- */
.paper-list { list-style: none; padding: 0; margin: 0; }
.paper {
  padding: 1.4rem 1.5rem; margin-bottom: 0.7rem;
  background: #ffffff;
  border: 1px solid rgba(29, 111, 242, 0.12);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(19, 58, 120, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.paper:hover {
  border-color: rgba(29, 111, 242, 0.30);
  box-shadow: 0 12px 26px rgba(19, 58, 120, 0.11);
  transform: translateY(-2px);
}
.paper h3 { font-size: 1.03rem; margin: 0 0 0.45rem; font-weight: 600; color: #0e2440; line-height: 1.4; }
.paper .meta { color: #3a5473; font-size: 0.88rem; margin: 0 0 0.4rem; }
.paper .author-note { color: #6b83a3; font-size: 0.78rem; margin: 0 0 0.7rem; }
.paper .author-mark { color: #1d6ff2; font-weight: 700; }
.paper .abstract { color: #29405f; font-size: 0.92rem; margin: 0 0 0.8rem; line-height: 1.7; text-align: justify; text-justify: inter-ideograph; }
.paper .cite-badge {
  display: inline-block; margin: 0 0 0.7rem;
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.02em;
  color: #0b57d0; background: rgba(29, 111, 242, 0.1);
  border: 1px solid rgba(29, 111, 242, 0.22);
  border-radius: 1rem; padding: 0.1rem 0.6rem;
}
html.theme-dark .paper .cite-badge {
  color: #9cc4ff; background: rgba(106, 168, 255, 0.14);
  border-color: rgba(106, 168, 255, 0.3);
}
.pdf-link {
  color: #1d6ff2; text-decoration: none;
  font-size: 0.9rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: 0.3rem;
  transition: color 0.2s;
}
.pdf-link:hover { color: #0b57d0; }

/* ---------- 新闻列表 ---------- */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-item {
  position: relative;
  padding: 1.3rem 1.5rem; margin-bottom: 0.7rem;
  background: #ffffff;
  border: 1px solid rgba(29, 111, 242, 0.12);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(19, 58, 120, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.news-item:hover {
  border-color: rgba(29, 111, 242, 0.30);
  box-shadow: 0 12px 26px rgba(19, 58, 120, 0.11);
  transform: translateY(-2px);
}
.news-item .date {
  display: inline-block; color: #6b83a3; font-size: 0.8rem;
  font-family: "SF Mono", "Consolas", monospace;
  margin-bottom: 0.35rem;
}
.news-item .title {
  display: block; color: #1d6ff2; text-decoration: none;
  font-size: 1.02rem; font-weight: 500;
  margin-bottom: 0.35rem; transition: color 0.2s;
}
.news-item .title::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }
.news-item .title:hover { color: #0b57d0; }
.news-item .summary { color: #3a5473; font-size: 0.9rem; margin: 0; line-height: 1.7; text-align: justify; text-justify: inter-ideograph; }
.news-empty {
  padding: 1.5rem;
  background: #ffffff;
  border: 1px dashed rgba(29, 111, 242, 0.28);
  border-radius: 12px;
  color: #6b83a3; font-size: 0.92rem; text-align: center;
}
.item-num {
  display: inline-block;
  font-family: "SF Mono", "Consolas", monospace;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  color: #1d6ff2;
  background: rgba(29, 111, 242, 0.1);
  border: 1px solid rgba(29, 111, 242, 0.2);
  border-radius: 6px;
  padding: 0.08rem 0.45rem;
  margin-bottom: 0.55rem;
}
html.theme-dark .item-num {
  color: #9cc4ff;
  background: rgba(106, 168, 255, 0.14);
  border-color: rgba(106, 168, 255, 0.3);
}

/* ---------- 软件列表 ---------- */
.software-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem;
}
.software-card {
  position: relative; padding: 1.3rem 1.4rem;
  background: #ffffff; border: 1px solid rgba(29, 111, 242, 0.12);
  border-radius: 12px; box-shadow: 0 2px 10px rgba(19, 58, 120, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.software-card:hover {
  border-color: rgba(29, 111, 242, 0.3);
  box-shadow: 0 12px 26px rgba(19, 58, 120, 0.11);
  transform: translateY(-2px);
}
.sw-title {
  display: block; color: #1d6ff2; text-decoration: none;
  font-size: 1.02rem; font-weight: 600; margin-bottom: 0.4rem;
}
.sw-title:hover { color: #0b57d0; }
.software-card .sw-title::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }
.sw-ext { font-size: 0.85em; opacity: 0.7; }
.sw-desc { color: #29405f; font-size: 0.9rem; line-height: 1.7; margin: 0 0 0.7rem; text-align: justify; text-justify: inter-ideograph; }
.sw-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.sw-lang {
  font-size: 0.72rem; font-family: "SF Mono", "Consolas", monospace;
  color: #0b57d0; background: rgba(29, 111, 242, 0.1);
  border: 1px solid rgba(29, 111, 242, 0.22);
  border-radius: 1rem; padding: 0.05rem 0.5rem;
}
.sw-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.sw-tags li { font-size: 0.72rem; color: #6b83a3; }
.software-empty {
  padding: 1.5rem; list-style: none;
  background: #ffffff; border: 1px dashed rgba(29, 111, 242, 0.28);
  border-radius: 12px; color: #6b83a3; font-size: 0.92rem; text-align: center;
}
html.theme-dark .software-card { background: rgba(24, 40, 66, 0.5); border-color: rgba(150, 190, 255, 0.16); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }
html.theme-dark .software-card:hover { border-color: rgba(150, 190, 255, 0.32); }
html.theme-dark .sw-title { color: #7cb8ff; }
html.theme-dark .sw-desc { color: #c5d4e8; }
html.theme-dark .sw-lang { color: #9cc4ff; background: rgba(106, 168, 255, 0.14); border-color: rgba(106, 168, 255, 0.3); }
html.theme-dark .sw-tags li { color: #8fa8c8; }
html.theme-dark .software-empty { background: rgba(24, 40, 66, 0.5); border-color: rgba(120, 170, 255, 0.28); color: #9fb3d0; }

/* ---------- 照片墙 ---------- */
.photo-wall { border-radius: 12px; }
.photo-row {
  display: flex; gap: 8px; width: 100%; max-height: 440px;
  border-radius: 12px; overflow: hidden;
}
.photo-tile {
  display: block; height: 100%; min-width: 0;
  border-radius: 8px; overflow: hidden; background: #eef4ff;
}
.photo-tile img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.35s ease;
}
.photo-tile:hover img { transform: scale(1.04); }
.photo-empty {
  margin: 0; padding: 1.5rem; width: 100%;
  background: rgba(29, 111, 242, 0.04); border: 1px dashed rgba(29, 111, 242, 0.25);
  border-radius: 12px; color: #6b83a3; font-size: 0.92rem; text-align: center;
}
.photo-gallery { columns: 3; column-gap: 10px; }
.photo-gallery:has(.photo-empty) { columns: 1; }
.photo-item { margin: 0 0 10px; break-inside: avoid; }
.photo-item a { display: block; }
.photo-item img {
  width: 100%; height: auto; display: block; border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.2s;
}
.photo-item img:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(19, 58, 120, 0.16); }
html.theme-dark .photo-tile { background: rgba(24, 40, 66, 0.5); }
html.theme-dark .photo-empty { background: rgba(24, 40, 66, 0.5); border-color: rgba(120, 170, 255, 0.28); color: #9fb3d0; }

/* ---------- 照片灯箱 ---------- */
body.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(6, 12, 24, 0.9);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.lightbox.open { opacity: 1; visibility: visible; pointer-events: auto; }
.lightbox-figure {
  margin: 0; display: flex; align-items: center; justify-content: center;
  max-width: 92vw; max-height: 88vh;
}
.lightbox-img {
  max-width: 92vw; max-height: 88vh; width: auto; height: auto;
  object-fit: contain; border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  background: rgba(255, 255, 255, 0.04);
  transform: scale(0.96); transition: transform 0.25s ease;
}
.lightbox.open .lightbox-img { transform: scale(1); }
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute; z-index: 1; border: 0; cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: rgba(255, 255, 255, 0.12);
  font-size: 1.6rem; line-height: 1;
  transition: background 0.2s, transform 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible { outline: 2px solid #8ec5ff; outline-offset: 2px; }
.lightbox-close { top: 18px; right: 18px; font-size: 1.8rem; }
.lightbox-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover { transform: translateY(-50%) scale(1.06); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.06); }
.lightbox-counter {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  padding: 0.35rem 0.8rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12); color: #e8f1ff;
  font-size: 0.8rem; letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

/* ---------- 联系我们 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 1.6rem; align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { margin: 0 0 1.05rem; }
.contact-list li:last-child { margin-bottom: 0; }
.contact-label {
  display: block; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: #1d6ff2; margin-bottom: 0.25rem;
}
.contact-value { display: block; color: #29405f; font-size: 0.95rem; line-height: 1.65; word-break: break-word; }
a.contact-value { color: #1d6ff2; transition: color 0.2s; }
a.contact-value:hover { color: #0b57d0; }
.contact-map-col { display: flex; flex-direction: column; }
.contact-map {
  position: relative; width: 100%; height: 340px;
  border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(29, 111, 242, 0.14);
  box-shadow: 0 8px 22px rgba(19, 58, 120, 0.08);
}
.contact-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.map-links { margin: 0.6rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.map-link { font-size: 0.82rem; color: #1d6ff2; }
.map-link:hover { color: #0b57d0; }

/* ---------- 区块底部按钮 ---------- */
.section-footer { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: flex-end; margin-top: 1.3rem; }
.more-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: #1d6ff2; text-decoration: none;
  font-size: 0.9rem; font-weight: 500;
  padding: 0.55rem 1.1rem;
  border: 1px solid rgba(29, 111, 242, 0.28);
  border-radius: 2rem;
  background: rgba(29, 111, 242, 0.05);
  transition: all 0.2s;
}
.more-btn::after { content: '→'; transition: transform 0.2s; }
.more-btn:hover {
  background: #1d6ff2;
  border-color: #1d6ff2;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(29, 111, 242, 0.28);
}
.more-btn:hover::after { transform: translateX(3px); }

/* ==================== 详情页 / 列表子页 ==================== */
.post { max-width: 900px; margin: 0 auto; padding: 48px 28px 100px; }
.post article {
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.62) 0%,
    rgba(255, 255, 255, 0.38) 55%,
    rgba(255, 255, 255, 0.54) 100%);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 20px;
  padding: 2.2rem 2.4rem;
  box-shadow:
    0 18px 40px rgba(19, 58, 120, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(255, 255, 255, 0.3);
}
.post-back {
  display: inline-flex; align-items: center; gap: 0.35rem;
  color: #1d6ff2; text-decoration: none; font-size: 0.92rem;
  margin-bottom: 1.8rem; transition: color 0.2s;
}
.post-back:hover { color: #0b57d0; }
.post-title { font-size: 1.8rem; font-weight: 600; line-height: 1.35; margin: 0 0 0.5rem; color: #0e2440; }
.post-date {
  color: #6b83a3; font-size: 0.85rem; margin: 0 0 2rem;
  font-family: "SF Mono", "Consolas", monospace;
}
.post-content { color: #29405f; font-size: 1rem; text-align: justify; text-justify: inter-ideograph; }
.post-content p { margin: 0 0 1.1em; }
.post-content h1, .post-content h2, .post-content h3 { color: #0e2440; line-height: 1.4; margin: 1.6em 0 0.6em; }
.post-content a { color: #1d6ff2; }
.post-content a:hover { color: #0b57d0; }
.post-content img {
  max-width: 100%; height: auto;
  border-radius: 10px; display: block; margin: 1.4em 0;
  box-shadow: 0 10px 28px rgba(19, 58, 120, 0.16);
}
.post-content ul, .post-content ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.post-content blockquote {
  margin: 1.2em 0; padding: 0.4em 1.1em;
  border-left: 3px solid rgba(29, 111, 242, 0.5);
  background: rgba(29, 111, 242, 0.06);
  border-radius: 0 8px 8px 0;
  color: #3a5473;
}
.post-content code {
  font-family: "SF Mono", "Consolas", monospace;
  background: rgba(29, 111, 242, 0.08);
  padding: 0.1em 0.4em; border-radius: 4px;
  font-size: 0.9em; color: #0b57d0;
}
.post-content pre {
  background: #f2f7ff;
  border: 1px solid rgba(29, 111, 242, 0.14);
  border-radius: 8px; padding: 0.9rem 1.1rem; overflow-x: auto;
}
.post-content pre code { background: none; padding: 0; }

/* ==================== 页脚 ==================== */
footer {
  max-width: 900px; margin: 0 auto;
  padding: 40px 28px;
  color: #7d93b2; font-size: 0.82rem;
  text-align: center;
  font-family: "SF Mono", "Consolas", monospace;
}

/* ==================== 响应式 ==================== */
@media (max-width: 640px) {
  .home { padding: 40px 16px 80px; }
  .nav-inner { flex-wrap: wrap; height: auto; padding: 6px 12px; row-gap: 2px; }
  .nav-name { order: 1; font-size: 0.95rem; gap: 0.4rem; }
  .nav-logo { width: 24px; height: 24px; }
  .nav-controls { order: 2; gap: 0.3rem; }
  .nav-links { order: 3; width: 100%; justify-content: center; gap: 0.1rem; flex-wrap: wrap; }
  .nav-links a { padding: 0.35rem 0.5rem; font-size: 0.78rem; }
  .lang-switch, .theme-switch { font-size: 0.7rem; }
  .lang-switch .ls-zh, .lang-switch .ls-en,
  .theme-switch .ts-light, .theme-switch .ts-dark { width: 30px; padding: 0.3rem 0; }
  .lang-switch .ls-knob, .theme-switch .ls-knob { width: 30px; }
  html.lang-en .lang-switch .ls-knob,
  html.theme-dark .theme-switch .ls-knob { transform: translateX(30px); }
  .section { padding: 1.5rem 1.3rem; border-radius: 16px; }
  .section-emblem { width: 44px; height: 44px; }
  .slide { padding: 1.6rem 1.4rem 1.4rem; min-height: 230px; }
  .slide-title { font-size: 1.15rem; }
  .slide-num { font-size: 2.6rem; top: 0.8rem; right: 1rem; }
  .slide-desc { max-width: 100%; font-size: 0.9rem; }
  .curtain-name { font-size: 1.4rem; }
  .curtain-content { margin-top: 18vh; }   /* 移动端文案保持原位置 */
  .about-header {
    flex-direction: column; align-items: center; text-align: center;
    gap: 0.85rem; margin-bottom: 1.4rem;
  }
  .about-header .links { justify-content: center; margin-top: 0.5rem; }
  .avatar { width: 96px; height: 96px; font-size: 2rem; }
  .about-header h1, .about-header h2 { font-size: 1.35rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .contact-map { height: 260px; }
  .software-list { grid-template-columns: 1fr; }
  .photo-row { max-height: 300px; gap: 6px; }
  .photo-gallery { columns: 2; }
  .lightbox { padding: 12px; }
  .lightbox-img { max-width: 94vw; max-height: 82vh; }
  .lightbox-close { top: 10px; right: 10px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-prev, .lightbox-next { width: 38px; height: 38px; font-size: 1.4rem; }
  .lightbox-counter { bottom: 12px; }
  .post { padding: 32px 18px 80px; }
  .post-title { font-size: 1.45rem; }
}

/* ==================== 暗夜主题 ==================== */
html.theme-dark body {
  color: #e8eef8;
  background:
    radial-gradient(1100px 560px at 82% -12%, rgba(58, 120, 220, 0.20), transparent 60%),
    radial-gradient(1000px 620px at -6% 8%, rgba(90, 70, 200, 0.16), transparent 55%),
    linear-gradient(180deg, #0a1220 0%, #0b1728 46%, #0a1424 100%);
}
html.theme-dark .bg-far {
  background-image:
    radial-gradient(circle at 18% 22%, rgba(64, 120, 255, 0.24) 0%, transparent 44%),
    radial-gradient(circle at 82% 58%, rgba(40, 180, 230, 0.20) 0%, transparent 48%),
    radial-gradient(circle at 45% 90%, rgba(90, 110, 255, 0.18) 0%, transparent 44%);
}
html.theme-dark .bg-near {
  background-image:
    linear-gradient(rgba(120, 170, 255, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 170, 255, 0.10) 1px, transparent 1px),
    repeating-linear-gradient(45deg, transparent 0, transparent 80px,
      rgba(120, 170, 255, 0.05) 80px, rgba(120, 170, 255, 0.05) 81px);
}
html.theme-dark a { color: #7cb8ff; }
html.theme-dark a:hover { color: #a8d0ff; }

html.theme-dark .sticky-nav,
html.theme-dark .topbar { background: rgba(9, 17, 30, 0.72); border-bottom-color: rgba(120, 170, 255, 0.14); }
html.theme-dark .nav-name { color: #e8eef8; }
html.theme-dark .nav-name:hover { color: #7cb8ff; }
html.theme-dark .nav-links a { color: #9fb3d0; }
html.theme-dark .nav-links a:hover { color: #7cb8ff; background: rgba(120, 170, 255, 0.10); }
html.theme-dark .nav-links a.active { color: #7cb8ff; }

html.theme-dark .lang-switch, html.theme-dark .theme-switch {
  border-color: rgba(120, 170, 255, 0.32);
  background: rgba(120, 170, 255, 0.12);
}
html.theme-dark .lang-switch .ls-knob, html.theme-dark .theme-switch .ls-knob { background: #4a9eff; }
html.theme-dark.lang-en .lang-switch .ls-en,
html.theme-dark.lang-zh .lang-switch .ls-zh,
html.theme-dark .theme-switch .ts-dark { color: #fff; }
html.theme-dark.lang-en .lang-switch .ls-zh,
html.theme-dark.lang-zh .lang-switch .ls-en,
html.theme-dark .theme-switch .ts-light { color: #9cc4ff; }

html.theme-dark .section {
  background: linear-gradient(135deg,
    rgba(46, 68, 106, 0.5) 0%,
    rgba(18, 30, 52, 0.34) 55%,
    rgba(30, 46, 76, 0.46) 100%);
  backdrop-filter: blur(34px) saturate(160%);
  -webkit-backdrop-filter: blur(34px) saturate(160%);
  border-color: rgba(150, 190, 255, 0.26);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}
html.theme-dark .section-title { color: #e8eef8; }
html.theme-dark .section-subtitle { color: #6f88a8; }
html.theme-dark .avatar { box-shadow: 0 0 0 3px rgba(17, 30, 52, 0.9), 0 10px 26px rgba(0, 0, 0, 0.5); }
html.theme-dark .about-header h1, html.theme-dark .about-header h2 { color: #e8eef8; }
html.theme-dark .muted { color: #9fb3d0; }
html.theme-dark .bio { color: #c5d4e8; }
html.theme-dark .bio strong { color: #e8eef8; }
html.theme-dark .bio em { color: #8fc0ff; }

html.theme-dark .carousel-count { color: #6f88a8; }
html.theme-dark .slide {
  background: linear-gradient(180deg, rgba(24, 40, 66, 0.55) 0%, rgba(16, 28, 48, 0.4) 100%);
  border-color: rgba(150, 190, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
html.theme-dark .slide-title { color: #e8eef8; }
html.theme-dark .slide-desc { color: #a9bcd6; }
html.theme-dark .slide-num { color: rgba(120, 170, 255, 0.12); }
html.theme-dark .slide-tags li { background: rgba(106, 168, 255, 0.14); color: #9cc4ff; border-color: rgba(106, 168, 255, 0.3); }
html.theme-dark .dot { background: rgba(120, 170, 255, 0.22); }
html.theme-dark .dot.active { background: #4a9eff; }
html.theme-dark .arrow { background: rgba(17, 30, 52, 0.8); border-color: rgba(120, 170, 255, 0.3); color: #7cb8ff; }
html.theme-dark .arrow:hover { background: #4a9eff; border-color: #4a9eff; color: #fff; }
html.theme-dark .progress-bar { background: rgba(120, 170, 255, 0.15); }

html.theme-dark .paper, html.theme-dark .news-item {
  background: rgba(24, 40, 66, 0.5);
  border-color: rgba(150, 190, 255, 0.16);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
html.theme-dark .paper:hover, html.theme-dark .news-item:hover {
  border-color: rgba(120, 170, 255, 0.3);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
}
html.theme-dark .paper h3 { color: #e8eef8; }
html.theme-dark .paper .meta { color: #9fb3d0; }
html.theme-dark .paper .author-note { color: #6f88a8; }
html.theme-dark .paper .author-mark { color: #7cb8ff; }
html.theme-dark .paper .abstract { color: #c5d4e8; }
html.theme-dark .pdf-link { color: #7cb8ff; }
html.theme-dark .pdf-link:hover { color: #a8d0ff; }
html.theme-dark .news-item .date { color: #6f88a8; }
html.theme-dark .news-item .title { color: #7cb8ff; }
html.theme-dark .news-item .summary { color: #9fb3d0; }
html.theme-dark .news-empty { background: rgba(17, 30, 52, 0.6); border-color: rgba(120, 170, 255, 0.28); color: #9fb3d0; }
html.theme-dark .contact-label { color: #7cb8ff; }
html.theme-dark .contact-value { color: #c5d4e8; }
html.theme-dark a.contact-value { color: #7cb8ff; }
html.theme-dark .contact-map { border-color: rgba(120, 170, 255, 0.18); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4); }
html.theme-dark .map-link { color: #7cb8ff; }
html.theme-dark .more-btn { background: rgba(106, 168, 255, 0.08); border-color: rgba(106, 168, 255, 0.3); color: #7cb8ff; }
html.theme-dark .more-btn:hover { background: #4a9eff; border-color: #4a9eff; color: #fff; }
html.theme-dark footer { color: #7f97b8; }
html.theme-dark .post-title { color: #e8eef8; }
html.theme-dark .post article {
  background: linear-gradient(135deg,
    rgba(46, 68, 106, 0.5) 0%,
    rgba(18, 30, 52, 0.34) 55%,
    rgba(30, 46, 76, 0.46) 100%);
  border-color: rgba(150, 190, 255, 0.26);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}
html.theme-dark .post-date { color: #6f88a8; }
html.theme-dark .post-content { color: #c5d4e8; }
html.theme-dark .post-content h1, html.theme-dark .post-content h2, html.theme-dark .post-content h3 { color: #e8eef8; }
html.theme-dark .post-back { color: #7cb8ff; }
