:root {
  --bg: #080b12;
  --bg-2: #0d1220;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-hover: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --ink: #e8edf7;
  --ink-2: #a6b2c8;
  --muted: #6d7a90;
  --accent: #6f9bff;
  --accent-2: #a58bff;
  --radius: 16px;
  --maxw: 760px;
}

html[data-theme="light"] {
  --bg: #f6f7fa;
  --bg-2: #eef1f7;
  --panel: #ffffff;
  --panel-hover: #ffffff;
  --line: rgba(18, 28, 45, 0.10);
  --ink: #16202f;
  --ink-2: #445468;
  --muted: #7b8798;
  --accent: #3567d6;
  --accent-2: #7a5bd6;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  line-height: 1.75;
  letter-spacing: 0.01em;
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(111, 155, 255, 0.16), transparent 70%),
    radial-gradient(900px 500px at 90% 10%, rgba(165, 139, 255, 0.10), transparent 70%),
    var(--bg);
}

.glow {
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 60vh;
  background: radial-gradient(closest-side, rgba(111, 155, 255, 0.12), transparent);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* ---------- 头部 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 24px;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, var(--bg) 55%, transparent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.brand-ico {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}

.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.18s ease;
}

.site-nav a:hover { color: var(--ink); }

.theme-btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-2);
  width: 30px;
  height: 30px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  transition: all 0.18s ease;
}

.theme-btn:hover {
  color: var(--ink);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(111, 155, 255, 0.12);
}

/* ---------- 主体 ---------- */
main {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.hero { padding: 48px 0 64px; }

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(34px, 6vw, 54px);
  line-height: 1.22;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  max-width: 46ch;
}

.sec-title {
  margin: 0 0 22px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- 文章卡片 ---------- */
.posts { padding-bottom: 56px; }

.post {
  display: block;
  position: relative;
  padding: 22px 24px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.post:hover {
  transform: translateY(-2px);
  border-color: rgba(111, 155, 255, 0.42);
  background: var(--panel-hover);
}

.post-meta {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.post h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.post p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
}

.more {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.2s ease;
}

.post:hover .more { opacity: 1; transform: translateX(0); }

/* ---------- 关于 ---------- */
.about p { color: var(--ink-2); margin: 0 0 14px; }
.about .muted { color: var(--muted); font-size: 14px; }

code {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.92em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(111, 155, 255, 0.12);
  color: var(--accent);
}

/* ---------- 页脚 ---------- */
.site-foot {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 24px 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--accent); }
.dot { opacity: 0.55; }

/* ---------- 文章页 ---------- */
.article {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 24px 96px;
}

.article h1 {
  font-size: clamp(28px, 4.4vw, 40px);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 12px 0 10px;
}

.article .post-meta { margin-bottom: 6px; }

.article h2 {
  margin: 46px 0 14px;
  font-size: 21px;
  letter-spacing: -0.01em;
}

.article h3 { margin: 30px 0 10px; font-size: 17px; }

.article p, .article li { color: var(--ink-2); }

.article blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--accent);
  color: var(--ink-2);
  font-style: normal;
}

.article pre {
  overflow-x: auto;
  padding: 18px 20px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.36);
  border: 1px solid var(--line);
}

.article pre code {
  background: none;
  padding: 0;
  color: var(--ink);
}

.article img {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.back {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.back:hover { color: var(--accent); }

@media (max-width: 560px) {
  .site-head { padding: 16px 18px; }
  main { padding: 24px 18px 60px; }
  .hero { padding: 28px 0 44px; }
  .post { padding: 18px; }
}


/* ---------- 带封面的文章卡 ---------- */
.post.has-cover {
  display: flex;
  gap: 20px;
  align-items: stretch;
  padding: 16px;
}

.post-cover {
  width: 240px;
  height: 135px;
  object-fit: cover;
  border-radius: 12px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  transition: transform 0.3s ease;
}

.post.has-cover:hover .post-cover { transform: scale(1.03); }

.post-body { flex: 1 1 auto; min-width: 0; }

@media (max-width: 640px) {
  .post.has-cover { flex-direction: column; gap: 12px; }
  .post-cover { width: 100%; height: auto; aspect-ratio: 16 / 9; }
}


/* ---------- 作品页视频 ---------- */
.film {
  display: block;
  width: 100%;
  margin-top: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #000;
}
