:root {
  color-scheme: light;
  --bg: #ffffff;
  --fg: #393a34;
  --muted: #73736b;
  --soft: #efefeb;
  --soft-bg: #f8f8f5;
  --accent: #1c6b48;
  --accent-soft: #e7f0eb;
  --selection: #dfe9e3;
  --max-width: 960px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family:
    "Geist",
    "Inter",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.68;
  letter-spacing: 0;
}

::selection {
  background: var(--selection);
}

a {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition:
    color 160ms ease,
    text-decoration-color 160ms ease,
    background-color 160ms ease;
}

a:hover {
  color: #124a32;
  text-decoration-color: transparent;
}

button {
  font: inherit;
}

.skip-link {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  transform: translateY(-160%);
  background: var(--fg);
  color: var(--bg);
  padding: 0.45rem 0.65rem;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.page-shell,
.site-footer {
  width: min(calc(100% - 32px), var(--max-width));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2rem 3rem;
}

.brand {
  color: var(--fg);
  font-weight: 520;
  text-decoration: none;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.top-links a {
  color: inherit;
  text-decoration-color: transparent;
}

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

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #a2a29a;
  white-space: nowrap;
}

.language-option {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.language-option:hover,
.language-option.is-active {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
  gap: 4.5rem;
  align-items: start;
}

.main-column,
.side-column {
  min-width: 0;
}

.intro {
  margin-bottom: 3rem;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.88rem;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0 0 1rem;
  color: var(--fg);
  font-size: 2.05rem;
  font-weight: 560;
  line-height: 1.18;
}

h2 {
  margin: 3rem 0 1rem;
  color: var(--fg);
  font-size: 1.05rem;
  font-weight: 560;
  line-height: 1.3;
}

h2 a {
  color: inherit;
  text-decoration: none;
}

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

.lede {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.72;
}

.prose-section:first-of-type h2,
.about-panel h2 {
  margin-top: 0;
}

.archive-list {
  display: grid;
  gap: 0.86rem;
  margin: 0;
  padding-left: 1.15rem;
}

.archive-list li {
  padding-left: 0.15rem;
}

.archive-list strong {
  font-weight: 610;
}

.archive-list .meta {
  color: #9a9a91;
}

.archive-list p {
  margin: 0.16rem 0 0;
  color: var(--muted);
}

.side-column {
  position: sticky;
  top: 2rem;
}

.about-panel {
  color: var(--muted);
}

.about-panel h2 {
  color: var(--fg);
}

.avatar {
  float: left;
  display: grid;
  width: 3.6rem;
  height: 3.6rem;
  margin: 0.25rem 1.1rem 0.4rem 0;
  place-items: center;
  border: 1px solid #e2e2dc;
  border-radius: 999px;
  background: var(--soft-bg);
  color: var(--accent);
  font-family:
    ui-monospace,
    "SFMono-Regular",
    Menlo,
    Consolas,
    monospace;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1;
}

.about-panel p {
  margin-block: 0 1.1rem;
}

.about-panel hr {
  clear: both;
  margin: 1.4rem 0 1.1rem;
  border: 0;
  border-top: 1px solid var(--soft);
}

.social-links {
  color: var(--muted);
}

.social-links a {
  color: inherit;
}

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

.site-footer {
  display: grid;
  place-items: center;
  margin-top: 4.5rem;
  padding-block: 2.2rem 2.5rem;
  border-top: 1px solid #d6d6d0;
  color: var(--fg);
  font-size: 0.98rem;
  font-weight: 560;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.footer-signature {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: baseline;
  gap: 0.55rem;
  flex-wrap: wrap;
  text-align: center;
}

.last-updated {
  margin-left: 0.25rem;
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    padding-block: 1.4rem 2.25rem;
  }

  .top-links {
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 0.45rem;
  }

  .page-shell {
    grid-template-columns: 1fr;
    gap: 3.2rem;
  }

  .side-column {
    position: static;
  }

  h1 {
    font-size: 1.85rem;
  }
}

@media (max-width: 520px) {
  .site-header,
  .page-shell,
  .site-footer {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .site-header {
    display: grid;
    gap: 0.75rem;
  }

  .top-links {
    justify-content: flex-start;
    gap: 0.78rem;
    font-size: 0.9rem;
  }

  .intro {
    margin-bottom: 2.5rem;
  }

  h2 {
    margin-top: 2.6rem;
  }

  .site-footer {
    margin-top: 3.5rem;
    padding-block: 1.8rem 2rem;
    font-size: 0.92rem;
  }

  .footer-divider {
    display: none;
  }

  .footer-signature {
    flex-direction: column;
    gap: 0.15rem;
  }
}
