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

:root {
  --text: #1a1a1a;
  --muted: #666;
  --border: #e0e0e0;
  --bg: #fff;
  --accent: #d97706;
  --max-width: 680px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8e8e8;
    --muted: #999;
    --border: #333;
    --bg: #111;
    --accent: #fbbf24;
  }

  .post-body pre {
    background: #1e1e1e;
  }
}

body {
  font-family: Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0 1rem;
}

a {
  color: var(--accent);
}

a:hover {
  opacity: 0.75;
}

header, main, footer {
  max-width: var(--max-width);
  margin: 0 auto;
}

header {
  padding: 2rem 0 1rem;
  display: flex;
  align-items: baseline;
  gap: 2rem;
}

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

.site-title {
  font-size: 1rem;
  font-weight: bold;
  margin: 0;
}

nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

main {
  padding: 0 0 2.5rem 0;
}

footer {
  padding: 1.5rem 0;
  font-size: 0.875rem;
  color: var(--muted);
}

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

.post-list li {
  padding: 0.4rem 0;
}

.post-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  text-decoration: none;
}

.post-list a:hover {
  text-decoration: underline;
}

.post-list .date {
  color: var(--muted);
  font-size: 0.875rem;
  white-space: nowrap;
  font-family: monospace;
}

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

.post-header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  line-height: 1.3;
}

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

.post-body h2 { font-size: 1.25rem; margin-top: 2rem; }
.post-body h3 { font-size: 1.1rem; margin-top: 1.75rem; }

.post-body pre {
  background: #f5f5f5;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.875rem;
  border-radius: 2px;
}

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

/* Homepage intro */
.intro {
  margin: 2rem 0;
}

/* See all link */
.see-all {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  text-decoration: none;
}

.see-all:hover {
  text-decoration: underline;
  opacity: 1;
}

/* Section headings on homepage */
.section-title {
  font-size: 1.4rem;
  color: var(--text);
  margin: 2.5rem 0 0;
}

/* Share CTA */
.share-cta {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.share-btn {
  background: none;
  border: 1px solid var(--text);
  padding: 0.3rem 0.9rem;
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  border-radius: 2px;
}

.share-btn:hover {
  background: var(--text);
  color: var(--bg);
}

.share-feedback {
  font-size: 0.875rem;
  color: var(--muted);
}
