:root {
  --background: #f5f8fa;
  --text: #15171a;
  --muted: #65747e;
  --accent: #567d97;
  --accent-dark: #3f6f8f;
  --line: #ccd9e2;
  --code-background: #e8eef2;
  --max-width: 42rem;
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

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

.container {
  width: min(calc(100% - 2.5rem), var(--max-width));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  top: 1rem;
  left: 1rem;
  z-index: 10;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  clip-path: none;
  padding: 0.6rem 0.9rem;
  color: white;
  background: var(--text);
}

.site-header { border-bottom: 1px solid var(--line); }

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-inner { min-height: 4.5rem; }

.site-title {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.page-content {
  min-height: calc(100vh - 10rem);
  padding-block: clamp(2.75rem, 7vw, 5rem);
}

.post-stream .blog-post + .blog-post {
  margin-top: clamp(4rem, 10vw, 7rem);
  padding-top: clamp(4rem, 10vw, 7rem);
  border-top: 1px solid var(--line);
}

.blog-post-header,
.page-header { margin-bottom: 2.5rem; }

.blog-post-header h1,
.page-header h1 {
  margin: 0;
  color: var(--accent);
  font-family: "Inter Tight", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(2.625rem, 6vw, 3.75rem);
  font-weight: 650;
  letter-spacing: -0.011em;
  line-height: 1.1;
}

.blog-post-header h1 a {
  color: inherit;
  text-decoration: none;
}

.blog-post-header h1 a:hover { color: var(--accent-dark); }

.lede {
  max-width: 38rem;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: clamp(1.12rem, 3vw, 1.4rem);
  line-height: 1.5;
}

.post-date {
  display: block;
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.035em;
}

.prose {
  font-size: 17px;
  letter-spacing: -0.01em;
  line-height: 1.6;
}

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

.prose h2,
.prose h3 {
  margin-top: 2.2em;
  line-height: 1.2;
}

.prose img {
  max-width: 100%;
  height: auto;
}

.prose code {
  padding: 0.1em 0.3em;
  border-radius: 0.2rem;
  background: var(--code-background);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86em;
}

.prose pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  background: var(--code-background);
}

.prose pre code { padding: 0; }

.home-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

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

.archive-list li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.archive-list time {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.035em;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.footer-inner { min-height: 5.5rem; }

@media (max-width: 38rem) {
  .archive-list li {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { scroll-behavior: auto !important; }
}
