/* Rex编程经验分享 - 简约风格样式 */
* {
  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;
  color: #333;
  background: #fff;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #1a73e8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* 头部 */
.site-header {
  border-bottom: 1px solid #e8e8e8;
}

.header-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 22px;
  font-weight: 600;
  color: #222;
}

.site-title:hover {
  text-decoration: none;
}

.nav a {
  color: #555;
  font-size: 14px;
  margin-left: 20px;
}

.nav a:hover {
  color: #1a73e8;
}

/* 主体 */
.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 24px;
  min-height: calc(100vh - 170px);
}

/* 首页 */
.hero {
  margin-bottom: 36px;
}

.hero h1 {
  font-size: 28px;
  font-weight: 600;
  color: #222;
  margin-bottom: 8px;
}

.hero p {
  color: #777;
  font-size: 15px;
}

.article-list .list-title {
  font-size: 18px;
  font-weight: 600;
  color: #222;
  margin-bottom: 16px;
}

.article-item {
  display: block;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
}

.article-item:last-child {
  border-bottom: none;
}

.article-item h2 {
  font-size: 17px;
  font-weight: 600;
  color: #222;
  margin-bottom: 6px;
  transition: color 0.2s;
}

.article-item:hover h2 {
  color: #1a73e8;
}

.article-item p.meta {
  font-size: 13px;
  color: #999;
  margin-bottom: 6px;
}

.article-item p.desc {
  font-size: 14px;
  color: #666;
}

/* 文章详情 */
.post-header {
  margin-bottom: 28px;
}

.post-header h1 {
  font-size: 26px;
  font-weight: 600;
  color: #222;
  margin-bottom: 10px;
  line-height: 1.4;
}

.post-header .meta {
  font-size: 13px;
  color: #999;
}

.post-content {
  font-size: 15px;
  color: #333;
}

.post-content h2 {
  font-size: 20px;
  font-weight: 600;
  color: #222;
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.post-content h3 {
  font-size: 17px;
  font-weight: 600;
  color: #222;
  margin: 24px 0 10px;
}

.post-content p {
  margin-bottom: 14px;
}

.post-content ul,
.post-content ol {
  margin: 0 0 14px 22px;
}

.post-content li {
  margin-bottom: 6px;
}

.post-content code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
    monospace;
  font-size: 13px;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
}

.post-content pre {
  background: #f7f7f7;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  margin: 0 0 16px;
}

.post-content pre code {
  background: transparent;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
}

.post-content blockquote {
  margin: 0 0 16px;
  padding: 10px 16px;
  border-left: 4px solid #1a73e8;
  background: #f8f9fa;
  color: #555;
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 14px;
  color: #555;
}

.back-link:hover {
  color: #1a73e8;
}

/* 页脚 */
.site-footer {
  border-top: 1px solid #e8e8e8;
  padding: 20px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 820px;
  margin: 0 auto;
  font-size: 13px;
  color: #999;
}

.site-footer a {
  color: #666;
}

.site-footer a:hover {
  color: #1a73e8;
}

/* 响应式 */
@media (max-width: 600px) {
  .header-inner {
    padding: 20px 16px;
  }
  .site-title {
    font-size: 18px;
  }
  .nav a {
    margin-left: 12px;
    font-size: 13px;
  }
  .container {
    padding: 24px 16px;
  }
  .hero h1 {
    font-size: 22px;
  }
  .post-header h1 {
    font-size: 22px;
  }
}