/* ============================================================
   个人网站 · 共享样式  |  深空科幻主题
   ============================================================ */
:root {
  --bg: #05070f;
  --bg-2: #0a0e1a;
  --panel: rgba(17, 24, 39, 0.62);
  --panel-solid: #111827;
  --line: #1f2937;
  --text: #e5e7eb;
  --dim: #94a3b8;
  --cyan: #22d3ee;
  --green: #4ade80;
  --purple: #a78bfa;
  --gold: #f59e0b;
  --red: #ef4444;
  --glow-cyan: rgba(34, 211, 238, 0.35);
  --glow-green: rgba(74, 222, 128, 0.30);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection { background: var(--cyan); color: #04121a; }

/* ---------- 星空背景画布 ---------- */
#starfield {
  position: fixed;
  inset: 0;
  z-index: -2;
  display: block;
}

/* 全局网格线覆层 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(34, 211, 238, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 75%);
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }

/* ---------- 导航 ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 14px 0;
  transition: background .3s, box-shadow .3s, padding .3s;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}
.nav.scrolled {
  background: rgba(5, 7, 15, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(34, 211, 238, 0.15);
  padding: 10px 0;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  font-family: "SF Mono", Consolas, monospace;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 2px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.logo .accent {
  background: linear-gradient(90deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--dim);
  text-decoration: none;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all .2s;
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.06);
}
.nav-links a.active {
  color: var(--green);
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.07);
}
@media (max-width: 900px) {
  .nav-inner { flex-direction: column; gap: 8px; }
  .nav-links { justify-content: center; }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 120px 28px 80px;
  overflow: hidden;
}
.hero-img-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-img-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: saturate(1.15) contrast(1.1);
}
.hero-img-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(5,7,15,0.15), rgba(5,7,15,0.92) 75%),
    linear-gradient(180deg, rgba(5,7,15,0.5) 0%, rgba(5,7,15,0.2) 40%, var(--bg) 100%);
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border: 1px solid rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.07);
  color: var(--green);
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: 2px;
  font-family: "SF Mono", Consolas, monospace;
  margin-bottom: 26px;
}
.kicker .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--glow-green);
  animation: blink 1.8s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
h1.hero-title {
  font-size: clamp(44px, 8vw, 84px);
  font-weight: 900;
  letter-spacing: 4px;
  line-height: 1.12;
  background: linear-gradient(92deg, #e5e7eb 10%, var(--cyan) 55%, var(--green) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 60px var(--glow-cyan);
  margin-bottom: 20px;
}
.hero-sub {
  color: var(--dim);
  font-size: clamp(15px, 2vw, 18px);
  max-width: 640px;
  margin-bottom: 34px;
}
.hero-sub .en {
  font-family: "SF Mono", Consolas, monospace;
  color: var(--cyan);
  font-size: 0.86em;
  letter-spacing: 1px;
}
.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 3px;
  font-family: "SF Mono", Consolas, monospace;
  animation: floaty 2.2s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 9px); }
}

/* ---------- 章节标题 ---------- */
.section { padding: 84px 0; position: relative; }
.section-head { margin-bottom: 40px; }
.sec-tag {
  font-family: "SF Mono", Consolas, monospace;
  color: var(--cyan);
  font-size: 13px;
  letter-spacing: 3px;
  display: block;
  margin-bottom: 10px;
}
h2.sec-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: 1px;
}
h2.sec-title .grad {
  background: linear-gradient(90deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sec-quote {
  color: var(--dim);
  margin-top: 12px;
  max-width: 700px;
  font-size: 15px;
}

/* ---------- 卡片 ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .35s ease, border-color .35s, box-shadow .35s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5), 0 0 30px rgba(34, 211, 238, 0.08);
}
.card .thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #0e1626, #1a1033);
}
.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease, filter .6s;
  filter: saturate(1.08) contrast(1.05);
}
.card:hover .thumb img { transform: scale(1.07); }
.card .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(5, 7, 15, 0.75));
}
.card .icon-chip {
  position: absolute;
  z-index: 2;
  top: 12px; left: 12px;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  font-size: 21px;
  border-radius: 12px;
  background: rgba(5, 7, 15, 0.68);
  border: 1px solid rgba(34, 211, 238, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.card-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 18px; margin-bottom: 6px; letter-spacing: 0.5px; }
.card-body h3 .en {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 11.5px;
  color: var(--cyan);
  letter-spacing: 2px;
  margin-left: 8px;
  font-weight: 500;
}
.card-body p { color: var(--dim); font-size: 13.5px; flex: 1; }
.card-body .tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.05);
}
.tag.g { border-color: rgba(74, 222, 128, 0.35); color: var(--green); background: rgba(74, 222, 128, 0.05); }
.tag.p { border-color: rgba(167, 139, 250, 0.35); color: var(--purple); background: rgba(167, 139, 250, 0.05); }
.tag.o { border-color: rgba(245, 158, 11, 0.35); color: var(--gold); background: rgba(245, 158, 11, 0.05); }

/* ---------- 数据面板 ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
  margin: 34px 0;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 20px;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color .3s, transform .3s;
}
.stat:hover { border-color: rgba(74, 222, 128, 0.45); transform: translateY(-3px); }
.stat .num {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 34px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat .label { color: var(--dim); font-size: 13px; margin-top: 4px; letter-spacing: 1px; }

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 6px; top: 4px; bottom: 4px;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--green), transparent);
}
.tl-item { position: relative; padding: 0 0 26px 18px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -26px; top: 7px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 12px var(--glow-cyan);
}
.tl-item .year {
  font-family: "SF Mono", Consolas, monospace;
  color: var(--cyan);
  font-size: 14px;
  letter-spacing: 1px;
}
.tl-item h4 { font-size: 16.5px; margin: 3px 0 4px; }
.tl-item p { color: var(--dim); font-size: 13.5px; max-width: 660px; }

/* ---------- 引用块 ---------- */
.blockquote {
  border-left: 3px solid var(--cyan);
  background: rgba(34, 211, 238, 0.05);
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  color: #cbd5e1;
  font-size: 14.5px;
  margin: 26px 0;
}
.blockquote .who {
  display: block;
  margin-top: 8px;
  color: var(--dim);
  font-size: 12.5px;
  font-family: "SF Mono", Consolas, monospace;
}

/* ---------- 大图横幅 ---------- */
.banner {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 30px 0;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
}
.banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1);
}
.banner .veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,7,15,0.1) 20%, rgba(5,7,15,0.9));
}
.banner .cap {
  position: relative;
  z-index: 2;
  padding: 28px;
}
.banner .cap h3 { font-size: 22px; margin-bottom: 6px; }
.banner .cap p { color: var(--dim); font-size: 13.5px; max-width: 620px; }

/* ---------- 页脚 ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 36px;
  margin-top: 60px;
  text-align: center;
}
footer .sig {
  font-family: "SF Mono", Consolas, monospace;
  color: var(--dim);
  font-size: 12.5px;
  letter-spacing: 2px;
  line-height: 2.1;
}
footer .sig .c { color: var(--cyan); }
footer .sig .g { color: var(--green); }
footer .links { margin-top: 14px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
footer .links a { color: var(--dim); text-decoration: none; font-size: 13px; }
footer .links a:hover { color: var(--cyan); }

/* ---------- 滚动淡入 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

/* ---------- 滚动进度条 ---------- */
#progress {
  position: fixed;
  top: 0; left: 0;
  height: 2.5px;
  width: 0%;
  z-index: 200;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  box-shadow: 0 0 12px var(--glow-cyan);
  transition: width .12s linear;
}

/* ---------- 返回顶部 ---------- */
#toTop {
  position: fixed;
  right: 26px; bottom: 26px;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: var(--cyan);
  font-size: 19px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 90;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
#toTop.show { opacity: 1; pointer-events: auto; }
#toTop:hover { transform: translateY(-4px); }

/* ---------- 首页入口卡 ---------- */
.entrance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
.entrance {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 210px;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  transition: transform .35s, border-color .35s, box-shadow .35s;
}
.entrance:hover {
  transform: translateY(-6px);
  border-color: rgba(74, 222, 128, 0.5);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 34px rgba(74, 222, 128, 0.09);
}
.entrance img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s;
  filter: saturate(1.1);
}
.entrance:hover img { transform: scale(1.06); }
.entrance .veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,7,15,0.18) 20%, rgba(5,7,15,0.92));
}
.entrance .cap {
  position: relative;
  z-index: 2;
  padding: 22px;
}
.entrance .cap .no {
  font-family: "SF Mono", Consolas, monospace;
  color: var(--cyan);
  font-size: 12px;
  letter-spacing: 2px;
}
.entrance .cap h3 { color: var(--text); font-size: 21px; margin: 4px 0 4px; }
.entrance .cap p { color: var(--dim); font-size: 13px; }
.entrance .cap .go {
  display: inline-block;
  margin-top: 10px;
  color: var(--green);
  font-size: 12.5px;
  font-family: "SF Mono", Consolas, monospace;
  letter-spacing: 1px;
}

/* ---------- 科学角小互动 ---------- */
.demo-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-top: 30px;
}
.demo-panel h3 { margin-bottom: 6px; }
.demo-panel .hint { color: var(--dim); font-size: 13px; margin-bottom: 14px; }
.demo-panel canvas {
  width: 100%;
  border-radius: 10px;
  display: block;
  background: #070b14;
  border: 1px solid var(--line);
}
.demo-ctl { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.btn {
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.4);
  color: var(--cyan);
  padding: 8px 18px;
  border-radius: 9px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.btn:hover { background: rgba(34, 211, 238, 0.2); box-shadow: 0 0 16px rgba(34, 211, 238, 0.2); }
.btn.green { background: rgba(74, 222, 128, 0.12); border-color: rgba(74, 222, 128, 0.45); color: var(--green); }
.btn.green:hover { box-shadow: 0 0 16px rgba(74, 222, 128, 0.22); }

/* ============================================================
   以下为 Drupal 移植新增样式（STELLAR theme 新增，注释标明）
   ============================================================ */

/* ---------- 辅助可用性：跳转链接 ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  position: fixed !important;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  clip-path: none;
  white-space: normal;
  background: var(--panel-solid);
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.4);
  padding: 10px 16px;
  border-radius: 9px;
  z-index: 999;
}
#main-content { outline: none; }

/* ---------- 导航内 Drupal 块/区域包装透明化，保持 flex 布局 ---------- */
.nav-inner .region-header,
.nav-inner .block { display: contents; }
.nav .block-title,
footer .block-title { display: none; }

/* ---------- header 搜索块：极简小输入框 ---------- */
.nav-inner .search-block-form {
  display: flex;
  align-items: center;
  margin: 0;
}
.nav-inner .search-block-form .form-search {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
  padding: 6px 16px;
  width: 170px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, width .2s;
}
.nav-inner .search-block-form .form-search::placeholder { color: var(--dim); }
.nav-inner .search-block-form .form-search:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
  width: 220px;
}
.nav-inner .search-block-form .form-submit { display: none; }

/* ---------- 页脚菜单复用 .nav-links（footer .links 同款表现） ---------- */
footer .links .region-footer,
footer .links .block { display: contents; }
footer .nav-links {
  margin-top: 14px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
footer .nav-links a {
  color: var(--dim);
  text-decoration: none;
  font-size: 13px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
footer .nav-links a:hover { color: var(--cyan); }
footer .nav-links a.is-active { color: var(--green); }

/* ---------- 导航高亮：兼容 Drupal is-active 类（main.js 会把 is-active 转成 .active） ---------- */
.nav-links a.is-active {
  color: var(--green);
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.07);
}

/* ---------- 字段包装透明化：让子节点直接进入网格/统计/时间线 ---------- */
.cards > .field,
.cards > .field__items,
.cards > .field__item,
.stats-row > .field,
.stats-row > .field__items,
.stats-row > .field__item,
.timeline > .field,
.timeline > .field__items,
.timeline > .field__item {
  display: contents;
}

/* ---------- 图片字段包装撑满容器（hero 背景 / 卡片缩略图） ---------- */
.hero-img-bg > .field,
.card .thumb > .field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.card a.thumb { display: block; }

/* ---------- 博客 teaser 卡片（复用 .card 网格） ---------- */
.card-body > a { text-decoration: none; color: inherit; }
.card-body > a:hover h3 { color: var(--cyan); }
.card .post-meta {
  margin-top: 6px;
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--dim);
  font-family: "SF Mono", Consolas, monospace;
  font-size: 11.5px;
  letter-spacing: 1px;
}
.post-meta .chip {
  color: var(--purple);
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.06);
  padding: 2px 9px;
  border-radius: 999px;
}

/* ---------- 博客列表页 / 搜索结果页顶部避让固定导航 ---------- */
.blog-page { padding-top: 150px; }
body.path-search .region-content {
  max-width: 820px;
  margin: 110px auto 0;
  padding: 0 28px 60px;
}
body.path-search .search-form { max-width: 640px; margin-bottom: 28px; }
body.path-search .search-form .form-search {
  width: 100%;
  background: rgba(5, 7, 15, 0.6);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  padding: 12px 20px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
body.path-search .search-form .form-search:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}
body.path-search .search-form .form-submit {
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.4);
  color: var(--cyan);
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  margin-left: 10px;
}
body.path-search .search-form .form-submit:hover { background: rgba(34, 211, 238, 0.2); }

/* ---------- 搜索结果（--panel 浅色适配） ---------- */
.search-results { list-style: none; margin: 0; }
.search-result {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.search-result__title a {
  color: var(--cyan);
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
}
.search-result__title a:hover { text-decoration: underline; }
.search-result__snippet { color: var(--dim); font-size: 13.5px; margin-top: 6px; }
.search-result__info { color: var(--dim); font-size: 12px; font-family: "SF Mono", Consolas, monospace; margin-top: 8px; }
.search-results mark {
  background: rgba(34, 211, 238, 0.2);
  color: var(--cyan);
  border-radius: 4px;
  padding: 0 3px;
}

/* ---------- 文章页正文排版（标题/正文/封面图 max-width） ---------- */
.post-cover { margin-bottom: 24px; }
.post-cover img {
  width: 100%;
  height: clamp(280px, 44vw, 480px);
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
}
.post-head {
  max-width: 900px;
  margin: 0 auto;
  padding: 130px 28px 30px;
}
.post-title {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1.25;
}
.post-meta {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--dim);
  font-size: 12.5px;
  font-family: "SF Mono", Consolas, monospace;
  flex-wrap: wrap;
}
.post-meta .chip {
  color: var(--purple);
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.06);
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 1px;
}
.post-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 10px 28px 60px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.85;
}
.post-body p { margin: 0 0 18px; }
.post-body h2, .post-body h3 { margin: 34px 0 12px; letter-spacing: 0.5px; }
.post-body h2 { font-size: 24px; }
.post-body h3 { font-size: 20px; }
.post-body img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  margin: 10px auto;
}
.post-body img.align-center { margin-left: auto; margin-right: auto; }
.post-body blockquote {
  border-left: 3px solid var(--cyan);
  background: rgba(34, 211, 238, 0.05);
  padding: 14px 18px;
  border-radius: 0 12px 12px 0;
  color: #cbd5e1;
  margin: 20px 0;
}
.post-body ul, .post-body ol { margin: 0 0 18px 22px; }
.post-body a { color: var(--cyan); }
.post-body code {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 0.9em;
  background: rgba(34, 211, 238, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
}

/* ---------- 评论区（--panel 浅色适配） ---------- */
.comments { max-width: 820px; margin: 0 auto; padding: 10px 28px 70px; }
.comments .title { font-size: 20px; margin-bottom: 16px; }
.comments .comment {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.comments .comment .author { font-weight: 700; font-size: 14px; color: var(--green); }
.comments .comment .created { color: var(--dim); font-size: 12px; font-family: "SF Mono", Consolas, monospace; margin-top: 2px; }
.comments .comment .content { color: var(--text); font-size: 14.5px; margin-top: 8px; }
.comments .indented { margin-left: 24px; }
.comments .comment-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin-top: 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.comments .comment-form .form-item label { color: var(--text); font-size: 13px; margin-bottom: 4px; display: block; }
.comments .comment-form .form-text,
.comments .comment-form .form-textarea {
  width: 100%;
  background: rgba(5, 7, 15, 0.6);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  box-sizing: border-box;
}
.comments .comment-form .form-text:focus,
.comments .comment-form .form-textarea:focus {
  border-color: var(--cyan);
  outline: none;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}
.comments .comment-form .form-actions { margin-top: 14px; }
.comments .comment-form .form-submit {
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.4);
  color: var(--cyan);
  padding: 9px 22px;
  border-radius: 9px;
  cursor: pointer;
  font-family: inherit;
}
.comments .comment-form .form-submit:hover { background: rgba(34, 211, 238, 0.2); }
.comments .filter-wrapper { display: none; }

/* ---------- 系统消息（浅色适配） ---------- */
.messages {
  max-width: 820px;
  margin: 120px auto 0;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left-width: 3px;
}
.messages--status { border-left-color: var(--green); color: var(--green); }
.messages--error { border-left-color: var(--red); color: #fca5a5; }
.messages--warning { border-left-color: var(--gold); color: #fcd34d; }

/* ---------- 分页（博客列表） ---------- */
.blog-pager { margin-top: 40px; }
.pager { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.pager__item a,
.pager__item.is-active span {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 13px;
  color: var(--dim);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 9px;
  background: var(--panel);
}
.pager__item a:hover { color: var(--cyan); border-color: rgba(34, 211, 238, 0.4); }
.pager__item.is-active span { color: var(--green); border-color: rgba(74, 222, 128, 0.4); }

/* ---------- 节点页面隐藏重复的 Page Title 块（hero/标题由节点模板输出） ---------- */
body.front .block-page-title-block,
body.node .block-page-title-block { display: none; }

/* ---------- 前台表单（登录/联系/评论/搜索页）：面板化 + 控件统一样式 ---------- */
.user-login-form,
.webform-submission-form,
.comment-form,
body.path-search .search-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  max-width: 640px;
  margin: 0 auto 28px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-sizing: border-box;
}
.user-login-form { max-width: 430px; }
.comment-form { max-width: 820px; }
.form-item { margin: 0 0 18px; }
.form-item label {
  display: block;
  font-family: "SF Mono", Consolas, monospace;
  font-size: 12.5px;
  color: var(--dim);
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.form-item .form-required::after { content: " *"; color: #f472b6; }
.form-item input[type="text"],
.form-item input[type="email"],
.form-item input[type="tel"],
.form-item input[type="url"],
.form-item input[type="password"],
.form-item input[type="number"],
.form-item textarea,
.form-item select {
  width: 100%;
  box-sizing: border-box;
  background: rgba(5, 7, 15, 0.6);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14.5px;
}
.form-item input:focus,
.form-item textarea:focus,
.form-item select:focus {
  border-color: var(--cyan);
  outline: none;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}
.form-item .description { color: var(--dim); font-size: 12.5px; margin-top: 6px; line-height: 1.6; }
.form-submit {
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.4);
  color: var(--cyan);
  padding: 10px 26px;
  border-radius: 9px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}
.form-submit:hover { background: rgba(34, 211, 238, 0.2); }

/* ---------- 联系页介绍块（自定义块「联系页介绍」） ---------- */
.contact-intro { max-width: 640px; margin: 0 auto 26px; }
.contact-intro .sec-title { margin: 10px 0 14px; }
.contact-intro p { color: var(--dim); font-size: 14.5px; line-height: 1.9; margin: 0 0 10px; }
.contact-intro p.lead { color: var(--text); font-size: 15.5px; }

/* ---------- 评论列表与评论表单（core Stable9: article.js-comment） ---------- */
article.js-comment {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 0 0 14px;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.7;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
article.js-comment footer p {
  color: var(--dim);
  font-size: 12.5px;
  font-family: "SF Mono", Consolas, monospace;
  margin: 0;
}
article.js-comment footer p span { color: var(--green); font-weight: 700; }
article.js-comment footer > a {
  color: var(--dim);
  font-size: 12px;
  font-family: "SF Mono", Consolas, monospace;
  text-decoration: none;
}
article.js-comment footer > a:hover { color: var(--cyan); }
article.js-comment .indented { margin-left: 24px; }
article.js-comment ul.links { list-style: none; margin: 8px 0 0; padding: 0; }
article.js-comment ul.links a {
  color: var(--dim);
  font-size: 12.5px;
  font-family: "SF Mono", Consolas, monospace;
  text-decoration: none;
}
article.js-comment ul.links a:hover { color: var(--cyan); }
article.post > h2 { font-size: 20px; letter-spacing: 0.5px; margin: 44px 0 16px; color: var(--text); }

/* ---------- path-user / path-contact / path-webform / path-search：内容容器 ---------- */
/* 顶部安全区放 body 上（多区块页面——如联系页的介绍块+表单块——每个块都能避开固定导航） */
body.path-user,
body.path-webform,
body.path-search { padding-top: 130px; }
body.path-user #block-stellar-content,
body.path-contact #block-stellar-content,
body.path-webform #block-stellar-content,
body.path-search #block-stellar-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 28px 80px;
  box-sizing: border-box;
}

/* ---------- 搜索页（core 无类名标记：<h2> + <ol><li><h3><a> + <p>×2） ---------- */
body.path-search #block-stellar-content h2 {
  font-size: 22px;
  margin: 36px 0 18px;
  color: var(--text);
  letter-spacing: 0.5px;
}
body.path-search #block-stellar-content ol { list-style: none; margin: 0; padding: 0; }
body.path-search #block-stellar-content ol > li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body.path-search #block-stellar-content ol > li h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: 0.5px; }
body.path-search #block-stellar-content ol > li h3 a { color: var(--text); text-decoration: none; }
body.path-search #block-stellar-content ol > li h3 a:hover { color: var(--cyan); }
body.path-search #block-stellar-content ol > li p { color: var(--dim); font-size: 13.5px; margin: 6px 0 0; line-height: 1.8; }
body.path-search #block-stellar-content ol > li p strong { color: var(--green); font-weight: 700; }
body.path-search #block-stellar-content ol > li p + p {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 12px;
}
body.path-search #block-stellar-content ol > li p + p span { color: var(--green); }

/* ---------- 搜索帮助页（/search/node/help：<h2> + <ul><li> 条目） ---------- */
body.path-search #block-stellar-content ul { list-style: none; margin: 18px 0 0; padding: 0; }
body.path-search #block-stellar-content ul > li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  color: var(--dim);
  font-size: 13.5px;
  line-height: 1.9;
}
body.path-search #block-stellar-content ul > li em,
body.path-search #block-stellar-content ul > li code {
  color: var(--cyan);
  font-style: normal;
  font-family: "SF Mono", Consolas, monospace;
}

/* ---------- 搜索表单里的「关于搜索」链接 ---------- */
.search-help-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--cyan);
  font-family: "SF Mono", Consolas, monospace;
  font-size: 12.5px;
  text-decoration: none;
  letter-spacing: 1px;
}
.search-help-link:hover { text-decoration: underline; }

/* ---------- 评论区标题（content.comment 输出的 <h2>添加新评论</h2>） ---------- */
.comments h2 {
  font-size: 20px;
  letter-spacing: 0.5px;
  margin: 44px 0 16px;
  color: var(--text);
}

/* ============================================================
   Drupal 移植修复（2026-09-05）
   ============================================================ */

/* 1. 包装 div 透明化（容器级，不依赖 field/block 类名）：
      网格容器（.cards/.stats-row/.timeline）内的字段包装 div 透明化，让卡片/统计成为网格直接子元素；
      hero 背景图与卡片缩略图内的包装 div 透明化，让 img 的 width/height:100% 正确填满容器。 */
.cards > div,
.cards > div > div,
.stats-row > div,
.stats-row > div > div,
.timeline > div,
.timeline > div > div,
.entrance-grid > div,
.entrance-grid > div > div,
.hero-img-bg > div,
.thumb > div { display: contents; }

/* 2. 导航区横排：header 区域块（菜单+搜索）被包在一个无类 div 里导致上下堆叠换行，
      让该包装变成 flex 横排即可（.nav-inner > div 只匹配这个包装，logo 是 <a> 不受影响） */
.nav-inner > div { display: flex; align-items: center; gap: 14px; }

/* 3. 搜索框极简胶囊样式 */
.search-block-form { display: flex; align-items: center; gap: 6px; margin: 0; }
.search-block-form .form-item { margin: 0; }
.search-block-form input[type="search"] {
  width: 140px;
  background: rgba(5, 7, 15, 0.6);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  padding: 6px 14px;
  color: var(--text);
  font-size: 12.5px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search-block-form input[type="search"]:focus { border-color: var(--cyan); box-shadow: 0 0 12px var(--glow-cyan); }
.search-block-form .form-actions { margin: 0; }
.search-block-form .form-submit {
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.4);
  color: var(--cyan);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  cursor: pointer;
  transition: background .2s;
}
.search-block-form .form-submit:hover { background: rgba(34, 211, 238, 0.2); }

/* 4. 窄屏（<=900px）导航换列时搜索框自适应 */
@media (max-width: 900px) {
  .nav-inner > div { flex-direction: column; align-items: center; gap: 8px; }
  .search-block-form input[type="search"] { width: 180px; }
}
