/* ==========================================================================
   alan-haddad.github.io
   One typeface (Mona Sans), quiet neutrals, black stages for the big moments.
   ========================================================================== */

/* Self-hosted variable fonts (SIL Open Font License, see assets/fonts/OFL.txt) */
@font-face {
  font-family: "Mona Sans";
  src: url("../fonts/mona-sans-latin-wdth-normal.woff2") format("woff2-variations"),
       url("../fonts/mona-sans-latin-wdth-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --page: #fbfbfd;
  --band: #f3f4f7;
  --tile: #ffffff;
  --ink: #16181d;
  --ink-2: #5f6470;
  --ink-3: #868b96;
  --hairline: rgba(20, 24, 33, 0.1);
  --accent: #2456d6;
  --accent-hover: #1a44b3;
  --signal: #b27406;
  --signal-soft: #fff1d2;

  /* the black stage used by the hero and contact */
  --stage: #000000;
  --stage-ink: #f5f5f7;
  --stage-ink-2: #a1a4ad;
  --stage-hairline: rgba(255, 255, 255, 0.14);

  /* console / code surfaces */
  --console: #0d1220;
  --console-2: #151c2e;
  --console-ink: #e3e8f2;
  --console-dim: #8b95aa;
  --console-key: #a5b8ff;
  --console-str: #f3c97a;
  --console-com: #6f7b93;
  --amber: #f2b84b;

  --font: "Mona Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1080px;
  --wrap-wide: 1240px;
  --gutter: clamp(18px, 4vw, 44px);
  --radius-tile: 28px;
  --radius-sm: 14px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #000000;
    --band: #0b0c0f;
    --tile: #15171c;
    --ink: #f5f5f7;
    --ink-2: #a1a4ad;
    --ink-3: #7d818c;
    --hairline: rgba(255, 255, 255, 0.12);
    --accent: #7ea2ff;
    --accent-hover: #a3bdff;
    --signal: #f2b84b;
    --signal-soft: #2b2312;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #000000;
  --band: #0b0c0f;
  --tile: #15171c;
  --ink: #f5f5f7;
  --ink-2: #a1a4ad;
  --ink-3: #7d818c;
  --hairline: rgba(255, 255, 255, 0.12);
  --accent: #7ea2ff;
  --accent-hover: #a3bdff;
  --signal: #f2b84b;
  --signal-soft: #2b2312;
  color-scheme: dark;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 0.2em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.025em; line-height: 1.08; color: inherit; }
p { margin: 0 0 1em; text-wrap: pretty; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--page);
  padding: 8px 14px; border-radius: 8px; font-size: 0.875rem;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide { max-width: var(--wrap-wide); margin: 0 auto; padding: 0 var(--gutter); }

/* chevron link, the one recurring call to action */
.chev { font-weight: 500; white-space: nowrap; }
.chev::after { content: "\203A"; display: inline-block; margin-left: 0.3em; transition: transform 200ms var(--ease); }
.chev:hover { text-decoration: underline; }
.chev:hover::after { transform: translateX(2px); }

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: 1rem; font-weight: 550; letter-spacing: -0.01em;
  transition: background-color 200ms var(--ease);
}
.pill:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }
.pill-ghost { background: transparent; color: var(--stage-ink); box-shadow: inset 0 0 0 1px var(--stage-hairline); }
.pill-ghost:hover { background: rgba(255, 255, 255, 0.08); color: var(--stage-ink); }

/* ---------- global nav: dark glass, always ---------- */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 11, 14, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: -53px; /* float over the black stage below */
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .masthead { background: rgba(10, 11, 14, 0.96); }
}
.masthead .wrap-wide { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 52px; }
.wordmark { color: #f5f5f7; font-size: 0.9375rem; font-weight: 650; letter-spacing: -0.01em; font-stretch: 108%; white-space: nowrap; }
.wordmark:hover { color: #fff; text-decoration: none; }
.site-nav ul { list-style: none; display: flex; gap: clamp(16px, 2.6vw, 34px); margin: 0; padding: 0; }
.site-nav a { color: rgba(245, 245, 247, 0.78); font-size: 0.8125rem; font-weight: 450; letter-spacing: 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; text-decoration: none; }
@media (max-width: 640px) { .site-nav .opt { display: none; } }

/* ---------- hero stage ---------- */

.hero {
  background: var(--stage);
  color: var(--stage-ink);
  text-align: center;
  padding: calc(53px + clamp(72px, 12vw, 136px)) 0 clamp(64px, 9vw, 112px);
  overflow: hidden;
  position: relative;
}
.hero-name {
  font-size: clamp(3rem, 9vw, 6.5rem);
  font-weight: 680;
  font-stretch: 112%;
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.hero-role {
  font-size: clamp(1.1875rem, 2.4vw, 1.75rem);
  font-weight: 520;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--stage-ink-2);
  max-width: 44ch;
  margin: 22px auto 0;
}
.hero-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 28px; margin-top: 34px; }
.hero-links .chev { color: #8fb0ff; font-size: 1.0625rem; }

.stage-shot { position: relative; max-width: 760px; margin: clamp(56px, 8vw, 88px) auto 0; text-align: left; }
.stage-shot::before {
  content: ""; position: absolute; inset: 12% -14% -18%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(50% 55% at 30% 60%, rgba(64, 110, 255, 0.34), transparent 70%),
    radial-gradient(40% 45% at 75% 70%, rgba(242, 184, 75, 0.2), transparent 70%);
  filter: blur(36px);
}

/* ---------- detection console ---------- */

.console {
  position: relative; z-index: 1;
  margin: 0;
  background: linear-gradient(180deg, #111829 0%, var(--console) 100%);
  color: var(--console-ink);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 40px 80px -24px rgba(0, 0, 0, 0.8);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.75;
  overflow: hidden;
}
.console-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-family: var(--font); font-size: 0.8125rem; color: var(--console-dim);
}
.console-bar .dots { display: flex; gap: 7px; }
.console-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.console-bar strong { color: var(--console-ink); font-weight: 550; }
.console-bar span:last-child { margin-left: auto; }
.console pre { margin: 0; padding: 20px 22px 14px; white-space: pre; overflow-x: auto; font: inherit; }
.console .k { color: var(--console-key); }
.console .s { color: var(--console-str); }
.console .c { color: var(--console-com); font-style: italic; }
.console .ln { display: block; }
.console-result { border-top: 1px solid rgba(255, 255, 255, 0.07); padding: 14px 22px 18px; }
.console-status { font-family: var(--font); font-size: 0.8125rem; font-weight: 550; color: var(--amber); margin: 0 0 10px; display: flex; gap: 10px; align-items: center; }
.console-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(242, 184, 75, 0.18); }
.console table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.console th { text-align: left; font-weight: 450; color: var(--console-dim); padding: 2px 12px 6px 0; }
.console td { padding: 8px 12px 8px 0; white-space: nowrap; }
.console tbody tr { background: rgba(242, 184, 75, 0.12); }
.console tbody td:first-child { padding-left: 10px; border-left: 2px solid var(--amber); border-radius: 2px 0 0 2px; }
.console-note { font-family: var(--font); font-size: 0.75rem; color: var(--console-dim); margin: 12px 0 0; }
.console pre code, .code pre code { background: none; border: 0; padding: 0; border-radius: 0; font: inherit; color: inherit; }

@media (max-width: 480px) {
  .console { font-size: 0.6875rem; border-radius: 16px; }
  .console pre { padding: 16px 14px 10px; }
  .console-result { padding: 12px 14px 14px; }
  .console-bar span:last-child { display: none; }
}

/* the hero's one orchestrated moment: shot rises, query lands, a match surfaces */
@media (prefers-reduced-motion: no-preference) {
  .stage-shot { animation: rise 1100ms var(--ease) 150ms both; }
  .console .ln { opacity: 0; animation: ln-in 280ms ease-out forwards; animation-delay: calc(700ms + var(--i, 0) * 110ms); }
  .console-result { opacity: 0; animation: ln-in 320ms ease-out 1950ms forwards; }
  .console tbody tr { animation: flag 1400ms ease-out 2150ms both; }
  @keyframes rise { from { opacity: 0; transform: translateY(40px) scale(0.98); } to { opacity: 1; transform: none; } }
  @keyframes ln-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
  @keyframes flag { 0% { background: rgba(242, 184, 75, 0); } 35% { background: rgba(242, 184, 75, 0.36); } 100% { background: rgba(242, 184, 75, 0.12); } }
}

/* ---------- scroll reveal (only when JS has marked the page) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 900ms var(--ease), transform 900ms var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* ---------- sections ---------- */

.section { padding: clamp(80px, 11vw, 144px) 0; }
.band { background: var(--band); }
.band + .band { padding-top: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.kicker-head { text-align: center; margin: 0 auto clamp(44px, 6vw, 72px); max-width: 46rem; }
.kicker-head h2 { font-size: clamp(2.25rem, 5.4vw, 3.75rem); font-weight: 680; font-stretch: 106%; letter-spacing: -0.04em; }
.kicker-head p { color: var(--ink-2); font-size: clamp(1.0625rem, 1.8vw, 1.3125rem); margin: 16px auto 0; max-width: 36rem; }

/* statement: two-tone, Apple-style */
.statement { font-size: clamp(2rem, 4.8vw, 3.5rem); font-weight: 650; letter-spacing: -0.035em; line-height: 1.12; max-width: 14ch; margin: 0; }
.statement span { color: var(--ink-3); }

.about-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 96px); align-items: start; }
.about-copy p { color: var(--ink-2); font-size: 1.125rem; line-height: 1.6; max-width: 58ch; }
.about-copy p strong { color: var(--ink); font-weight: 600; }
@media (max-width: 860px) { .about-grid { grid-template-columns: minmax(0, 1fr); } }

/* highlight tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: clamp(48px, 7vw, 80px); }
.tile { background: var(--tile); border-radius: var(--radius-tile); padding: 28px 28px 30px; }
.tile .big { display: block; font-size: clamp(1.875rem, 3.2vw, 2.5rem); font-weight: 680; font-stretch: 108%; letter-spacing: -0.04em; line-height: 1.05; margin-bottom: 10px; }
.tile .small { display: block; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.45; }
@media (max-width: 960px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .tiles { gap: 12px; }
  .tile { padding: 20px 18px 22px; border-radius: 22px; }
  .tile .big { font-size: 1.5rem; }
  .tile .small { font-size: 0.875rem; }
  .hero-role { font-size: 1.125rem; }
  .hero-role br { display: none; }
  .mini-code { font-size: 0.6875rem; padding: 14px 16px; }
}
@media (max-width: 340px) { .tiles { grid-template-columns: minmax(0, 1fr); } }

/* work bento */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.work {
  background: var(--tile); border-radius: var(--radius-tile);
  padding: clamp(28px, 4vw, 48px);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.work-feature { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.work h3 { font-size: clamp(1.625rem, 3vw, 2.25rem); font-weight: 670; font-stretch: 106%; letter-spacing: -0.035em; margin-bottom: 14px; }
.work p { color: var(--ink-2); font-size: 1.0625rem; max-width: 46ch; }
.work .links { display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: 1.0625rem; }
.work .art { margin-top: 32px; }
.stack { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 22px; padding: 0; }
.stack li { font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); background: var(--band); border-radius: 999px; padding: 4px 11px; }
@media (max-width: 860px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .work-feature { grid-template-columns: minmax(0, 1fr); }
  .work-feature .art-feature { order: -1; }
}

/* mini art for the two smaller tiles */
.mini-code {
  background: var(--console); color: var(--console-ink);
  border-radius: 16px; padding: 18px 20px;
  font-family: var(--mono); font-size: 0.75rem; line-height: 1.8;
  white-space: pre; overflow-x: auto;
}
.mini-code .k { color: var(--console-key); }
.mini-code .s { color: var(--console-str); }
.mini-code .hit { color: var(--amber); font-family: var(--font); font-weight: 550; }

/* experience */
.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 60rem; }
.timeline > li { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 6px 40px; padding: 34px 0; border-top: 1px solid var(--hairline); }
.timeline > li:last-child { border-bottom: 1px solid var(--hairline); }
.when { font-size: 0.9375rem; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; padding-top: 5px; }
.timeline h3 { font-size: 1.375rem; font-weight: 640; letter-spacing: -0.025em; }
.timeline .org { color: var(--ink-2); font-size: 1rem; margin: 4px 0 14px; }
.timeline ul { margin: 0; padding-left: 1.1em; color: var(--ink-2); }
.timeline li li { margin-bottom: 8px; max-width: 62ch; }
.timeline li li::marker { color: var(--ink-3); }
.timeline .note { color: var(--ink-2); font-size: 0.9375rem; margin: 0 0 12px; max-width: 62ch; }
.timeline > li.brief .note { margin: 6px 0 0; }
.roles { list-style: none; margin: 4px 0 0; padding: 0 0 0 18px; border-left: 2px solid var(--hairline); display: grid; gap: 18px; }
.roles li { margin: 0; }
.roles h4 { font-size: 1.0625rem; font-weight: 620; letter-spacing: -0.015em; }
.roles .role-when { display: block; color: var(--ink-3); font-size: 0.875rem; margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.roles p { color: var(--ink-2); margin: 0; max-width: 62ch; }
.timeline > li.brief { padding: 22px 0; }
.timeline > li.brief h3 { font-size: 1.125rem; }
.timeline > li.brief .org { margin-bottom: 0; }
.timeline code, .prose code { font-family: var(--mono); font-size: 0.86em; }
@media (max-width: 700px) { .timeline > li { grid-template-columns: minmax(0, 1fr); } }

/* certifications */
.cert-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cert { background: var(--tile); border-radius: var(--radius-tile); padding: 26px 26px 28px; display: flex; flex-direction: column; min-height: 220px; }
.cert .issuer { color: var(--ink-3); font-size: 0.875rem; font-weight: 550; }
.cert .abbr { font-size: clamp(2rem, 3.6vw, 2.75rem); font-weight: 700; font-stretch: 110%; letter-spacing: -0.04em; line-height: 1; margin: 18px 0 10px; }
.cert .name { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.4; }
.cert .issued { margin-top: auto; padding-top: 18px; color: var(--ink-3); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.education { text-align: center; color: var(--ink-2); font-size: 1rem; margin: 40px auto 0; max-width: 40rem; }
.education strong { color: var(--ink); font-weight: 600; }
@media (max-width: 960px) { .cert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cert { min-height: 0; padding: 20px 18px 22px; border-radius: 22px; } .cert .abbr { font-size: 1.625rem; margin: 12px 0 8px; } .cert .name { font-size: 0.875rem; } }
@media (max-width: 340px) { .cert-grid { grid-template-columns: minmax(0, 1fr); } }

/* contact stage */
.contact { background: var(--stage); color: var(--stage-ink); text-align: center; padding: clamp(96px, 13vw, 168px) 0; }
.contact h2 { font-size: clamp(2.75rem, 8vw, 5.5rem); font-weight: 680; font-stretch: 110%; letter-spacing: -0.045em; }
.contact p { color: var(--stage-ink-2); font-size: clamp(1.0625rem, 2vw, 1.375rem); max-width: 32rem; margin: 20px auto 0; }
.contact .hero-links { margin-top: 38px; }

/* footer */
.site-footer { background: var(--band); color: var(--ink-3); font-size: 0.75rem; padding: 0 0 30px; }
main > .prose:last-child { padding-bottom: clamp(72px, 10vw, 128px); }
.site-footer .wrap-wide { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; border-top: 1px solid var(--hairline); padding-top: 18px; }
.site-footer a { color: var(--ink-2); }
.contact + .site-footer, main + .site-footer { padding-top: 0; }
.contact + .site-footer .wrap-wide { border-top: 0; }

/* ---------- architecture diagrams (inline SVG) ---------- */

.diagram { width: 100%; font-family: var(--font); }
.diagram .zone { fill: none; stroke: var(--ink-3); stroke-opacity: 0.45; stroke-width: 1.5; }
.diagram .zone-inner { fill: none; stroke: var(--ink-3); stroke-opacity: 0.45; stroke-width: 1.25; stroke-dasharray: 4 4; }
.diagram .zone-label { fill: var(--ink-3); font-size: 12px; font-weight: 550; }
.diagram .node { fill: var(--tile); stroke: var(--ink); stroke-width: 1.4; }
.diagram .node-ext { fill: var(--band); stroke: var(--ink-3); stroke-width: 1.2; }
.diagram .node-attack { stroke: var(--signal); stroke-width: 2; }
.diagram .t { fill: var(--ink); font-size: 14px; font-weight: 620; letter-spacing: -0.01em; }
.diagram .st { fill: var(--ink-2); font-size: 11.5px; font-weight: 450; }
.diagram .edge { stroke: var(--ink-3); stroke-width: 1.5; fill: none; }
.diagram .edge-attack { stroke: var(--signal); stroke-width: 2; }
.diagram .edge-ctl { stroke-dasharray: 5 4; }
.diagram .el { fill: var(--ink-2); font-size: 11px; font-weight: 500; }
.diagram .el-attack { fill: var(--signal); font-weight: 600; }
.diagram .ah { fill: var(--ink-3); }
.diagram .ah-attack { fill: var(--signal); }
.diagram-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 520px) { .diagram-scroll .diagram { min-width: 520px; } }

/* ---------- case-study pages ---------- */

.cs-head { background: var(--stage); color: var(--stage-ink); padding: calc(53px + clamp(64px, 10vw, 128px)) 0 clamp(56px, 8vw, 96px); }
.crumb { font-size: 0.9375rem; font-weight: 500; margin: 0 0 22px; }
.crumb a { color: #8fb0ff; }
.cs-head h1 { font-size: clamp(2.5rem, 7vw, 5rem); font-weight: 680; font-stretch: 110%; letter-spacing: -0.045em; line-height: 1; max-width: 16ch; }
.lede { font-size: clamp(1.1875rem, 2.4vw, 1.625rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.35; color: var(--stage-ink-2); max-width: 36ch; margin: 24px 0 0; }
.lede a { color: #8fb0ff; }
.cs-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 36px; margin: 44px 0 0; padding-top: 22px; border-top: 1px solid var(--stage-hairline); max-width: 54rem; }
.cs-facts div { display: grid; gap: 4px; }
.cs-facts dt { font-size: 0.8125rem; font-weight: 550; color: #7f838d; }
.cs-facts dd { margin: 0; font-size: 1rem; line-height: 1.45; color: var(--stage-ink); }
.cs-facts a { color: #8fb0ff; }
@media (max-width: 640px) { .cs-facts { grid-template-columns: minmax(0, 1fr); } }

.prose { padding: clamp(56px, 8vw, 104px) 0 clamp(72px, 10vw, 128px); }
.prose .wrap > * { max-width: 42rem; }
.prose .wrap > figure { max-width: 100%; }
.prose p, .prose li { font-size: 1.125rem; line-height: 1.65; color: var(--ink-2); }
.prose p strong, .prose li strong { color: var(--ink); font-weight: 600; }
.prose h2 { font-size: clamp(1.625rem, 3.2vw, 2.375rem); font-weight: 670; font-stretch: 106%; letter-spacing: -0.035em; margin: 2.2em 0 0.55em; color: var(--ink); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.1875rem; font-weight: 640; margin: 1.6em 0 0.4em; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.15em; margin: 0 0 1.3em; }
.prose li { margin-bottom: 0.55em; }
.prose li::marker { color: var(--ink-3); }
.prose code { background: var(--band); border-radius: 6px; padding: 0.1em 0.38em; color: var(--ink); }
.prose figure { margin: 3em 0; }
.prose .wrap > figure:first-child { margin-top: 0; }
.prose figure.panel { background: var(--tile); border-radius: var(--radius-tile); padding: clamp(18px, 3.4vw, 44px); box-shadow: 0 0 0 1px var(--hairline); }
.prose figcaption { font-size: 0.875rem; color: var(--ink-3); margin-top: 14px; max-width: 42rem; }

.code { background: var(--console); color: var(--console-ink); border-radius: 18px; overflow: hidden; max-width: 52rem; border: 1px solid rgba(255, 255, 255, 0.06); }
.code-head { display: flex; justify-content: space-between; gap: 12px; padding: 11px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); font-size: 0.8125rem; color: var(--console-dim); }
.code-head span:last-child { white-space: nowrap; flex-shrink: 0; }
.code pre { margin: 0; padding: 18px 20px 20px; overflow-x: auto; font-family: var(--mono); font-size: 0.8125rem; line-height: 1.7; tab-size: 2; }
.code .k { color: var(--console-key); }
.code .s { color: var(--console-str); }
.code .c { color: var(--console-com); font-style: italic; }

.pairs { list-style: none; padding: 0; margin: 0 0 1.3em; display: grid; gap: 12px; }
.pairs li { background: var(--tile); border-radius: var(--radius-sm); padding: 20px 22px; margin: 0; box-shadow: 0 0 0 1px var(--hairline); }
.pairs h3 { margin: 0 0 6px; font-size: 1.0625rem; }
.pairs p { margin: 0 0 8px; font-size: 1rem; }
.pairs .fix { margin: 0; }
.pairs .fix strong { color: var(--ink); }

.prose .callout { background: var(--band); border-radius: var(--radius-sm); padding: 16px 20px; color: var(--ink-2); font-size: 1rem; }

.next-up { margin-top: 72px; padding: 28px 30px; background: var(--band); border-radius: var(--radius-tile); }
.prose .next-up p { margin: 0 0 4px; color: var(--ink-3); font-size: 0.875rem; font-weight: 550; }
.next-up a { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.025em; }

@media print {
  .masthead, .hero-links, .skip { display: none; }
  .hero, .contact, .cs-head { background: #fff; color: #000; }
}
