:root {
  --background: #f3f4f7;
  --text: #50566b;
  --muted: #858b9c;
  --muted-soft: #888e9e;
  --link: #6c58d9;
  --link-hover: #5848b8;
  --line: #dcdde6;
  --line-accent: #d6d1ed;
  --measure: 52rem;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 450;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration-color: rgba(108, 88, 217, 0.38);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 140ms ease, text-decoration-color 140ms ease;
}

a:hover {
  color: var(--link-hover);
  text-decoration-color: rgba(88, 72, 184, 0.62);
}

a:focus-visible {
  outline: 2px solid rgba(108, 88, 217, 0.55);
  outline-offset: 4px;
}

.shell {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--text);
  color: var(--background);
  transform: translateY(-180%);
}

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

.site-header,
.home-header {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.site-header {
  align-items: baseline;
  padding: 1.65rem 3.25rem 1.25rem;
}

.home-header {
  align-items: flex-start;
  padding: 3.55rem 3.25rem 3.2rem;
}

.wordmark {
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 650;
  letter-spacing: 0.012em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  font-size: 0.82rem;
}

.site-nav a {
  color: var(--muted-soft);
  text-decoration: none;
}

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

.home-header .site-nav {
  margin-top: 0.72rem;
}

main.shell {
  min-width: 0;
  padding: 3.55rem 3.25rem 7rem;
}

.home-page main.shell {
  padding-top: 0;
}

.home-heading h1,
.post-header h1,
.post-header h2,
.section-header h1,
.compact-page h1,
.error-page h1,
.prose h2 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 650;
}

.home-heading h1 {
  font-size: clamp(2rem, 5vw, 2.45rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.home-heading p {
  margin: 0.72rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.post-index {
  padding: 0;
}

.section-header {
  margin-bottom: 2.35rem;
}

.section-header h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  letter-spacing: -0.018em;
}

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

.post-list li {
  padding: 1.45rem 0 1.55rem;
  border-bottom: 1px solid var(--line);
}

.post-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  color: var(--text);
  text-decoration: none;
}

.post-list a:hover .post-list-title {
  color: var(--link);
}

.post-list-title {
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.45;
  transition: color 140ms ease;
}

.post-list time,
.post-header time {
  color: var(--muted-soft);
  font-size: 0.79rem;
  font-variant-numeric: tabular-nums;
}

.post-list time {
  flex: 0 0 auto;
}

.post-list p {
  max-width: 42rem;
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.empty-state {
  margin: 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.prose,
.error-page {
  overflow-wrap: break-word;
}

.post-header {
  margin-bottom: 2.35rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}

.post-header h1,
.feed-post .post-header h2 {
  font-size: clamp(1.9rem, 4.8vw, 2.35rem);
  line-height: 1.24;
  letter-spacing: -0.018em;
}

.feed-post .post-header h2 a {
  color: var(--text);
  text-decoration: none;
}

.feed-post .post-header h2 a:hover {
  color: var(--link);
}

.feed-post + .feed-post {
  margin-top: 4.25rem;
  padding-top: 4.25rem;
  border-top: 1px solid var(--line);
}

.feed-post-body > p:last-child {
  margin-bottom: 0;
}

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

.prose p {
  margin: 0 0 0.78rem;
  text-indent: 0;
}

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

.prose h2 {
  margin: 2.5rem 0 0.85rem;
  font-size: 1.25rem;
  line-height: 1.4;
}

.prose ul,
.prose ol {
  margin: 0.78rem 0 1.2rem;
  padding-left: 1.45em;
}

.prose li + li {
  margin-top: 0.35rem;
}

.prose blockquote {
  margin: 1.2rem 0;
  padding: 0.15rem 0 0.15rem 1rem;
  border-left: 2px solid var(--line-accent);
  color: var(--muted);
}

.prose blockquote p {
  margin: 0;
}

.prose pre {
  max-width: 100%;
  margin: 1.2rem 0;
  overflow-x: auto;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #edeef3;
  font-size: 0.84rem;
  line-height: 1.6;
  tab-size: 2;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.prose img,
.prose figure {
  max-width: 100%;
}

.post-footer-nav {
  margin-top: 3.4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.post-footer-nav a {
  font-size: 0.85rem;
}

.compact-page,
.error-page {
  min-height: 52vh;
}

.compact-page h1,
.error-page h1 {
  margin-bottom: 1.5rem;
  font-size: 1.9rem;
  line-height: 1.25;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--link);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.error-page > p:not(.eyebrow) {
  color: var(--muted);
}

.site-footer {
  padding: 1.25rem 3.25rem 2.4rem;
  color: var(--muted-soft);
  font-size: 0.75rem;
}

.site-footer p {
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  .site-header {
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.4rem 1rem;
  }

  .home-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.35rem;
    padding: 3.15rem 1.4rem 2.65rem;
  }

  .site-nav {
    gap: 0.9rem;
    font-size: 0.78rem;
  }

  .home-header .site-nav {
    margin-top: 0;
  }

  main.shell {
    padding: 3.15rem 1.4rem 5rem;
  }

  .home-heading h1 {
    font-size: 1.95rem;
  }

  .post-list a {
    display: block;
  }

  .post-list time {
    display: block;
    margin-top: 0.38rem;
  }

  .post-header {
    margin-bottom: 2rem;
  }

  .post-header h1,
  .feed-post .post-header h2 {
    font-size: 1.85rem;
  }

  .section-header h1,
  .compact-page h1,
  .error-page h1 {
    font-size: 1.7rem;
  }

  .site-footer {
    padding: 1.2rem 1.4rem 2.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  a,
  .post-list-title {
    transition: none;
  }
}
