:root {
  --background: #fff;
  --surface: #f7f7f7;
  --surface-accent: #eef5ff;
  --border: #d7d7d7;
  --border-accent: #c7d8f4;
  --text: #111;
  --text-soft: #333;
  --link: #0047b3;
  --link-hover: #00378a;
  --accent-text: #1f5a9f;
  --focus: #ffbf47;
  --radius-sm: 0.45rem;
  --radius-md: 0.85rem;
  --radius-lg: 1.2rem;
  --radius-xl: 1.8rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

a {
  color: var(--link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

p,
ul,
ol {
  margin: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.75rem 1rem;
  background: #000;
  color: #fff;
  border-radius: var(--radius-md);
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

.site-shell {
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 98%), rgb(244 248 255 / 98%));
  box-shadow: 0 0 0 1px rgb(17 17 17 / 6%);
}

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

.site-header {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-accent);
}

.site-name {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.site-role {
  margin-top: 0.3rem;
  color: var(--text-soft);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.75rem;
}

.site-nav a {
  color: var(--text);
  font-weight: 600;
  padding: 0.28rem 0.72rem;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
}

.intro a,
.eyebrow a {
  color: inherit;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  border-color: var(--border-accent);
  background: var(--surface-accent);
}

.hero {
  padding: 2.75rem 1.75rem;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgb(238 245 255 / 96%), rgb(255 255 255 / 98%));
}

.not-found {
  max-width: 42rem;
  padding: 3rem 0 2rem;
}

.eyebrow {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-text);
}

.hero h1,
.section h2,
.panel h3 {
  margin: 0;
  line-height: 1.2;
}

.hero h1 {
  max-width: 16ch;
  margin-top: 0.75rem;
  font-size: clamp(2.3rem, 6vw, 4.25rem);
}

.intro {
  max-width: 44rem;
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--text-soft);
}

.back-link {
  margin-top: 1.25rem;
  font-weight: 600;
}

.inline-link-list,
.tag-list,
.taxonomy-list,
.archive-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.inline-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
}

.section {
  padding: 2rem 0;
}

.section + .section {
  border-top: 1px solid rgb(199 216 244 / 55%);
}

.section h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--accent-text);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.panel {
  padding: 1.25rem;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 96%), rgb(247 247 247 / 100%));
  border-radius: var(--radius-lg);
}

.panel h3 {
  font-size: 1.2rem;
}

.panel p + p {
  margin-top: 0.9rem;
}

.panel-wide {
  grid-column: 1 / -1;
}

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

.post-card {
  max-width: 44rem;
}

.post-card-title {
  margin-top: 0.3rem;
}

.post-meta-inline {
  margin-top: 0.6rem;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.post-date,
.post-meta {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.post-shell {
  max-width: 44rem;
  padding: 3rem 0 2rem;
}

.post-header h1 {
  margin: 0.75rem 0 0;
  line-height: 1.15;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}

.post-meta {
  margin-top: 0.9rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.tag-link {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border-accent);
  background: var(--surface-accent);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}

.tag-count {
  color: var(--text-soft);
}

.taxonomy-list li + li {
  margin-top: 0.75rem;
}

.archive-year + .archive-year {
  margin-top: 2rem;
}

.archive-month {
  margin-top: 1rem;
}

.archive-month h3 {
  margin: 0 0 0.6rem;
}

.archive-list li + li {
  margin-top: 0.65rem;
}

.archive-list time {
  display: inline-block;
  min-width: 9.5rem;
  margin-right: 0.8rem;
  color: var(--text-soft);
}

.prose {
  margin-top: 2rem;
}

.prose > * + * {
  margin-top: 1rem;
}

.prose h2,
.prose h3,
.prose h4 {
  line-height: 1.2;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

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

.prose blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--border);
  color: var(--text-soft);
}

.prose code,
.prose pre {
  font-family:
    ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

.prose code {
  padding: 0.08rem 0.28rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
}

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

.prose pre code {
  padding: 0;
  background: transparent;
}

.link-list {
  padding-left: 1.25rem;
}

.link-list li + li {
  margin-top: 0.6rem;
}

.site-footer {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgb(245 249 255 / 92%), rgb(255 255 255 / 100%));
  color: var(--text-soft);
}

@media (width <= 700px) {
  .site-header,
  .site-footer {
    flex-direction: column;
  }

  .site-header {
    gap: 1.25rem;
  }

  .site-nav {
    width: 100%;
    gap: 0.55rem;
  }

  .site-nav a {
    padding-inline: 0.65rem;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2rem;
  }
}

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