/* ============================================================
   Yuan0o0 个人博客 · 影视飓风布局 · 白底简约高级
   ============================================================ */
:root {
  --bg: #ffffff;
  --bg-gray: #f4f6f7;
  --text: #24252c;          /* 主文字 深灰黑 */
  --text-2: #646464;        /* 次级文字 中灰 */
  --text-3: #9a9aa3;
  --line: #e8e8ec;
  --accent: #24252c;        /* 强调色 深灰黑 */
  --accent-hover: #ff4d2e;  /* hover 点缀 橙红 */
  --font-en: 'Rajdhani', 'Noto Sans SC', sans-serif;
  --font-body: 'Noto Sans SC', sans-serif;
  /* 主题扩展变量（卡片表面 / 中性灰 / 导航背景） */
  --card: #ffffff;
  --chip: #d0d0d6;
  --nav-bg: rgba(255,255,255,.96);
}

/* ============ 深色主题（浅色互补色，随北京日落自动切换） ============ */
html[data-theme="dark"] {
  --bg: #0f1115;
  --bg-gray: #1a1d23;
  --text: #e8e6e2;
  --text-2: #a8aab2;
  --text-3: #6b6e76;
  --line: #2b2e35;
  --accent: #e8e6e2;
  --accent-hover: #ff4d2e;
  --card: #15181d;
  --chip: #3a3e46;
  --nav-bg: rgba(15,17,21,.96);
}
/* 深色下深底白字的主视觉块反转为浅底深字（互补），保证可读 */
html[data-theme="dark"] .ham-card-main { background: #e8e6e2; color: #0f1115; border-color: #e8e6e2; }
html[data-theme="dark"] .ham-card-main .ham-call,
html[data-theme="dark"] .ham-card-main .ham-badge,
html[data-theme="dark"] .ham-card-main .ham-list li b { color: #0f1115; }
html[data-theme="dark"] .ham-card-main .ham-list li { border-bottom-color: rgba(0,0,0,.15); color: #3a3d45; }
html[data-theme="dark"] .about-avatar { background: #e8e6e2; color: #0f1115; }
html[data-theme="dark"] .log-table th { background: #e8e6e2; color: #0f1115; }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--chip); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============ 顶部导航（透明 → 滚动后白色） ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 70px;
  background: rgba(0,0,0,0);
  transition: background .4s, box-shadow .4s;
}
.nav.scrolled {
  background: var(--nav-bg);
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner {
  max-width: 1440px; height: 100%; margin: 0 auto; padding: 0 70px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.logo-text {
  font-family: var(--font-en); font-weight: 700; font-size: 22px;
  letter-spacing: 1px; color: var(--text); transition: color .3s;
}
.nav:not(.scrolled) .logo-text { color: #fff; }
.logo-text em {
  font-style: normal; font-size: 12px; color: var(--text-2);
  margin-left: 8px; letter-spacing: 2px; font-weight: 500;
}
.nav:not(.scrolled) .logo-text em { color: rgba(255,255,255,.7); }

.nav-menu { display: flex; gap: 60px; }
.nav-link {
  color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500;
  letter-spacing: 1px; position: relative; padding: 4px 0; transition: color .3s;
}
.nav:not(.scrolled) .nav-link { color: rgba(255,255,255,.85); }
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 2px;
  background: var(--accent); transition: width .3s;
}
.nav:not(.scrolled) .nav-link::after { background: #fff; }
.nav-link:hover { color: var(--text); }
.nav:not(.scrolled) .nav-link:hover { color: #fff; }
.nav-link:hover::after { width: 100%; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: .3s; }
.nav:not(.scrolled) .nav-toggle span { background: #fff; }

/* ============ 全屏视频 Banner ============ */
.hero {
  position: relative; height: 100vh; min-height: 640px; max-height: 1440px;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.hero-videos { position: absolute; inset: 0; }
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; visibility: hidden;
  transition: opacity 1.5s ease;
}
.hero-video.active { opacity: 1; visibility: visible; z-index: 1; }
/* 转场中：新视频提升层级覆盖旧视频 */
.hero-video.entering { z-index: 2; }
/* 转场中：旧视频柔和淡出 */
.hero-video.leaving { opacity: 0; }
.hero-video.placeholder {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  display: flex; align-items: center; justify-content: center;
}
.hero-video.placeholder::after {
  content: 'VIDEO'; font-family: var(--font-en); font-size: 60px; font-weight: 700;
  letter-spacing: 12px; color: rgba(255,255,255,.12);
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.1) 50%, rgba(0,0,0,.35) 100%);
}
.hero-content {
  position: relative; z-index: 3; text-align: center; padding: 0 24px;
  animation: heroIn 1.4s ease both;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
/* slogan 小字，居中叠加在视频上 */
.hero-slogan {
  font-family: var(--font-en); font-weight: 500; font-size: 30px;
  letter-spacing: 10px; color: #fff; font-style: italic;
  text-shadow: 0 2px 20px rgba(0,0,0,.4);
}

.hero-indicators {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  z-index: 4; display: flex; gap: 10px;
}
.hero-dot {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.4);
  cursor: pointer; transition: all .3s; border: 0;
}
.hero-dot.active { background: #fff; transform: scale(1.3); }

.hero-controls { position: absolute; right: 30px; bottom: 30px; z-index: 4; display: flex; gap: 10px; }
.hero-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4);
  background: rgba(0,0,0,.25); color: #fff; font-size: 20px; cursor: pointer;
  transition: all .3s; backdrop-filter: blur(6px);
}
.hero-btn:hover { background: #fff; color: var(--text); border-color: #fff; }

.hero-mute {
  position: absolute; left: 30px; bottom: 30px; z-index: 4;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4);
  background: rgba(0,0,0,.25); color: #fff; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all .3s;
}
.hero-mute:hover { background: #fff; color: var(--text); border-color: #fff; }

/* ---------- 视频转场效果池（柔和无缝，随机抽取） ---------- */
.hero-video.tr-crossfade { animation: trFade 1.5s ease both; }
.hero-video.tr-slide-left { animation: trSlideLeft 1.5s cubic-bezier(.25,.8,.3,1) both; }
.hero-video.tr-slide-right { animation: trSlideRight 1.5s cubic-bezier(.25,.8,.3,1) both; }
.hero-video.tr-slide-up { animation: trSlideUp 1.5s cubic-bezier(.25,.8,.3,1) both; }
.hero-video.tr-zoom-in { animation: trZoomIn 1.5s cubic-bezier(.25,.8,.3,1) both; }
.hero-video.tr-blur { animation: trBlur 1.5s ease both; }
.hero-video.tr-curtain { animation: trCurtain 1.4s cubic-bezier(.6,0,.3,1) both; }
.hero-video.tr-circle { animation: trCircle 1.4s cubic-bezier(.6,0,.3,1) both; }
.hero-video.tr-wipe { animation: trWipe 1.4s cubic-bezier(.6,0,.3,1) both; }

@keyframes trFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes trSlideLeft { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes trSlideRight { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes trSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes trZoomIn { from { transform: scale(1.12); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes trBlur { from { filter: blur(18px); opacity: 0; } to { filter: blur(0); opacity: 1; } }
@keyframes trCurtain { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes trCircle { from { clip-path: circle(0% at 50% 50%); } to { clip-path: circle(150% at 50% 50%); } }
@keyframes trWipe { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ============ Banner 下方 slogan 行（一行三列小字） ============ */
.slogan-row {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1440px; margin: 0 auto; padding: 0 70px;
  height: 60px; border-bottom: 1px solid var(--line);
}
.slogan-row span {
  font-family: var(--font-en); font-size: 12px; font-weight: 700;
  letter-spacing: 3px; color: var(--text-2);
}

/* ============ 通用 Section ============ */
.section { padding: 100px 70px; max-width: 1440px; margin: 0 auto; }
.section-gray { max-width: none; background: var(--bg-gray); }
.section-gray .section-head, .section-gray .section-desc { max-width: 1300px; margin-left: auto; margin-right: auto; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 50px; max-width: 1300px; margin-left: auto; margin-right: auto;
}
/* 首页板块头部：标题视觉居中，右侧按钮绝对定位到最右端 */
.home-head {
  position: relative; justify-content: center;
  width: 100%; max-width: none;
}
.home-head .section-more {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
}
/* 首页整屏板块（无线电 / 射频工程 / 关于我 与照片墙一致） */
.section-fill {
  max-width: none; min-height: 100vh; padding: 64px 40px;
  display: flex; flex-direction: column; justify-content: center;
  box-sizing: border-box;
}
.section-fill .section-head { margin-bottom: 40px; max-width: 1300px; }
.section-title {
  font-family: var(--font-en); font-size: 30px; font-weight: 700;
  letter-spacing: 2px; color: var(--text);
}
.section-title span {
  font-family: var(--font-body); font-size: 15px; font-weight: 400;
  color: var(--text-2); margin-left: 14px; letter-spacing: 2px;
}
.section-more {
  font-size: 13px; color: var(--text-2); text-decoration: none;
  letter-spacing: 1px; transition: color .3s;
}
.section-more:hover { color: var(--accent-hover); }

/* ============ 无线电 Ham ============ */
.ham-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr; gap: 20px; align-items: center; max-width: 1300px; margin: 0 auto; }
/* 首页 QRZ 板块：三卡等高、列宽均衡、间距舒适（仅首页，不影响 ham.html 子页） */
.home-ham-grid {
  grid-template-columns: 1.2fr 1.4fr 1fr;
  gap: 24px;
  align-items: stretch;
}
.home-ham-grid .ham-card {
  display: flex;
  flex-direction: column;
}
.home-ham-grid .ham-card-main {
  justify-content: center;
}
.home-ham-grid .ham-card:nth-child(2) {
  padding-top: 34px;
  padding-bottom: 34px;
}
.home-ham-grid .ham-card:nth-child(3) .ham-log {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-ham-grid .ham-call {
  font-size: 48px;
}
.home-ham-grid .ham-tags {
  gap: 10px;
  margin-top: 20px;
}
.ham-grid .ham-card:nth-child(2) { padding-top: 44px; padding-bottom: 44px; }
.ham-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 34px; transition: transform .3s, box-shadow .3s;
}
.ham-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.06); }
.ham-card-main { background: var(--text); color: #fff; border-color: var(--text); }
.ham-call {
  font-family: var(--font-en); font-weight: 700; font-size: 56px; letter-spacing: 4px;
  line-height: 1.1; color: #fff;
}
.ham-badge {
  display: inline-block; margin: 14px 0 20px; padding: 5px 14px; border-radius: 20px;
  background: rgba(255,255,255,.15); color: #fff; font-size: 12px; letter-spacing: 1px;
}
.ham-list { list-style: none; }
.ham-list li {
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.15);
  font-size: 14px; color: rgba(255,255,255,.7);
  display: flex; justify-content: space-between;
}
.ham-list li b { color: #fff; font-weight: 500; }
.ham-card h3 { font-size: 18px; margin-bottom: 14px; letter-spacing: 1px; }
.ham-card p { color: var(--text-2); font-size: 14px; }
.ham-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ham-tags span {
  padding: 5px 14px; border-radius: 20px; background: var(--bg-gray);
  border: 1px solid var(--line); font-size: 12px; color: var(--text-2);
}
.ham-tags .ham-tag {
  padding: 5px 14px; border-radius: 20px; background: var(--bg-gray);
  border: 1px solid var(--line); font-size: 12px; color: var(--text-2);
  text-decoration: none; cursor: pointer; transition: all .25s;
  display: inline-block; line-height: 1.7;
}
.ham-tags .ham-tag:hover {
  background: var(--text); color: #fff; border-color: var(--text);
  transform: translateY(-1px);
}
.ham-toast {
  position: fixed; left: 50%; bottom: 48px; transform: translateX(-50%) translateY(16px);
  background: var(--text); color: var(--bg); padding: 10px 22px; border-radius: 6px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: all .3s; z-index: 9999;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.ham-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.ham-log { margin-top: 18px; }
.log-row {
  display: flex; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px dashed var(--line); font-size: 13px; color: var(--text-2);
  font-family: var(--font-en);
}
.log-row span:last-child { color: var(--accent-hover); font-weight: 700; }
.log-empty { text-align: center; color: var(--text-2); padding: 22px 12px; font-size: 14px; letter-spacing: 1px; }

/* ============ 射频工程 ============ */
.rf-grid { display: grid; grid-template-columns: 1fr; gap: 20px; width: 75%; max-width: 1600px; margin: 0 auto; grid-auto-rows: minmax(100px, auto); }
.rf-item {
  background: var(--bg-gray); border: 1px solid var(--line); border-radius: 8px;
  padding: 34px 26px; transition: transform .3s, box-shadow .3s;
  display: flex; flex-direction: column;
}
.rf-item:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.06); }
.rf-item h3 { font-size: 17px; margin-bottom: 10px; letter-spacing: 1px; }
.rf-item p { color: var(--text-2); font-size: 14px; flex: 1; }

/* ============ 关于我 ============ */
.about-wrap {
  display: flex; gap: 50px; align-items: center; max-width: 1300px; margin: 0 auto;
}
.about-avatar {
  flex-shrink: 0; width: 180px; height: 180px; border-radius: 50%;
  background: var(--text); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-en); font-weight: 700; font-size: 72px;
}
.about-text h3 { font-size: 24px; margin-bottom: 18px; letter-spacing: 1px; }
.about-text p { color: var(--text-2); margin-bottom: 14px; font-size: 15px; }
.about-text b { color: var(--accent-hover); }
.about-links { display: flex; gap: 14px; margin-top: 24px; flex-wrap: wrap; }
.about-link {
  padding: 10px 24px; border: 1px solid var(--line); border-radius: 4px;
  color: var(--text); text-decoration: none; font-size: 14px; transition: all .3s;
  background: var(--bg);
}
.about-link:hover { border-color: var(--accent); color: var(--accent); }

/* ============ 页脚 ============ */
.footer { background: var(--bg); padding: 60px 28px; text-align: center; border-top: 1px solid var(--line); }
.footer-logo { font-family: var(--font-en); font-weight: 700; font-size: 20px; letter-spacing: 2px; }
.footer-logo span { color: var(--text-2); font-size: 13px; }
.footer-slogan { font-family: var(--font-en); letter-spacing: 5px; font-size: 11px; color: var(--text-3); margin: 10px 0; }
.footer-copy { font-size: 12px; color: var(--text-3); }

/* ============ 主题切换控件 ============ */
.theme-switch {
  display: inline-flex; gap: 4px; margin-top: 26px; padding: 4px;
  background: var(--bg-gray); border: 1px solid var(--line); border-radius: 999px;
}
.theme-opt {
  padding: 6px 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--text-2); font-size: 12px;
  font-family: var(--font-body); letter-spacing: 1px; transition: all .3s;
}
.theme-opt:hover { color: var(--text); }
.theme-opt.active { background: var(--accent); color: #fff; }
html[data-theme="dark"] .theme-opt.active { background: #e8e6e2; color: #0f1115; }

/* ============ 灯箱 ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.92);
  display: none; align-items: center; justify-content: center; flex-direction: column;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 82vh; border-radius: 4px; box-shadow: 0 20px 80px rgba(0,0,0,.8); }
.lightbox-caption { color: #ccc; margin-top: 18px; font-size: 15px; letter-spacing: 1px; }
.lightbox-close {
  position: absolute; top: 24px; right: 30px; background: none; border: 0;
  color: #fff; font-size: 44px; cursor: pointer; transition: color .3s; line-height: 1;
}
.lightbox-close:hover { color: var(--accent-hover); }

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .rf-grid { grid-template-columns: 1fr; width: 100%; }
  .ham-grid { grid-template-columns: 1fr; }
  .nav-inner { padding: 0 30px; }
  .section { padding: 80px 30px; }
  .section-fill { padding: 72px 30px; }
  .slogan-row { padding: 0 30px; }
}
@media (max-width: 768px) {
  .nav-menu {
    position: fixed; top: 0; right: -100%; width: 70%; height: 100vh;
    background: var(--bg); flex-direction: column; justify-content: center;
    align-items: center; gap: 30px; transition: right .4s; z-index: 99;
    box-shadow: -10px 0 30px rgba(0,0,0,.08);
  }
  .nav-menu.open { right: 0; }
  .nav-toggle { display: block; z-index: 100; }
  .rf-grid { grid-template-columns: 1fr; }
  .about-wrap { flex-direction: column; text-align: center; }
  .section { padding: 70px 20px; }
  .section-fill { padding: 56px 16px; }
  .slogan-row { padding: 0 20px; }
  .hero-controls { right: 16px; bottom: 16px; }
  .hero-mute { left: 16px; bottom: 16px; }
  .section-head { flex-direction: column; gap: 8px; }
  .home-head { align-items: center; }
  .home-head .section-more { position: static; transform: none; }
  #photos { padding: 56px 14px 34px; }
  #photos .section-head { margin-bottom: 24px; }
  .card-arrow { width: 38px; height: 38px; font-size: 20px; }
}
@media (max-width: 480px) {
  .card-cap { font-size: 13px; padding: 34px 14px 12px; opacity: 1; }
}

/* ============ 子页面：固定白色导航 ============ */
.nav.nav-sub:not(.scrolled) { background: rgba(0,0,0,0); }
.nav.nav-sub:not(.scrolled) .logo-text { color: var(--text); }
.nav.nav-sub:not(.scrolled) .logo-text em { color: var(--text-2); }
.nav.nav-sub:not(.scrolled) .nav-link { color: var(--text-2); }
.nav.nav-sub:not(.scrolled) .nav-link:hover { color: var(--text); }
.nav.nav-sub:not(.scrolled) .nav-link::after { background: var(--accent); }
.nav.nav-sub:not(.scrolled) .nav-toggle span { background: var(--text); }

/* 当前页高亮 */
.nav-link.active { color: var(--text); }
.nav:not(.scrolled) .nav-link.active { color: #fff; }
.nav.nav-sub:not(.scrolled) .nav-link.active { color: var(--text); }
.nav-link.active::after { width: 100%; }

/* ============ 子页面头部 ============ */
.page-hero {
  padding: 150px 70px 60px; text-align: center;
  background: var(--bg-gray); border-bottom: 1px solid var(--line);
}
.page-title {
  font-family: var(--font-en); font-size: 44px; font-weight: 700;
  letter-spacing: 4px; color: var(--text);
}
.page-title span {
  font-family: var(--font-body); font-size: 18px; font-weight: 400;
  color: var(--text-2); margin-left: 14px; letter-spacing: 2px;
}
.page-desc { color: var(--text-2); margin-top: 14px; font-size: 15px; letter-spacing: 1px; }

/* ============ 照片轮播 ============ */
.photo-carousel { max-width: 1300px; margin: 0 auto; }
.carousel-stage {
  position: relative; height: 520px; overflow: hidden; border-radius: 8px;
  background: var(--bg-gray);
}
.carousel-stage-lg { height: 640px; }
.carousel-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; visibility: hidden;
  transition: opacity 1.2s ease, transform 6s ease; cursor: pointer;
}
.carousel-img.active { opacity: 1; visibility: visible; }
.carousel-img.active:hover { transform: scale(1.03); }
.carousel-dots { display: flex; justify-content: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.carousel-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--chip);
  border: 0; cursor: pointer; transition: all .3s; padding: 0;
}
.carousel-dot.active { background: var(--accent); transform: scale(1.3); }

/* ============ 首页照片墙：全屏循环卡片轮播 ============ */
#photos {
  max-width: none; box-sizing: border-box;
  min-height: 100vh; padding: 64px 40px 40px;
  display: flex; flex-direction: column; justify-content: center;
}
#photos .section-head { margin-bottom: 32px; max-width: 1600px; }
.photo-carousel { position: relative; width: 100%; max-width: 1600px; margin: 0 auto; }
.cards-viewport { position: relative; width: 100%; overflow: hidden; }
.cards-track { position: relative; height: 100%; }
.card {
  position: absolute; left: 50%; top: 50%;
  box-sizing: border-box; border-radius: 12px; overflow: hidden;
  background: var(--bg-gray); cursor: pointer;
  box-shadow: 0 6px 22px rgba(0,0,0,.08);
  transition: transform .7s cubic-bezier(.25,.8,.25,1), opacity .5s ease, box-shadow .4s ease;
  will-change: transform, opacity;
}
.card img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover img { transform: scale(1.08); }
.card-cap {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
  padding: 50px 22px 18px; color: #fff; font-size: 15px; letter-spacing: 1px;
  background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
  text-align: left; pointer-events: none;
  opacity: 0; transition: opacity .45s ease;
}
.card:hover .card-cap { opacity: 1; }
.card-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); border: 1px solid var(--line); color: var(--text);
  font-size: 24px; line-height: 1; cursor: pointer; z-index: 4;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  transition: background .3s, color .3s, border-color .3s, transform .3s;
}
.card-arrow:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-50%) scale(1.08); }
.card-prev { left: calc(50% - 22vw - 22px); }
.card-next { left: calc(50% + 22vw - 22px); }

/* ============ 友情链接图标 ============ */
.social-links { display: flex; gap: 18px; margin-top: 26px; flex-wrap: wrap; }
.social-link {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none; color: var(--text-2); transition: transform .3s, color .3s;
}
.social-link:hover { transform: translateY(-4px); color: var(--text); }
.social-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--sc, var(--text)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-en); font-weight: 700; font-size: 20px; letter-spacing: 1px;
  box-shadow: 0 6px 18px rgba(0,0,0,.12); transition: box-shadow .3s;
}
.social-link:hover .social-icon { box-shadow: 0 10px 26px rgba(0,0,0,.2); }
.social-name { font-size: 12px; letter-spacing: 1px; }
.social-links-lg { justify-content: center; gap: 40px; }
.social-links-lg .social-icon { width: 72px; height: 72px; font-size: 24px; }
.social-links-lg .social-name { font-size: 14px; }

/* ============ 通联日志表格 ============ */
.log-table-wrap { max-width: 1300px; margin: 0 auto; overflow-x: auto; }
.log-table {
  width: 100%; border-collapse: collapse; background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
.log-table th {
  background: var(--text); color: #fff; font-weight: 500; font-size: 13px;
  letter-spacing: 1px; padding: 14px 18px; text-align: left;
}
.log-table td {
  padding: 13px 18px; font-size: 14px; color: var(--text-2);
  border-bottom: 1px solid var(--line); font-family: var(--font-en);
}
.log-table tbody tr:hover { background: var(--bg-gray); }
.log-table .log-call { color: var(--text); font-weight: 700; letter-spacing: 1px; }
.log-table .log-rst { color: var(--accent-hover); font-weight: 700; }

/* ============ 技术笔记列表 ============ */
.notes-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  width: 75%; max-width: 1600px; margin: 0 auto;
  grid-auto-rows: minmax(300px, auto);
}
.note-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 30px 26px; transition: transform .3s, box-shadow .3s;
  display: flex; flex-direction: column;
}
.note-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.06); }
.note-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.note-tag {
  padding: 4px 12px; border-radius: 20px; background: var(--bg-gray);
  border: 1px solid var(--line); font-size: 12px; color: var(--text-2);
}
.note-date { font-family: var(--font-en); font-size: 12px; color: var(--text-3); }
.note-title { font-size: 17px; margin-bottom: 10px; letter-spacing: 1px; line-height: 1.5; }
.note-summary { color: var(--text-2); font-size: 14px; flex: 1; }
.note-link {
  margin-top: 18px; font-size: 13px; color: var(--accent-hover);
  text-decoration: none; letter-spacing: 1px;
}
.note-link:hover { text-decoration: underline; }

/* ============ 联系方式 ============ */
.contact-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  max-width: 1300px; margin: 0 auto;
}
.contact-item {
  background: var(--bg-gray); border: 1px solid var(--line); border-radius: 8px;
  padding: 30px 26px; text-align: center;
}
.contact-item h3 { font-size: 16px; margin-bottom: 10px; letter-spacing: 1px; }
.contact-item p { color: var(--text-2); font-size: 14px; }
.contact-item b { color: var(--accent-hover); }

/* ============ 响应式补充 ============ */
@media (max-width: 1024px) {
  .notes-grid { grid-template-columns: repeat(2, 1fr); width: 100%; }
  .contact-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 130px 30px 50px; }
}
@media (max-width: 768px) {
  .carousel-stage { height: 380px; }
  .carousel-stage-lg { height: 420px; }
  .card img { height: 250px; }
  .card-prev { left: 6px; }
  .card-next { right: 6px; }
  .notes-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 120px 20px 40px; }
  .page-title { font-size: 32px; }
}

/* ============ 首页通篇粒子背景（经典信号网络，滚动全程可见，叠加在视频之上、内容之下） ============ */
.particles-fixed.particles-home {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;   /* 高于 hero 视频/遮罩(z-index:2)，叠加于内容之上；低于导航(100)/灯箱(200) */
  opacity: 0.9;
  pointer-events: none;
}
/* 子页全屏粒子背景（固定覆盖整页，位于内容下层） */
.particles-fixed {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.9;
  pointer-events: none;
}

/* ============================================================
   以下为整合桌面版 about / photos 功能时追加的样式（只追加，不改动既有规则）
   ============================================================ */

/* ============ 子页面：固定实底导航（about 等） ============ */
.nav-solid { background: var(--nav-bg); box-shadow: 0 1px 0 var(--line); }
.nav-solid .logo-text { color: var(--text); }
.nav-solid .logo-text em { color: var(--text-2); }
.nav-solid .nav-link { color: var(--text-2); }
.nav-solid .nav-link:hover { color: var(--text); }
.nav-solid .nav-link::after { background: var(--accent); }
.nav-solid .nav-toggle span { background: var(--text); }
.nav.nav-solid:not(.scrolled) .nav-link.active { color: var(--text); }
.nav.nav-solid:not(.scrolled) .nav-link.active::after { width: 100%; }

/* ============ 关于我 · 照片轮播墙 ============ */
.about-photos { margin-top: 40px; }
.carousel-stage-about { height: 380px; }

/* ============ 关于我 · 空间动态（备忘录时间线） ============ */
.memo-timeline {
  position: relative; max-width: 860px; margin: 0 auto;
  padding-left: 44px;
}
.memo-timeline::before {
  content: ''; position: absolute; left: 13px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.memo-item { position: relative; margin-bottom: 26px; }
.memo-item::before {
  content: ''; position: absolute; left: -37px; top: 24px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
  box-shadow: 0 0 0 2px var(--line);
}
.memo-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 22px 28px; transition: transform .3s, box-shadow .3s;
}
.memo-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.06); }
.memo-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.memo-date { font-family: var(--font-en); font-size: 13px; font-weight: 600; color: var(--text-3); letter-spacing: 1px; }
.memo-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.memo-tags span {
  padding: 2px 12px; border-radius: 20px; background: var(--bg-gray);
  border: 1px solid var(--line); font-size: 11px; color: var(--text-2);
}
.memo-card p { color: var(--text-2); font-size: 14px; }

/* ============ 联系我（社交 + 联系方式整合） ============ */
#contactCombined .contact-grid { margin-top: 46px; }

/* ============ 彩蛋提示 Toast ============ */
.egg-toast {
  position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%) translateY(16px);
  background: var(--text); color: var(--bg); padding: 10px 24px; border-radius: 30px;
  font-size: 13px; letter-spacing: 1px; opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s; z-index: 300;
}
.egg-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ 响应式补充（关于我新增栏目） ============ */
@media (max-width: 768px) {
  .carousel-stage-about { height: 300px; }
  .memo-timeline { padding-left: 34px; }
  .memo-item::before { left: -27px; }
}

/* ============ 照片墙页：相册时间轴 ============ */
.timeline { position: relative; max-width: 1100px; margin: 0 auto; padding-left: 44px; }
.timeline::before {
  content: ''; position: absolute; left: 12px; top: 8px; bottom: 8px;
  width: 2px; background: var(--line);
}
.album-node { position: relative; margin-bottom: 32px; }
.album-node::before {
  content: ''; position: absolute; left: -40px; top: 32px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
  box-shadow: 0 0 0 2px var(--line); transition: all .3s;
}
.album-node.open::before {
  background: var(--accent-hover); border-color: var(--accent-hover);
  transform: scale(1.18);
}
.album-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; cursor: pointer; display: flex;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.album-card:hover {
  transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,.08);
  border-color: var(--chip);
}
.album-cover { width: 210px; flex-shrink: 0; overflow: hidden; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.album-card:hover .album-cover img { transform: scale(1.06); }
.album-info { padding: 24px 28px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.album-name { font-size: 20px; letter-spacing: 1px; margin-bottom: 6px; }
.album-date {
  font-family: var(--font-en); font-size: 13px; font-weight: 600;
  letter-spacing: 2px; color: var(--text-3); margin-bottom: 10px;
}
.album-mark {
  color: var(--text-2); font-size: 14px; line-height: 1.8;
  border-left: 3px solid var(--accent-hover); padding-left: 12px;
}
.album-toggle {
  display: inline-block; margin-top: 14px; font-size: 12px;
  letter-spacing: 1px; color: var(--accent-hover); transition: letter-spacing .3s;
}
.album-node.open .album-toggle { letter-spacing: 2px; }

/* 子图网格（就地展开，高度平滑过渡） */
.album-grid {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .55s cubic-bezier(.25,.8,.3,1), opacity .4s ease, margin-top .4s ease;
}
.album-node.open .album-grid { opacity: 1; margin-top: 18px; }
.album-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.album-photo {
  position: relative; border-radius: 8px; overflow: hidden; cursor: pointer;
  background: var(--bg-gray); margin: 0;
}
.album-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  aspect-ratio: 4 / 3; transition: transform .6s ease;
}
.album-photo:hover img { transform: scale(1.06); }
.album-photo figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
  padding: 30px 12px 10px; color: #fff; font-size: 12px; letter-spacing: 1px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.65));
  opacity: 0; transition: opacity .4s;
}
.album-photo:hover figcaption { opacity: 1; }

/* ============ 照片墙页：响应式（时间轴单列 + 卡片纵向） ============ */
@media (max-width: 768px) {
  .timeline { padding-left: 32px; }
  .album-node::before { left: -29px; top: 18px; }
  .album-card { flex-direction: column; }
  .album-cover { width: 100%; height: 190px; }
  .album-info { padding: 18px 20px; }
  .album-photos { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-width: 480px) {
  .album-photos { grid-template-columns: 1fr; }
}

/* ============ 深色主题下新增样式的适配补充 ============ */
html[data-theme="dark"] .nav-solid { background: var(--nav-bg); }
html[data-theme="dark"] .album-card:hover { border-color: #3a3e46; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
html[data-theme="dark"] .memo-card:hover { box-shadow: 0 10px 26px rgba(0,0,0,.35); }
html[data-theme="dark"] .album-photo figcaption { background: linear-gradient(180deg, transparent, rgba(0,0,0,.75)); }

/* ============ 荣誉墙（honors.html） ============ */
.honor-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  max-width: 1300px; margin: 0 auto;
}
.honor-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; transition: transform .3s, box-shadow .3s;
  display: flex; flex-direction: column;
}
.honor-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.08); }
.honor-cover { margin: 0; border-bottom: 1px solid var(--line); }
.honor-cover img { display: block; width: 100%; height: auto; }
.honor-info { padding: 20px 22px 24px; }
.honor-title { font-size: 17px; letter-spacing: 1px; }
.honor-desc { margin-top: 8px; color: var(--text-2); font-size: 14px; }
html[data-theme="dark"] .honor-card:hover { border-color: #3a3e46; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
@media (max-width: 1024px) { .honor-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .honor-grid { grid-template-columns: 1fr; } }

/* ============================================================
   深色主题：主页 / 照片墙统一极光渐变
   与子页（ham / rf / about）particles aurora 模式同色系，
   仅深色下生效；浅色主题保持原样，不引入依赖、不动 JS。
   ============================================================ */
html[data-theme="dark"] body.page-index::before,
html[data-theme="dark"] body.page-photos::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 55% at 50% 115%, rgba(255,107,53,.14) 0%, transparent 60%),
    radial-gradient(ellipse 95% 45% at 42% 118%, rgba(150,100,220,.10) 0%, transparent 62%),
    radial-gradient(ellipse 85% 42% at 58% 120%, rgba(60,150,255,.10) 0%, transparent 62%);
}

/* ============ 关于我（首页高级简约版） ============ */
.about-hero {
  max-width: 820px; margin: 0 auto; text-align: center;
  padding: 46px 0 64px;
}
.about-kicker {
  font-family: var(--font-en); text-transform: uppercase;
  letter-spacing: 8px; font-size: 12px; color: var(--accent);
  margin-bottom: 24px;
}
.about-greet {
  font-size: 44px; font-weight: 500; letter-spacing: 3px;
  line-height: 1.25; margin-bottom: 20px;
}
.about-greet span { color: var(--accent-hover); }
.about-role {
  font-size: 14px; letter-spacing: 5px; color: var(--text-2);
  margin-bottom: 28px;
}
.about-call {
  font-family: var(--font-en); font-weight: 700;
  font-size: 20px; letter-spacing: 12px; color: var(--accent);
  margin-bottom: 24px;
}
.about-divider {
  width: 44px; height: 1px; background: var(--line);
  margin: 0 auto 40px;
}
.about-hero .social-links {
  justify-content: center; margin-top: 48px; gap: 44px;
}
.about-hero .social-icon {
  width: 84px; height: 84px; font-size: 26px; background: var(--card);
}
.about-hero .social-icon img {
  width: 46px; height: 46px; object-fit: contain; display: block;
}
/* 首页关于我：PNG 品牌图标（黑色单色图）配浅色圆底，深浅主题下均清晰 */
.about-hero .social-icon.social-icon-png {
  background: rgba(255,255,255,.95);
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.about-hero .social-icon.social-icon-png img {
  width: 54px; height: 54px;
}
html[data-theme="dark"] .about-hero .social-icon img { filter: invert(1); }
/* PNG 图标为黑色单色图+浅色圆底，深浅主题均无需反色，否则白底上看不见 */
html[data-theme="dark"] .about-hero .social-icon.social-icon-png img { filter: none; }
/* 深色主题：社交图标圆底加一圈浅描边，避免深色品牌色（如抖音黑）融入深色背景 */
html[data-theme="dark"] .social-icon { border: 1px solid rgba(255,255,255,.14); }
html[data-theme="dark"] .about-hero .social-icon { border-color: rgba(255,255,255,.16); }
@media (max-width: 768px) {
  .about-greet { font-size: 32px; letter-spacing: 2px; }
  .about-call { letter-spacing: 8px; }
  .about-role { letter-spacing: 3px; }
}

/* ============ 背景音乐播放器 ============ */
.bg-player {
  position: fixed; right: 24px; bottom: 24px; z-index: 1000;
  width: 348px; border-radius: 18px;
  background: rgba(255,255,255,.30);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 12px 36px rgba(0,0,0,.16);
  padding: 16px 18px;
  font-family: var(--font-body);
  transition: width .3s ease, padding .3s ease;
}
html[data-theme="dark"] .bg-player {
  background: rgba(15,17,21,.26);
  border-color: rgba(255,255,255,.06);
}
.bp-toggle {
  position: absolute; top: 8px; right: 8px;
  width: 24px; height: 24px; border: none; border-radius: 50%;
  background: rgba(128,128,128,.16); color: var(--text);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.bp-toggle:hover { background: rgba(128,128,128,.3); }
.bp-toggle svg { width: 14px; height: 14px; fill: currentColor; transition: transform .3s; }
.bg-player.collapsed .bp-toggle svg { transform: rotate(180deg); }
.bp-main { display: flex; align-items: center; gap: 14px; }
.bp-cover {
  width: 62px; height: 62px; flex: none; border-radius: 50%;
  overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.28);
  position: relative; transition: width .3s ease, height .3s ease;
}
.bp-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bp-cover.spin { animation: bp-spin 14s linear infinite; }
@keyframes bp-spin { to { transform: rotate(360deg); } }
.bp-body { flex: 1; min-width: 0; }
.bp-title { font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: .5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.bp-progress { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.bp-seek {
  flex: 1; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--accent-hover) var(--bp-progress,0%), rgba(128,128,128,.22) var(--bp-progress,0%));
  outline: none; cursor: pointer;
}
.bp-seek::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent-hover);
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.bp-seek::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent-hover);
}
.bp-times { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bp-controls { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.bp-btn {
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(128,128,128,.14); color: var(--text);
  transition: transform .2s, background .2s;
}
.bp-btn:hover { transform: scale(1.08); background: rgba(128,128,128,.24); }
.bp-btn svg { width: 15px; height: 15px; fill: currentColor; }
.bp-btn.bp-play {
  width: 40px; height: 40px;
  background: var(--accent); color: var(--bg);
}
.bp-btn.bp-play:hover { background: var(--accent-hover); color: #fff; }
.bp-lyrics {
  margin-top: 12px; max-height: 96px; overflow-y: auto; text-align: center;
  border-top: 1px dashed rgba(128,128,128,.3); padding-top: 8px;
  cursor: pointer; transition: max-height .3s;
}
.bp-lyrics.expanded { max-height: 200px; overflow-y: auto; }
.bp-lyrics::-webkit-scrollbar { width: 4px; }
.bp-lyrics::-webkit-scrollbar-thumb { background: rgba(128,128,128,.35); border-radius: 2px; }
.bp-lyric-row { font-size: 12px; color: var(--text-3); line-height: 1.9; transition: color .2s; }
.bp-lyric-row.active { color: var(--accent-hover); font-weight: 600; }

/* ---- 折叠态：缩成小横条（小封面 + 歌名 + 播放/暂停） ---- */
.bg-player.collapsed { width: 252px; }
.bg-player.collapsed .bp-main { gap: 10px; }
.bg-player.collapsed .bp-cover { width: 36px; height: 36px; box-shadow: 0 4px 12px rgba(0,0,0,.24); }
.bg-player.collapsed .bp-sub,
.bg-player.collapsed .bp-progress,
.bg-player.collapsed .bp-lyrics { display: none; }
.bg-player.collapsed .bp-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.bg-player.collapsed .bp-title { flex: 0 1 auto; min-width: 0; }
.bg-player.collapsed .bp-controls { margin-top: 0; gap: 8px; }
.bg-player.collapsed .bp-btn.bp-replay { display: none; }
.bg-player.collapsed .bp-loop-label { display: none; }

@media (max-width: 480px) {
  .bg-player { right: 12px; left: 12px; bottom: 12px; width: auto; }
  .bg-player.collapsed { width: 232px; }
}

/* ============ 电子文档（PDF 检索与即时查看） ============ */
.doc-section { padding: 64px 40px; }
.doc-wrap {
  max-width: 1300px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 18px;
}
.doc-searchbar { display: flex; }
.doc-input {
  width: 100%; padding: 14px 20px;
  font-size: 15px; font-family: var(--font-body);
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.doc-input:focus {
  border-color: var(--accent-hover);
  box-shadow: 0 0 0 3px rgba(255,77,46,.12);
}
.doc-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.doc-filter {
  padding: 6px 16px; border: 1px solid var(--line);
  border-radius: 999px; background: transparent;
  color: var(--text-2); font-size: 13px; font-family: var(--font-body);
  cursor: pointer; transition: all .2s;
}
.doc-filter:hover { border-color: var(--accent-hover); color: var(--accent-hover); }
.doc-filter.active {
  background: var(--accent); color: var(--bg); border-color: var(--accent);
}
.doc-recent {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  min-height: 22px;
}
.doc-recent-label { font-size: 12px; color: var(--text-3); }
.doc-recent-chip {
  padding: 3px 12px; border: none; border-radius: 999px;
  background: rgba(128,128,128,.14); color: var(--text-2);
  font-size: 12px; font-family: var(--font-body);
  cursor: pointer; transition: background .2s, color .2s;
}
.doc-recent-chip:hover { background: rgba(128,128,128,.26); color: var(--text); }
.doc-results {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px; margin-top: 6px;
  /* 文档库：独立滚动容器，占约一屏高度，列表在区域内滚动 */
  max-height: 62vh; overflow-y: auto;
  overscroll-behavior: contain; /* 避免滚动到底后触发页面滚动 */
  padding: 4px 8px 8px 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(128,128,128,.35) transparent;
}
.doc-results::-webkit-scrollbar { width: 8px; }
.doc-results::-webkit-scrollbar-thumb { background: rgba(128,128,128,.35); border-radius: 999px; }
.doc-results::-webkit-scrollbar-track { background: transparent; }
.doc-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.doc-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-hover);
  box-shadow: 0 10px 26px rgba(0,0,0,.12);
}
.doc-icon {
  flex: none; width: 44px; height: 44px; border-radius: 10px;
  background: var(--accent-hover); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-en); font-size: 12px; font-weight: 700; letter-spacing: .5px;
}
.doc-info { flex: 1; min-width: 0; }
.doc-name {
  font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.doc-meta { display: flex; gap: 10px; margin-top: 6px; font-size: 12px; color: var(--text-3); }
.doc-cat { color: var(--accent-hover); }
.doc-view-btn {
  flex: none; padding: 8px 16px; border: none; border-radius: 999px;
  background: var(--accent); color: var(--bg);
  font-size: 13px; font-family: var(--font-body);
  cursor: pointer; transition: background .2s;
}
.doc-view-btn:hover { background: var(--accent-hover); color: #fff; }
.doc-empty {
  grid-column: 1 / -1; text-align: center;
  padding: 48px 20px; color: var(--text-3); font-size: 14px; line-height: 2;
}
.doc-empty code { background: rgba(128,128,128,.14); padding: 2px 8px; border-radius: 6px; font-size: 12px; }

/* ---- 文档预览浮层 ---- */
.doc-viewer {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(15,17,21,.6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: none; flex-direction: column;
  padding: 24px;
}
.doc-viewer.open { display: flex; }
.doc-viewer-bar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1400px; width: 100%; margin: 0 auto 12px;
  padding: 12px 18px; border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  box-sizing: border-box;
}
.doc-viewer-name {
  font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 16px;
}
.doc-viewer-close {
  flex: none; width: 32px; height: 32px; border: none; border-radius: 50%;
  background: rgba(128,128,128,.16); color: var(--text);
  font-size: 14px; cursor: pointer; transition: background .2s;
}
.doc-viewer-close:hover { background: var(--accent-hover); color: #fff; }
.doc-viewer iframe {
  flex: 1; width: 100%; max-width: 1400px; margin: 0 auto;
  border: none; border-radius: 12px;
  background: #fff;
}
@media (max-width: 768px) {
  .doc-section { padding: 48px 20px; }
  .doc-viewer { padding: 12px; }
  .doc-results { grid-template-columns: 1fr; }
}

/* ============================================================
   射频工程页 · MATLAB 工程板块
   （与 DOCUMENTS / 首页板块同一设计语言：accent 主色、圆角卡片、
    Rajdhani + Noto Sans SC、hover 上浮阴影，浅深主题均协调）
   ============================================================ */
.matlab-section { padding: 56px 70px; }
.matlab-grid {
  display: flex; flex-direction: column; gap: 22px;
  width: 75%; max-width: 1600px; margin: 0 auto;
}
.matlab-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 30px 32px 26px;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.matlab-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0,0,0,.08);
  border-color: var(--chip);
}
.matlab-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.matlab-num {
  font-family: var(--font-en); font-weight: 700; font-size: 13px;
  letter-spacing: 1px; color: var(--bg);
  background: var(--accent); border-radius: 6px; padding: 4px 10px; line-height: 1.4;
}
html[data-theme="dark"] .matlab-num { background: #e8e6e2; color: #0f1115; }
.matlab-name { font-size: 19px; letter-spacing: 1px; font-weight: 600; }
.matlab-tag {
  margin-left: auto; padding: 4px 14px; border-radius: 20px;
  background: var(--bg-gray); border: 1px solid var(--line);
  font-size: 12px; color: var(--text-2); letter-spacing: 1px;
}
.matlab-summary { color: var(--text-2); font-size: 14px; line-height: 1.9; }
.matlab-scene {
  margin-top: 12px; font-size: 13px; color: var(--text-2);
  background: var(--bg-gray); border: 1px dashed var(--line);
  border-radius: 8px; padding: 10px 14px;
}
.matlab-scene b { color: var(--accent-hover); font-weight: 600; margin-right: 4px; }
.matlab-files {
  list-style: none; margin-top: 14px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.matlab-files li {
  padding: 4px 12px; border-radius: 20px;
  background: var(--bg-gray); border: 1px solid var(--line);
  font-family: var(--font-en); font-size: 12px; color: var(--text-2);
}
/* ---- 代码折叠块（默认收起，点击展开） ---- */
.matlab-code {
  margin-top: 18px; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: var(--bg-gray);
}
.matlab-code summary {
  cursor: pointer; list-style: none; padding: 12px 18px;
  font-size: 13px; color: var(--text-2); letter-spacing: 1px;
  user-select: none; transition: color .2s, background .2s;
  display: flex; align-items: center; gap: 8px;
}
.matlab-code summary::-webkit-details-marker { display: none; }
.matlab-code summary:hover { background: rgba(128,128,128,.08); color: var(--text); }
.matlab-code-icon { color: var(--accent-hover); transition: transform .2s; }
.matlab-code[open] summary { border-bottom: 1px solid var(--line); color: var(--text); }
.matlab-code pre {
  margin: 0; padding: 18px 20px; overflow: auto;
  max-height: 480px;
  background: #1b1e26; color: #d7dae0;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12.5px; line-height: 1.65; tab-size: 4;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.22) transparent;
}
.matlab-code pre::-webkit-scrollbar { height: 8px; }
.matlab-code pre::-webkit-scrollbar-thumb { background: rgba(255,255,255,.22); border-radius: 999px; }
.matlab-code pre::-webkit-scrollbar-track { background: transparent; }
html[data-theme="dark"] .matlab-code pre { background: #0b0d11; }
html[data-theme="dark"] .matlab-card:hover { border-color: #3a3e46; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
@media (max-width: 1024px) {
  .matlab-grid { width: 100%; }
  .matlab-section { padding: 48px 30px; }
}
@media (max-width: 768px) {
  .matlab-section { padding: 40px 20px; }
  .matlab-card { padding: 22px 18px 18px; }
  .matlab-code pre { max-height: 360px; font-size: 12px; }
  .matlab-tag { margin-left: 0; }
}
