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

:root {
  --color-primary: #4a2c6e;
  --color-accent: #7c4dbd;
  --color-text: #1a1a2e;
  --color-muted: #666;
  --color-border: #e8e8e8;
  --color-bg: #fff;
  --color-bg-alt: #fafafa;
  --font-body: Georgia, 'Times New Roman', serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 680px;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.75;
  font-size: 1.05rem;
}

/* ---- Header ---- */
.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem 1.5rem;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.blog-title a {
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}
.blog-title a:hover { color: var(--color-accent); }
.header-links { display: flex; gap: 1.25rem; }
.header-links a {
  font-family: var(--font-ui);
  font-size: .85rem;
  color: var(--color-muted);
  text-decoration: none;
}
.header-links a:hover { color: var(--color-primary); }

/* ---- Main layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* ---- Blog index ---- */
.post-list { list-style: none; }
.post-list-item { padding: 2rem 0; border-bottom: 1px solid var(--color-border); }
.post-list-item:first-child { padding-top: 0; }
.post-list-item:last-child { border-bottom: none; }
.post-meta {
  font-family: var(--font-ui);
  font-size: .8rem;
  color: var(--color-muted);
  margin-bottom: .5rem;
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}
.post-list-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: .5rem;
  font-family: var(--font-ui);
  line-height: 1.3;
}
.post-list-title a { color: var(--color-text); text-decoration: none; }
.post-list-title a:hover { color: var(--color-accent); }
.post-excerpt { color: #555; font-size: .95rem; }
.read-more {
  display: inline-block;
  margin-top: .75rem;
  font-family: var(--font-ui);
  font-size: .85rem;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}
.read-more:hover { text-decoration: underline; }

/* ---- Single post ---- */
.post-header { margin-bottom: 2rem; }
.post-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  font-family: var(--font-ui);
  color: var(--color-text);
  margin-bottom: .75rem;
}
.cover-image { width: 100%; border-radius: 8px; margin-bottom: 2rem; max-height: 420px; object-fit: cover; }
.post-content { font-size: 1.05rem; line-height: 1.85; }
.post-content h2, .post-content h3 { font-family: var(--font-ui); margin: 2rem 0 .75rem; }
.post-content p { margin-bottom: 1.25rem; }
.post-content a { color: var(--color-accent); }
.post-content img { max-width: 100%; border-radius: 6px; margin: 1rem 0; }
.post-content blockquote { border-left: 3px solid var(--color-accent); padding-left: 1.25rem; color: #555; font-style: italic; margin: 1.5rem 0; }
.post-content ul, .post-content ol { padding-left: 1.75rem; margin-bottom: 1.25rem; }
.post-content pre { background: #f4f4f8; border-radius: 6px; padding: 1rem 1.25rem; overflow-x: auto; margin-bottom: 1.25rem; }
.post-content code { font-size: .88em; background: #f0f0f5; padding: .15em .4em; border-radius: 3px; }
.post-content pre code { background: none; padding: 0; }
.post-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; font-size: .9rem; }
.post-content th, .post-content td { border: 1px solid var(--color-border); padding: .6rem .9rem; text-align: left; }
.post-content th { background: #f8f8fb; font-family: var(--font-ui); font-weight: 600; }

/* ---- Tags ---- */
.post-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.5rem; }
.tag-link {
  font-family: var(--font-ui);
  font-size: .78rem;
  padding: .25rem .7rem;
  border-radius: 20px;
  background: #f0edf7;
  color: var(--color-primary);
  text-decoration: none;
}
.tag-link:hover { background: var(--color-accent); color: #fff; }

/* ---- Pagination ---- */
.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 2.5rem; font-family: var(--font-ui); }
.page-link {
  padding: .45rem .9rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--color-primary);
  background: #f0edf7;
  font-size: .9rem;
}
.page-link.active { background: var(--color-primary); color: #fff; }
.page-link:hover:not(.active) { background: var(--color-accent); color: #fff; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem;
  font-family: var(--font-ui);
  font-size: .8rem;
  color: #aaa;
  text-align: center;
}
.site-footer a { color: var(--color-muted); text-decoration: none; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .post-title { font-size: 1.5rem; }
  .container { padding: 1.5rem 1rem 3rem; }
}
