:root {
  --bg: #0b0e14;
  --bg-soft: #11151d;
  --text: #e6e9ef;
  --muted: #a7b0c0;
  --primary: #6ee7ff;
  --primary-2: #a78bfa;
  --card: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.12);
}

/* 亮色模式变量 */
[data-theme="light"] {
  --bg: #f7f9fc;
  --bg-soft: #ffffff;
  --text: #0b1220;
  --muted: #556070;
  --card: rgba(0, 0, 0, 0.06);
  --border: rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(150%) blur(8px);
  background: linear-gradient(to bottom, rgba(0,0,0,0.25), transparent);
}
.nav {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
}
.brand { font-weight: 800; letter-spacing: 0.2px; }
.nav-actions button {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 62vh;
  display: grid;
  place-items: center;
  padding: 56px 16px 24px;
}
.hero-bg { 
  position: absolute; inset: 0; 
  background: radial-gradient(1200px 500px at 10% 20%, rgba(110,231,255,0.25), transparent),
              radial-gradient(1000px 500px at 90% 40%, rgba(167,139,250,0.18), transparent),
              radial-gradient(700px 400px at 50% 95%, rgba(34,197,94,0.14), transparent);
  filter: blur(24px);
}
.hero-content { 
  position: relative; z-index: 2; 
  max-width: 1040px; width: 100%; text-align: center; 
}
.hero h1 { font-size: clamp(28px, 6vw, 56px); margin: 0 0 14px; }
.subtitle { color: var(--muted); font-size: clamp(16px, 2.2vw, 20px); margin: 0 0 22px; }

.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { 
  display: inline-block; padding: 12px 16px; border-radius: 12px; 
  text-decoration: none; border: 1px solid var(--border); background: var(--card); color: var(--text);
}
.btn.primary { 
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); 
  color: #0b0e14; font-weight: 600; border: none;
}
.btn.ghost:hover { border-color: var(--text); }

.meta { margin-top: 14px; color: var(--muted); font-size: 14px; }

.post-list { max-width: 1040px; margin: 42px auto; padding: 0 16px; }
.post-list h2 { margin: 0 0 16px; }
.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.post-link { display: block; padding: 18px; text-decoration: none; color: inherit; }
.post-title { font-weight: 700; margin-bottom: 8px; }
.post-excerpt { color: var(--muted); margin-bottom: 8px; }
.post-meta { font-size: 12px; color: var(--muted); }

.site-footer { margin-top: 60px; border-top: 1px dashed var(--border); }
.footer-inner { max-width: 1040px; margin: 0 auto; padding: 18px 16px; display: flex; gap: 10px; align-items: center; color: var(--muted); }
.footer-inner a { color: inherit; }

/* 文章页面样式 */
.container { max-width: 840px; margin: 0 auto; padding: 24px 16px 60px; }
.post-header { margin-top: 32px; margin-bottom: 18px; }
.post-header h1 { margin: 0 0 6px; }
.post-header .desc { color: var(--muted); }
.post-content {
  line-height: 1.75;
  color: var(--text);
}
.post-content h2, .post-content h3 { margin-top: 24px; }
.post-content pre { background: #0f1320; border: 1px solid var(--border); border-radius: 12px; padding: 14px; overflow-x: auto; }
.post-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace; }
.tip { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px; color: var(--muted); }

/* 论文 / PDF 嵌入 */
.paper-meta { color: var(--muted); font-size: 14px; margin: 4px 0 18px; }
.paper-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0 8px; }
.pdf-embed {
  width: 100%; height: 82vh; min-height: 480px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-soft); margin-top: 8px;
}

@media (max-width: 480px) {
  .post-content pre { font-size: 14px; }
  .pdf-embed { height: 70vh; }
}