:root {
  --text: #333;
  --bg: #fff;
  --link: #0066cc;
  --muted: #666;
  --border: #eee;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
header {
  margin-bottom: 3rem;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

/* Post list (home page) */
.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  margin-bottom: 1.5rem;
}

.post-list time {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
}

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

.post-header h1 {
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

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

.post-content h2,
.post-content h3 {
  margin-top: 2rem;
}

/* Code */
code {
  background: #f5f5f5;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

pre {
  background: #f5f5f5;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 4px;
}

pre code {
  padding: 0;
  background: none;
}

/* Footnotes */
.footnotes {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}

/* Math - ensure display math doesn't overflow on mobile */
.MathJax {
  overflow-x: auto;
  overflow-y: hidden;
}

/* Responsive */
@media (max-width: 600px) {
  body {
    padding: 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }
}
