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

/* === Base === */
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, sans-serif;
  color: #3a3a3a;
  background: #f6f5f0;
  line-height: 1.8;
}
a { color: #3a3a3a; text-decoration: none; transition: color 0.2s; }
a:hover { color: #b8860b; }
::selection { background: rgba(184, 134, 11, 0.15); color: #222; }

/* === Layout === */
.container { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* === Header === */
.site-header {
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 20px 0;
  background: rgba(246, 245, 240, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-title {
  font-size: 1rem;
  font-weight: 600;
  color: #b8860b;
  letter-spacing: 0.05em;
}
.site-nav { display: flex; gap: 28px; }
.site-nav a {
  font-size: 0.85rem;
  color: #888;
  letter-spacing: 0.02em;
}
.site-nav a:hover { color: #b8860b; }
.menu-toggle { display: none; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: #888; }

/* === Home Hero === */
.hero {
  padding: 80px 0 48px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.hero h1 {
  font-size: 1.8rem;
  font-weight: 300;
  color: #2a2a2a;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}
.hero p {
  color: #999;
  font-size: 1rem;
  font-weight: 300;
}

/* === Article List === */
.article-list { padding: 12px 0; }

.article-card {
  padding: 28px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: transform 0.2s;
}
.article-card:hover { transform: translateX(4px); }
.article-card time {
  font-size: 0.8rem;
  color: #aaa;
  font-family: "SF Mono", "Fira Code", monospace;
}
.article-card h2 {
  font-size: 1.15rem;
  font-weight: 500;
  margin: 10px 0 6px;
  color: #333;
}
.article-card h2 a { color: #333; }
.article-card h2 a:hover { color: #b8860b; }
.article-card .summary {
  font-size: 0.88rem;
  color: #888;
  line-height: 1.6;
}
.empty { color: #aaa; padding: 60px 0; text-align: center; font-style: italic; }

/* === Article === */
.article-header { padding: 64px 0 32px; }
.article-meta {
  font-size: 0.8rem;
  color: #aaa;
  margin-bottom: 12px;
  font-family: "SF Mono", "Fira Code", monospace;
}
.article-header h1 {
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.4;
  color: #2a2a2a;
}

.article-content {
  padding-bottom: 60px;
  font-size: 1rem;
  line-height: 2;
  color: #555;
}
.article-content h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 40px 0 16px;
  color: #333;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.article-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 28px 0 10px;
  color: #444;
}
.article-content p { margin-bottom: 18px; }
.article-content img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.06);
}
.article-content blockquote {
  border-left: 2px solid #b8860b;
  padding: 12px 20px;
  color: #777;
  margin: 20px 0;
  background: rgba(0,0,0,0.02);
  border-radius: 0 6px 6px 0;
}
.article-content code {
  font-family: "SF Mono", "Fira Code", monospace;
  background: rgba(0,0,0,0.04);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.88em;
  color: #b8860b;
}
.article-content pre {
  background: #eeeee8;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid rgba(0,0,0,0.05);
}
.article-content pre code { background: none; padding: 0; color: #555; }
.article-content ul, .article-content ol { padding-left: 24px; margin-bottom: 18px; }
.article-content li { margin-bottom: 6px; }
.article-content strong { color: #333; }

/* === About === */
.about-content { padding: 64px 0; color: #555; }
.about-content h1 { font-size: 1.5rem; font-weight: 400; margin-bottom: 28px; color: #2a2a2a; }
.about-content h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 36px 0 14px;
  color: #333;
}
.about-content p { margin-bottom: 18px; }
.about-content a { color: #b8860b; border-bottom: 1px solid rgba(184, 134, 11, 0.3); }
.about-content a:hover { border-color: #b8860b; }
.contact-box {
  background: rgba(0,0,0,0.02);
  padding: 28px;
  border-radius: 10px;
  margin: 28px 0;
  border: 1px solid rgba(0,0,0,0.06);
}
.contact-box p { margin-bottom: 10px; color: #777; }
.contact-box strong { color: #444; }

/* === Footer === */
.site-footer {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding: 28px 0;
  margin-top: 60px;
}
.footer-content { font-size: 0.8rem; color: #aaa; line-height: 1.8; }
.footer-links { margin-bottom: 12px; }
.footer-links a { color: #999; margin-right: 20px; font-size: 0.8rem; }
.footer-links a:hover { color: #b8860b; }
.disclaimer { font-size: 0.72rem; color: #bbb; line-height: 1.6; }

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f6f5f0; }
::-webkit-scrollbar-thumb { background: #d5d4cf; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #bbb; }

/* === Mobile === */
@media (max-width: 640px) {
  .site-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    background: rgba(246, 245, 240, 0.98);
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    gap: 18px;
    z-index: 10;
  }
  .site-nav.open { display: flex; }
  .menu-toggle { display: block; }
  .hero { padding: 48px 0 32px; }
  .hero h1 { font-size: 1.4rem; }
  .article-header { padding: 40px 0 24px; }
  .article-header h1 { font-size: 1.3rem; }
  .site-header .container { position: relative; }
}
