/* ========================================
   Carl's Blog — 共享样式
   深灰底白字，内容为主，简洁排版
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #1a1a1a;
  --bg-card: #242424;
  --bg-hover: #2a2a2a;
  --text: #e0e0e0;
  --text-muted: #999;
  --text-light: #bbb;
  --accent: #48c78e;
  --border: #333;
  --max-width: 720px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  line-height: 1.8;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: #63e6a5;
}

/* --- Navigation Bar --- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.navbar .site-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.5px;
}

.navbar .site-title:hover {
  color: var(--accent);
}

.navbar .nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.navbar .nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
  color: var(--text);
}

/* --- Page Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* --- Blog Post List --- */
.post-list {
  list-style: none;
}

.post-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.post-item:first-child {
  padding-top: 0;
}

.post-item .post-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.post-item .post-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
  color: var(--text);
}

.post-item .post-title:hover {
  color: var(--accent);
}

.post-item .post-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Article Page --- */
.article-header {
  margin-bottom: 40px;
}

.article-header .article-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.article-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}

.article-body {
  font-size: 1.05rem;
  line-height: 2;
  color: var(--text-light);
}

.article-body p {
  margin-bottom: 1.2em;
}

.article-body h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin: 2em 0 0.8em;
}

.article-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.5em 0 0.6em;
}

.article-body ul, .article-body ol {
  margin: 0 0 1.2em 1.5em;
}

.article-body li {
  margin-bottom: 0.4em;
}

.article-body code {
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--accent);
}

.article-body pre {
  background: #111;
  padding: 16px 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.2em;
  border: 1px solid var(--border);
}

.article-body pre code {
  background: none;
  padding: 0;
  color: #e0e0e0;
}

.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  color: var(--text-muted);
  margin: 0 0 1.2em;
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

/* --- Back Link --- */
.back-link {
  display: inline-block;
  margin-top: 40px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.back-link:hover {
  color: var(--text);
}

.back-link::before {
  content: "← ";
}

/* --- Section Title --- */
.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* --- Footer --- */
.footer {
  max-width: var(--max-width);
  margin: 60px auto 0;
  padding: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-state p {
  font-size: 1.05rem;
}
