* {
  margin:0; padding:0; box-sizing:border-box;
}
:root {
  --bg: #fff;
  --text: #222;
  --link: #0066cc;
  --muted: #666;
  --border: #eee;
  --code: #f7f7f7;
}
.dark {
  --bg: #121212;
  --text: #e0e0e0;
  --link: #69f;
  --muted: #aaa;
  --border: #333;
  --code: #2a2a2a;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  line-height: 1.7;
  padding: 20px;
  transition: all 0.3s;
}
.container {
  max-width: 1000px;
  margin: 0 auto;
}
.home-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 30px 20px;
  background: #f5f5f5;
  border-radius: 12px;
}
.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 0 6px #00000022;
}
.home-header h1 {
  margin-top: 10px;
  font-size: 28px;
}
.home-header p {
  color: #666;
  font-size: 16px;
}
.main {
  display: flex;
  gap: 30px;
}
.sidebar {
  width: 240px;
  flex-shrink: 0;
}
.toc {
  position: sticky;
  top: 20px;
  max-height: 80vh;
  overflow-y: auto;
}
.toc strong {
  display: block;
  margin-bottom: 10px;
  font-size: 16px;
}
.toc-item-1 {
  display:block; margin:4px 0; font-weight:500; color:var(--link); text-decoration:none; }
.toc-item-2 {
  display:block; margin:3px 0 3px 10px; font-size:14px; color:var(--link); }
.toc-item-3 {
  display:block; margin:2px 0 2px 20px; font-size:13px; color:var(--muted); }
.content {
  flex: 1;
}
.post-item {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.post-date {
  color: var(--muted);
  font-size: 14px;
}
.post-title {
  font-size: 20px;
  margin-top: 4px;
}
.post-title a {
  color: var(--text);
  text-decoration: none;
}
.post-title a:hover {
  color: var(--link);
}
.pagination {
  margin-top: 30px;
  display: flex;
  gap: 20px;
}
.pagination a {
  padding: 6px 12px;
  background: var(--link);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
}
pre {
  background: var(--code);
  padding: 15px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1em 0;
}
code {
  background: var(--code);
  padding: 2px 6px;
  border-radius: 4px;
}
blockquote {
  border-left: 4px solid var(--link);
  padding-left: 1em;
  color: var(--muted);
  margin: 1em 0;
}
#backToTop, #darkToggle {
  position: fixed;
  right: 20px;
  padding: 8px 12px;
  background: var(--link);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  z-index: 99;
}
#backToTop { bottom: 80px; display: none; }
#darkToggle { bottom: 20px; }
.comment-section {
  margin-top: 4em;
  padding-top: 2em;
  border-top: 1px solid var(--border);
}
@media (max-width:768px) {
  .main { flex-direction: column; }
  .sidebar { width: 100%; }
  .toc { position: static; }
}