:root {
  color-scheme: light;
  --paper: #f7f3e9;
  --ink: #25383c;
  --muted: #586568;
  --accent: #a34423;
  --rule: #cdcbbf;
  --wash: #eee9dd;
  --strip-bg: #25383c;
  --strip-ink: #f7f3e9;
}

* {
  box-sizing: border-box;
}

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

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

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

a:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 5px;
  border-radius: 1px;
}

::selection {
  background: #f0ce9a;
  color: #25383c;
}

.strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 0.8rem max(1.25rem, calc((100% - 43rem) / 2));
  border: 0;
  background: var(--strip-bg);
  color: var(--strip-ink);
  font: 0.75rem/1.6 system-ui, sans-serif;
}

.strip a {
  color: inherit;
  white-space: nowrap;
}

.strip span {
  flex: 1 1 15rem;
  text-align: center;
}

.masthead,
main,
.colophon {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding-right: 1.5rem;
  padding-left: 1.5rem;
}

.masthead {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  column-gap: 1.25rem;
  align-items: center;
  padding-top: clamp(2.5rem, 7vw, 5rem);
  padding-bottom: 2.5rem;
}

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

.blog-title {
  grid-column: 2;
  margin: 0;
  font: 400 clamp(2.2rem, 6vw, 3.6rem)/1.08 Georgia, "Times New Roman", serif;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

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

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

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

main {
  padding-bottom: 4rem;
  overflow-wrap: anywhere;
}

.about {
  border-top: 2px solid var(--ink);
  padding-top: 1.1rem;
}

p {
  margin: 0 0 1.25rem;
}

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

.posts {
  margin-top: 3.25rem;
}

.posts > h2 {
  margin: 0;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--ink);
  color: var(--muted);
  font: 600 0.75rem/1.5 system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.post-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1.5rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--rule);
}

.post-link {
  flex: 1 1 22rem;
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1.4;
  text-decoration: none;
}

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

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

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

.empty {
  margin-top: 1rem;
  color: var(--muted);
  font-style: italic;
}

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

.post-header {
  border-top: 2px solid var(--ink);
  padding-top: 1.8rem;
  margin-bottom: 2.25rem;
}

.post-header h1 {
  margin: 0 0 1rem;
  font: 400 clamp(2rem, 5.5vw, 3.1rem)/1.16 Georgia, "Times New Roman", serif;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h2,
h3,
h4 {
  color: var(--ink);
  font-family: system-ui, sans-serif;
  font-weight: 650;
  line-height: 1.35;
}

h2 {
  margin: 2.5rem 0 0.9rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

h3 {
  margin: 2rem 0 0.7rem;
  font-size: 1.1rem;
}

h4 {
  margin: 1.75rem 0 0.6rem;
  font-size: 1rem;
}

ul,
ol {
  padding-left: 1.5em;
  margin: 0 0 1.5rem;
}

li + li {
  margin-top: 0.35rem;
}

.post-list li + li {
  margin-top: 0;
}

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

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

code {
  padding: 0.12em 0.3em;
  background: var(--wash);
  font: 0.85em/1.6 ui-monospace, "SFMono-Regular", Consolas, monospace;
  border-radius: 2px;
}

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

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

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

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

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

.notice {
  margin-top: 2rem;
  padding: 1rem;
  border-left: 3px solid var(--accent);
  background: var(--wash);
}

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

.colophon p {
  margin: 0;
}

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

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

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

  .avatar {
    width: 3.25rem;
    height: 3.25rem;
  }

  .tagline {
    font-size: 0.8rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #192529;
    --ink: #eee9dd;
    --muted: #b3bdbb;
    --accent: #f0ad83;
    --rule: #465457;
    --wash: #243338;
    --strip-bg: #101b1e;
    --strip-ink: #eee9dd;
  }
}

@media print {
  :root {
    color-scheme: light;
    --paper: #fff;
    --ink: #111;
    --muted: #444;
    --accent: #111;
    --rule: #bbb;
    --wash: #f5f5f5;
    --strip-bg: #fff;
    --strip-ink: #111;
  }

  body {
    font-size: 11pt;
  }

  .strip {
    border-bottom: 1px solid var(--rule);
  }

  .masthead {
    padding-top: 1.5rem;
  }

  h2,
  h3,
  h4,
  .post-header {
    break-after: avoid;
  }

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