/* 基座：Linear（单一强调色、近黑画布、细线边框）+ Resend（无装饰性边框、氛围光、12px 圆角）
   外观点睛：点阵（dot-matrix）字体 Doto / DotGothic16 */
:root, [data-theme="dark"] {
  --canvas: #08090a;
  --surface-1: #0e0f11;
  --surface-2: #141517;
  --ink: #f7f8f8;
  --ink-muted: #b4b8bf;
  --ink-subtle: #8a8f98;
  --ink-tertiary: #62666d;
  --hairline: #1e2024;
  --hairline-strong: #2c2f34;
  --accent: #22d3ee;
  --accent-dim: rgba(34, 211, 238, .55);
  --track: rgba(255, 255, 255, .06);
  --glow-1: rgba(34, 211, 238, .07);
  --glow-2: rgba(94, 106, 210, .055);
  --dot: rgba(255, 255, 255, .12);
}
[data-theme="light"] {
  --canvas: #fbfbfa;
  --surface-1: #ffffff;
  --surface-2: #f5f5f4;
  --ink: #17181a;
  --ink-muted: #4a4f57;
  --ink-subtle: #6b7280;
  --ink-tertiary: #9aa1a9;
  --hairline: #e6e7e9;
  --hairline-strong: #d3d5d8;
  --accent: #0891b2;
  --accent-dim: rgba(8, 145, 178, .55);
  --track: rgba(0, 0, 0, .07);
  --glow-1: rgba(34, 211, 238, .12);
  --glow-2: rgba(94, 106, 210, .07);
  --dot: rgba(0, 0, 0, .14);
}
:root {
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --pixel: 'Doto', 'DotGothic16', var(--mono);
  --radius: 12px;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
[data-theme="light"] { color-scheme: light; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -.05px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .35s ease, color .35s ease;
}
/* 氛围光 + 极淡的点阵底纹 */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(760px circle at 50% -18%, var(--glow-1), transparent 62%),
    radial-gradient(520px circle at 92% 2%, var(--glow-2), transparent 60%);
}
body::after {
  content: "";
  position: fixed; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(120% 60% at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(120% 60% at 50% 0%, #000 0%, transparent 70%);
}
.wrap { position: relative; z-index: 1; max-width: 660px; margin: 0 auto; padding: 88px 24px 112px; }

/* ---------- 主题切换 ---------- */
.theme-toggle {
  position: fixed; top: 20px; right: 20px; z-index: 10;
  width: 34px; height: 34px; padding: 0;
  display: grid; place-items: center;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: 9px;
  color: var(--ink-subtle);
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, transform .18s ease;
}
.theme-toggle:hover { border-color: var(--hairline-strong); color: var(--accent); transform: translateY(-1px); }
.theme-glyph { font-size: 15px; line-height: 1; }

/* ---------- hero ---------- */
.hero { margin-bottom: 4px; }
h1 {
  font-family: var(--pixel);
  font-size: 62px; font-weight: 700;
  letter-spacing: -1px; line-height: 1;
  margin: 0 0 14px;
}
.tagline { color: var(--ink-muted); font-size: 18px; margin: 0 0 18px; max-width: 46ch; }
.now {
  font-family: var(--pixel); font-size: 14px; line-height: 1.7;
  color: var(--ink-tertiary); margin: 0; display: flex; gap: 10px; flex-wrap: wrap;
}
.now-key { color: var(--accent); flex: 0 0 auto; text-transform: uppercase; letter-spacing: 1px; }

/* ---------- section ---------- */
section { margin-top: 64px; }
.eyebrow {
  font-family: var(--pixel); font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.6px;
  color: var(--ink-tertiary); margin: 0 0 18px;
}

a { color: var(--ink); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent); }

/* ---------- project cards ---------- */
.cards { display: grid; gap: 10px; }
.card {
  display: block; background: var(--surface-1);
  border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
a.card:hover { border-color: var(--hairline-strong); background: var(--surface-2); transform: translateY(-2px); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card h3 { font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: -.3px; margin: 0; }
.card .arrow { color: var(--ink-tertiary); font-size: 14px; transition: color .18s ease, transform .18s ease; }
a.card:hover .arrow { color: var(--accent); transform: translateX(3px); }
.card p { color: var(--ink-subtle); font-size: 14px; line-height: 1.55; margin: 6px 0 0; }
.card-meta {
  display: flex; align-items: center; gap: 7px; margin-top: 12px;
  font-family: var(--pixel); font-size: 13px; color: var(--ink-tertiary);
}
.dot-sep { color: var(--hairline-strong); }

/* ---------- stack ---------- */
.stack { display: grid; gap: 11px; }
.stack-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; align-items: baseline; }
.stack-key {
  font-family: var(--pixel); font-size: 12px; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--ink-tertiary);
}
.stack-items { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-family: var(--mono); font-size: 11.5px;
  padding: 3px 9px; border-radius: 7px;
  background: var(--surface-1); border: 1px solid var(--hairline);
  color: var(--ink-muted);
  transition: border-color .18s ease, color .18s ease, transform .18s ease;
}
.chip:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-1px); }

/* ---------- posts ---------- */
.posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.posts li a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 9px 0; border-bottom: 1px solid transparent;
}
.posts li a:hover { border-bottom-color: var(--hairline); }
.post-title { font-size: 14.5px; color: var(--ink-muted); }
.posts li a:hover .post-title { color: var(--ink); }
.post-date { font-family: var(--pixel); font-size: 12px; color: var(--ink-tertiary); flex: 0 0 auto; }
.posts-empty { font-size: 14px; color: var(--ink-tertiary); margin: 0; }

/* ---------- interest bars ---------- */
.interests { display: grid; gap: 10px; }
.interest { display: grid; grid-template-columns: minmax(0, 1fr) 190px 34px; align-items: center; gap: 16px; }
.interest-label { color: var(--ink-muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.interest-track { height: 3px; border-radius: 999px; background: var(--track); overflow: hidden; }
.interest-fill {
  display: block; height: 100%; border-radius: 999px;
  background: var(--accent-dim);
  transition: background .18s ease;
}
.interest:hover .interest-fill { background: var(--accent); }
.interest:hover .interest-label { color: var(--ink); }
.interest-value { font-family: var(--pixel); font-size: 13px; color: var(--ink-tertiary); text-align: right; }
.hint { color: var(--ink-tertiary); font-family: var(--mono); font-size: 11px; margin: 18px 0 0; }

/* ---------- footer ---------- */
footer { margin-top: 64px; }
.contact { font-family: var(--mono); font-size: 12.5px; margin: 0; }
.contact .sep { color: var(--ink-tertiary); margin: 0 7px; }

/* ---------- 入场动画：一点点出现 ---------- */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity .6s cubic-bezier(.2, .7, .3, 1), transform .6s cubic-bezier(.2, .7, .3, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}
/* 数据条生长 */
@keyframes bar-grow { from { width: 0 !important; } }
.is-visible .interest-fill { animation: bar-grow .9s cubic-bezier(.2, .7, .3, 1) both; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-visible { opacity: 1; transform: none; transition: none; }
  .is-visible .interest-fill { animation: none; }
  a, .card, .chip, .theme-toggle { transition: none; }
}

@media (max-width: 560px) {
  h1 { font-size: 44px; }
  .wrap { padding: 56px 20px 80px; }
  section { margin-top: 48px; }
  .interest { grid-template-columns: minmax(0, 1fr) 34px; }
  .interest-track { display: none; }
  .stack-row { grid-template-columns: 84px minmax(0, 1fr); }
}
