/* ===== GEO Blog 前台主题 ===== */
:root {
  --bg: #070b14;
  --bg-2: #0c1322;
  --panel: rgba(13, 21, 37, 0.74);
  --panel-solid: #0f182a;
  --line: rgba(120, 170, 220, 0.14);
  --text: #e6edf6;
  --muted: #8d9cb3;
  --geo-1: #3ee6c4;   /* 经纬线 / 主色 */
  --geo-2: #ffb547;   /* 节点 / 强调色 */
  --link: #6ff0d6;
  --radius: 14px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.75 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--geo-1); color: #000; padding: 6px 12px; border-radius: 6px; }

/* GEO 背景：canvas 地球 + 坐标网格 + 暗角 */
#geo-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; }
.geo-grid { position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(62,230,196,.06), transparent 70%),
    linear-gradient(rgba(120,170,220,.05) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(120,170,220,.05) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--bg);
}
.geo-grid::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 40%, rgba(4,7,13,.85) 100%); }

/* 头部 */
.site-header { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); background: rgba(7,11,20,.7); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: .02em; }
.brand:hover { text-decoration: none; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 15px; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); text-decoration: none; }
.search input { background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 6px 14px; width: 180px; font: inherit; font-size: 14px; outline: none; transition: border-color .2s, width .2s; }
.search input:focus { border-color: var(--geo-1); width: 220px; }
.lang-switch { border: 1px solid var(--line); padding: 3px 12px; border-radius: 999px; font-family: var(--mono); font-size: 13px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 4px 10px; font-size: 18px; }

/* 首屏 */
.hero { padding: 96px 0 56px; max-width: 640px; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--geo-1); margin: 0 0 14px; }
.hero h1 { font-family: var(--serif); font-size: clamp(40px, 6vw, 68px); line-height: 1.08; margin: 0 0 14px; letter-spacing: -.01em; }
.tagline { font-size: 20px; color: var(--geo-2); margin: 0 0 10px; }
.hero-desc { color: var(--muted); margin: 0; }
.list-heading { font-family: var(--serif); font-size: 34px; margin: 28px 0 24px; }

/* 文章卡片 */
.post-list { display: grid; gap: 18px; max-width: 760px; padding-bottom: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: border-color .2s, transform .2s; }
.card:hover { border-color: rgba(62,230,196,.45); transform: translateY(-2px); }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.card-title { font-family: var(--serif); font-size: 23px; line-height: 1.35; margin: 8px 0 6px; }
.card-title a { color: var(--text); }
.card-summary { color: var(--muted); margin: 0 0 10px; }
.chip { display: inline-block; font-size: 12px; padding: 1px 10px; border-radius: 999px; background: rgba(62,230,196,.1); color: var(--geo-1); border: 1px solid rgba(62,230,196,.25); }
.tags { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; }
.tags a { color: var(--muted); }
.empty { color: var(--muted); }
.pager { display: flex; justify-content: space-between; align-items: center; max-width: 760px; margin: 24px 0 48px; }
.pager-num { font-family: var(--mono); color: var(--muted); font-size: 13px; }
.btn { display: inline-block; background: var(--geo-1); color: #04120f; padding: 10px 22px; border-radius: 999px; font-weight: 600; }

/* 面包屑 */
.crumbs { font-size: 13px; color: var(--muted); margin: 28px 0 0; }
.crumbs a { color: var(--muted); }

/* 文章页 */
.post-layout { display: grid; grid-template-columns: minmax(0, 760px) 220px; gap: 48px; align-items: start; }
.post { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 48px; margin: 16px 0 40px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.post-title { font-family: var(--serif); font-size: clamp(30px, 4vw, 42px); line-height: 1.2; margin: 0 0 14px; }
.post-summary { font-size: 18px; color: #b9c6d8; margin: 0 0 16px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 14px; color: var(--muted); padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.draft-flag { font-family: var(--mono); color: var(--geo-2); font-size: 12px; letter-spacing: .2em; }
.cover { border-radius: 10px; margin-top: 20px; }
.stale-note { background: rgba(255,181,71,.08); border: 1px solid rgba(255,181,71,.3); color: var(--geo-2); padding: 10px 14px; border-radius: 10px; font-size: 14px; }

.tldr { margin: 26px 0; padding: 18px 22px 10px; border-left: 3px solid var(--geo-1); background: linear-gradient(90deg, rgba(62,230,196,.08), transparent); border-radius: 0 10px 10px 0; }
.tldr h2 { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--geo-1); margin: 0 0 6px; }
.tldr ul { margin: 0; padding-left: 20px; }
.tldr li { margin-bottom: 6px; }

.prose { font-size: 17px; }
.prose h2, .prose h3 { font-family: var(--serif); line-height: 1.3; margin: 2em 0 .6em; position: relative; scroll-margin-top: 80px; }
.prose h2 { font-size: 27px; } .prose h3 { font-size: 21px; }
.prose .anchor { position: absolute; left: -1em; color: var(--muted); opacity: 0; font-weight: 400; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; text-decoration: none; }
.prose blockquote { margin: 1.5em 0; padding: 4px 20px; border-left: 3px solid var(--geo-2); color: #c8d3e2; background: rgba(255,181,71,.05); border-radius: 0 8px 8px 0; }
.prose code { font-family: var(--mono); font-size: .88em; background: rgba(255,255,255,.06); padding: 2px 6px; border-radius: 5px; }
.prose pre { background: #050911; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose th { background: rgba(62,230,196,.07); }
.prose img { border-radius: 10px; }
.post-tags { margin-top: 28px; }

.faq { margin-top: 40px; }
.faq h2, .cite h2, .related h2 { font-family: var(--serif); font-size: 24px; }
.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 12px 18px; margin-bottom: 10px; background: rgba(255,255,255,.02); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; color: #c2cede; }
.cite { margin-top: 36px; }
.cite p { color: var(--muted); font-size: 14px; }
.cite-box { display: flex; gap: 10px; align-items: stretch; }
.cite-box code { flex: 1; font-family: var(--mono); font-size: 13px; background: #050911; border: 1px solid var(--line); padding: 10px 12px; border-radius: 8px; word-break: break-all; }
.cite-box button { background: transparent; border: 1px solid var(--geo-1); color: var(--geo-1); border-radius: 8px; padding: 0 16px; cursor: pointer; font: inherit; font-size: 14px; }
.author-box { display: flex; gap: 16px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.author-box p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--geo-1), var(--geo-2)); color: #04120f; font-weight: 700; font-size: 20px; }
.muted { color: var(--muted); font-size: 14px; }

.toc-wrap { position: sticky; top: 90px; margin-top: 16px; }
.toc { border-left: 1px solid var(--line); padding-left: 16px; font-size: 14px; }
.toc-title { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; margin: 0 0 8px; }
.toc a { display: block; color: var(--muted); padding: 4px 0; line-height: 1.4; }
.toc a.d3 { padding-left: 12px; font-size: 13px; }
.toc a.active { color: var(--geo-1); }
.related { margin-bottom: 56px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* 页脚 */
.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: rgba(7,11,20,.8); font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 22px 0; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--muted); font-family: var(--mono); font-size: 13px; }

/* ===== JS 跳转框 ===== */
.jm-overlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(3,6,12,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s; }
.jm-overlay.jm-in { opacity: 1; }
.jm-box { position: relative; width: min(420px, 100%); background: var(--panel-solid); border: 1px solid rgba(62,230,196,.35); border-radius: 18px; padding: 30px 28px 24px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.03) inset; transform: translateY(12px) scale(.98); transition: transform .25s; overflow: hidden; }
.jm-in .jm-box { transform: none; }
.jm-box::before { content: ""; position: absolute; left: 50%; top: -120px; width: 360px; height: 240px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(62,230,196,.2), transparent); pointer-events: none; }
.jm-globe { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; border: 2px solid var(--geo-1); position: relative; background:
  linear-gradient(var(--geo-1), var(--geo-1)) center / 100% 1px no-repeat,
  radial-gradient(ellipse 30% 50% at center, transparent 96%, var(--geo-1) 97%, transparent 100%); animation: jm-spin 6s linear infinite; }
.jm-globe::after { content: ""; position: absolute; right: -4px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--geo-2); box-shadow: 0 0 12px var(--geo-2); }
@keyframes jm-spin { to { transform: rotate(360deg); } }
.jm-box h3 { margin: 0 0 8px; font-size: 20px; }
.jm-msg { color: #bccadb; font-size: 15px; line-height: 1.65; }
.jm-url { margin-top: 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); background: #050911; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; word-break: break-all; }
.jm-count { min-height: 1.4em; margin-top: 10px; font-family: var(--mono); font-size: 13px; color: var(--geo-2); }
.jm-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.jm-actions > * { flex: 1; padding: 10px 16px; border-radius: 999px; font: inherit; font-size: 15px; cursor: pointer; text-align: center; }
.jm-cancel { background: transparent; color: var(--text); border: 1px solid var(--line); }
.jm-go { background: var(--geo-1); color: #04120f; font-weight: 600; border: 0; }
.jm-go:hover { text-decoration: none; filter: brightness(1.08); }
.jm-x { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }

/* 响应式 */
@media (max-width: 960px) {
  .post-layout { grid-template-columns: 1fr; }
  .toc-wrap { display: none; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 12px; padding: 16px 20px; background: rgba(7,11,20,.96); border-bottom: 1px solid var(--line); }
  .nav-open .nav { display: flex; }
  .search input, .search input:focus { width: 100%; }
  .hero { padding: 56px 0 32px; }
  .post { padding: 26px 20px; }
  .card { padding: 18px; }
  .cite-box { flex-direction: column; }
  .cite-box button { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
