/* ===== 哈吉米博客 - 样式表 ===== */

/* --- 基础设置 --- */
:root {
  --bg: #fdfbf7;
  --card-bg: #ffffff;
  --text: #2d2d2d;
  --text-light: #6b6b6b;
  --accent: #e07b5a;
  --accent-hover: #c96a4b;
  --green: #6aab8e;
  --green-light: #eaf5ef;
  --border: #ebe5dd;
  --shadow: 0 2px 16px rgba(0,0,0,0.06);
  --radius: 12px;
  --max-width: 720px;
  --font-serif: 'Georgia', 'Noto Serif SC', 'STSong', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; height: auto; }

/* --- 导航栏 --- */
nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.nav-brand span { color: var(--accent); }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--text-light);
  font-size: 0.95rem;
  position: relative;
  padding-bottom: 3px;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

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

/* --- 首屏 --- */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.35;
  margin-bottom: 16px;
}
.hero p {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 32px;
}
.hero .tagline-accent { color: var(--accent); }

/* --- 文章列表 --- */
.post-list { padding-bottom: 60px; }

.post-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.post-card .post-date {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 8px;
}
.post-card h2 {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
  color: var(--text);
}
.post-card .post-excerpt {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 16px;
}
.post-card .post-tags {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.post-card .post-tags span {
  font-size: 0.78rem;
  padding: 3px 12px;
  border-radius: 20px;
  background: var(--green-light);
  color: var(--green);
  font-weight: 500;
}

/* --- 文章详情页 --- */
.article-header {
  text-align: center;
  padding: 60px 24px 40px;
}
.article-header .post-date {
  color: var(--text-light);
  font-size: 0.88rem;
  margin-bottom: 12px;
}
.article-header h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 20px;
}
.article-header .post-tags { justify-content: center; }

.article-body {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px 80px;
  font-size: 1rem;
  line-height: 2;
}
.article-body h2 {
  font-size: 1.35rem;
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.article-body h3 {
  font-size: 1.15rem;
  margin: 32px 0 12px;
  color: var(--accent);
}
.article-body p { margin-bottom: 20px; }
.article-body ul, .article-body ol { margin: 12px 0 20px 24px; }
.article-body li { margin-bottom: 6px; }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 24px 0;
  background: #fefaf7;
  border-radius: 0 8px 8px 0;
  color: var(--text-light);
}
.article-body code {
  font-size: 0.9em;
  background: #f5f2ed;
  padding: 2px 6px;
  border-radius: 4px;
}
.article-body pre {
  background: #2d2d2d;
  color: #e8e3db;
  padding: 20px 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 24px 0;
  font-size: 0.88rem;
  line-height: 1.6;
}
.article-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* --- 关于页 --- */
.about-section {
  padding: 60px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.about-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 48px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
}
.about-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f9d5c1, var(--accent));
  margin: 0 auto 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
}
.about-card h2 { font-size: 1.6rem; margin-bottom: 8px; }
.about-card .about-bio { color: var(--text-light); line-height: 1.9; margin-bottom: 28px; }
.about-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.about-links a {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 24px;
  background: var(--green-light);
  color: var(--green);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.about-links a:hover { background: #d4ece0; transform: translateY(-1px); }

/* --- 空状态 --- */
.empty-state {
  text-align: center; padding: 80px 24px; color: var(--text-light);
}
.empty-state .emoji { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 8px; }

/* --- 页脚 --- */
footer {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-light);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  max-width: var(--max-width);
  margin: 0 auto;
}
footer .heart { color: var(--accent); }

/* --- 响应式 --- */
@media (max-width: 640px) {
  html { font-size: 15px; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 50px 20px 40px; }
  .post-card { padding: 24px 20px; }
  .article-header h1 { font-size: 1.7rem; }
  .about-card { padding: 32px 24px; }
  nav { padding: 20px 16px 0; }
  .nav-links { gap: 16px; }
}
