@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;1,400&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&display=swap');

:root {
  color-scheme: light dark;
  --bg: #f6f4ee;
  --bg-elevated: #edeae0;
  --fg: #1b1c1e;
  --fg-muted: #5e6168;
  --border: #d5d1c5;
  --border-strong: #9c988c;
  --accent: #a83c24;
  --font-serif: 'Newsreader', Georgia, "Times New Roman", serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131416;
    --bg-elevated: #1b1d21;
    --fg: #e5e3dc;
    --fg-muted: #92969f;
    --border: #2a2d34;
    --border-strong: #494e59;
    --accent: #e2785c;
  }
}

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.72;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--fg);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

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

/* Top navigation strip */
.strip {
  background-color: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  color: var(--fg-muted);
}

.strip a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

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

/* Layout containers */
.masthead,
main,
.colophon {
  max-width: 42rem;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Masthead */
.masthead {
  padding-top: 3.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.post .masthead {
  padding-top: 2.25rem;
  padding-bottom: 1.5rem;
}

.avatar {
  width: 4.25rem;
  height: 4.25rem;
  margin-bottom: 1.1rem;
  border-radius: 0.65rem;
}

.post .avatar {
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.75rem;
}

.blog-title {
  font-family: var(--font-serif);
  font-size: 2.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}

.post .blog-title {
  font-size: 1.5rem;
}

.blog-title a {
  text-decoration: none;
  color: var(--fg);
}

.blog-title a:hover {
  color: var(--accent);
}

.tagline {
  margin: 0.45rem 0 0;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--fg-muted);
}

/* About section on front page */
.about {
  margin-top: 2.25rem;
  padding: 1.4rem 1.6rem;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  font-size: 1.05rem;
  line-height: 1.65;
}

.about p:first-child {
  margin-top: 0;
}

.about p:last-child {
  margin-bottom: 0;
}

/* Post index */
.posts {
  margin-top: 2.75rem;
}

.posts > h2 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  margin: 0 0 0.75rem;
}

.post-list {
  border-top: 1px solid var(--border);
}

.post-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  gap: 0.35rem 1.25rem;
}

.post-link {
  font-size: 1.2rem;
  font-weight: 500;
  text-decoration: none;
}

.post-link:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

time {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-muted);
  white-space: nowrap;
}

.empty {
  font-style: italic;
  color: var(--fg-muted);
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

/* Individual post styling */
.post-header {
  margin-top: 2.5rem;
  margin-bottom: 2rem;
}

.post-header h1 {
  font-size: 2.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 0.6rem;
}

.post-header time {
  display: inline-block;
}

.post-body p {
  margin: 1.25rem 0;
}

.post-body h2 {
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2.4rem 0 0.75rem;
}

.post-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.9rem 0 0.5rem;
}

.post-body h4 {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  margin: 1.75rem 0 0.5rem;
}

.post-body ul,
.post-body ol {
  padding-left: 1.4rem;
  margin: 1.25rem 0;
}

.post-body li {
  margin-bottom: 0.4rem;
}

blockquote {
  margin: 1.6rem 0;
  padding: 0.2rem 0 0.2rem 1.25rem;
  border-left: 2px solid var(--accent);
  color: var(--fg-muted);
  font-style: italic;
}

code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  background-color: var(--bg-elevated);
  padding: 0.15em 0.38em;
  border-radius: 3px;
  border: 1px solid var(--border);
}

pre {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem 1.2rem;
  margin: 1.6rem 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}

hr {
  border: 0;
  height: 1px;
  background: var(--border);
  max-width: 6rem;
  margin: 2.5rem auto;
}

/* Notices, receipts, and colophon */
.notice {
  margin-top: 2rem;
  padding: 0.75rem 1rem;
  background-color: var(--bg-elevated);
  border-left: 3px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.receipt {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--border);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--fg-muted);
}

.colophon {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  padding-bottom: 3.5rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--fg-muted);
}

@media (max-width: 600px) {
  body {
    font-size: 1.06rem;
  }
  .masthead {
    padding-top: 2.25rem;
  }
  .blog-title {
    font-size: 1.95rem;
  }
  .post-header h1 {
    font-size: 1.75rem;
  }
  .about {
    padding: 1.15rem 1.2rem;
  }
}
