* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  background: #fafaf8;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 40px 0 20px;
  text-align: center;
  margin-bottom: 40px;
}

.site-title {
  font-size: 28px;
  font-weight: 700;
  color: #2c3e50;
  letter-spacing: 2px;
}

.site-tagline {
  color: #999;
  font-size: 14px;
  margin-top: 8px;
}

.site-nav {
  margin-top: 20px;
}

.site-nav a {
  color: #666;
  text-decoration: none;
  margin: 0 15px;
  font-size: 15px;
}

.site-nav a:hover,
.site-nav a.active {
  color: #2c3e50;
  border-bottom: 2px solid #2c3e50;
  padding-bottom: 4px;
}

/* Intro */
.intro {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 32px;
  border-left: 4px solid #5b8c5a;
  color: #555;
  font-size: 15px;
}

/* Post List */
.post-list {
  margin-bottom: 48px;
}

.post-list h2.section-title {
  font-size: 22px;
  color: #2c3e50;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #eee;
}

.section-icon {
  margin-right: 6px;
}

/* Section accent borders */
#reading h2.section-title { border-bottom-color: #4caf50; }
#cpp h2.section-title    { border-bottom-color: #1565c0; }
#golang h2.section-title { border-bottom-color: #00838f; }

.post-card {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
}

.post-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.post-date {
  color: #999;
  font-size: 13px;
}

.post-category {
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
}

/* 类别配色 */
.category-reading {
  background: #e8f5e9;
  color: #388e3c;
}

.category-cpp {
  background: #e3f2fd;
  color: #1565c0;
}

.category-go {
  background: #e0f7fa;
  color: #00838f;
}

.post-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.post-card h3 a {
  color: #2c3e50;
  text-decoration: none;
}

.post-card h3 a:hover {
  color: #5b8c5a;
}

.post-excerpt {
  color: #666;
  font-size: 14px;
  margin-bottom: 12px;
}

.read-more {
  color: #5b8c5a;
  text-decoration: none;
  font-size: 14px;
}

.read-more:hover {
  text-decoration: underline;
}

/* Article Page */
.article-header {
  text-align: center;
  padding: 30px 0 20px;
}

.article-header h1 {
  font-size: 26px;
  color: #2c3e50;
  margin-bottom: 12px;
}

.article-body {
  background: #fff;
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 32px;
}

.article-body h2 {
  font-size: 20px;
  color: #2c3e50;
  margin: 28px 0 12px;
}

.article-body h3 {
  font-size: 17px;
  color: #444;
  margin: 20px 0 8px;
}

.article-body p {
  margin-bottom: 16px;
  text-indent: 2em;
}

.article-body blockquote {
  border-left: 4px solid #5b8c5a;
  background: #f5f9f5;
  padding: 12px 20px;
  margin: 16px 0;
  color: #555;
  font-style: italic;
}

.article-body ul,
.article-body ol {
  margin: 12px 0 12px 2em;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 18px 22px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.7;
  margin: 16px 0;
}

.article-body code {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  background: #f0f0f0;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #333;
}

.article-body pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: #d4d4d4;
  font-size: 14px;
}

.back-link {
  display: inline-block;
  color: #5b8c5a;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 20px;
}

.back-link:hover {
  text-decoration: underline;
}

/* About Page */
.about-section {
  background: #fff;
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 32px;
}

.about-section h2 {
  font-size: 22px;
  color: #2c3e50;
  margin-bottom: 16px;
}

.about-section p {
  margin-bottom: 14px;
  color: #555;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 30px 0;
  color: #999;
  font-size: 13px;
  border-top: 1px solid #eee;
  margin-top: 40px;
}

.site-footer a {
  color: #999;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 480px) {
  .site-title {
    font-size: 22px;
  }
  .container {
    padding: 0 16px;
  }
  .post-card {
    padding: 18px;
  }
}
