:root {
  color-scheme: light;
  --ink: #17243a;
  --muted: #526075;
  --paper: #f6f2e9;
  --surface: #fffdf8;
  --cobalt: #173f85;
  --amber: #d9902f;
  --rule: #d8d1c3;
  --shadow: 0 18px 50px rgba(24, 37, 58, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 5%, rgba(217, 144, 47, 0.12), transparent 28rem),
    linear-gradient(180deg, #ebe6dc 0, var(--paper) 20rem);
  font: 18px/1.75 Georgia, "Times New Roman", serif;
}

.shell {
  width: min(100% - 32px, 900px);
  margin: 32px auto 64px;
}

.site-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 2px;
  color: var(--muted);
  border-bottom: 1px solid rgba(23, 36, 58, 0.25);
  font: 700 0.72rem/1.3 system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

article {
  margin-top: 20px;
  padding: clamp(28px, 6vw, 72px);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 5px solid var(--cobalt);
  box-shadow: var(--shadow);
}

h1, h2, h3 {
  font-family: ui-serif, Georgia, serif;
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  margin: 0 0 28px;
  max-width: 18ch;
  font-size: clamp(2.25rem, 7vw, 4.85rem);
  letter-spacing: -0.045em;
}

h2 {
  margin: 64px 0 18px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  letter-spacing: -0.02em;
}

h3 {
  margin: 30px 0 8px;
  color: var(--cobalt);
  font-size: 1.18rem;
}

p { margin: 0 0 1.15em; }

article > p:first-of-type {
  color: #243854;
  font-size: 1.22rem;
  line-height: 1.65;
}

figure { margin: 38px 0 46px; }

img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #bfb7a8;
}

a {
  color: var(--cobalt);
  text-decoration-color: var(--amber);
  text-decoration-thickness: 0.15em;
  text-underline-offset: 0.16em;
}

a:hover { color: #0c2d67; }

code {
  padding: 0.08em 0.35em;
  background: #eee9df;
  border-radius: 3px;
  font: 0.88em/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}

footer {
  padding: 20px 4px 0;
  color: var(--muted);
  font: 0.76rem/1.5 system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .shell { width: min(100% - 20px, 900px); margin-top: 12px; }
  .site-bar { align-items: flex-start; flex-direction: column; }
  article { padding: 24px 20px 40px; }
  h1 { font-size: clamp(2.1rem, 13vw, 3.25rem); }
  h2 { margin-top: 48px; }
}

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