:root {
  --bg: #ffffff;
  --text: #111827;
  --text-muted: #6b7280;
  --text-subtle: #9ca3af;
  --border: #e5e7eb;
  --border-subtle: #f3f4f6;
  --link: #1d4ed8;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.7;
  font-size: 1rem;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover { opacity: 0.7; }

.container {
  max-width: 660px;
  margin: 0 auto;
  padding: 6rem 2rem 10rem;
}

/* ── Site name ── */
.site-name {
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  margin-bottom: 2rem;
}

.site-name a {
  color: var(--text);
  text-decoration: none;
}

.site-name a:hover { opacity: 1; }

/* ── Intro quote ── */
.intro {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* ── More link line ── */
.more-link {
  font-size: 0.9375rem;
  margin-bottom: 2.2rem;
}

/* ── Prose ── */
.prose p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.prose p:last-child { margin-bottom: 0; }

.prose a { color: var(--link); }

.prose h2, .prose h3 {
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.prose h2 {
  font-size: 1.0625rem;
  margin-top: 2rem;
  margin-bottom: 0.625rem;
}

.prose h3 {
  font-size: 0.9375rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.prose ul, .prose ol {
  margin: 0.75rem 0 1.25rem 1.25rem;
}

.prose li { margin-bottom: 0.25rem; line-height: 1.7; }

.prose code {
  font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.875em;
  background: var(--border-subtle);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.prose pre {
  background: var(--border-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.25rem 0;
}

.prose pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
}

.prose blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  color: var(--text-muted);
  margin: 1.25rem 0;
}

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

.post-heading {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

.post-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Comments ── */
.comments { margin-top: 4rem; }

/* ── Blog list ── */
.post-list { list-style: none; margin-top: 2.2rem; }

.post-item { border-bottom: 1px solid var(--border-subtle); }
.post-item:first-child { border-top: 1px solid var(--border-subtle); }

.post-link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 0.75rem 0;
  text-decoration: none;
  color: var(--text);
  transition: opacity 0.15s;
}

.post-link:hover { opacity: 0.6; }

.post-title { font-size: 0.9375rem; }

.post-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.no-posts {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* ── Projects (More) ── */
.project-list { list-style: none; }

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

.project-item:first-child { border-top: 1px solid var(--border-subtle); }

.project-name {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.2rem;
}

.project-name a {
  color: var(--text);
  text-decoration: none;
}

.project-name a:hover {
  color: var(--link);
  opacity: 1;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Mobile ── */
@media (max-width: 720px) {
  .container {
    padding: 2rem 1.25rem 5rem;
  }

  .site-name {
    margin-bottom: 0.75rem;
  }
}
