:root {
  --bg: #f5f1e8;
  --panel: rgba(255, 252, 246, 0.72);
  --panel-strong: rgba(255, 252, 246, 0.92);
  --line: rgba(21, 25, 34, 0.1);
  --text: #16181d;
  --muted: #666158;
  --accent: #2f5f96;
  --accent-soft: rgba(47, 95, 150, 0.08);
  --max: 74rem;
  --content: 42rem;
  --radius: 18px;
  --shadow: 0 18px 36px rgba(18, 24, 33, 0.04);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, #f8f5ef 0%, var(--bg) 38%, #efeadf 100%);
  font-family: "Newsreader", Georgia, serif;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration-color: rgba(76, 140, 245, 0.45);
  text-underline-offset: 0.22em;
}

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

img {
  max-width: 100%;
  display: block;
}

code,
pre,
.eyebrow,
.brand,
.site-nav,
.post-meta,
.post-card-meta,
.tag-list,
.pagination,
.footer-links {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
}

.skip-link:focus {
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--panel-strong);
}

.site-shell {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  padding: 1.5rem 0 3.5rem;
}

.hero,
.feature-block,
.post-card,
.post-single,
.page-single,
.empty-state,
.pagination,
.toc-block {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: none;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.25rem 0;
}

.site-header {
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(21, 25, 34, 0.08);
}

.brand-lockup {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.65rem 0.95rem;
}

.brand {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-tagline {
  margin: 0;
  display: block;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.eyebrow,
.post-meta,
.post-card-meta,
.footer-links,
.pagination,
.site-nav {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow,
.lede,
.section-head p,
.post-card-meta,
.post-meta {
  margin: 0;
}

.site-nav,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-nav a,
.footer-links a,
.inline-link {
  text-decoration: none;
}

.site-nav a,
.footer-links a {
  position: relative;
}

.site-nav a::after,
.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.footer-links a:hover::after {
  transform: scaleX(1);
}

.site-main {
  display: grid;
  gap: 2rem;
}

.hero,
.feature-block,
.section-head,
.page-intro,
.empty-state,
.post-single,
.page-single {
  animation: rise 520ms ease both;
}

.hero,
.feature-block,
.empty-state,
.post-single,
.page-single,
.toc-block,
.post-card,
.pagination {
  border-radius: var(--radius);
}

.hero {
  padding: 2rem;
}

.hero h1,
.page-intro h1,
.post-header h1 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
}

.lede,
.hero .lede {
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.hero-meta,
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.feature-block,
.section-head,
.page-intro {
  padding: 1.5rem 1.75rem;
}

.page-intro,
.section-head {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.page-intro {
  padding: 0 0 0.5rem;
}

.feature-block {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1.1fr 0.9fr;
}

.feature-block h2,
.section-head h2,
.post-card h3 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.post-list {
  display: grid;
  gap: 0;
}

.post-card {
  padding: 1.4rem 0;
  border: 0;
  border-bottom: 1px solid rgba(21, 25, 34, 0.1);
  border-radius: 0;
  background: transparent;
}

.post-card-heading {
  display: block;
}

.post-card h3 {
  margin-bottom: 0.45rem;
  font-size: 1.32rem;
}

.post-card p {
  max-width: 44rem;
  color: var(--muted);
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.65;
}

.post-card-meta,
.post-meta,
.tag-list,
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.tag-list {
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
  gap: 0.45rem;
  font-size: 0.68rem;
}

.tag-list a {
  display: inline-flex;
  padding: 0;
  border-radius: 0;
  background: transparent;
  text-decoration: none;
}

.post-single,
.page-single {
  padding: 2rem;
}

.post-single-minimal {
  position: relative;
  padding: clamp(1.75rem, 3vw, 2.75rem) clamp(1.2rem, 3vw, 2.5rem) clamp(2.25rem, 4vw, 3.5rem);
  background: linear-gradient(180deg, #f8f5ef 0%, #f3efe7 100%);
  border: 1px solid rgba(31, 35, 42, 0.08);
  box-shadow: none;
  backdrop-filter: none;
}

.post-single-minimal::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), transparent 18%),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.4), transparent 42%);
}

.post-header {
  max-width: var(--content);
  margin: 0 auto 2rem;
}

.post-single-minimal .post-header,
.post-single-minimal .toc-block,
.post-single-minimal .prose {
  position: relative;
  z-index: 1;
}

.post-single-minimal .post-header {
  margin-bottom: 2.5rem;
}

.post-header h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
}

.post-single-minimal .post-header h1 {
  max-width: 15ch;
  font-size: clamp(1.68rem, 3vw, 2.72rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.022em;
  text-wrap: balance;
  color: #302c27;
}

.post-single-minimal .lede {
  max-width: 34rem;
  margin-top: 1rem;
  color: #4d473f;
  font-size: 1.12rem;
}

.post-single-minimal .post-meta {
  gap: 0.65rem 1rem;
  margin-top: 1rem;
  color: #72695f;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.post-single-minimal .tag-list {
  margin-top: 1.1rem;
  gap: 0.5rem;
}

.post-single-minimal .tag-list a {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #665f56;
}

.post-rule {
  width: min(8rem, 28%);
  height: 1px;
  margin-top: 1.6rem;
  background: rgba(31, 35, 42, 0.14);
}

.prose,
.content-body {
  width: min(100%, var(--content));
  margin: 0 auto;
  font-size: 1.12rem;
}

.post-single-minimal .prose {
  font-size: 1.16rem;
  line-height: 1.82;
}

.prose h2,
.prose h3,
.prose h4,
.content-body h2,
.content-body h3,
.content-body h4 {
  margin-top: 2.2em;
  margin-bottom: 0.7em;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.prose p,
.prose ul,
.prose ol,
.prose img,
.prose blockquote,
.content-body p,
.content-body ul,
.content-body ol,
.content-body blockquote {
  margin: 1.1rem 0;
}

.prose img,
.content-body img {
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--panel-strong);
}

.post-single-minimal .prose img {
  border-radius: 4px;
  border-color: rgba(31, 35, 42, 0.08);
  box-shadow: none;
  background: rgba(255, 255, 255, 0.45);
}

.prose blockquote,
.content-body blockquote {
  margin-left: 0;
  padding: 0.1rem 0 0.1rem 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.post-single-minimal .prose blockquote {
  padding-left: 1.2rem;
  border-left-color: rgba(31, 35, 42, 0.32);
  color: #4d4944;
}

.prose pre,
.content-body pre {
  overflow-x: auto;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: #141922;
}

.prose code,
.content-body code {
  font-size: 0.92em;
}

.prose :not(pre) > code,
.content-body :not(pre) > code {
  padding: 0.12rem 0.4rem;
  border-radius: 0.4rem;
  background: rgba(20, 25, 34, 0.08);
}

.prose table,
.content-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.prose th,
.prose td,
.content-body th,
.content-body td {
  padding: 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.toc-block {
  width: min(100%, var(--content));
  margin: 0 auto 2rem;
  padding: 1rem 1.2rem;
}

.post-single-minimal .toc-block {
  margin-bottom: 2.5rem;
  padding: 0 0 0 1rem;
  border: 0;
  border-left: 1px solid rgba(31, 35, 42, 0.12);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.post-single-minimal .toc-block .eyebrow {
  color: #6d665f;
}

.toc-block nav ul {
  margin: 0.8rem 0 0;
  padding-left: 1rem;
}

.pagination {
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border: 0;
  border-top: 1px solid rgba(21, 25, 34, 0.08);
  border-radius: 0;
  background: transparent;
}

.site-footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(21, 25, 34, 0.08);
}

.section-head-minimal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.15rem 0 0.6rem;
  border-bottom: 1px solid rgba(21, 25, 34, 0.08);
}

.section-head-minimal p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 900px) {
  .feature-block,
  .section-head,
  .hero-meta,
  .site-header,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .hero,
  .feature-block,
  .page-intro,
  .post-single,
  .page-single {
    padding: 1.4rem;
  }

  .page-intro,
  .section-head {
    padding-left: 0;
    padding-right: 0;
  }

  .hero h1,
  .post-header h1 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(calc(100% - 1.5rem), var(--max));
    padding-top: 0.85rem;
    padding-bottom: 2.5rem;
  }

  .site-main {
    gap: 1.5rem;
  }

  .site-header,
  .site-footer {
    gap: 0.85rem;
  }

  .site-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.85rem;
  }

  .brand-lockup {
    gap: 0.35rem 0.75rem;
  }

  .brand {
    font-size: 0.82rem;
    letter-spacing: 0.12em;
  }

  .site-tagline {
    font-size: 0.78rem;
    line-height: 1.1;
  }

  .site-nav,
  .footer-links {
    gap: 0.8rem 1rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .hero h1,
  .page-intro h1,
  .post-header h1 {
    font-size: clamp(2.35rem, 12vw, 3.5rem);
  }

  .post-card h3,
  .section-head h2 {
    font-size: 1.34rem;
    line-height: 1.14;
  }

  .section-head-minimal {
    align-items: flex-start;
    gap: 0.45rem;
    padding-bottom: 0.55rem;
  }

  .section-head-minimal p:last-child {
    font-size: 0.92rem;
  }

  .post-card {
    padding: 1.15rem 0 1.35rem;
  }

  .post-card-meta {
    gap: 0.5rem 0.75rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .post-card p {
    font-size: 1rem;
    line-height: 1.36;
  }

  .tag-list {
    gap: 0.35rem 0.55rem;
    font-size: 0.66rem;
  }

  .post-single-minimal {
    padding: 1.4rem 1rem 1.9rem;
    background: linear-gradient(180deg, #faf7f1 0%, #f5f0e7 100%);
  }

  .post-header,
  .toc-block,
  .prose,
  .content-body {
    width: 100%;
  }

  .post-single-minimal .post-header {
    margin-bottom: 1.75rem;
  }

  .post-single-minimal .post-header h1 {
    max-width: none;
    font-size: clamp(1.58rem, 8vw, 2.08rem);
    line-height: 1.12;
  }

  .post-single-minimal .post-meta {
    gap: 0.45rem 0.8rem;
    margin-top: 0.85rem;
    font-size: 0.72rem;
  }

  .post-single-minimal .lede,
  .lede {
    max-width: none;
    font-size: 1.03rem;
    line-height: 1.65;
  }

  .post-single-minimal .tag-list {
    margin-top: 0.9rem;
  }

  .post-rule {
    width: 4.5rem;
    margin-top: 1.2rem;
  }

  .post-single-minimal .toc-block {
    margin-bottom: 1.9rem;
    padding: 0.85rem 0 0.1rem;
    border-left: 0;
    border-top: 1px solid rgba(31, 35, 42, 0.12);
  }

  .toc-block nav ul {
    margin-top: 0.7rem;
    padding-left: 1.1rem;
  }

  .prose,
  .content-body,
  .post-single-minimal .prose {
    font-size: 1.05rem;
    line-height: 1.82;
  }

  .prose h2,
  .content-body h2 {
    margin-top: 1.9em;
    font-size: 1.55rem;
    line-height: 1.08;
  }

  .prose h3,
  .content-body h3 {
    font-size: 1.28rem;
  }

  .prose p,
  .prose ul,
  .prose ol,
  .prose blockquote,
  .content-body p,
  .content-body ul,
  .content-body ol,
  .content-body blockquote {
    margin: 0.95rem 0;
  }

  .prose ul,
  .prose ol,
  .content-body ul,
  .content-body ol {
    padding-left: 1.2rem;
  }

  .prose blockquote,
  .content-body blockquote,
  .post-single-minimal .prose blockquote {
    padding-left: 0.9rem;
  }

  .prose table,
  .content-body table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .pagination {
    gap: 0.6rem;
    align-items: flex-start;
    flex-direction: column;
  }

  .page-single,
  .post-single {
    padding: 1.35rem 1rem 1.8rem;
  }
}
