/* === Base === */
*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --text: #1a1a1a;
  --text-light: #555;
  --text-lighter: #888;
  --bg: #fff;
  --accent: #2563eb;
  --border: #e5e5e5;
  --max-width: 680px;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

/* === Wrapper === */
.wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* === Header === */
.site-header {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.site-header .wrapper {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 32px;
}

.site-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-title:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.site-nav a {
  font-size: 0.95rem;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* === Page Content === */
.page-content {
  min-height: 50vh;
  padding-bottom: 64px;
}

/* === Home Intro === */
.home-intro {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.home-intro h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.3;
}

.home-intro p {
  margin: 0;
  color: var(--text-light);
  font-size: 1.05rem;
}

/* === Post List === */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.post-preview {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.post-preview:last-child {
  border-bottom: none;
}

.post-preview h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.35;
}

.post-preview h2 a {
  color: var(--text);
  text-decoration: none;
}

.post-preview h2 a:hover {
  color: var(--accent);
}

.post-meta {
  font-size: 0.85rem;
  color: var(--text-lighter);
  margin: 0 0 10px;
}

.post-thumbnail {
  display: block;
  margin: 0 0 14px;
}

.post-thumbnail img {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 8px;
}

.post-excerpt {
  margin: 0;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* === Post Page === */
.post-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.post-header h1 {
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.post-content h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 36px 0 14px;
  line-height: 1.35;
}

.post-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 28px 0 10px;
}

.post-content p {
  margin: 0 0 18px;
}

.post-content a {
  color: var(--accent);
  text-decoration: none;
}

.post-content a:hover {
  text-decoration: underline;
}

.post-content ul, .post-content ol {
  margin: 0 0 18px;
  padding-left: 24px;
}

.post-content li {
  margin-bottom: 6px;
}

.post-content blockquote {
  margin: 24px 0;
  padding: 0 20px;
  border-left: 3px solid var(--border);
  color: var(--text-light);
  font-style: italic;
}

.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 24px auto;
  border-radius: 8px;
}

.post-content code {
  font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
  font-size: 0.88em;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
}

.post-content pre {
  background: #f5f5f5;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0 0 18px;
}

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

/* === Post Navigation === */
.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.post-nav a {
  color: var(--text-light);
  text-decoration: none;
}

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

.post-nav .next {
  margin-left: auto;
}

/* === About Page === */
.about-page h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 32px 0 12px;
}

.about-page p {
  margin: 0 0 16px;
  color: var(--text-light);
}

.about-page ul {
  margin: 0 0 18px;
  padding-left: 20px;
  color: var(--text-light);
}

.about-page li {
  margin-bottom: 6px;
}

/* === Footer === */
.site-footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-lighter);
}

/* === Responsive === */
@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  .site-header {
    padding: 28px 0 20px;
    margin-bottom: 32px;
  }

  .site-header .wrapper {
    gap: 20px;
  }

  .site-nav {
    gap: 16px;
  }

  .post-header h1 {
    font-size: 1.45rem;
  }

  .post-preview h2 {
    font-size: 1.2rem;
  }
}
