:root {
  --bg: #0b0c0e;
  --bg-soft: #111317;
  --nav-bg: rgba(11, 12, 14, .66);
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .18);
  --fg: #e9ecef;
  --fg-dim: #9aa1ab;
  --fg-faint: #6b727c;
  --accent: #6c8cff;
  --accent-soft: rgba(108, 140, 255, .12);
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --glass: rgba(255, 255, 255, .045);
  --glass-hi: rgba(255, 255, 255, .075);
  --glass-brd: rgba(255, 255, 255, .11);
  --glass-shadow: 0 20px 50px -30px rgba(0, 0, 0, .85);
}

html[data-theme="light"] {
  --bg: #f4f5f7;
  --bg-soft: #ffffff;
  --nav-bg: rgba(250, 250, 252, .72);
  --line: rgba(0, 0, 0, .1);
  --line-strong: rgba(0, 0, 0, .2);
  --fg: #14161a;
  --fg-dim: #5b626b;
  --fg-faint: #8b929b;
  --accent: #3d5afe;
  --accent-soft: rgba(61, 90, 254, .09);
  --glass: rgba(255, 255, 255, .6);
  --glass-hi: rgba(255, 255, 255, .82);
  --glass-brd: rgba(255, 255, 255, .9);
  --glass-shadow: 0 20px 44px -30px rgba(20, 30, 60, .35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(680px 520px at 16% 10%, rgba(108, 140, 255, .17), transparent 62%),
    radial-gradient(560px 460px at 84% 4%, rgba(167, 139, 250, .14), transparent 62%),
    radial-gradient(760px 560px at 60% 98%, rgba(255, 159, 69, .09), transparent 62%);
  background-attachment: fixed;
  color: var(--fg);
  font: 16px/1.68 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}
html[data-theme="light"] body {
  background-image:
    radial-gradient(680px 520px at 16% 10%, rgba(108, 140, 255, .2), transparent 62%),
    radial-gradient(560px 460px at 84% 4%, rgba(167, 139, 250, .16), transparent 62%),
    radial-gradient(760px 560px at 60% 98%, rgba(255, 159, 69, .12), transparent 62%);
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 14px; letter-spacing: .06em; font-weight: 600; }
.brand i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 2.6s ease-in-out infinite; }
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--fg-dim); }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--fg); }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: 9px; color: var(--fg-dim);
  transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--line-strong); color: var(--fg); }
.icon-btn svg { width: 16px; height: 16px; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 96px 0 88px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 65% 55% at 45% 35%, #000 25%, transparent 72%);
  mask-image: radial-gradient(ellipse 65% 55% at 45% 35%, #000 25%, transparent 72%);
  opacity: .45;
  animation: gridBreath 10s ease-in-out infinite;
}
@keyframes gridBreath {
  0%, 100% { opacity: .32; }
  50% { opacity: .62; }
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  padding: 5px 11px; border-radius: 999px; margin-bottom: 26px;
}
h1 { font-size: clamp(38px, 5.6vw, 58px); line-height: 1.14; font-weight: 600; letter-spacing: -.035em; }
.lede { margin-top: 22px; font-size: 16.5px; color: var(--fg-dim); max-width: 44ch; line-height: 1.75; }
.actions { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px; font-size: 14.5px; font-weight: 500;
  background: var(--fg); color: var(--bg); border: 1px solid var(--fg);
  transition: transform .18s ease, opacity .18s;
}
.btn:hover { transform: translateY(-1px); opacity: .9; }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--bg-soft); }

/* ---------- terminal ---------- */
.term {
  position: relative; overflow: hidden;
  border: 1px solid var(--glass-brd); border-radius: var(--radius);
  background: var(--glass-hi);
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  box-shadow: 0 30px 70px -34px rgba(0, 0, 0, .75);
}
.term::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(61, 220, 151, .055) 50%, transparent 62%);
  transform: translateX(-100%);
  animation: sweep 7s ease-in-out infinite;
}
html[data-theme="light"] .term { box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .18); }
html[data-theme="light"] .term::after {
  background: linear-gradient(105deg, transparent 38%, rgba(15, 157, 99, .05) 50%, transparent 62%);
}
@keyframes sweep {
  0%, 55% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* 角落电路走线（纯装饰，低透明度，不承载数据） */
.term-deco {
  position: absolute; top: 38px; right: 0; z-index: 0;
  width: 220px; height: 140px; pointer-events: none;
  opacity: .2;
}
.term-deco path {
  fill: none; stroke: var(--accent); stroke-width: 1;
  stroke-dasharray: 5 7;
  animation: dashmove 4.5s linear infinite;
}
.term-deco path:nth-of-type(2) {
  animation-duration: 7s;
  animation-direction: reverse;
  opacity: .7;
}
@keyframes dashmove { to { stroke-dashoffset: -24; } }
.term-deco circle {
  fill: var(--accent); opacity: .5;
  animation: nodepulse 3.2s ease-in-out infinite;
}
.term-deco circle:nth-of-type(2) { animation-delay: 1s; }
.term-deco circle:nth-of-type(3) { animation-delay: 2s; }
@keyframes nodepulse {
  0%, 100% { opacity: .25; }
  50% { opacity: .85; }
}

.term-bar {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 7px; padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em;
  color: var(--fg-faint);
}
.term-bar i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.term-bar i:nth-child(1) { background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 6px; }
.term-live {
  margin-left: auto; font-style: normal; font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); padding: 2px 9px; border-radius: 999px;
  background: var(--accent-soft);
  display: inline-flex; align-items: center; gap: 5px;
}
.term-live::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); animation: pulse 1.8s ease-in-out infinite;
}

.term-body {
  position: relative; z-index: 1;
  padding: 20px 20px 22px;
  font-family: var(--mono); font-size: 12.8px; line-height: 1.9;
}
.term-body .p { color: var(--accent); margin-right: 9px; }
.term-cmd { color: var(--fg-dim); }
.term-out {
  color: var(--fg); padding-left: 17px; font-size: 14px;
  letter-spacing: .02em; transition: opacity .5s ease;
}

.term-kv {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin: 18px 0 12px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.term-kv > div { padding: 11px 0 12px; }
.term-kv dt {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  color: var(--fg-faint); margin-bottom: 5px;
}
.term-kv dd {
  font-family: var(--mono); font-size: 20px; font-weight: 500; margin: 0;
  color: var(--fg); letter-spacing: .02em; font-variant-numeric: tabular-nums;
}

.term-latest {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 0 4px;
  font-size: 12.5px; color: var(--fg-faint);
}
.term-latest .dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); animation: pulse 2.4s ease-in-out infinite;
}
.term-latest .dot.dim { background: var(--fg-faint); animation: none; }
.term-latest .lbl { letter-spacing: .04em; }
.term-latest a { color: var(--fg); border-bottom: 1px solid transparent; transition: color .16s; }
.term-latest a:hover {
  color: var(--accent);
  border-bottom-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.term-latest .sep, .term-latest .who { color: var(--fg-faint); }
.term-latest time { margin-left: auto; font-family: var(--mono); font-size: 11.5px; }

.caret { display: inline-block; width: 7px; height: 14px; background: var(--accent); vertical-align: -2px; animation: blink 1.1s steps(1) infinite; }

/* ---------- sections ---------- */
.sec { padding: 76px 0; border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 34px; }
.sec-head h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.sec-head em { font-family: var(--mono); font-size: 12px; color: var(--fg-faint); font-style: normal; letter-spacing: .06em; }
.sec-link {
  margin-left: auto; font-family: var(--mono); font-size: 12px;
  color: var(--fg-faint); transition: color .16s;
}
.sec-link:hover { color: var(--accent); }

/* ---------- 写作热力图 ---------- */
.heat { display: flex; gap: 3px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: thin; }
.hcol { display: flex; flex-direction: column; gap: 3px; flex-shrink: 0; }
.hd {
  width: 11px; height: 11px; border-radius: 2px; display: block; flex-shrink: 0;
  background: var(--line);
  transition: transform .15s ease, background .2s;
}
.hd:hover { transform: scale(1.4); }
.hd.fut { opacity: .3; }
.hd.lv1 { background: color-mix(in srgb, var(--accent) 26%, var(--line)); }
.hd.lv2 { background: color-mix(in srgb, var(--accent) 48%, var(--line)); }
.hd.lv3 { background: color-mix(in srgb, var(--accent) 72%, var(--line)); }
.hd.lv4 { background: var(--accent); }
.heat-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; font-family: var(--mono); font-size: 11.5px; color: var(--fg-faint);
}
.heat-foot .lg { display: flex; align-items: center; gap: 3px; letter-spacing: .04em; }
.heat-foot .lg i { width: 9px; height: 9px; margin: 0 1px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; background: var(--glass);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-color: var(--glass-brd);
  box-shadow: var(--glass-shadow);
  transition: border-color .24s ease, transform .24s ease;
  display: flex; flex-direction: column; min-height: 186px;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--pc); opacity: .5;
  transition: opacity .24s, box-shadow .24s;
}
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 82% -12%,
    color-mix(in srgb, var(--pc) 15%, transparent), transparent 62%);
  opacity: 0; transition: opacity .28s;
}
.card:hover {
  border-color: color-mix(in srgb, var(--pc) 42%, transparent);
  transform: translateY(-4px);
}
.card:hover::before { opacity: 1; box-shadow: 0 0 14px var(--pc); }
.card:hover::after { opacity: 1; }

.card-bignum {
  position: absolute; right: 8px; top: -10px;
  font-family: var(--mono); font-size: 66px; font-weight: 700;
  line-height: 1; letter-spacing: -.06em;
  color: var(--pc); opacity: .07;
  pointer-events: none;
  transition: opacity .28s, transform .28s;
}
.card:hover .card-bignum { opacity: .15; transform: translateY(2px); }

.card-cover {
  display: block; width: calc(100% + 44px);
  margin: -22px -22px 16px;
  aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: 13px 13px 0 0;
}
.card-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; min-height: 20px;
}
.tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  color: color-mix(in srgb, var(--pc) 68%, var(--fg));
  background: color-mix(in srgb, var(--pc) 13%, transparent);
  padding: 3px 9px; border-radius: 6px;
}
.card h3 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; line-height: 1.45; }
.card h3 a { transition: color .18s; }
.card:hover h3 a { color: var(--pc); }
.card p { font-size: 13.8px; color: var(--fg-dim); margin-top: 9px; line-height: 1.65; flex: 1; }
.card-foot {
  display: flex; align-items: center; gap: 6px;
  margin-top: 16px; font-family: var(--mono);
  font-size: 11.5px; color: var(--fg-faint);
}
.card-foot::after {
  content: "→"; margin-left: auto; color: var(--pc);
  opacity: 0; transform: translateX(-5px);
  transition: opacity .22s, transform .22s;
}
.card:hover .card-foot::after { opacity: 1; transform: none; }
.empty {
  grid-column: 1 / -1; border: 1px dashed var(--line-strong); border-radius: var(--radius);
  padding: 48px; text-align: center; color: var(--fg-faint); font-size: 14px;
}

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 180px 1fr; gap: 40px; }
.about h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.about-body p { color: var(--fg-dim); font-size: 15.5px; line-height: 1.85; max-width: 58ch; }
.about-body p + p { margin-top: 16px; }
.dl { display: grid; grid-template-columns: 84px 1fr; gap: 10px 18px; margin-top: 28px; font-size: 14px; }
.dl dt { font-family: var(--mono); font-size: 12px; color: var(--fg-faint); padding-top: 2px; }
.dl dd { color: var(--fg-dim); }

/* ---------- contact ---------- */
.contact-box {
  border: 1px solid var(--line); border-radius: 18px;
  padding: 48px 40px; background: var(--bg-soft); text-align: center;
}
.contact-box h2 { font-size: 26px; font-weight: 600; letter-spacing: -.025em; }
.contact-box p { color: var(--fg-dim); margin-top: 12px; font-size: 15px; }
.mail {
  display: inline-block; margin-top: 26px; font-family: var(--mono); font-size: 15px;
  color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  padding-bottom: 3px; transition: opacity .2s;
}
.mail:hover { opacity: .75; }
.contact-alt { margin-top: 18px; font-size: 13px; color: var(--fg-faint); }
.contact-alt a { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 30px 0; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--fg-faint); font-family: var(--mono); }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .brand i, .caret, .term-live::before, .term::after, .term-latest .dot,
  .term-deco path, .term-deco circle, .hero::before { animation: none; }
  html { scroll-behavior: auto; }
}
@media (max-width: 860px) {
  .hero { padding: 64px 0 56px; }
  .hero-inner { grid-template-columns: 1fr; gap: 38px; }
  .grid { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; gap: 20px; }
  .nav-links { display: none; }
  .contact-box { padding: 38px 24px; }
  .sec { padding: 54px 0; }
}

/* ---------- 独立页面框架 ---------- */
.page { padding-top: 58px; padding-bottom: 90px; }
.page-head { margin-bottom: 42px; }
.page-head h1 {
  font-size: clamp(28px, 4.5vw, 40px); font-weight: 600;
  letter-spacing: -.03em; line-height: 1.25;
}
.page-sub { margin-top: 14px; font-size: 15px; color: var(--fg-dim); line-height: 1.7; }

.hero.home-only { padding: 78px 0 54px; }

.hero-links {
  margin-top: 28px; font-family: var(--mono);
  font-size: 12.5px; color: var(--fg-faint);
}
.hero-links a {
  color: var(--fg-dim); border-bottom: 1px solid transparent;
  transition: color .16s, border-color .16s;
}
.hero-links a:hover {
  color: var(--accent);
  border-bottom-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.hero-links .sep { margin: 0 10px; opacity: .45; }

/* 导航当前页 */
.nav-links a.on { color: var(--fg); }
.nav-links a.on::after {
  content: ""; display: block; height: 1px; margin-top: 4px;
  background: var(--accent); opacity: .7;
}

/* ---------- 写作页 ---------- */
.wstats { display: flex; gap: 46px; margin-bottom: 36px; }
.wstats > div { display: flex; flex-direction: column; gap: 5px; }
.wstats b {
  font-family: var(--mono); font-size: 30px; font-weight: 500;
  letter-spacing: .01em; color: var(--fg);
}
.wstats span {
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .12em; color: var(--fg-faint);
}
.w-latest {
  margin-top: 28px; font-size: 13.5px; color: var(--fg-faint);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline;
}
.w-latest a {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.w-latest span { font-family: var(--mono); font-size: 12px; }

/* ---------- 关于页 ---------- */
.about-body { max-width: 660px; }
.about-body p {
  font-size: 15.5px; line-height: 1.88; color: var(--fg-dim);
  margin-bottom: 1.15em;
}
.about-kv {
  display: grid; grid-template-columns: 56px 1fr; gap: 12px 20px;
  max-width: 660px; margin-top: 34px; font-size: 14px;
}
.about-kv dt {
  font-family: var(--mono); font-size: 11.5px;
  color: var(--fg-faint); letter-spacing: .08em; padding-top: 3px;
}
.about-kv dd { margin: 0; color: var(--fg-dim); line-height: 1.7; }

.about-contact { margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--line); }
.about-contact h2 {
  font-size: 14px; font-weight: 500; color: var(--fg-dim); margin-bottom: 14px;
}

/* ---------- 首页：鼠标光晕 ---------- */
.spot {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(460px circle at var(--sx, 50%) var(--sy, 26%),
    color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%);
}
html[data-theme="light"] .spot {
  background: radial-gradient(460px circle at var(--sx, 50%) var(--sy, 26%),
    rgba(15, 157, 99, .07), transparent 70%);
}
.hero, .hubs, .recent { position: relative; z-index: 1; }

/* ---------- 首页：三个枢纽 ---------- */
.hubs {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; padding-bottom: 18px;
}
.hub {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 22px 22px 18px;
  border: 1px solid var(--glass-brd); border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  box-shadow: var(--glass-shadow);
  min-height: 196px;
  transform-style: preserve-3d;
  transition: border-color .25s, box-shadow .25s, transform .18s ease;
  will-change: transform;
}
.hub::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(320px circle at var(--gx, 50%) var(--gy, 0%),
    color-mix(in srgb, var(--hc) 17%, transparent), transparent 66%);
  opacity: 0; transition: opacity .3s;
}
.hub:hover::before { opacity: 1; }
.hub:hover {
  border-color: color-mix(in srgb, var(--hc) 45%, transparent);
  box-shadow: 0 18px 44px -26px var(--hc);
}
.hub-pattern {
  position: absolute; right: -16px; top: -16px;
  width: 124px; height: 124px;
  color: var(--hc); opacity: .15; pointer-events: none;
  transition: opacity .3s, transform .55s ease;
}
.hub:hover .hub-pattern { opacity: .3; transform: scale(1.08) rotate(4deg); }

.hub-num {
  font-family: var(--mono); font-size: 34px; font-weight: 500;
  color: var(--hc); line-height: 1; letter-spacing: -.02em;
  margin-bottom: 14px;
}
.hub-label { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.hub-sub {
  margin-top: 7px; font-size: 12.8px;
  color: var(--fg-faint); line-height: 1.55;
}
.hub-arrow {
  margin-top: auto; padding-top: 18px;
  font-family: var(--mono); font-size: 13px; color: var(--hc);
  opacity: .5; transition: opacity .2s, transform .2s;
}
.hub:hover .hub-arrow { opacity: 1; transform: translateX(5px); }

/* ---------- 首页：最近更新 ---------- */
.recent { padding-top: 44px; padding-bottom: 46px; }
.recent-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.recent-head h2 { font-size: 14px; font-weight: 500; color: var(--fg-dim); }
.recent-head a {
  font-family: var(--mono); font-size: 11.5px; color: var(--fg-faint);
  transition: color .16s;
}
.recent-head a:hover { color: var(--accent); }
.recent-list { list-style: none; padding: 0; margin: 0; }
.recent-list li { border-bottom: 1px solid var(--line); }
.recent-list li:first-child { border-top: 1px solid var(--line); }
.recent-list a {
  display: flex; align-items: baseline; gap: 14px;
  padding: 13px 4px;
  transition: padding-left .18s ease, background .18s;
}
.recent-list a:hover { padding-left: 12px; background: var(--bg-soft); }
.rc-title { font-size: 14.5px; }
.rc-from { font-size: 12.5px; color: var(--fg-faint); }
.recent-list time {
  margin-left: auto; font-family: var(--mono);
  font-size: 11.5px; color: var(--fg-faint);
}

@media (max-width: 820px) {
  .hubs { grid-template-columns: 1fr; gap: 12px; }
  .hub { min-height: auto; }
}

/* ---------- 首页写作区 ---------- */
.home-writing { padding-top: 40px; padding-bottom: 8px; }
.hw-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.hw-head h2 { font-size: 14px; font-weight: 500; color: var(--fg-dim); }
.hw-head span { font-family: var(--mono); font-size: 11.5px; color: var(--fg-faint); }

/* ---------- 项目页背景装饰 ---------- */
.p-bg {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}
.page { position: relative; z-index: 1; }

.pb-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .5;
  -webkit-mask-image: radial-gradient(ellipse 72% 62% at 50% 28%, #000 18%, transparent 76%);
  mask-image: radial-gradient(ellipse 72% 62% at 50% 28%, #000 18%, transparent 76%);
  animation: gridDrift 40s linear infinite;
}
@keyframes gridDrift {
  to { background-position: 56px 56px; }
}

.pb-orb {
  position: absolute; border-radius: 50%;
  animation: orbFloat 24s ease-in-out infinite;
}
.pb-1 {
  width: 560px; height: 560px; top: -180px; left: -140px;
  background: radial-gradient(circle, rgba(108, 140, 255, .26), transparent 68%);
}
.pb-2 {
  width: 480px; height: 480px; bottom: -180px; right: -120px;
  background: radial-gradient(circle, rgba(167, 139, 250, .22), transparent 68%);
  animation-delay: -8s;
}
.pb-3 {
  width: 380px; height: 380px; top: 34%; right: 12%;
  background: radial-gradient(circle, rgba(255, 159, 69, .14), transparent 70%);
  animation-delay: -16s;
}
html[data-theme="light"] .pb-1 { background: radial-gradient(circle, rgba(108,140,255,.3), transparent 68%); }
html[data-theme="light"] .pb-2 { background: radial-gradient(circle, rgba(167,139,250,.26), transparent 68%); }
html[data-theme="light"] .pb-3 { background: radial-gradient(circle, rgba(255,159,69,.18), transparent 70%); }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(44px, -32px) scale(1.07); }
  66% { transform: translate(-26px, 28px) scale(.95); }
}

/* 标题小圆点 */
.ph-dot {
  display: inline-block; width: 8px; height: 8px;
  margin-left: 12px; border-radius: 50%;
  background: var(--accent); vertical-align: middle;
  animation: dotPulse 2.6s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: .3; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1); }
}

/* ---------- 卡片图案与倾斜 ---------- */
.card {
  transform-style: preserve-3d;
  will-change: transform;
}
.card-pattern {
  position: absolute; right: -12px; top: -12px;
  width: 124px; height: 124px;
  color: var(--pc); opacity: .13;
  pointer-events: none;
  transition: opacity .3s, transform .6s ease;
}
.card:hover .card-pattern { opacity: .28; transform: scale(1.08) rotate(3deg); }
.card:has(.card-cover) .card-pattern { display: none; }

.card::after {
  background: radial-gradient(340px circle at var(--gx, 82%) var(--gy, -12%),
    color-mix(in srgb, var(--pc) 17%, transparent), transparent 64%);
}

@media (prefers-reduced-motion: reduce) {
  .pb-orb, .pb-grid, .ph-dot { animation: none; }
}

/* ---------- 终端 ---------- */
.tt {
  border: 1px solid var(--line); border-radius: 14px;
  background: #090b0f; overflow: hidden;
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .9);
}
.tt-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,.07);
  font-family: var(--mono); font-size: 11.5px; color: #5b626b;
}
.tt-bar i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.tt-bar i:nth-child(1) { background: #ff5f57; }
.tt-bar i:nth-child(2) { background: #febc2e; }
.tt-bar i:nth-child(3) { background: #28c840; }
.tt-bar span { margin-left: 6px; }
.tt-body {
  height: 390px; overflow-y: auto; padding: 16px 18px;
  font-family: var(--mono); font-size: 13px; line-height: 1.9;
  color: #cfd6e2; scrollbar-width: thin;
}
.tt-line { white-space: pre-wrap; word-break: break-word; }
.tt-dim { color: #5b626b; }
.tt-cmd { color: #9fb3d9; }
.tt-input-row {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 18px; border-top: 1px solid rgba(255,255,255,.07);
}
.tt-ps { color: var(--accent); font-family: var(--mono); font-size: 13px; }
.tt-input-row input {
  flex: 1; background: transparent; border: 0; outline: none;
  color: #e9ecef; font-family: var(--mono); font-size: 13px;
}
.tt-hint {
  margin-top: 14px; font-size: 12.5px; color: var(--fg-faint);
  font-family: var(--mono);
}
.tt-hint code, .page-sub code {
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 5px; font-size: .92em;
}
.tt-flash { animation: ttFlash 1.1s ease; }
@keyframes ttFlash {
  0%, 100% { box-shadow: 0 30px 70px -40px rgba(0,0,0,.9); }
  30% { box-shadow: 0 0 44px -6px var(--accent); }
}

/* ---------- 足迹 ---------- */
.fs-stats { display: flex; gap: 46px; margin-bottom: 24px; }
.fs-stats > div { display: flex; flex-direction: column; gap: 5px; }
.fs-stats b {
  font-family: var(--mono); font-size: 30px; font-weight: 500;
  color: var(--fg); line-height: 1;
}
.fs-stats span {
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .1em; color: var(--fg-faint);
}
.fs-box {
  position: relative; height: 430px; overflow: hidden;
  border: 1px solid var(--glass-brd); border-radius: 16px;
  background: radial-gradient(ellipse at 50% 48%, #141a28 0%, #07090d 72%);
}
.fs-box canvas { display: block; }
.fs-corner {
  position: absolute; left: 15px; bottom: 13px;
  font-family: var(--mono); font-size: 10px;
  color: rgba(255, 255, 255, .26); letter-spacing: .14em;
}
.fs-recent { margin-top: 34px; }
.fs-recent h2 {
  font-size: 14px; font-weight: 500; color: var(--fg-dim); margin-bottom: 12px;
}
.fs-recent ul { list-style: none; padding: 0; margin: 0; }
.fs-recent li {
  display: flex; align-items: baseline; gap: 14px;
  padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.fr-path { font-family: var(--mono); color: var(--fg-dim); }
.fs-recent time {
  margin-left: auto; font-family: var(--mono);
  font-size: 11.5px; color: var(--fg-faint);
}

/* ---------- 播放器 ---------- */
.pl { position: fixed; right: 22px; bottom: 22px; z-index: 60; }
.pl-fab {
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  background: var(--glass-hi); border: 1px solid var(--glass-brd);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: var(--accent);
  box-shadow: 0 12px 32px -16px rgba(0, 0, 0, .8);
  transition: transform .2s;
}
.pl-fab:hover { transform: scale(1.07); }
.pl-fab svg { width: 21px; height: 21px; animation: spin 9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.pl-panel {
  position: absolute; right: 0; bottom: 60px; width: 268px;
  padding: 14px;
  background: var(--glass-hi); border: 1px solid var(--glass-brd);
  border-radius: 16px;
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  box-shadow: 0 26px 64px -26px rgba(0, 0, 0, .9);
  opacity: 0; transform: translateY(8px) scale(.96);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.pl-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.pl-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px;
  color: var(--fg-faint); letter-spacing: .1em; margin-bottom: 10px;
}
.pl-head button {
  background: none; border: 0; cursor: pointer;
  color: var(--fg-faint); font-size: 16px; line-height: 1; padding: 0 2px;
}
.pl-list { list-style: none; padding: 0; margin: 0 0 10px; max-height: 190px; overflow-y: auto; }
.pl-list li {
  display: flex; align-items: baseline; gap: 8px;
  padding: 8px 9px; border-radius: 8px; cursor: pointer;
  transition: background .15s;
}
.pl-list li:hover { background: rgba(255, 255, 255, .05); }
.pl-list li.on { background: var(--accent-soft); }
.pl-list li.on .pl-t { color: var(--accent); }
.pl-t { font-size: 13px; }
.pl-a { font-size: 11px; color: var(--fg-faint); margin-left: auto; }
.pl-ctrl { display: flex; justify-content: center; align-items: center; gap: 14px; }
.pl-ctrl button {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--line-strong);
  color: var(--fg-dim); font-size: 15px; line-height: 1;
  transition: color .15s, border-color .15s;
}
.pl-ctrl button:hover { color: var(--fg); border-color: var(--fg-faint); }
.pl-btn-main {
  width: 42px !important; height: 42px !important;
  background: var(--accent) !important; color: #05070c !important;
  border: 0 !important;
}
.pl-now {
  margin-top: 10px; text-align: center;
  font-family: var(--mono); font-size: 11px; color: var(--fg-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 640px) {
  .pl { right: 14px; bottom: 14px; }
  .pl-panel { width: 232px; }
}

/* 导航右侧图标组 */
.nav-right { display: flex; align-items: center; gap: 6px; }
.nav-ico { text-decoration: none; color: var(--fg-faint); }
.nav-ico:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.nav-ico svg { width: 16px; height: 16px; }

@media (max-width: 640px) {
  .nav-ico { display: none; }
  .nav-ico:first-of-type { display: grid; }
}

/* ---------- 终端彩蛋：全屏信号扫描 ---------- */
.tt-fx {
  position: fixed; inset: 0; z-index: 9998;
  pointer-events: none; opacity: 0;
  overflow: hidden;
}
.tt-fx::before {
  content: ""; position: absolute; left: 0; right: 0; height: 180px;
  top: -180px;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(108, 140, 255, .06) 30%,
    rgba(140, 170, 255, .22) 50%,
    rgba(108, 140, 255, .06) 70%,
    transparent 100%);
}
.tt-fx::after {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 50%,
    rgba(108, 140, 255, .12), transparent 70%);
}
.tt-fx.on { opacity: 1; animation: fxFade 1.4s ease-out forwards; }
.tt-fx.on::before { animation: fxScan 1.3s cubic-bezier(.25, .5, .3, 1) forwards; }
.tt-fx.on::after { animation: fxGlow 1.3s ease-out forwards; }

@keyframes fxFade {
  0% { opacity: 0; }
  8% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes fxScan {
  0% { transform: translateY(0); }
  100% { transform: translateY(calc(100vh + 180px)); }
}
@keyframes fxGlow {
  0% { opacity: 0; }
  30% { opacity: 1; }
  100% { opacity: 0; }
}

/* ---------- 移动端菜单 ---------- */
.nav-burger { display: none; }
.nav-drawer { display: none; }

@media (max-width: 720px) {
  .nav { position: sticky; }
  .nav-burger { display: grid; }
  .nav-drawer {
    position: absolute; left: 0; right: 0; top: 60px;
    padding: 6px 24px 16px;
    background: var(--nav-bg);
    backdrop-filter: blur(26px) saturate(180%);
    -webkit-backdrop-filter: blur(26px) saturate(180%);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .8);
  }
  .nav-drawer.open { display: block; }
  .nav-drawer a {
    display: block; padding: 13px 4px;
    font-size: 15px; color: var(--fg-dim);
    border-bottom: 1px solid var(--line);
  }
  .nav-drawer a:last-child { border-bottom: 0; }
  .nav-drawer a.on { color: var(--accent); }
  .nav-drawer a:active { background: var(--bg-soft); }
  .nd-sep {
    height: 1px; margin: 10px 0;
    background: var(--line); opacity: .6;
  }
}
