:root {
  color-scheme: dark;
  --ink: #e6e1d8;
  --muted: #a39c92;
  --line: #3a342c;
  --paper: #161411;
  --panel: #221f1b;
  --measure: 40rem;
}

html.light {
  color-scheme: light;
  --ink: #1c1a17;
  --muted: #6d675f;
  --line: #e4dfd6;
  --paper: #fbfaf7;
  --panel: #ffffff;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0 auto;
  max-width: calc(var(--measure) + 3rem);
  padding: 2.5rem 1.5rem 4rem;
  color: var(--ink);
  background: var(--paper);
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", "Liberation Serif", Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.65;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 3rem;
  font-family: "Liberation Sans", "Nimbus Sans", sans-serif;
  font-size: 0.95rem;
}

.tools {
  display: flex;
  gap: 1.1rem;
  align-items: baseline;
}

.theme {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}

.theme button,
.theme .slash { color: var(--ink); }

.theme button[aria-pressed="true"] { font-weight: 700; }

.name {
  color: inherit;
  text-decoration: none;
  letter-spacing: 0.01em;
}

button {
  font: inherit;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

button[aria-pressed="true"] { color: var(--ink); }

button:hover,
a:hover { color: var(--ink); }

h1 {
  margin: 0 0 1.25rem;
  font-size: 2.15rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.date,
time {
  color: var(--muted);
  font-family: "Liberation Sans", "Nimbus Sans", sans-serif;
  font-size: 0.85rem;
}

.date { margin: 0 0 0.4rem; }

.lede { font-size: 1.15rem; }

.posts {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
}

.posts li {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.posts a {
  color: inherit;
  text-decoration: none;
  font-size: 1.25rem;
}

article p { margin: 0 0 1.1rem; }

article img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0.4rem 0 0.35rem;
}

article em {
  color: var(--muted);
  font-size: 0.95rem;
}

a { color: inherit; }

article a { text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

code {
  font-family: "IBM Plex Mono", "Liberation Mono", ui-monospace, monospace;
  font-size: 0.92em;
}

#search-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 9, 8, 0.55);
  padding: 12vh 1rem 1rem;
}

html.light #search-modal { background: rgba(28, 26, 23, 0.35); }

.search-panel {
  max-width: 36rem;
  margin: 0 auto;
  background: var(--panel);
  color: var(--ink);
  padding: 1rem;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.28);
  --pagefind-ui-primary: var(--ink);
  --pagefind-ui-text: var(--ink);
  --pagefind-ui-background: var(--panel);
  --pagefind-ui-border: var(--line);
  --pagefind-ui-tag: var(--muted);
  --pagefind-ui-font: "Liberation Sans", "Nimbus Sans", sans-serif;
}

@media (max-width: 640px) {
  .posts li { flex-direction: column; gap: 0.15rem; }
  .top { flex-wrap: wrap; }
}
