:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #b5432d;
  --rule: #ebebeb;
  --max: 680px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111110;
    --text: #e8e6e1;
    --muted: #9a988f;
    --accent: #e07a5f;
    --rule: #2a2a28;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 19px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 24px 96px;
}

/* Header */
.site-header {
  margin-bottom: 56px;
}

.name {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  line-height: 1.1;
}

.tagline {
  color: var(--muted);
  font-style: italic;
  margin: 0 0 20px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
}

.links a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Sections */
.section {
  margin-bottom: 56px;
}

.section p a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.section p a:hover {
  border-color: var(--accent);
}

.section-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding-bottom: 10px;
  margin: 0 0 24px;
  border-bottom: 1px solid var(--rule);
}

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

.post-item {
  margin-bottom: 32px;
}

.post-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  text-decoration: none;
  color: var(--text);
}

.post-title {
  font-size: 1.25rem;
  font-weight: 700;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.post-link:hover .post-title {
  color: var(--accent);
  border-color: var(--accent);
}

.post-date {
  flex-shrink: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.post-excerpt {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: 1rem;
  line-height: 1.55;
}

/* Article */
.article-header {
  margin-bottom: 40px;
}

.article-title {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 12px;
}

.article-meta {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
}

.article-body p {
  margin: 0 0 22px;
}

.article-body h2 {
  font-size: 1.4rem;
  margin: 40px 0 14px;
  letter-spacing: -0.01em;
}

.article-body em {
  font-style: italic;
}

.article-body blockquote {
  margin: 40px 0;
  padding: 0 24px;
  text-align: center;
  border: 0;
  color: var(--text);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.section-break {
  border: 0;
  height: 40px;
  margin: 24px 0;
  position: relative;
}

.section-break::after {
  content: "\00B7 \00B7 \00B7";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  letter-spacing: 0.6em;
  font-size: 1.4rem;
  color: var(--accent);
}

.unfinished {
  color: var(--muted);
  font-style: italic;
}

.article-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.article-body a:hover {
  border-color: var(--accent);
}

.article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: var(--rule);
  padding: 2px 6px;
  border-radius: 4px;
}

.back-link {
  display: inline-block;
  margin-bottom: 40px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent);
}

/* Footer */
.site-footer {
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 520px) {
  body { font-size: 18px; }
  .wrap { padding: 48px 20px 72px; }
  .name { font-size: 2rem; }
  .post-link { flex-direction: column; gap: 2px; }
}
