:root{
  --primary:#2563eb;
  --primary-hover:#1d4ed8;
  --primary-active:#1e40af;
  --primary-light:#eff6ff;
  --primary-border:#bfdbfe;

  --bg-page:#f8fafc;
  --bg-surface:#ffffff;
  --bg-surface-hover:#f1f5f9;
  --text-main:#0f172a;
  --text-muted:#64748b;
  --text-sub:#94a3b8;
  --border-color:#e2e8f0;
  --border-focus:#3b82f6;

  --radius-sm:4px;
  --radius-md:6px;
  --radius-lg:8px;
  --radius-pill:9999px;
  --content-max-width:820px;
  --header-height:60px;

  --shadow-sm:0 1px 2px 0 rgba(0,0,0,.05);
  --shadow-md:0 4px 6px -1px rgba(0,0,0,.07),0 2px 4px -1px rgba(0,0,0,.04);
  --shadow-lg:0 10px 15px -3px rgba(0,0,0,.08),0 4px 6px -2px rgba(0,0,0,.03);

  --motion-ease:cubic-bezier(0.16,1,0.3,1);
  --transition-base:all .15s var(--motion-ease);
}

[data-theme="dark"]{
  --bg-page:#0f172a;
  --bg-surface:#1e293b;
  --bg-surface-hover:#334155;
  --text-main:#f8fafc;
  --text-muted:#94a3b8;
  --text-sub:#64748b;
  --border-color:#334155;
  --primary-light:rgba(37,99,235,.15);
  --primary-border:rgba(37,99,235,.35);
  --shadow-sm:0 1px 2px 0 rgba(0,0,0,.4);
  --shadow-md:0 4px 6px -1px rgba(0,0,0,.4);
  --shadow-lg:0 10px 15px -3px rgba(0,0,0,.5);
}

*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',
    'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  background:var(--bg-page);
  color:var(--text-main);
  font-size:14px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  transition:background .2s var(--motion-ease),color .2s var(--motion-ease);
}
a{color:inherit;text-decoration:none}
::selection{background:var(--primary-light);color:var(--primary-hover)}

.container{
  width:100%;
  max-width:var(--content-max-width);
  margin:0 auto;
  padding:0 24px;
}

.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:var(--bg-surface);
  border-bottom:1px solid var(--border-color);
}
.header-inner{
  height:var(--header-height);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.brand{
  font-size:16px;
  font-weight:700;
  letter-spacing:.4px;
  color:var(--text-main);
}
.nav{
  display:flex;
  align-items:center;
  gap:4px;
}
.nav a{
  padding:7px 12px;
  border-radius:var(--radius-sm);
  font-size:13px;
  font-weight:500;
  color:var(--text-muted);
  transition:var(--transition-base);
}
.nav a:hover{background:var(--bg-surface-hover);color:var(--text-main)}
.nav a.active{background:var(--primary-light);color:var(--primary);font-weight:600}

.theme-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:32px;
  margin-left:6px;
  border:1px solid var(--border-color);
  border-radius:var(--radius-md);
  background:var(--bg-surface);
  color:var(--text-muted);
  cursor:pointer;
  transition:var(--transition-base);
}
.theme-toggle:hover{background:var(--bg-surface-hover);color:var(--text-main)}
.theme-toggle:active{transform:scale(.98)}
.theme-toggle svg{width:16px;height:16px}
.theme-toggle .i-sun{display:none}
[data-theme="dark"] .theme-toggle .i-sun{display:block}
[data-theme="dark"] .theme-toggle .i-moon{display:none}

main{padding:40px 0 72px}

.page-head{margin-bottom:28px}
.page-title{font-size:22px;font-weight:700;line-height:1.3;letter-spacing:.3px}
.page-desc{margin-top:6px;font-size:13px;color:var(--text-muted)}

.post-list{display:flex;flex-direction:column;gap:12px}

.post-item{
  display:block;
  padding:18px 20px;
  background:var(--bg-surface);
  border:1px solid var(--border-color);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm);
  transition:var(--transition-base);
}
.post-item:hover{
  border-color:var(--primary-border);
  box-shadow:var(--shadow-md);
  transform:translateY(-1px);
}
.post-item .post-date{
  font-size:12px;
  color:var(--text-sub);
  font-variant-numeric:tabular-nums;
}
.post-item .post-title{
  margin-top:4px;
  font-size:16px;
  font-weight:600;
  line-height:1.4;
  color:var(--text-main);
}
.post-item:hover .post-title{color:var(--primary)}
.post-item .post-excerpt{
  margin-top:6px;
  font-size:13px;
  color:var(--text-muted);
}

.empty-state{
  padding:64px 24px;
  text-align:center;
  border:1px dashed var(--border-color);
  border-radius:var(--radius-lg);
  background:var(--bg-surface);
}
.empty-title{font-size:14px;font-weight:600;color:var(--text-muted)}
.empty-desc{margin-top:4px;font-size:12px;color:var(--text-sub)}

.site-footer{
  border-top:1px solid var(--border-color);
  padding:28px 0;
}
.footer-inner{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:8px 16px;
  font-size:12px;
  color:var(--text-sub);
}
.footer-inner a{color:var(--text-sub);transition:var(--transition-base)}
.footer-inner a:hover{color:var(--primary)}
.footer-links{display:inline-flex;flex-wrap:wrap;align-items:center;gap:6px 14px}

@media (prefers-color-scheme: dark){
  html:not([data-theme="light"]) .theme-toggle .i-sun{display:block}
  html:not([data-theme="light"]) .theme-toggle .i-moon{display:none}
}

@media (max-width:600px){
  .container{padding:0 18px}
  .nav a{padding:7px 9px}
  .page-title{font-size:20px}
  .post-item{padding:16px}
}
