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

:root {
  color-scheme: light dark;
  --paper: #f6f2ea;
  --paper-2: #efe9dd;
  --ink: #1e1c19;
  --ink-soft: #5d574d;
  --rule: #cfc5b4;
  --accent: #9a3b22;
  --strip-bg: #1e1c19;
  --strip-fg: #e8e1d3;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16171a;
    --paper-2: #1c1e22;
    --ink: #e6e1d7;
    --ink-soft: #9b968c;
    --rule: #34363b;
    --accent: #e0916c;
    --strip-bg: #0f1012;
    --strip-fg: #cfc9bd;
  }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.12rem;
  line-height: 1.68;
  font-weight: 350;
}

/* ---- top strip ---- */
.strip {
  background: var(--strip-bg);
  color: var(--strip-fg);
  border-bottom: none;
  padding: 0.55rem 1.1rem;
  font: 500 0.72rem/1.4 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.strip a { color: var(--strip-fg); text-decoration: none; border-bottom: 1px solid currentColor; }
.strip a:hover { color: #e9a07a; }
.strip span { color: #9c968a; letter-spacing: 0.04em; }

/* ---- masthead ---- */
.masthead {
  max-width: 42rem;
  padding-top: 3.2rem;
  padding-bottom: 1.4rem;
}
.masthead::after { content: ""; display: block; clear: both; }

.avatar {
  float: left;
  width: 3.4rem;
  height: 3.4rem;
  margin: 0.25rem 1rem 0.5rem 0;
}

.blog-title {
  font-size: 2.35rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0;
}
body.post .blog-title { font-size: 1.15rem; font-weight: 500; letter-spacing: 0.02em; }
.blog-title a { text-decoration: none; }
.blog-title a:hover { color: var(--accent); }

.tagline {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 1.02rem;
}
body.post .tagline { font-size: 0.9rem; }

main, .colophon { max-width: 42rem; }

/* ---- links ---- */
main a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--rule);
}
main a:hover { text-decoration-color: var(--accent); }

/* ---- about ---- */
.about {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.4rem 0 1.5rem;
  margin-top: 0.5rem;
}
.about p:first-child { margin-top: 0; }
.about p:last-child { margin-bottom: 0; }
.about strong { font-weight: 600; }

/* ---- post list ---- */
.posts h2, .post-header h1 { font-weight: 600; }
.posts h2 {
  font: 500 0.72rem/1.4 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 2.6rem 0 0.4rem;
}
.post-list { counter-reset: post; }
.post-list li {
  justify-content: flex-start;
  align-items: baseline;
  gap: 0.3rem 0.9rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}
.post-list li::before {
  counter-increment: post;
  content: counter(post, decimal-leading-zero);
  font: 400 0.72rem "IBM Plex Mono", ui-monospace, monospace;
  color: var(--accent);
  flex: 0 0 auto;
}
.post-link {
  font-size: 1.18rem;
  font-weight: 500;
  color: var(--ink) !important;
  text-decoration: none;
  flex: 1 1 14rem;
}
.post-link:hover { color: var(--accent) !important; text-decoration: underline; text-decoration-color: var(--accent); }
.post-list time { margin-left: auto; flex: 0 0 auto; }

time {
  font: 400 0.74rem "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.empty, .notice { color: var(--ink-soft); font-style: italic; }

/* ---- post page ---- */
.post-header {
  margin-top: 2.4rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--rule);
}
.post-header h1 {
  font-size: 2.1rem;
  letter-spacing: -0.015em;
  margin: 0 0 0.55rem;
}
.post-body { margin-top: 1.8rem; }
.post-body > p:first-child { font-size: 1.18rem; }
.post-body p { margin: 0 0 1.15rem; }

.post-body h2 {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2.4rem 0 0.6rem;
  text-transform: none;
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
}
.post-body h3, .post-body h4 {
  font-size: 1.05rem;
  font-weight: 600;
  font-style: italic;
  color: var(--ink-soft);
  margin: 1.8rem 0 0.4rem;
}

blockquote {
  margin: 1.6rem 0;
  padding: 0 0 0 1.3rem;
  border-left: 2px solid var(--accent);
  color: var(--ink-soft);
  font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }

code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.86em;
  background: var(--paper-2);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}
pre {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.9rem 1rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}
pre code { background: none; padding: 0; font-size: 1em; }

ul, ol { padding-left: 1.3rem; }
li { margin: 0.3rem 0; }

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

strong { font-weight: 600; }

/* ---- feet ---- */
.receipt, .colophon {
  font: 400 0.78rem/1.6 "IBM Plex Mono", ui-monospace, monospace;
  color: var(--ink-soft);
}
.receipt {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}
.colophon { border-top: 1px solid var(--rule); padding-top: 1.1rem; }

/* ---- small screens ---- */
@media (max-width: 34rem) {
  body { font-size: 1.06rem; }
  .masthead { padding-top: 2.2rem; }
  .blog-title { font-size: 1.95rem; }
  .post-header h1 { font-size: 1.65rem; }
  .avatar { width: 2.8rem; height: 2.8rem; margin-right: 0.8rem; }
  .strip { font-size: 0.68rem; letter-spacing: 0.04em; }
}
