:root {
  color-scheme: light;
  --paper: #f7f4eb;
  --ink: #252a2c;
  --muted: #626762;
  --rule: #cccbbf;
  --accent: #285b70;
  --warm: #ad541e;
  --wash: #eeece2;
}

body {
  background: var(--paper);
  color: var(--ink);
  font: 1.1rem/1.78 Georgia, "Times New Roman", serif;
  -webkit-text-size-adjust: 100%;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 3px solid var(--warm);
  outline-offset: 5px;
  border-radius: 1px;
}

.strip {
  padding: 0.75rem max(1rem, calc((100% - 42rem) / 2));
  gap: 0.4rem 1.2rem;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  background: var(--wash);
  font: 0.75rem/1.5 system-ui, sans-serif;
}

.strip a {
  color: var(--ink);
}

.masthead,
main,
.colophon {
  max-width: 44rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.masthead {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  column-gap: 1.15rem;
  align-items: center;
  padding-top: clamp(2.5rem, 8vw, 5.5rem);
  padding-bottom: 2.75rem;
}

.avatar {
  grid-column: 1;
  grid-row: 1 / 3;
  display: block;
  width: 4rem;
  height: 4rem;
  margin: 0;
}

.blog-title {
  grid-column: 2;
  margin: 0;
  color: var(--ink);
  font: 400 clamp(2rem, 6vw, 3.7rem)/1.08 Georgia, "Times New Roman", serif;
  letter-spacing: -0.055em;
}

.blog-title a {
  color: inherit;
  text-decoration: none;
}

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

.tagline {
  grid-column: 2;
  margin: 0.7rem 0 0;
  color: var(--muted);
  font: 0.85rem/1.6 system-ui, sans-serif;
}

main {
  padding-bottom: 4rem;
}

.about {
  padding: 0.05rem 0 0.05rem 1.25rem;
  border-left: 2px solid var(--warm);
}

.about p {
  margin: 0 0 1rem;
}

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

.posts {
  margin-top: 3.5rem;
}

.posts > h2 {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font: 600 0.75rem/1.5 system-ui, sans-serif;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

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

.post-link {
  flex: 1 1 16rem;
  font-size: 1.22rem;
  line-height: 1.4;
  text-decoration: none;
}

.post-link:hover {
  text-decoration: underline;
}

time {
  color: var(--muted);
  font: 0.76rem/1.6 ui-monospace, "Cascadia Code", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.post-list time {
  white-space: nowrap;
}

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

.post .masthead {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

.post-header {
  padding-top: 1.6rem;
  padding-bottom: 1.65rem;
  border-top: 2px solid var(--warm);
}

.post-header h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5.5vw, 3rem);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

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

h2 {
  margin: 2.6rem 0 0.85rem;
  font-size: 1.5rem;
  line-height: 1.3;
}

h3,
h4 {
  margin: 2rem 0 0.6rem;
  font-size: 1.15rem;
  line-height: 1.4;
}

.post-body li + li {
  margin-top: 0.5rem;
}

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

blockquote {
  margin: 1.8rem 0;
  padding: 0.15rem 0 0.15rem 1.25rem;
  border-left: 2px solid var(--warm);
  color: var(--muted);
}

blockquote > :last-child {
  margin-bottom: 0;
}

code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.85em;
}

:not(pre) > code {
  padding: 0.12em 0.25em;
  background: var(--wash);
  border-radius: 2px;
}

pre {
  max-width: 100%;
  padding: 1rem;
  border: 1px solid var(--rule);
  background: var(--wash);
  font-size: 0.9rem;
  line-height: 1.6;
  overflow-wrap: normal;
  tab-size: 2;
}

pre code {
  font-size: inherit;
}

hr {
  width: 5rem;
  margin: 2.75rem auto;
  border: 0;
  border-top: 2px solid var(--warm);
}

.receipt,
.notice,
.colophon {
  color: var(--muted);
  font: 0.77rem/1.7 system-ui, sans-serif;
}

.receipt {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.notice {
  border-left: 2px solid var(--warm);
  padding-left: 1rem;
}

.colophon {
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
  padding-bottom: 3rem;
}

.colophon p {
  margin: 0;
}

::selection {
  background: #ead49b;
  color: #252a2c;
}

@media (max-width: 30rem) {
  .strip span {
    flex-basis: 100%;
    order: 3;
  }

  .masthead {
    grid-template-columns: 2.8rem minmax(0, 1fr);
    column-gap: 0.8rem;
  }

  .avatar {
    width: 2.8rem;
    height: 2.8rem;
    grid-row: 1;
  }

  .tagline {
    grid-column: 1 / -1;
    margin-top: 1rem;
  }

  .about {
    padding-left: 1rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #1c2427;
    --ink: #eeeadd;
    --muted: #b2b8b3;
    --rule: #465052;
    --accent: #a0ccdc;
    --warm: #e3a36c;
    --wash: #252e30;
  }

  ::selection {
    background: #6e5430;
    color: #fff7e7;
  }
}

@media print {
  :root {
    --paper: #fff;
    --ink: #111;
    --muted: #444;
    --rule: #bbb;
    --accent: #111;
    --warm: #555;
    --wash: #fff;
  }

  body {
    font-size: 11pt;
  }

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

  .strip {
    background: none;
  }

  pre {
    white-space: pre-wrap;
  }
}
