* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --accent: #d45135;
  --ink: #262522;
  --muted: #77736d;
  --line: #e7e3dc;
  --paper: #fbfaf7;
  --sidebar: #f1eee8;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 1rem/1.7 system-ui, sans-serif;
}

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

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

.site-shell {
  min-height: 100vh;
}

.sidebar {
  padding: 2rem 1.5rem;
  background: var(--sidebar);
  border-bottom: 3px solid var(--accent);
}

.site-brand {
  display: inline-block;
  max-width: 15rem;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
}

.site-tagline {
  margin: 0.65rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.section-nav a {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.section-nav a:hover,
.section-nav a:focus-visible {
  color: var(--accent);
}

main {
  width: min(100% - 2.5rem, 46rem);
  margin: 0 auto;
  padding: 3rem 0 5rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h1 {
  margin: 0.25rem 0 0.75rem;
  font-size: clamp(2.25rem, 7vw, 4rem);
  letter-spacing: -0.055em;
}

h2 {
  margin: 0;
  font-size: 1.75rem;
  letter-spacing: -0.035em;
}

.home-header {
  max-width: 40rem;
  padding: 0 0 2.5rem;
  border-bottom: 1px solid var(--line);
}

.home-header > p:last-child {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.content-section {
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 1.5rem;
}

.section-intro {
  margin: 0.45rem 0 1rem;
  color: var(--muted);
}

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

.posts li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.posts a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

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

time,
.empty-state {
  color: var(--muted);
}

time {
  white-space: nowrap;
  font-size: 0.9rem;
}

.empty-state {
  margin: 1rem 0 0;
}

.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  margin-top: 0.75rem;
  font-size: clamp(2rem, 6vw, 3rem);
}

.article-header time {
  display: block;
  margin-top: 0.75rem;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  background: var(--sidebar);
}

img {
  max-width: 100%;
}

@media (min-width: 800px) {
  .site-shell {
    display: grid;
    grid-template-columns: 17rem minmax(0, 1fr);
  }

  .sidebar {
    position: sticky;
    top: 0;
    display: flex;
    height: 100vh;
    flex-direction: column;
    align-items: flex-start;
    padding: 3rem 2rem;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .site-brand {
    font-size: 1.6rem;
  }

  .section-nav {
    flex-direction: column;
    gap: 0.5rem;
  }

  main {
    width: min(100% - 6rem, 46rem);
    padding-top: 5rem;
  }
}
