/* ========= Typography & palette ========= */
:root{
  --font-sans: "Inter var", ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Roboto, "Helvetica Neue", Arial,
               "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
  --text-color: #374151;  /* neutral-700 */
  --head-color: #111827;  /* neutral-900 */
  --measure: 64ch;        /* comfortable column */
  --leading: 1.6;
}

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html, body { background: #f8fafc; }

/* Force Inter everywhere (belt-and-braces for Safari) */
body, main, header, footer { font-family: var(--font-sans) !important; }

body{
  color: var(--text-color);
  line-height: var(--leading);
  font-variation-settings: "wght" 500; /* <-- BODY THICKNESS */
  letter-spacing: 0;
}

/* ========= Content container ========= */
main{ max-width: var(--measure); margin-inline: auto; padding-inline: 1.2rem; }
@media (max-width: 600px){ main{ padding-inline: 1rem; } }

/* ========= Headings (Inter, Apache-like) ========= */
main h1, main h2, main h3{
  color: var(--head-color);
  letter-spacing: -0.0125em;
  font-feature-settings: "calt" 1, "liga" 1;
  font-optical-sizing: auto;
}
main h1{
  font-weight: 780; /* firm */
  font-size: clamp(2rem, 2.4vw + 1rem, 2.4rem);
  line-height: 1.2;
  margin: 1.25rem 0 .6rem;
}
main h2{
  font-weight: 700;
  font-size: clamp(1.5rem, 1.6vw + 1rem, 1.85rem);
  line-height: 1.25;
  margin: 1rem 0 .5rem;
}
main h3{
  font-weight: 600;
  font-size: clamp(1.2rem, 1.1vw + .9rem, 1.4rem);
  line-height: 1.3;
  margin: .9rem 0 .5rem;
}

/* Site title in header should echo H1 tone */
header .title h2{
  font-weight: 780;
  letter-spacing: -0.0125em;
  color: var(--head-color);
  margin: .2rem 0 .4rem;
}

/* ========= Paragraphs, lists, links ========= */
main p{ margin: .65rem 0 1rem; max-width: var(--measure); }
main p + p{ margin-top: .75rem; }
main ul, main ol{ padding-inline-start: 1.25rem; margin: .4rem 0 1rem; }
main{ word-break: normal; overflow-wrap: anywhere; hyphens: auto; text-align: left; }

main a{ color: #0e5c9a; text-decoration-thickness: .09em; text-underline-offset: .15em; }
main a:hover, main a:focus{ color: #0a4a7b; text-decoration: underline; }

/* ========= Code & quotes ========= */
main pre, main code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
main pre{ padding: .8rem; border-radius: .6rem; overflow: auto; }
main blockquote{ border-left: 4px solid #cbd5e1; padding-left: .75rem; color: #334155; }

/* ========= Header & nav layout ========= */
header{ max-width: min(1100px, 92vw); margin: 0 auto 1.25rem; padding: 0 1rem; }
header .title{ display: inline-block; margin-top: .25rem; text-decoration: none; }
nav{ margin-bottom: .75rem; }

/* ========= Banner (incl. graceful fallback) ========= */
.site-banner{
  margin: 0 auto 1rem;
  max-width: min(1100px, 92vw);
  aspect-ratio: 1200 / 630;
  position: relative; overflow: hidden;
  border-radius: 16px; background: #e2e8f0;
  box-shadow: 0 10px 22px rgba(0,0,0,.06), 0 2px 6px rgba(0,0,0,.05);
  display: flex; align-items: center; justify-content: center;
}
.site-banner img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.site-banner .fallback-text{ display: none; font-size: 2rem; font-weight: 700; color: #334155; }
.site-banner.fallback{ background: #cbd5e1; }
.site-banner.fallback .fallback-text{ display: block; }

/* ========= Media ========= */
main img{ max-width: 100%; height: auto; border-radius: 8px; }

/* ========= Desktop nudge ========= */
@media (min-width: 1200px){ html{ font-size: 17px; } }
