/* ============================================================
   wangwang.asia · 汪汪的小站
   Theme: Neon Terminal / Cyber Paw
   ============================================================ */

:root {
  --bg: #04060c;
  --bg2: #070b16;
  --panel: rgba(13, 20, 38, .55);
  --panel-solid: #0a1120;
  --line: rgba(120, 160, 255, .14);
  --line-strong: rgba(0, 229, 255, .35);
  --cyan: #00e5ff;
  --blue: #4d7cff;
  --purple: #a855f7;
  --pink: #ff3d81;
  --green: #3ddc97;
  --orange: #ffb454;
  --text: #e9f0fb;
  --muted: #8b97ad;
  --grad: linear-gradient(135deg, var(--cyan), var(--blue) 45%, var(--purple));
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", "Fira Code", "SF Mono", Consolas, "Liberation Mono", monospace;
  --radius: 16px;
  --nav-h: 64px;
}

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

html { scroll-behavior: smooth; }

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

::selection { background: rgba(0, 229, 255, .3); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1a2440; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #24335c; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font-family: inherit; }

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

/* ---------- 背景层 ---------- */
#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(77, 124, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 124, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 78%);
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse 600px 420px at 12% -6%, rgba(0, 229, 255, .12), transparent 65%),
    radial-gradient(ellipse 640px 460px at 92% 12%, rgba(168, 85, 247, .12), transparent 65%),
    radial-gradient(ellipse 700px 500px at 50% 115%, rgba(77, 124, 255, .10), transparent 70%);
}

/* ---------- 顶部导航 ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(4, 6, 12, .78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .02em;
}

.logo .logo-paw {
  width: 30px;
  height: 30px;
  padding: 5px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(0, 229, 255, .16), rgba(168, 85, 247, .16));
  border: 1px solid var(--line-strong);
  color: var(--cyan);
  box-shadow: 0 0 16px rgba(0, 229, 255, .25);
}

.logo .domain { color: var(--text); }
.logo .domain em { color: var(--cyan); font-style: normal; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  position: relative;
  font-size: 14.5px;
  color: var(--muted);
  padding: 6px 2px;
  transition: color .25s;
}

.nav-links a:hover { color: var(--text); }

.nav-links a.active { color: var(--text); }

.nav-links a.active::after,
.nav-links a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  box-shadow: 0 0 10px rgba(0, 229, 255, .6);
}

.nav-links a .idx {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cyan);
  margin-right: 4px;
  opacity: .8;
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-burger span {
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .3s, opacity .3s;
}

.nav-burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.active span:nth-child(2) { opacity: 0; }
.nav-burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 按钮 / 标签 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .25s, box-shadow .25s, background .25s, border-color .25s, color .25s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad);
  color: #04060c;
  box-shadow: 0 0 24px rgba(0, 229, 255, .35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 34px rgba(0, 229, 255, .5);
}

.btn-ghost {
  background: rgba(255, 255, 255, .03);
  border-color: var(--line);
  color: var(--text);
  font-family: var(--mono);
  font-weight: 500;
}

.btn-ghost:hover {
  border-color: var(--line-strong);
  background: rgba(0, 229, 255, .07);
  transform: translateY(-2px);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 3px 11px;
  border-radius: 999px;
  border: 1px solid;
  letter-spacing: .03em;
  white-space: nowrap;
}

.tag::before { content: "#"; opacity: .6; }

.tag-cyan   { color: var(--cyan);   border-color: rgba(0, 229, 255, .35);  background: rgba(0, 229, 255, .08); }
.tag-purple { color: #c084fc;       border-color: rgba(168, 85, 247, .4);  background: rgba(168, 85, 247, .1); }
.tag-pink   { color: #ff6ba0;       border-color: rgba(255, 61, 129, .4);  background: rgba(255, 61, 129, .1); }
.tag-green  { color: var(--green);  border-color: rgba(61, 220, 151, .4);  background: rgba(61, 220, 151, .09); }
.tag-orange { color: var(--orange); border-color: rgba(255, 180, 84, .4);  background: rgba(255, 180, 84, .09); }
.tag-draft  { color: var(--muted);  border-color: var(--line);             background: rgba(255, 255, 255, .03); }

/* ---------- 玻璃卡片（鼠标聚光灯） ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(0, 229, 255, .1), transparent 65%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45), 0 0 24px rgba(0, 229, 255, .08);
}

.card:hover::after { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: calc(var(--nav-h) + 40px) 24px 80px;
  overflow: hidden;
}

.hero-bg-word {
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(72px, 16vw, 220px);
  line-height: 1;
  letter-spacing: .06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 229, 255, .1);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.hero > .container { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--cyan);
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 229, 255, .06);
  letter-spacing: .08em;
  margin-bottom: 30px;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.8); }
}

.hero-title {
  font-size: clamp(34px, 6.4vw, 64px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: .01em;
  text-shadow: 0 0 46px rgba(0, 229, 255, .22);
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: clamp(15px, 2.4vw, 19px);
  color: var(--muted);
  min-height: 1.8em;
}

.hero-sub .prompt { color: var(--green); margin-right: 10px; }

.caret {
  display: inline-block;
  width: 9px;
  height: 1.15em;
  margin-left: 3px;
  vertical-align: text-bottom;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-desc {
  margin-top: 16px;
  max-width: 560px;
  color: var(--muted);
  font-size: 15.5px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 38px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-stats {
  display: flex;
  gap: clamp(28px, 6vw, 64px);
  margin-top: 58px;
}

.stat { text-align: center; }

.stat b {
  display: block;
  font-family: var(--mono);
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: .06em;
}

.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .2em;
  animation: float 2.4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- 通用 Section ---------- */
.section { padding: 96px 0; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.sec-idx {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0, 229, 255, .5);
}

.section-head h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 700; }

.sec-en {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-left: auto;
}

.sec-line {
  width: 64px;
  height: 3px;
  border-radius: 3px;
  background: var(--grad);
  box-shadow: 0 0 14px rgba(0, 229, 255, .5);
  margin-bottom: 40px;
}

.section-alt { background: linear-gradient(180deg, rgba(13, 20, 38, .25), transparent); }

/* ---------- 文章卡片 ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 24px 22px;
  min-height: 230px;
}

.pc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pc-top time {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.pc-title { font-size: 17.5px; font-weight: 700; line-height: 1.5; }

.pc-title a { transition: color .25s; }

.pc-title a:hover { color: var(--cyan); }

.pc-excerpt {
  font-size: 14px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pc-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

.pc-arrow { color: var(--cyan); opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s; }

.post-card:hover .pc-arrow { opacity: 1; transform: translateX(0); }

.more-wrap { text-align: center; margin-top: 44px; }

/* ---------- 技术栈跑马灯 ---------- */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  padding: 10px 0;
}

.marquee-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.mq-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .02);
  white-space: nowrap;
  transition: color .25s, border-color .25s;
}

.mq-item:hover { color: var(--cyan); border-color: var(--line-strong); }

.mq-item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 8px rgba(0, 229, 255, .6);
}

/* ---------- 首页关于预览 ---------- */
.about-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }

.ap-left p { color: var(--muted); font-size: 15.5px; margin-top: 18px; }

.ap-list { list-style: none; margin-top: 22px; display: grid; gap: 12px; }

.ap-list li { display: flex; gap: 12px; font-size: 15px; color: #c6d2e6; }

.ap-list li::before {
  content: "▸";
  font-family: var(--mono);
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(0, 229, 255, .6);
}

.ap-left .more-wrap { text-align: left; margin-top: 30px; }

/* 仿终端窗口 */
.term {
  font-family: var(--mono);
  font-size: 13.5px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(7, 11, 22, .85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5), 0 0 30px rgba(0, 229, 255, .06);
}

.term-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
}

.term-dot { width: 11px; height: 11px; border-radius: 50%; }
.term-dot:nth-child(1) { background: #ff5f56; }
.term-dot:nth-child(2) { background: #ffbd2e; }
.term-dot:nth-child(3) { background: #27c93f; }

.term-title { margin-left: 10px; font-size: 12px; color: var(--muted); }

.term-body { padding: 20px 22px; display: grid; gap: 10px; }

.term-line { color: #c6d2e6; word-break: break-all; }
.term-line .p { color: var(--green); }
.term-line .out { color: var(--muted); }
.term-line .hl { color: var(--cyan); }

/* ---------- 联系卡片 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 28px 16px;
}

.cc-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--cyan);
  background: rgba(0, 229, 255, .08);
  border: 1px solid var(--line);
  margin-bottom: 6px;
  transition: box-shadow .3s, transform .3s;
}

.contact-card:hover .cc-icon { box-shadow: 0 0 20px rgba(0, 229, 255, .3); transform: scale(1.06); }

.cc-name { font-weight: 700; font-size: 15px; }

.cc-handle { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 36px;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(13, 20, 38, .5));
}

.footer .f1 { font-size: 14px; color: var(--text); }
.footer .f1 em { font-style: normal; color: var(--cyan); font-family: var(--mono); }
.footer .f2 { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.footer .f2 .heart { color: var(--pink); text-shadow: 0 0 10px rgba(255, 61, 129, .6); }
.footer .f3 { font-family: var(--mono); font-size: 11.5px; color: #55617a; margin-top: 14px; }

/* ---------- 子页面头 ---------- */
.page-head {
  padding: calc(var(--nav-h) + 72px) 0 56px;
  text-align: center;
  position: relative;
}

.crumb {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  letter-spacing: .05em;
}

.crumb a { color: var(--cyan); }
.crumb a:hover { text-decoration: underline; }

.page-head h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; }

.page-head .sub { margin-top: 14px; color: var(--muted); font-size: 15px; }
.page-head .sub .sep { margin: 0 10px; color: #3a4763; }

/* ---------- 归档时间线 ---------- */
.filters {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 52px;
}

.filters button {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  padding: 7px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
  cursor: pointer;
  transition: all .25s;
}

.filters button:hover { color: var(--text); border-color: var(--line-strong); }

.filters button.active {
  background: var(--grad);
  color: #04060c;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 0 18px rgba(0, 229, 255, .35);
}

.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 34px;
  border-left: 1px solid var(--line);
}

.year-label {
  position: relative;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(0, 229, 255, .5);
  margin: 8px 0 22px -50px;
}

.year-label::before {
  content: "";
  position: absolute;
  left: 33px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.tl-item {
  position: relative;
  display: flex;
  gap: 20px;
  padding: 16px 18px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: background .25s, border-color .25s, transform .25s;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -39px;
  top: 28px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2a3a66;
  box-shadow: 0 0 0 3px rgba(77, 124, 255, .12);
  transition: background .25s, box-shadow .25s;
}

.tl-item:hover { background: rgba(255, 255, 255, .025); border-color: var(--line); transform: translateX(4px); }
.tl-item:hover::before { background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }

.tl-item.hide { display: none; }

.tl-time {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  padding-top: 4px;
  min-width: 52px;
}

.tl-main h3 { font-size: 16.5px; font-weight: 700; line-height: 1.5; }
.tl-main p { font-size: 13.5px; color: var(--muted); margin-top: 5px; }
.tl-main .tag { margin-top: 10px; }
.tl-item a.tl-link { display: flex; gap: 20px; width: 100%; }

.tl-item.draft { opacity: .62; }
.tl-item.draft .tl-main h3 { color: var(--muted); }

/* ---------- 关于页 ---------- */
.profile {
  display: flex;
  align-items: center;
  gap: 40px;
  max-width: 760px;
  margin: 0 auto 72px;
  text-align: left;
}

.avatar-ring {
  position: relative;
  width: 132px;
  height: 132px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(0, 229, 255, .2), rgba(168, 85, 247, .2));
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 40px rgba(0, 229, 255, .2);
  animation: ringPulse 3.6s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(0, 229, 255, .18); }
  50% { box-shadow: 0 0 55px rgba(168, 85, 247, .3); }
}

.avatar-ring svg { width: 74px; height: 74px; }

.profile-info h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; }

.profile-info .handle {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--cyan);
  margin-top: 4px;
}

.profile-info .bio { margin-top: 14px; color: var(--muted); font-size: 15px; }

.meta-row { display: flex; gap: 22px; margin-top: 18px; flex-wrap: wrap; }

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

.meta-item svg { width: 14px; height: 14px; color: var(--cyan); }

.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }

.mini-card { padding: 26px 22px; }

.mc-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--purple);
  background: rgba(168, 85, 247, .1);
  border: 1px solid rgba(168, 85, 247, .3);
  margin-bottom: 14px;
}

.mini-card h3 { font-size: 16px; margin-bottom: 8px; }
.mini-card p { font-size: 13.5px; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.chip {
  font-family: var(--mono);
  font-size: 13px;
  color: #c6d2e6;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
  transition: all .25s;
  cursor: default;
}

.chip:hover {
  color: var(--cyan);
  border-color: var(--line-strong);
  box-shadow: 0 0 14px rgba(0, 229, 255, .18);
  transform: translateY(-2px);
}

/* ---------- 文章页 ---------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  background: transparent;
}

#progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(0, 229, 255, .7);
}

.post-hero {
  padding: calc(var(--nav-h) + 76px) 0 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.post-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 640px 320px at 50% 0%, rgba(0, 229, 255, .1), transparent 70%);
  pointer-events: none;
}

.post-hero .container { position: relative; }

.back {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 30px;
  transition: color .25s;
}

.back:hover { color: var(--cyan); }

.post-hero h1 {
  font-size: clamp(26px, 4.4vw, 42px);
  font-weight: 800;
  line-height: 1.35;
  max-width: 820px;
  margin: 0 auto;
}

.post-meta {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.post-meta .sep { color: #3a4763; }
.post-meta .author { color: var(--cyan); }

.post-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 24px 32px;
  font-size: 16.5px;
  line-height: 1.95;
  color: #cfd9ea;
}

.post-content > *:first-child { margin-top: 0; }

.post-content h2 {
  position: relative;
  margin: 2.2em 0 1em;
  padding-left: 16px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  border-left: 3px solid;
  border-image: linear-gradient(180deg, var(--cyan), var(--purple)) 1;
}

.post-content h3 {
  margin: 1.9em 0 .8em;
  font-size: 19px;
  color: var(--text);
}

.post-content h3::before {
  content: "// ";
  font-family: var(--mono);
  color: var(--cyan);
  opacity: .75;
}

.post-content p { margin: 1.1em 0; }

.post-content a {
  color: var(--cyan);
  border-bottom: 1px dashed rgba(0, 229, 255, .5);
  transition: border-color .2s;
}

.post-content a:hover { border-bottom-style: solid; }

.post-content ul, .post-content ol { margin: 1.1em 0; padding-left: 26px; }

.post-content li { margin: .5em 0; }
.post-content li::marker { color: var(--cyan); }

.post-content strong { color: var(--text); }

.post-content blockquote {
  margin: 1.6em 0;
  padding: 16px 22px;
  background: rgba(0, 229, 255, .05);
  border-left: 3px solid var(--cyan);
  border-radius: 0 14px 14px 0;
  color: var(--muted);
}

.post-content blockquote p { margin: .3em 0; }

.post-content code:not(pre code) {
  font-family: var(--mono);
  font-size: .84em;
  color: #7fe9ff;
  background: rgba(0, 229, 255, .09);
  border: 1px solid rgba(0, 229, 255, .16);
  padding: 2px 7px;
  border-radius: 7px;
  word-break: break-word;
}

.code-block {
  margin: 1.7em 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #070d1a;
  overflow: hidden;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .35);
}

.code-block figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
}

.code-lang {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.code-lang::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 8px rgba(0, 229, 255, .6);
}

.copy-btn {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  padding: 3px 12px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  transition: all .2s;
}

.copy-btn:hover { color: var(--cyan); border-color: var(--line-strong); }
.copy-btn.ok { color: var(--green); border-color: rgba(61, 220, 151, .5); }

.code-block pre {
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.75;
  color: #d7e2f5;
}

.code-block code { font-family: inherit; }

.tok-k { color: #c792ea; }   /* keyword */
.tok-s { color: #a5e08b; }   /* string */
.tok-c { color: #5c6a8a; font-style: italic; } /* comment */
.tok-f { color: #7fd4ff; }   /* function */
.tok-n { color: #ffb454; }   /* number */
.tok-p { color: #ff8fb3; }   /* punct/prop */

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.7em 0;
  font-size: 14.5px;
}

/* 文章配图 */
.img-block { margin: 1.9em 0; }

.img-block img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 13px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .35);
}

.img-block figcaption {
  margin-top: 10px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

/* 原始笔记折叠区 */
details.note-orig {
  margin: 2.2em 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(7, 13, 26, .6);
  overflow: hidden;
}

details.note-orig summary {
  cursor: pointer;
  padding: 14px 20px;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--cyan);
  list-style: none;
  user-select: none;
}

details.note-orig summary::-webkit-details-marker { display: none; }
details.note-orig summary::before { content: "▸ "; }
details.note-orig[open] summary::before { content: "▾ "; }
details.note-orig summary:hover { color: #fff; }

details.note-orig .note-scroll {
  max-height: 72vh;
  overflow-y: auto;
  padding: 0 14px 14px;
}

details.note-orig .note-scroll img {
  width: 100%;
  border-radius: 10px;
}

.post-content th, .post-content td {
  border: 1px solid var(--line);
  padding: 11px 16px;
  text-align: left;
}

.post-content th { background: rgba(0, 229, 255, .07); color: var(--text); font-weight: 600; }
.post-content tr:hover td { background: rgba(255, 255, 255, .02); }

.post-tags {
  display: flex;
  gap: 12px;
  max-width: 780px;
  margin: 0 auto;
  padding: 8px 24px 20px;
  flex-wrap: wrap;
}

.end-mark {
  text-align: center;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .4em;
  padding: 26px 0 10px;
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  max-width: 780px;
  margin: 30px auto 0;
  padding: 0 24px 84px;
}

.pn-card { padding: 18px 20px; display: block; }

.pn-label {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .1em;
  margin-bottom: 8px;
}

.pn-card h4 { font-size: 15px; line-height: 1.55; transition: color .25s; }
.pn-card:hover h4 { color: var(--cyan); }
.pn-card.next { text-align: right; }
.pn-card.empty { visibility: hidden; }

/* ---------- 404 ---------- */
.nf-wrap {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.nf-code {
  font-family: var(--mono);
  font-size: clamp(80px, 18vw, 150px);
  font-weight: 700;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 60px rgba(0, 229, 255, .25);
}

.nf-msg { margin-top: 20px; font-size: 18px; }
.nf-sub { margin-top: 10px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.nf-wrap .btn { margin-top: 34px; }

/* ---------- 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(10, 17, 32, .8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--cyan);
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .3s, transform .3s, box-shadow .3s;
  z-index: 40;
}

.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { box-shadow: 0 0 18px rgba(0, 229, 255, .35); }

/* ---------- 入场动画 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .about-preview { grid-template-columns: 1fr; gap: 36px; }
  .profile { flex-direction: column; text-align: center; }
  .meta-row { justify-content: center; }
  .mini-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-burger { display: flex; }

  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 24px 18px;
    background: rgba(4, 6, 12, .96);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }

  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 4px; border-bottom: 1px dashed rgba(120, 160, 255, .1); }
  .nav-links a.active::after, .nav-links a:hover::after { display: none; }
  .nav-links a.active { color: var(--cyan); }

  .post-grid { grid-template-columns: 1fr; }
  .post-card { min-height: 0; }
  .hero-stats { gap: 34px; }
  .sec-en { display: none; }
  .tl-item { flex-direction: column; gap: 6px; }
  .post-nav { grid-template-columns: 1fr; }
  .pn-card.next { text-align: left; }
}
