:root {
  color-scheme: light;
  --paper: #f4f0e7;
  --paper-deep: #e9e1d1;
  --ink: #18211f;
  --muted: #5f6965;
  --line: #c8c1b3;
  --signal: #c4492d;
  --signal-dark: #87301e;
  --network: #0d6b62;
  --card: rgba(255, 253, 248, 0.78);
  --shadow: 0 18px 50px rgba(32, 39, 36, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(13, 107, 98, 0.11), transparent 28rem),
    linear-gradient(180deg, #f8f5ee 0, var(--paper) 42rem);
  line-height: 1.65;
}

a { color: var(--network); text-underline-offset: 0.16em; }
a:hover { color: var(--signal-dark); }

.shell { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(248, 245, 238, 0.88);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .shell {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.language-nav { display: flex; gap: 0.25rem; }
.language-nav a {
  color: var(--muted);
  padding: 0.25rem 0.4rem;
  font: 700 0.72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-decoration: none;
  text-transform: uppercase;
}
.language-nav a[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--signal); }

.brand {
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
}

.brand-mark {
  font: 800 1.3rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: -0.08em;
  color: var(--signal);
}

.brand-name { font-weight: 760; letter-spacing: -0.02em; }
.mode-badge, .status-badge {
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font: 700 0.68rem/1.1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mode-badge { color: var(--signal-dark); background: #fff4e6; }
.status-badge { color: var(--network); }

.hero { padding: clamp(4rem, 10vw, 8rem) 0 4rem; }
.eyebrow {
  color: var(--signal);
  font: 750 0.75rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero h1, .article-header h1 {
  max-width: 17ch;
  margin: 0.55rem 0 1.2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 8vw, 6.3rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero p, .article-deck {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
}

.network-rule {
  height: 28px;
  margin-top: 2.5rem;
  background:
    linear-gradient(90deg, var(--network) 0 33%, transparent 33% 38%, var(--signal) 38% 62%, transparent 62% 67%, var(--ink) 67%) center / 100% 2px no-repeat,
    radial-gradient(circle, var(--paper) 0 3px, var(--network) 3px 5px, transparent 5px) 0 center / 25% 100% repeat-x;
  opacity: 0.75;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
  padding: 0 0 6rem;
}

.post-card, .empty-state, .review-panel {
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.post-card { padding: 1.5rem; min-height: 250px; display: flex; flex-direction: column; }
.post-card h2 { font: 500 1.65rem/1.12 Georgia, serif; margin: 1rem 0 0.7rem; }
.post-card p { color: var(--muted); margin: 0 0 1.5rem; }
.post-card .read-link { margin-top: auto; font-weight: 700; }
.card-meta { display: flex; justify-content: space-between; gap: 0.8rem; align-items: center; }

.empty-state { padding: clamp(2rem, 6vw, 4rem); margin-bottom: 6rem; }
.empty-state h2 { font: 500 2rem/1.1 Georgia, serif; }

.article-shell { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.article-header { padding: clamp(3.5rem, 9vw, 7rem) 0 3rem; border-bottom: 1px solid var(--line); }
.article-header h1 { font-size: clamp(2.6rem, 7vw, 5.5rem); }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.8rem 1.5rem; color: var(--muted); }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(220px, 300px);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: start;
  padding: 3rem 0 7rem;
}

.prose { font-family: Georgia, "Times New Roman", serif; font-size: 1.11rem; }
.prose > :first-child { margin-top: 0; }
.prose h2 {
  margin: 3.8rem 0 1.1rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.025em;
}
.prose p, .prose li { max-width: 68ch; }
.prose blockquote {
  margin: 2.5rem 0;
  padding: 0.5rem 0 0.5rem 1.4rem;
  border-left: 4px solid var(--signal);
  color: #2f3c38;
  font-size: 1.3rem;
}
.prose code { font: 0.88em ui-monospace, SFMono-Regular, Menlo, monospace; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }
.prose figure { margin: 2.8rem 0; }
.prose figure img { width: 100%; height: auto; border: 1px solid var(--line); background: #fbf8f1; }
.prose figcaption { color: var(--muted); font: 0.82rem/1.45 ui-sans-serif, system-ui, sans-serif; margin-top: 0.65rem; }

.review-panel { position: sticky; top: 92px; padding: 1.2rem; font-size: 0.9rem; }
.review-panel h2 { margin-top: 0; font-size: 1rem; }
.review-panel dl { margin: 0; }
.review-panel dt { color: var(--muted); margin-top: 0.9rem; }
.review-panel dd { margin: 0.15rem 0 0; font-weight: 650; overflow-wrap: anywhere; }
.review-panel a { display: inline-block; margin-top: 0.65rem; }

.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 4rem; color: var(--muted); }

@media (max-width: 820px) {
  .article-layout { grid-template-columns: 1fr; }
  .review-panel { position: static; order: -1; }
  .site-header .shell { min-height: 60px; }
  .brand-name { font-size: 0.9rem; }
  .header-actions { gap: 0.35rem; }
}

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

@media print {
  .site-header, .review-panel, .site-footer { display: none; }
  body { background: white; }
  .article-layout { display: block; }
  .article-header { padding-top: 1rem; }
  a { color: inherit; }
}
