/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fafafa;
  --fg: #1a1a1a;
  --muted: #6b7280;
  --accent: #2563eb;
  --border: #e5e7eb;
  --card-bg: #ffffff;
  --max-w: 680px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

header h1 a {
  color: var(--fg);
  text-decoration: none;
}

header p {
  color: var(--muted);
  font-size: 15px;
  margin-top: 4px;
}

/* Post list */
.post-list {
  list-style: none;
}

.post-list li {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

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

.post-list .post-date {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.post-list h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

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

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

.post-list .excerpt {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.tag {
  font-size: 12px;
  background: var(--border);
  color: var(--muted);
  padding: 2px 10px;
  border-radius: 12px;
}

/* Single post */
.post-header {
  margin-bottom: 32px;
}

.post-header .post-date {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.post-header h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.3;
}

.post-body {
  font-size: 17px;
  line-height: 1.8;
}

.post-body p {
  margin-bottom: 20px;
}

.post-body h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 36px 0 16px;
}

.post-body h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 12px;
}

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

.post-body li {
  margin-bottom: 8px;
}

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

.post-body code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 14px;
  background: var(--border);
  padding: 2px 6px;
  border-radius: 4px;
}

.post-body pre {
  background: var(--fg);
  color: #e5e7eb;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 24px 0;
}

.post-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.post-body img {
  max-width: 100%;
  border-radius: 8px;
  margin: 24px 0;
}

.post-body a {
  color: var(--accent);
  text-decoration: underline;
}

.back-link {
  display: inline-block;
  margin-top: 48px;
  margin-bottom: 48px;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
}

.back-link:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  margin-top: 48px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* 404 */
.not-found {
  text-align: center;
  padding: 80px 0;
}

.not-found h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 12px;
}

.not-found p {
  color: var(--muted);
}

.not-found a {
  color: var(--accent);
  text-decoration: none;
}

/* Responsive */
@media (max-width: 600px) {
  header { padding: 32px 0 24px; margin-bottom: 32px; }
  .post-header h1 { font-size: 26px; }
  .post-list h2 { font-size: 19px; }
  body { font-size: 16px; }
}
