/* =========================================================================
   Halvoryx — Design System
   Futuristic glass / iridescent. Cool light paper, cyan→violet gradients,
   Syne display + Sora body + Space Mono labels. Frosted glass. LIGHT default.
   ========================================================================= */

/* ---------- Tokens (LIGHT default) ---------- */
:root {
  --paper: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eaeef7;
  --ink: #0e1424;
  --ink-soft: #353d57;
  --muted: #687087;
  --faint: #8b92a8;
  --line: rgba(14, 20, 36, 0.10);
  --line-strong: rgba(14, 20, 36, 0.18);
  --accent: #0891b2;
  --accent-strong: #0e7490;
  --accent-soft: #d6f1f8;
  --violet: #7c3aed;
  --violet-soft: #ece7fc;
  --accent-ink: #ffffff;
  --danger: #e11d48;
  --grad: linear-gradient(110deg, #06b6d4 0%, #4f7cf0 50%, #7c3aed 100%);

  --maxw: 1180px;
  --readw: 720px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --btn-radius: 10px;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.7);
  --shadow-sm: 0 1px 2px rgba(20,30,60,.06), 0 1px 1px rgba(20,30,60,.05);
  --shadow: 0 22px 48px -26px rgba(30,40,90,.34), 0 6px 16px -8px rgba(20,30,60,.12);
  --shadow-lg: 0 44px 90px -36px rgba(40,30,110,.4);
  --ring: 0 0 0 4px var(--accent-soft);

  --display: "Syne", "Segoe UI", system-ui, sans-serif;
  --sans: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Space Mono", ui-monospace, Menlo, Consolas, monospace;

  --step--1: clamp(.83rem, .80rem + .15vw, .9rem);
  --step-0: clamp(1rem, .96rem + .2vw, 1.07rem);
  --step-1: clamp(1.18rem, 1.1rem + .4vw, 1.34rem);
  --step-2: clamp(1.5rem, 1.3rem + .9vw, 1.95rem);
  --step-3: clamp(1.9rem, 1.55rem + 1.55vw, 2.85rem);
  --step-4: clamp(2.3rem, 1.85rem + 2.6vw, 3.7rem);
  --step-5: clamp(2.9rem, 2.05rem + 4vw, 4.7rem);
}

:root[data-theme="dark"] {
  --paper: #0a0e1a;
  --surface: #121829;
  --surface-2: #1a2236;
  --ink: #eef1f9;
  --ink-soft: #c8cee0;
  --muted: #939bb4;
  --faint: #7a8199;
  --line: rgba(238, 241, 249, 0.10);
  --line-strong: rgba(238, 241, 249, 0.2);
  --accent: #22d3ee;
  --accent-strong: #67e8f9;
  --accent-soft: #0c3442;
  --violet: #a78bfa;
  --violet-soft: #241a3e;
  --accent-ink: #06121a;
  --glass: rgba(20, 28, 48, 0.55);
  --glass-border: rgba(255, 255, 255, 0.12);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.5);
  --shadow: 0 22px 50px -24px rgba(0,0,0,.72);
  --shadow-lg: 0 44px 90px -32px rgba(0,0,0,.82);
  --ring: 0 0 0 4px rgba(34,211,238,.22);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body {
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "calt";
  overflow-x: hidden;
}
img, picture, video, svg { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--violet); color: #fff; }
hr { border: none; border-top: 1px solid var(--line); margin: 2.4rem 0; }

/* ---------- Layout ---------- */
.wrap { width: min(100% - 2.4rem, var(--maxw)); margin-inline: auto; }
.wrap-read { width: min(100% - 2.4rem, var(--readw)); margin-inline: auto; }
.section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.section-sm { padding: clamp(2rem, 4vw, 3rem) 0; }
.stack > * + * { margin-top: 1.1rem; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { text-wrap: pretty; }
.lead { font-size: var(--step-1); line-height: 1.6; color: var(--ink-soft); font-weight: 400; }
.eyebrow { font-family: var(--mono); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); display: inline-flex; align-items: center; gap: .5rem; }
.eyebrow svg { width: 1.15em; height: 1.15em; flex: none; }
.muted { color: var(--muted); }
.center { text-align: center; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--sans); font-weight: 600; font-size: var(--step--1); letter-spacing: .01em;
  padding: .8rem 1.4rem; border-radius: var(--btn-radius); border: 1px solid transparent;
  cursor: pointer; transition: transform .16s ease, filter .18s ease, border-color .18s, box-shadow .18s, color .18s, background .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 12px 26px -10px rgba(80,60,220,.5); }
.btn-primary:hover { filter: brightness(1.07); box-shadow: 0 16px 32px -10px rgba(80,60,220,.55); }
.btn-ghost { background: var(--glass); border-color: var(--line-strong); color: var(--ink); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 72%, transparent);
  backdrop-filter: saturate(1.5) blur(16px);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 1.3rem; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--display); font-size: 1.42rem; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.brand .mark { width: 33px; height: 33px; flex: none; border-radius: 10px; box-shadow: 0 6px 18px -6px rgba(80,60,220,.5); }
.nav-links { display: flex; align-items: center; gap: .1rem; margin-left: .6rem; }
.nav-links a {
  font-family: var(--mono); font-size: .8rem; font-weight: 400; letter-spacing: .02em; color: var(--ink-soft);
  padding: .5rem .8rem; border-radius: 8px; transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--accent); background: var(--accent-soft); }
.nav-links a[aria-current="page"] { color: var(--accent); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: .4rem; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-soft); cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
.nav-toggle { display: none; }

/* mobile nav */
.mobile-menu { display: none; }
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-grid; }
  .mobile-menu {
    display: block; position: fixed; inset: 72px 0 auto 0; z-index: 49;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 1rem 1.2rem 1.6rem; transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .2s, transform .2s; box-shadow: var(--shadow);
  }
  .mobile-menu[hidden] { display: none; }
  .mobile-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .mobile-menu a { display: block; padding: .85rem .4rem; font-family: var(--mono); font-size: .95rem; border-bottom: 1px solid var(--line); color: var(--ink); }
  .mobile-menu a:last-child { border-bottom: none; }
}

/* ---------- Hero (iridescent mesh) ---------- */
.hero-tech { position: relative; padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(2.4rem, 5vw, 4.5rem); overflow: hidden; }
.mesh { position: absolute; inset: 0; z-index: -1; }
.mesh span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.mesh span:nth-child(1) { width: 46vw; height: 46vw; left: -8vw; top: -14vw; background: #06b6d4; animation: drift1 24s ease-in-out infinite; }
.mesh span:nth-child(2) { width: 40vw; height: 40vw; right: -6vw; top: -8vw; background: #7c3aed; animation: drift2 28s ease-in-out infinite; }
.mesh span:nth-child(3) { width: 38vw; height: 38vw; left: 30vw; bottom: -18vw; background: #4f7cf0; animation: drift1 32s ease-in-out infinite reverse; }
@keyframes drift1 { 50% { transform: translate(6vw, 4vw) scale(1.1); } }
@keyframes drift2 { 50% { transform: translate(-5vw, 5vw) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .mesh span { animation: none; } }
.hero-inner { max-width: 820px; text-align: center; margin-inline: auto; display: flex; flex-direction: column; align-items: center; }
.hero-tech h1 { font-size: var(--step-5); line-height: .98; margin: 1rem 0 1.2rem; letter-spacing: -.04em; }
.hero-tech .lead { max-width: 58ch; }
.hero-tech .hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; margin-top: 1.8rem; }

/* ---------- Article cards (glass) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: clamp(1.4rem, 2.6vw, 2rem); }
.card { display: flex; flex-direction: column; background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); overflow: hidden; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.card a.thumb { display: block; overflow: hidden; aspect-ratio: 16/10; background: var(--surface-2); }
.card a.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.2,.7,.2,1); }
.card:hover a.thumb img { transform: scale(1.06); }
.card .meta { display: flex; align-items: center; gap: .55rem; margin: 1.1rem 1.3rem .5rem; font-size: .78rem; }
.cat-tag { font-family: var(--mono); font-weight: 700; letter-spacing: .03em; text-transform: uppercase; font-size: .64rem; color: var(--violet); background: var(--violet-soft); padding: .26rem .55rem; border-radius: 5px; }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.card h3 { font-size: var(--step-1); line-height: 1.22; margin: 0 1.3rem; letter-spacing: -.02em; }
.card h3 a { transition: color .15s; }
.card:hover h3 a { color: var(--accent); }
.card p.dek { color: var(--muted); font-size: .92rem; margin: .55rem 1.3rem 0; line-height: 1.55; }
.card .byline { margin: auto 1.3rem 1.2rem; padding-top: 1rem; display: flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 1.1rem; }
.avatar { width: 26px; height: 26px; border-radius: 50%; flex: none; }

/* Featured / large card */
.feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.feature .thumb { aspect-ratio: auto; min-height: 300px; overflow: hidden; }
.feature .thumb img { width: 100%; height: 100%; object-fit: cover; }
.feature .feature-body { padding: clamp(1.6rem, 3.4vw, 3rem); display: flex; flex-direction: column; justify-content: center; }
.feature h2 { font-size: var(--step-3); margin: .7rem 0 .8rem; }
.feature h2 a:hover { color: var(--accent); }
.feature .dek { color: var(--ink-soft); font-size: 1.03rem; }
@media (max-width: 760px) { .feature { grid-template-columns: 1fr; } .feature .thumb { min-height: 0; aspect-ratio: 16/9; } }

/* ---------- Section heading ---------- */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.9rem; flex-wrap: wrap; }
.sec-head .titles h2 { font-size: var(--step-2); margin-top: .35rem; }
.sec-head p { color: var(--muted); margin-top: .35rem; }
.link-arrow { font-family: var(--mono); font-weight: 700; font-size: .8rem; text-transform: uppercase; color: var(--accent); display: inline-flex; align-items: center; gap: .4rem; }
.link-arrow svg { width: 16px; height: 16px; transition: transform .2s; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Category chips ---------- */
.chips { display: flex; gap: .55rem; flex-wrap: wrap; }
.chip { font-family: var(--mono); font-size: .8rem; padding: .5rem 1rem; border-radius: 8px; border: 1px solid var(--line-strong); color: var(--ink-soft); background: var(--surface); transition: all .15s; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-current="page"], .chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Article page ---------- */
.article-head { padding: clamp(2.2rem, 4vw, 3.4rem) 0 0; }
.breadcrumb { font-size: .8rem; color: var(--muted); display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.2rem; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb svg { width: 13px; height: 13px; opacity: .5; }
.article-head h1 { font-size: var(--step-4); margin: .7rem 0 1rem; letter-spacing: -.02em; }
.article-head .lead { max-width: 60ch; }
.article-byline { display: flex; align-items: center; gap: .8rem; margin: 1.6rem 0; flex-wrap: wrap; }
.article-byline .avatar { width: 46px; height: 46px; }
.article-byline .bi b { font-weight: 700; font-size: .96rem; }
.article-byline .bi span { display: block; font-size: .82rem; color: var(--muted); }
.share { margin-left: auto; display: flex; gap: .4rem; }
.figure-hero { margin: 1.4rem auto 0; }
.figure-hero img { border-radius: var(--radius-lg); aspect-ratio: 16/9; object-fit: cover; width: 100%; box-shadow: var(--shadow); }
figcaption { font-size: .8rem; color: var(--faint); margin-top: .6rem; text-align: center; }

.prose { font-size: 1.12rem; line-height: 1.82; color: var(--ink-soft); }
.prose > * + * { margin-top: 1.4rem; }
.prose h2 { font-family: var(--display); font-weight: 700; font-size: var(--step-2); margin-top: 2.8rem; color: var(--ink); letter-spacing: -.02em; }
.prose h3 { font-family: var(--display); font-weight: 600; font-size: var(--step-1); margin-top: 2rem; color: var(--ink); }
.prose p { color: var(--ink-soft); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.prose a:hover { text-decoration-color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-top: .55rem; padding-left: .3rem; }
.prose li::marker { color: var(--accent); }
.prose blockquote {
  border: none; border-left: 4px solid; border-image: var(--grad) 1; padding: .8rem 0 .8rem 1.5rem; margin-left: 0;
  font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.45; color: var(--ink); font-style: normal;
}
.prose img { border-radius: var(--radius); margin-block: 1.8rem; }
.prose figure img { margin-bottom: .4rem; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .15em .4em; border-radius: 5px; }
.prose pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose h2 a.anchor, .prose h3 a.anchor { opacity: 0; margin-left: .4rem; color: var(--faint); text-decoration: none; font-size: .8em; }
.prose h2:hover a.anchor, .prose h3:hover a.anchor { opacity: 1; }

.callout { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.callout strong { color: var(--accent-strong); }
.key-takeaways { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 1.5rem 1.6rem; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); position: relative; }
.key-takeaways::before { content: ""; position: absolute; left: 0; top: 1.4rem; bottom: 1.4rem; width: 4px; border-radius: 4px; background: var(--grad); }
.key-takeaways h2 { font-family: var(--display); font-weight: 700; margin-top: 0 !important; font-size: var(--step-1); }
.key-takeaways ul { margin-top: .8rem; }

.tags { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 2.6rem; }
.tag { font-family: var(--mono); font-size: .76rem; color: var(--muted); border: 1px solid var(--line); padding: .35rem .8rem; border-radius: 7px; background: var(--surface); }
.tag:hover { border-color: var(--accent); color: var(--accent); }

/* author box */
.author-box { display: flex; gap: 1.2rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem; margin-top: 2.8rem; box-shadow: var(--shadow-sm); }
.author-box .avatar { width: 64px; height: 64px; }
.author-box b { font-size: 1.08rem; font-family: var(--display); font-weight: 700; }
.author-box .role { font-family: var(--mono); font-size: .74rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.author-box p { color: var(--muted); font-size: .94rem; margin-top: .5rem; }

/* TOC */
.toc { font-size: .9rem; }
.toc-title { font-family: var(--mono); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: .8rem; }
.toc a { display: block; padding: .35rem 0; color: var(--muted); border-left: 2px solid var(--line); padding-left: .9rem; transition: color .15s, border-color .15s; }
.toc a:hover { color: var(--accent); border-color: var(--accent); }

.article-layout { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 1040px) {
  .article-layout { grid-template-columns: 1fr 230px; align-items: start; }
  .article-aside { position: sticky; top: 96px; }
}

/* prev/next */
.read-next { border-top: 1px solid var(--line); margin-top: 3.5rem; padding-top: 2.5rem; }

/* ---------- Newsletter ---------- */
.newsletter { background: var(--grad); color: #fff; border-radius: var(--radius-lg); padding: clamp(2rem, 4.5vw, 3.6rem); position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.newsletter h2 { color: #fff; font-size: var(--step-2); }
.newsletter p { color: rgba(255,255,255,.88); max-width: 48ch; margin-top: .6rem; }
.newsletter form { display: flex; gap: .6rem; margin-top: 1.5rem; max-width: 460px; flex-wrap: wrap; }
.newsletter input { flex: 1; min-width: 200px; padding: .82rem 1.1rem; border-radius: var(--btn-radius); border: 1px solid rgba(255,255,255,.32); background: rgba(255,255,255,.14); color: #fff; }
.newsletter input::placeholder { color: rgba(255,255,255,.72); }
.newsletter .btn { background: #fff; color: #4f3ad0; }
.newsletter .btn:hover { background: #f0f0ff; filter: none; }
.newsletter small { display: block; margin-top: .85rem; color: rgba(255,255,255,.74); font-size: .78rem; }
.newsletter .glow { position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.2), transparent 65%); right: -120px; top: -160px; }
.newsletter > * { position: relative; z-index: 1; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: clamp(3rem, 6vw, 6rem); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; padding: clamp(2.6rem, 5vw, 4rem) 0 2.4rem; }
.footer-grid h4 { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 1rem; font-weight: 700; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid a { display: block; padding: .5rem 0; color: var(--muted); font-size: .92rem; }
.footer-grid a:hover { color: var(--accent); }
.footer-brand p { color: var(--muted); font-size: .92rem; margin: .9rem 0 1.1rem; max-width: 34ch; }
.social { display: flex; gap: .5rem; }
.social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); }
.social a:hover { border-color: var(--accent); color: var(--accent); }
.social svg { width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid var(--line); padding: 1.4rem 0; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .84rem; color: var(--muted); }
.footer-bottom a:hover { color: var(--accent); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Page header (static pages) ---------- */
.page-head { padding: clamp(2.6rem, 5vw, 4.4rem) 0 clamp(1.4rem, 2vw, 2rem); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-head::before { content: ""; position: absolute; width: 50vw; height: 50vw; left: -10vw; top: -25vw; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--violet) 22%, transparent), transparent 60%); filter: blur(50px); z-index: -1; }
.page-head .eyebrow { margin-bottom: .8rem; }
.page-head h1 { font-size: var(--step-4); max-width: 18ch; letter-spacing: -.02em; }
.page-head .lead { max-width: 60ch; margin-top: 1rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.8rem, 4vw, 3.4rem); align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .45rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: .8rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.field textarea { min-height: 150px; resize: vertical; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; margin-bottom: 1rem; display: flex; gap: 1rem; align-items: flex-start; }
.contact-card .dot { width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.contact-card .dot svg { width: 20px; height: 20px; }
.contact-card b { font-size: .96rem; }
.contact-card a, .contact-card span { color: var(--muted); font-size: .92rem; }
.contact-card a:hover { color: var(--accent); }

/* ---------- Author archive header ---------- */
.author-hero { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; }
.author-hero .avatar { width: 92px; height: 92px; }
.author-hero .role { font-family: var(--mono); color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; }
.author-hero p { color: var(--muted); max-width: 56ch; margin-top: .5rem; }

/* ---------- Misc ---------- */
.pill-row { display: flex; gap: 1.4rem; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.pill-row .item { display: flex; align-items: center; gap: .5rem; }
.pill-row svg { width: 18px; height: 18px; color: var(--accent); }
.notice { background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 1rem 1.2rem; font-size: .9rem; color: var(--muted); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper); padding: .8rem 1.3rem; border-radius: 100px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .3s; z-index: 100; font-size: .9rem; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.4rem; }
.value-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 1.6rem; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform .2s, box-shadow .2s, border-color .2s; }
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.value-card .dot { width: 46px; height: 46px; border-radius: 12px; background: var(--grad); color: #fff; display: grid; place-items: center; margin-bottom: 1.1rem; }
.value-card .dot svg { width: 23px; height: 23px; }
.value-card h3 { font-size: 1.25rem; letter-spacing: -.02em; }
.value-card p { color: var(--muted); font-size: .92rem; margin-top: .5rem; }

.stat-row { display: flex; gap: clamp(1.5rem, 4vw, 3.5rem); flex-wrap: wrap; }
.stat b { font-family: var(--display); font-weight: 800; font-size: var(--step-3); display: block; line-height: 1; color: var(--accent); }
.stat span { color: var(--muted); font-size: .9rem; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 100; }
.skip-link:focus { left: 0; }

/* progress bar */
.read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--grad); z-index: 60; transition: width .1s linear; }

/* visually hidden (accessible) */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* cookie consent banner */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--surface); border-top: 1px solid var(--line-strong); box-shadow: 0 -10px 30px -16px rgba(20,30,60,.3); padding: 1rem 0; }
.consent[hidden] { display: none; }
.consent-inner { width: min(100% - 2.4rem, var(--maxw)); margin-inline: auto; display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.consent-inner p { font-size: .9rem; color: var(--ink-soft); margin: 0; flex: 1 1 320px; line-height: 1.5; }
.consent-inner a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.consent-actions { display: flex; gap: .6rem; flex: none; }
.consent-actions .btn { padding: .6rem 1.2rem; }
@media (max-width: 600px) { .consent-actions { width: 100%; } .consent-actions .btn { flex: 1; } }
