/* ========================================
   Minimal Blog — 极简个人博客
   ======================================== */

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

:root {
  --bg: #fafaf9;
  --text: #1a1a1a;
  --muted: #787774;
  --border: #e8e7e4;
  --accent: #0d6e6e;
  --accent-hover: #095555;
  --max-width: 680px;
}

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

body {
  font-family: "Georgia", "Times New Roman", serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

a:hover {
  color: var(--accent-hover);
}

/* --- Layout --- */
header {
  padding: 3rem 1.5rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

header .site-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

header nav {
  margin-top: 0.6rem;
  display: flex;
  gap: 1.5rem;
}

header nav a {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

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

main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  width: 100%;
}

footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

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

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

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

.post-item .post-date {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.post-item .post-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.post-item .post-title a {
  color: var(--text);
}

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

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

/* --- Post Page --- */
.post-header {
  margin-bottom: 2.5rem;
}

.post-header h1 {
  font-size: 1.8rem;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.post-meta {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
}

.post-body {
  font-size: 1.05rem;
}

.post-body p {
  margin-bottom: 1.4rem;
}

.post-body h2 {
  font-size: 1.3rem;
  margin: 2.5rem 0 0.8rem;
}

.post-body h3 {
  font-size: 1.1rem;
  margin: 2rem 0 0.6rem;
}

.post-body ul, .post-body ol {
  margin: 0 0 1.4rem 1.5rem;
}

.post-body li {
  margin-bottom: 0.4rem;
}

.post-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
  padding: 0.5rem 1rem;
  color: var(--muted);
  font-style: italic;
}

.post-body code {
  font-family: "SF Mono", "Menlo", "Monaco", monospace;
  font-size: 0.88em;
  background: #f0efed;
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.post-body pre {
  background: #f0efed;
  padding: 1.2rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1.4rem;
  font-size: 0.88rem;
  line-height: 1.6;
}

.post-body pre code {
  background: none;
  padding: 0;
}

.post-body img {
  max-width: 100%;
  border-radius: 4px;
  margin: 1rem 0;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.back-link {
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

/* --- About Page --- */
.about-section {
  margin-bottom: 2rem;
}

.about-section h2 {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.about-section p {
  margin-bottom: 1rem;
  color: #333;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  html { font-size: 16px; }
  header { padding: 2rem 1rem 1rem; }
  main { padding: 0 1rem 3rem; }
  .post-header h1 { font-size: 1.5rem; }
}