/* ============================================
   Base & Reset
   ============================================ */

:root {
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-mono: 'IBM Plex Mono', 'Menlo', monospace;
  --color-text: #1a1a1a;
  --color-text-secondary: #6b6b6b;
  --color-bg: #fafaf8;
  --color-border: #e0ddd8;
  --color-link: #1a1a1a;
  --color-link-hover: #555;
  --max-width: 900px;
}

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

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  padding: 0 1.5rem;
}

/* ============================================
   Navigation
   ============================================ */

.site-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--color-border);
}

.nav-name {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--color-text);
}

/* ============================================
   Main content area
   ============================================ */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

/* ============================================
   Blog index page
   ============================================ */

.blog-index h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  letter-spacing: -0.02em;
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-link {
  text-decoration: none;
  color: inherit;
  display: block;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
  transition: opacity 0.2s;
}

.post-link:first-child {
  border-top: 1px solid var(--color-border);
}

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

.post-preview h2 {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  letter-spacing: -0.01em;
}

.post-preview .post-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 0.3rem;
}

.post-excerpt {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-top: 0.3rem;
  line-height: 1.5;
}

/* ============================================
   Individual blog post
   ============================================ */

.post-header {
  margin-bottom: 2.5rem;
}

.post-header .post-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 0.75rem;
}

.post-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.post-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  margin-top: 0.75rem;
  line-height: 1.5;
  font-style: italic;
}

/* ============================================
   Post content / Prose
   ============================================ */

.post-content p {
  margin-bottom: 1.3rem;
}

.post-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.post-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.post-content a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color 0.2s;
}

.post-content a:hover {
  color: var(--color-link-hover);
}

.post-content strong {
  font-weight: 600;
}

.post-content em {
  font-style: italic;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.3rem;
  padding-left: 1.4rem;
}

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

.post-content blockquote {
  border-left: 2px solid var(--color-border);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--color-text-secondary);
  font-style: italic;
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: #f0eeea;
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

.post-content pre {
  background: #f0eeea;
  padding: 1.25rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1.3rem;
}

.post-content pre code {
  background: none;
  padding: 0;
  font-size: 0.82rem;
  line-height: 1.6;
}

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

/* ============================================
   About page
   ============================================ */

.about p {
  margin-bottom: 1.3rem;
}

.about-links {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--color-text-secondary);
}

.about-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
}

.about-links a:hover {
  color: var(--color-text);
}

.about h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.about ul {
  padding-left: 1.2rem;
}

.about ul li {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.about ul a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
}

.site-footer p {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-secondary);
}

/* ============================================
   Responsive
   ============================================ */

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

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

  .site-nav {
    padding: 1.5rem 0 0.75rem;
  }

  main {
    padding: 2rem 0 3rem;
  }
}
