/* ============================================================
   阿哲实验室 · 设计系统
   暗色玻璃拟态 · 纯静态 · 零依赖
   ============================================================ */

:root {
  --bg: #07070d;
  --bg-soft: #0d0d17;
  --card: rgba(255, 255, 255, 0.042);
  --card-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #eef0ff;
  --text-muted: #a0a6c2;
  --text-dim: #6d7396;
  --c1: #818cf8;
  --c2: #c084fc;
  --c3: #f472b6;
  --grad: linear-gradient(120deg, var(--c1), var(--c2) 55%, var(--c3));
  --radius: 18px;
  --radius-sm: 12px;
  --nav-h: 68px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- 背景：网格 + 噪点 ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* ---------- 漂浮光晕 ---------- */
.orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); animation: float 22s ease-in-out infinite; }
.orb-1 { width: 520px; height: 520px; background: radial-gradient(circle, rgba(129,140,248,.35), transparent 70%); top: -160px; left: -120px; }
.orb-2 { width: 460px; height: 460px; background: radial-gradient(circle, rgba(192,132,252,.28), transparent 70%); top: 8%; right: -140px; animation-delay: -8s; }
.orb-3 { width: 420px; height: 420px; background: radial-gradient(circle, rgba(244,114,182,.22), transparent 70%); bottom: -160px; left: 30%; animation-delay: -15s; }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -30px); } }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- 顶部导航 ---------- */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(7, 7, 13, 0.66);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; letter-spacing: 0.02em; font-size: 17px; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--grad);
  display: grid; place-items: center;
  font-size: 14px; color: #0b0b14;
  box-shadow: 0 4px 14px rgba(129, 140, 248, 0.4);
}
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links a {
  padding: 8px 14px; border-radius: 10px;
  color: var(--text-muted); text-decoration: none;
  font-size: 15px; transition: 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--card-2); }
.nav-links a.active {
  color: var(--text);
  background: rgba(129, 140, 248, 0.14);
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.25);
}
.nav-links .nav-cta {
  padding: 9px 18px !important;
  border-radius: 12px !important;
  background: var(--grad);
  color: #0b0b14 !important;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(192, 132, 252, 0.35);
  margin-left: 6px;
}
.nav-links .nav-cta:hover { transform: translateY(-1px); }
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--border); border-radius: 10px;
  width: 40px; height: 40px; color: var(--text); font-size: 18px; cursor: pointer;
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px 16px 20px;
    background: rgba(7, 7, 13, 0.96);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-links .nav-cta { margin-left: 0; margin-top: 6px; text-align: center; }
}

/* ---------- 通用 ---------- */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 14px;
  font-size: 15.5px; font-weight: 600; text-decoration: none;
  transition: 0.25s; cursor: pointer; border: 1px solid transparent;
}
.btn-primary {
  background: var(--grad); color: #0b0b14;
  box-shadow: 0 10px 30px rgba(192, 132, 252, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(192, 132, 252, 0.5); }
.btn-ghost {
  background: var(--card); border-color: var(--border); color: var(--text);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: var(--card-2); border-color: var(--border-strong); transform: translateY(-2px); }
.btn .arr { transition: transform 0.25s; display: inline-block; }
.btn:hover .arr { transform: translateX(4px); }
.pill {
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: rgba(129, 140, 248, 0.14); color: #a5b4fc;
  border: 1px solid rgba(129, 140, 248, 0.22);
}
.pill.pink { background: rgba(244, 114, 182, 0.12); color: #f9a8d4; border-color: rgba(244, 114, 182, 0.25); }
.pill.green { background: rgba(52, 211, 153, 0.12); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.25); }
.pill.amber { background: rgba(251, 191, 36, 0.12); color: #fcd34d; border-color: rgba(251, 191, 36, 0.25); }

/* ---------- Hero ---------- */
.hero { padding: calc(var(--nav-h) + 96px) 0 72px; text-align: center; position: relative; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 13.5px; letter-spacing: 0.06em;
}
.hero .eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #34d399; box-shadow: 0 0 10px #34d399;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.hero h1 {
  font-size: clamp(38px, 7vw, 66px); font-weight: 800;
  line-height: 1.18; letter-spacing: -0.02em;
  margin: 26px auto 0; max-width: 860px;
}
.hero .sub { max-width: 640px; margin: 22px auto 0; color: var(--text-muted); font-size: 17px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; margin-top: 38px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 12px; justify-content: center; margin-top: 60px; flex-wrap: wrap; }
.stat {
  min-width: 148px; padding: 20px 26px; border-radius: var(--radius-sm);
  background: var(--card); border: 1px solid var(--border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.stat b {
  display: block; font-size: 27px; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { font-size: 13px; color: var(--text-dim); margin-top: 2px; display: block; }

/* ---------- 区块 ---------- */
section { padding: 72px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 38px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; letter-spacing: -0.01em; }
.sec-head .more { color: var(--text-muted); text-decoration: none; font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; transition: 0.2s; }
.sec-head .more:hover { color: var(--text); gap: 10px; }
.sec-tag { display: block; font-size: 12px; letter-spacing: 0.18em; color: var(--c2); text-transform: uppercase; margin-bottom: 10px; font-weight: 600; }

/* ---------- 文章卡片 ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.post-card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 26px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: 0.3s; overflow: hidden;
}
.post-card::before {
  content: ""; position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: var(--grad); opacity: 0; transition: 0.3s;
}
.post-card:hover { transform: translateY(-5px); border-color: var(--border-strong); background: var(--card-2); box-shadow: var(--shadow); }
.post-card:hover::before { opacity: 1; }
.post-card .meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-dim); flex-wrap: wrap; }
.post-card h3 { font-size: 19px; font-weight: 700; line-height: 1.45; }
.post-card p { color: var(--text-muted); font-size: 14.5px; flex: 1; }
.post-card .go { color: var(--c2); font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.post-card:hover .go .arr { transform: translateX(4px); }

/* ---------- 插件卡片 ---------- */
.plugin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.plugin-card {
  display: flex; flex-direction: column; gap: 16px;
  padding: 30px; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(129, 140, 248, 0.10), rgba(244, 114, 182, 0.05)), var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: 0.3s;
}
.plugin-card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.plugin-head { display: flex; align-items: center; gap: 14px; }
.plugin-ico {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; font-size: 24px;
  background: var(--grad);
  box-shadow: 0 8px 24px rgba(192, 132, 252, 0.35);
}
.plugin-head h3 { font-size: 19px; font-weight: 700; line-height: 1.3; }
.plugin-head .who { font-size: 12.5px; color: var(--text-dim); }
.plugin-card .desc { color: var(--text-muted); font-size: 14.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.chip { font-size: 12.5px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); color: var(--text-muted); }
.plugin-links { display: flex; gap: 10px; margin-top: 8px; }

/* 价格展示 */
.price { margin-top: 2px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price b { font-size: 26px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -0.01em; }
.price span { font-size: 13px; color: var(--text-dim); font-weight: 500; }

/* ---------- 页面头（列表页/详情页） ---------- */
.page-head { padding: calc(var(--nav-h) + 80px) 0 8px; text-align: center; }
.page-head h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; letter-spacing: -0.02em; }
.page-head .sub { color: var(--text-muted); margin-top: 14px; max-width: 580px; margin-left: auto; margin-right: auto; font-size: 16px; }

/* ---------- 文章正文 ---------- */
.article { max-width: 780px; margin: 0 auto; padding: 0 24px calc(var(--nav-h) + 60px); }
.article .back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-muted); text-decoration: none; font-size: 14px;
  margin-bottom: 28px; transition: 0.2s;
}
.article .back:hover { color: var(--text); gap: 10px; }
.article h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 800; line-height: 1.3; letter-spacing: -0.015em; margin-bottom: 18px; }
.article .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--text-dim); font-size: 13.5px; padding-bottom: 26px; border-bottom: 1px solid var(--border); margin-bottom: 34px; }
.article-body { font-size: 16.5px; color: #d7daf0; }
.article-body h2 { font-size: 24px; font-weight: 700; margin: 46px 0 16px; padding-left: 14px; position: relative; }
.article-body h2::before { content: ""; position: absolute; left: 0; top: 0.35em; bottom: 0.35em; width: 4px; border-radius: 4px; background: var(--grad); }
.article-body h3 { font-size: 19px; font-weight: 700; margin: 32px 0 12px; color: var(--text); }
.article-body p { margin: 16px 0; }
.article-body ul, .article-body ol { margin: 16px 0; padding-left: 22px; }
.article-body li { margin: 8px 0; }
.article-body li::marker { color: var(--c2); }
.article-body strong { color: var(--text); font-weight: 700; }
.article-body a { color: #a5b4fc; text-decoration: none; border-bottom: 1px solid rgba(165, 180, 252, 0.35); }
.article-body a:hover { border-bottom-color: #a5b4fc; }
.article-body code { font-family: var(--mono); font-size: 0.88em; background: rgba(129, 140, 248, 0.12); color: #c7d2fe; padding: 2px 7px; border-radius: 7px; }
.article-body pre { background: #0a0a13; border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; overflow-x: auto; margin: 20px 0; font-size: 14px; line-height: 1.65; }
.article-body pre code { background: none; padding: 0; color: #d6d9f0; font-size: 0.95em; }
.article-body blockquote { border-left: 3px solid var(--c2); background: rgba(192, 132, 252, 0.07); padding: 14px 20px; border-radius: 0 12px 12px 0; margin: 20px 0; color: var(--text-muted); }
.article-body table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14.5px; }
.article-body th, .article-body td { padding: 11px 14px; border: 1px solid var(--border); text-align: left; }
.article-body th { background: rgba(255, 255, 255, 0.05); color: var(--text); font-weight: 600; }
.article-body tr:nth-child(2n) td { background: rgba(255, 255, 255, 0.02); }
.article-body hr { border: none; border-top: 1px dashed var(--border-strong); margin: 36px 0; }

/* 踩坑卡片 */
.pit { display: grid; gap: 14px; margin: 24px 0; }
.pit-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.pit-card b { display: block; margin-bottom: 6px; font-size: 15px; }
.pit-card b .no { color: var(--c2); margin-right: 8px; font-family: var(--mono); font-size: 13px; }
.pit-card p { margin: 4px 0 !important; font-size: 14.5px !important; color: var(--text-muted); }
.pit-card .fix { color: #6ee7b7 !important; }

/* 关于页 */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 24px; max-width: 780px; margin: 40px auto 0; }
.about-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.about-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.about-card p { color: var(--text-muted); font-size: 15px; }
.skill-bars { display: grid; gap: 16px; margin-top: 6px; }
.skill-bar .row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.skill-bar .row b { font-weight: 600; }
.skill-bar .row span { color: var(--text-dim); }
.skill-bar .track { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.skill-bar .fill { height: 100%; border-radius: 999px; background: var(--grad); width: 0; transition: width 1s ease; }

/* ---------- 页脚 ---------- */
#site-footer { border-top: 1px solid var(--border); padding: 48px 0 42px; margin-top: 40px; }
#site-footer .container { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
#site-footer .note { color: var(--text-dim); font-size: 13.5px; }
#site-footer .links { display: flex; gap: 18px; }
#site-footer a { color: var(--text-muted); text-decoration: none; font-size: 14px; transition: 0.2s; }
#site-footer a:hover { color: var(--text); }

/* ---------- 回到顶部 ---------- */
.back-top {
  position: fixed; right: 26px; bottom: 26px;
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--card-2); border: 1px solid var(--border-strong);
  color: var(--text); font-size: 18px; cursor: pointer;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: 0.3s; z-index: 40;
}
.back-top.show { opacity: 1; pointer-events: auto; transform: none; }
.back-top:hover { background: var(--grad); color: #0b0b14; border-color: transparent; }

/* ---------- 滚动渐入（无 JS 时内容直接可见） ---------- */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- 手机端优化（≤640px） ---------- */
@media (max-width: 640px) {
  .container { padding: 0 18px; }
  section { padding: 52px 0; }
  .hero { padding: calc(var(--nav-h) + 64px) 0 52px; }
  .hero .sub { font-size: 15.5px; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 44px; }
  .stat { min-width: 0; padding: 16px 18px; }
  .stat b { font-size: 24px; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 26px; }
  .sec-head .more { align-self: flex-start; }
  .post-grid, .plugin-grid { gap: 14px; }
  .post-card, .plugin-card { padding: 20px; }
  .plugin-ico { width: 44px; height: 44px; font-size: 20px; border-radius: 12px; }

  /* 页面头 */
  .page-head { padding: calc(var(--nav-h) + 56px) 0 4px; }

  /* 文章正文 */
  .article { padding: 0 18px calc(var(--nav-h) + 40px); }
  .article h1 { font-size: 26px; }
  .article-body { font-size: 15.5px; }
  .article-body h2 { font-size: 21px; margin: 36px 0 12px; }
  .article-body h3 { font-size: 17.5px; }
  .article-body pre { padding: 14px 16px; font-size: 13px; }
  /* 表格窄屏可横向滑动，不把页面撑破 */
  .article-body table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }

  /* 关于页 */
  .about-grid { margin-top: 28px; }
  .about-card { padding: 22px 20px; }
  .skill-bar .row { flex-direction: column; gap: 2px; }

  /* 页脚 */
  #site-footer .container { flex-direction: column; align-items: center; text-align: center; gap: 12px; }

  /* 回到顶部 */
  .back-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
}

/* ---------- 无障碍 ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
