:root {
  --paper: #fbf9f4;
  --ink: #191815;
  --muted: #6d675c;
  --rule: #e3ddd0;
  --accent: #a4451f;
  --code-bg: #f2efe6;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, ui-serif, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --measure: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14150f;
    --ink: #e9e5db;
    --muted: #9a9384;
    --rule: #2b2c25;
    --accent: #e08a5c;
    --code-bg: #1c1d16;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2.5rem);
  margin: 0 auto;
  padding: 0 1.25rem;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 10;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
}

/* Masthead */

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

.masthead-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.35rem;
  padding-bottom: 1.35rem;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.4rem;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 1.15rem;
}

.nav a {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s ease;
}

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

/* Page furniture */

main {
  padding-top: 3.25rem;
  padding-bottom: 1rem;
}

.kicker {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}

.kicker a {
  text-decoration: none;
  color: var(--muted);
}

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

.intro h1,
.page-head h1,
.post-head h1 {
  font-size: clamp(2rem, 6.2vw, 3.05rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin: 0 0 1.1rem;
  font-weight: 500;
  text-wrap: balance;
}

.intro h1 {
  max-width: 16ch;
}

.lede {
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 3rem;
  max-width: 34rem;
  text-wrap: pretty;
}

.page-head .lede {
  margin-bottom: 2.5rem;
}

/* Home list */

.year-block {
  margin-bottom: 2.5rem;
}

.year {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 0.35rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--rule);
}

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

.entry a {
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  gap: 1.1rem;
  align-items: baseline;
  padding: 0.78rem 0;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.entry:last-child a {
  border-bottom: 0;
}

.entry time {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.entry-title {
  font-size: 1.08rem;
  line-height: 1.35;
  text-wrap: pretty;
  transition: color 0.15s ease;
}

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

/* Post */

.post-head {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.2rem;
}

.post-head h1 {
  margin-bottom: 0.9rem;
}

.post-head .lede {
  margin-bottom: 1.4rem;
  font-size: 1.05rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tags a {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.18rem 0.62rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}

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

.prose {
  font-size: 1.0625rem;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 1.15em;
}

.prose h2 {
  font-size: 1.32rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 600;
  margin: 2.4em 0 0.65em;
}

.prose h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin: 1.9em 0 0.5em;
}

.prose a {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.18em;
}

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

.prose ul,
.prose ol {
  margin: 0 0 1.15em;
  padding-left: 1.3em;
}

.prose li {
  margin-bottom: 0.35em;
}

.prose li::marker {
  color: var(--muted);
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 0.1em 0 0.1em 1.1em;
  border-left: 2px solid var(--accent);
  color: var(--muted);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.4em 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 0 0 1.4em;
}

.prose th,
.prose td {
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--rule);
}

.prose th {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.prose code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--code-bg);
  border-radius: 3px;
  padding: 0.12em 0.34em;
}

.prose pre {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.62;
  margin: 0 0 1.5em;
}

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

.prose pre.shiki {
  background: var(--code-bg) !important;
}

.prose pre.shiki code {
  display: block;
  min-width: max-content;
}

@media (prefers-color-scheme: dark) {
  .prose pre.shiki,
  .prose pre.shiki span {
    color: var(--shiki-dark) !important;
  }
}

.copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-family: var(--sans);
  font-size: 0.64rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.26rem 0.5rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--muted);
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.prose pre:hover .copy,
.copy:focus-visible {
  opacity: 1;
}

.copy:hover {
  color: var(--accent);
}

@media (hover: none) {
  .copy {
    opacity: 1;
  }
}

/* Tag index */

.tag-index {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.tag-index li a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}

.tag-index li a:hover span {
  color: var(--accent);
}

.tag-index em {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.74rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Post navigation */

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
}

.post-nav-link {
  display: block;
  text-decoration: none;
  font-size: 0.98rem;
  line-height: 1.35;
}

.post-nav-link span {
  display: block;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.post-nav-link:hover {
  color: var(--accent);
}

.post-nav-link:last-child {
  text-align: right;
}

.about p {
  max-width: 34rem;
}

/* Footer */

.foot {
  margin-top: 5rem;
  border-top: 1px solid var(--rule);
}

.foot-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.3rem;
  padding-bottom: 2.6rem;
  font-family: var(--sans);
  font-size: 0.76rem;
  color: var(--muted);
}

.foot a {
  color: var(--muted);
  text-decoration: none;
}

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

@media (max-width: 34rem) {
  main {
    padding-top: 2.4rem;
  }

  .masthead-inner {
    padding-top: 1.05rem;
    padding-bottom: 1.05rem;
  }

  .entry a {
    grid-template-columns: 1fr;
    gap: 0.15rem;
    padding: 0.72rem 0;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav-link:last-child {
    text-align: left;
  }

  .lede {
    margin-bottom: 2.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}