:root {
  --bg: #fdfdfb;
  --text: #1c1c1a;
  --muted: #6a6a64;
  --accent: #7a2e2e;
  --rule: #e4e2da;
  --code-bg: #f2f1ec;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191917;
    --text: #e8e6e0;
    --muted: #9a988f;
    --accent: #d98f8f;
    --rule: #33322e;
    --code-bg: #232320;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
  max-width: 42rem;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.06rem;
  line-height: 1.65;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, .site-name, nav, .post-meta, .pub-meta, .pub-links, .site-footer {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

h1 { font-size: 1.7rem; line-height: 1.25; margin: 2.2rem 0 0.5rem; }
h2 { font-size: 1.2rem; margin: 2.2rem 0 0.6rem; }
h3 { font-size: 1.05rem; margin: 1.4rem 0 0.2rem; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.4rem 0 1rem;
  border-bottom: 1px solid var(--rule);
}
.site-name {
  font-weight: 650;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.site-header nav { display: flex; gap: 1.1rem; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.site-header nav a:hover { color: var(--accent); }

.post-meta, .pub-meta { color: var(--muted); font-size: 0.9rem; margin: 0.15rem 0 0.5rem; }
.pub-status {
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.05rem 0.35rem;
  font-size: 0.8rem;
}
.pub-summary { margin: 0.3rem 0; }
.pub-links { font-size: 0.9rem; margin: 0.3rem 0 0; }
.pub-links a { margin-right: 0.9rem; }

.pub-entry { margin-bottom: 1.8rem; }
.item-list { list-style: none; padding: 0; }
.item-list li { margin-bottom: 0.9rem; }
.item-list .when { color: var(--muted); font-size: 0.88rem; margin-left: 0.5rem; }

pre, code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--code-bg);
}
code { padding: 0.1em 0.3em; border-radius: 3px; }
pre { padding: 0.9rem 1rem; border-radius: 6px; overflow-x: auto; line-height: 1.5; }
pre code { padding: 0; background: none; }

blockquote {
  margin: 1rem 0;
  padding: 0.1rem 0 0.1rem 1rem;
  border-left: 3px solid var(--rule);
  color: var(--muted);
}

img { max-width: 100%; height: auto; }

table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
th, td { border: 1px solid var(--rule); padding: 0.4rem 0.6rem; text-align: left; }

.site-footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.88rem;
}
.site-footer a { color: var(--muted); }
