/* ==========================================================================
   SQL Server Expert — shared design system
   Michael Paycer · Senior SQL Server Database Administrator Consultant
   Two harmonized themes:
     .theme-dark  — professional / SQL Server / consulting pages
     .theme-paper — Little Falls editorial / local-interest pages
   One type system, one accent (gold). Paper theme distinguished by surface,
   not by a second accent color.
   ========================================================================== */

:root {
  --gold: #c6923b;
  --gold-bright: #e0b878;
  --radius: 18px;
  --radius-btn: 12px;
  --radius-sm: 10px;
  --maxw: 1140px;
  --maxw-read: 720px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

/* ---------- Dark (professional) theme tokens ---------- */
.theme-dark {
  --ink: #0d0e11;
  --ink-2: #14161b;
  --surface: #14161b;
  --line: rgba(233, 230, 223, 0.08);
  --line-strong: rgba(233, 230, 223, 0.15);
  --text: #eae8e2;
  --heading: #f2f0ea;
  --muted: #a6a49d;
  --faint: #74726c;
  --accent: #d1a460;
  --accent-bright: #e0b878;
  --link: #e0b878;
  --link-hover: #eecb94;
  --btn-ink: #241a08;
  --glow: rgba(209, 164, 96, 0.08);
  --shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.85);
}

/* ---------- Paper (editorial) theme tokens ---------- */
/* Little Falls News palette — navy + burnt orange on white, echoing littlefallsmn.com */
.theme-paper {
  --ink: #ffffff;
  --ink-2: #ffffff;
  --surface: #ffffff;
  --line: rgba(44, 62, 90, 0.14);
  --line-strong: rgba(44, 62, 90, 0.24);
  --text: #41474e;
  --heading: #2c3e5a;
  --muted: #556270;
  --faint: #6c7684;
  --accent: #2c3e5a;
  --accent-bright: #3f5c86;
  --link: #2c3e5a;
  --link-hover: #1b2a40;
  --btn-ink: #ffffff;
  --glow: rgba(44, 62, 90, 0.08);
  --shadow: 0 18px 40px -24px rgba(44, 62, 90, 0.35);
  --river: #2c3e5a; /* navy — decorative topo lines / river panels */
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--ink);
  line-height: 1.68;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* One quiet ambient glow on dark pages */
.theme-dark body::before,
body.theme-dark::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(48% 40% at 82% -8%, var(--glow), transparent 62%);
}

a { color: var(--text); text-decoration: none; }

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 34px; }
.reading { max-width: var(--maxw-read); }

/* ---------- Skip link + a11y ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--accent);
  color: var(--btn-ink);
  padding: 12px 18px;
  border-radius: var(--radius-btn);
  font-family: var(--font-mono);
  font-size: 13px;
}
.skip-link:focus { left: 16px; top: 12px; }

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 5px;
}

/* ---------- Header / nav ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  backdrop-filter: saturate(150%) blur(16px);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  padding: 16px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--heading);
  white-space: nowrap;
}
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.brand .by {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  border-left: 1px solid var(--line-strong);
  padding-left: 11px;
  margin-left: 2px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 26px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu > li { position: relative; }
.nav-menu a { color: var(--muted); transition: color 0.35s var(--ease); }
.nav-menu a:hover,
.nav-menu a[aria-current="page"] { color: var(--text); }
.nav-menu a[aria-current="page"] { color: var(--accent-bright); }

/* Dropdown */
.has-sub > button {
  font: inherit;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: inherit;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
}
.has-sub > button:hover { color: var(--text); }
.has-sub > button .caret { transition: transform 0.35s var(--ease); font-size: 9px; }
.has-sub[data-open="true"] > button .caret { transform: rotate(180deg); }
.submenu {
  position: absolute;
  top: calc(100% + 14px);
  left: -18px;
  min-width: 236px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px;
  list-style: none;
  margin: 0;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s;
}
.has-sub[data-open="true"] .submenu,
.has-sub:hover .submenu,
.has-sub:focus-within .submenu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.submenu a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 13px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.submenu a:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--text); }
.submenu .lead { color: var(--heading); font-weight: 600; }
.submenu .sub-note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 6px 12px 4px;
}

.nav-cta { display: inline-flex; align-items: center; gap: 12px; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  width: 42px; height: 42px;
  cursor: pointer;
  color: var(--text);
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.005em;
  padding: 13px 16px 13px 22px;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.5s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.btn .btn-ico {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: transform 0.5s var(--ease);
}
.btn:active { transform: scale(0.985); }

.btn-primary {
  background: var(--accent);
  color: var(--btn-ink);
  box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn-primary .btn-ico { background: color-mix(in srgb, var(--btn-ink) 16%, transparent); color: var(--btn-ink); }
.btn-primary:hover { background: var(--accent-bright); transform: translateY(-2px); box-shadow: 0 16px 34px -12px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-primary:hover .btn-ico { transform: translate(3px, -3px); }

.btn-ghost {
  background: color-mix(in srgb, var(--text) 3%, transparent);
  color: var(--text);
  border-color: var(--line-strong);
  padding: 13px 22px;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-bright); transform: translateY(-2px); }

.nav .btn { text-transform: none; font-size: 13.5px; padding: 10px 13px 10px 17px; }
.nav .btn .btn-ico { width: 24px; height: 24px; font-size: 12px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.12;
  color: var(--heading);
  margin: 0 0 18px;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 6vw, 68px); letter-spacing: -0.035em; line-height: 1.03; }
h2 { font-size: clamp(27px, 3.4vw, 39px); }
h3 { font-size: 21px; letter-spacing: -0.015em; }
h4 { font-size: 17px; }

p { margin: 0 0 16px; max-width: 68ch; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
strong { color: var(--heading); font-weight: 600; }

.kicker {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 11.5px;
  color: var(--accent);
  margin-bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
}
.kicker::before { content: ""; width: 24px; height: 1px; background: var(--accent); opacity: 0.55; }
.kicker.center { justify-content: center; }

section { padding: 104px 0; border-top: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head p { color: var(--muted); font-size: 18px; }

/* ---------- Breadcrumbs ---------- */
.crumbs {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 22px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.crumbs a { color: var(--muted); transition: color 0.3s var(--ease); }
.crumbs a:hover { color: var(--accent-bright); }
.crumbs .sep { opacity: 0.5; }
.crumbs [aria-current="page"] { color: var(--text); }

/* ---------- Hero ---------- */
.hero { border-top: none; padding: 84px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1fr 288px; gap: 68px; align-items: center; }
.hero h1 { margin-bottom: 24px; }
.hero p { font-size: 19px; max-width: 56ch; color: var(--muted); }
.hero .lead { color: var(--text); }
.hero-cta { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }

.hero-photo { position: relative; justify-self: center; }
.hero-photo img {
  width: 252px; height: 252px;
  border-radius: 22px;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.04);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

/* Stats row */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 56px;
  margin-top: 66px;
  padding-top: 38px;
  border-top: 1px solid var(--line);
}
.stat .num {
  font-family: var(--font-serif);
  font-size: 30px;
  color: var(--heading);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 9px;
}
.stat .num .accent { color: var(--accent); }
.stat .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
}

/* ---------- Grids / cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.phase {
  padding: 32px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--text) 1.5%, transparent);
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease), background 0.5s var(--ease);
}
.phase:hover { transform: translateY(-5px); border-color: var(--line-strong); background: color-mix(in srgb, var(--text) 3%, transparent); }
.phase .idx { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: 0.1em; display: block; margin-bottom: 18px; }
.phase h3 { margin-bottom: 11px; }
.phase p { font-size: 15.5px; line-height: 1.62; color: var(--muted); }

.card {
  padding: 32px 32px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease);
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-5px); border-color: var(--line-strong); }
.card h3 { margin-bottom: 12px; }
.card p { font-size: 15px; line-height: 1.64; color: var(--muted); }
.card p + p { margin-top: 12px; }

/* Link card (used for hubs / related content) */
.linkcard {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease);
}
.linkcard:hover { transform: translateY(-4px); border-color: var(--accent); }
.linkcard .lc-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.linkcard h3 { font-size: 20px; margin: 0; }
.linkcard p { font-size: 14.5px; color: var(--muted); margin: 0; line-height: 1.6; }
.linkcard .lc-more {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.linkcard:hover .lc-more .arrow { transform: translateX(3px); }
.lc-more .arrow { transition: transform 0.4s var(--ease); }

/* ---------- Checklist / panel ---------- */
.bp-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 58px; align-items: center; }
.panel {
  padding: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}
.panel h2 { font-size: 22px; margin-bottom: 24px; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
  position: relative;
  padding: 13px 0 13px 32px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 15.5px;
}
.check-list li:first-child { border-top: none; }
.check-list li::before {
  content: "";
  position: absolute; left: 3px; top: 19px;
  width: 7px; height: 7px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
}

/* ---------- Numbered rows ---------- */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 30px;
  padding: 32px 10px;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.5s var(--ease), background 0.5s var(--ease);
}
.row:hover { background: color-mix(in srgb, var(--text) 1.4%, transparent); padding-left: 22px; }
.row .r-idx { font-family: var(--font-serif); font-size: 30px; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1; }
.row h3 { margin-bottom: 10px; }
.row p { font-size: 15.5px; max-width: 76ch; color: var(--muted); }

/* ---------- Article prose ---------- */
.article { padding: 40px 0 96px; }
.article-header { max-width: var(--maxw-read); margin: 0 auto 40px; }
.article-header h1 { margin-bottom: 20px; }
.article-lead { font-size: 20px; line-height: 1.6; color: var(--muted); max-width: var(--maxw-read); }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.article-meta strong { color: var(--muted); font-weight: 500; }
.article-meta a { color: var(--link); }

.prose { max-width: var(--maxw-read); margin: 0 auto; }
.prose > * { max-width: 100%; }
.prose h2 {
  font-size: clamp(25px, 3vw, 32px);
  margin: 52px 0 16px;
  padding-top: 8px;
}
.prose h3 { font-size: 21px; margin: 34px 0 12px; }
.prose p { color: var(--text); margin: 0 0 20px; max-width: 100%; }
.prose a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--link) 45%, transparent); transition: color 0.3s var(--ease), text-decoration-color 0.3s var(--ease); }
.prose a:hover { color: var(--link-hover); text-decoration-color: var(--link-hover); }
.prose ul, .prose ol { color: var(--text); margin: 0 0 22px; padding-left: 22px; }
.prose li { margin-bottom: 9px; padding-left: 4px; }
.prose li::marker { color: var(--accent); }
.prose figure { margin: 30px 0; }
.prose figcaption {
  font-size: 13.5px;
  color: var(--faint);
  margin-top: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.prose blockquote {
  margin: 30px 0;
  padding: 6px 0 6px 26px;
  border-left: 3px solid var(--accent);
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1.45;
  color: var(--heading);
  font-style: italic;
}
.prose blockquote cite { display: block; margin-top: 12px; font-family: var(--font-mono); font-size: 12px; font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }

/* Featured / direct-answer block */
.answer {
  margin: 0 0 32px;
  padding: 26px 28px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}
.answer .answer-q {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.answer p { font-size: 17.5px; color: var(--heading); margin: 0; max-width: 100%; }

/* Verified / freshness note */
.verified {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.verified .tick { color: var(--accent); }

/* Callout box */
.callout {
  margin: 30px 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--text) 2.5%, transparent);
}
.callout .callout-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.callout p:last-child { margin-bottom: 0; }
.callout p { font-size: 15px; color: var(--muted); }

/* Fact table */
.facttable { width: 100%; border-collapse: collapse; margin: 26px 0; font-size: 15px; }
.facttable caption { text-align: left; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.facttable th, .facttable td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.facttable th { color: var(--heading); font-weight: 600; width: 34%; }
.facttable td { color: var(--muted); }
.table-scroll { overflow-x: auto; }

/* Table of contents */
.toc {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 22px 24px;
  background: color-mix(in srgb, var(--text) 2%, transparent);
  margin: 0 auto 40px;
  max-width: var(--maxw-read);
}
.toc .toc-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 30px; }
.toc li { margin-bottom: 8px; break-inside: avoid; }
.toc a { color: var(--muted); font-size: 14.5px; }
.toc a:hover { color: var(--link-hover); }

/* Related content strip */
.related {
  max-width: var(--maxw-read);
  margin: 56px auto 0;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.related h2 { font-size: 22px; margin-bottom: 22px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.related-grid a {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.related-grid a:hover { border-color: var(--accent); transform: translateY(-3px); }
.related-grid .rel-k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 6px; }
.related-grid .rel-t { color: var(--heading); font-weight: 600; font-size: 15.5px; }

/* Sources list */
.sources { max-width: var(--maxw-read); margin: 44px auto 0; padding-top: 28px; border-top: 1px solid var(--line); }
.sources h2 { font-size: 18px; margin-bottom: 14px; }
.sources ol { margin: 0; padding-left: 20px; }
.sources li { font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.sources a { color: var(--link); }

/* ---------- Author box (entity signal on Little Falls pages) ---------- */
.author-box {
  max-width: var(--maxw-read);
  margin: 52px auto 0;
  padding: 26px 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
.author-box img {
  width: 76px; height: 76px;
  border-radius: 14px;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.03);
  border: 1px solid var(--line-strong);
  flex: none;
}
.author-box .ab-k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 7px;
}
.author-box h2 { font-size: 19px; margin: 0 0 8px; }
.author-box p { font-size: 14.5px; color: var(--muted); margin: 0 0 13px; }
.author-box .ab-links {
  display: flex; gap: 18px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
}
.author-box .ab-links a { color: var(--accent); }
.author-box .ab-links a:hover { color: var(--accent-bright); }
@media (max-width: 560px) { .author-box { flex-direction: column; gap: 16px; } }

/* ---------- Editorial hero (paper theme) ---------- */
.ed-hero {
  border-top: none;
  padding: 56px 0 60px;
  position: relative;
  overflow: hidden;
}
.ed-hero .wrap { position: relative; z-index: 1; }
.ed-hero h1 { max-width: 16ch; }
.ed-hero .article-lead { margin-top: 8px; }
.topo {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background:
    radial-gradient(60% 50% at 88% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
}

/* ---------- Interests / hero feature band ---------- */
.feature-band {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.feature-band .fb-media {
  border-radius: var(--radius-sm);
  min-height: 260px;
  background:
    linear-gradient(140deg, color-mix(in srgb, var(--accent) 24%, var(--surface)), color-mix(in srgb, var(--river, #3f6b74) 26%, var(--surface)));
  position: relative;
  border: 1px solid var(--line);
}
.fb-media .fb-tag {
  position: absolute;
  left: 16px; bottom: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--btn-ink);
  background: color-mix(in srgb, var(--accent) 92%, black 4%);
  padding: 6px 11px;
  border-radius: 999px;
}

/* ---------- Chips / tag row ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin: 22px 0 0; }
.chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
a.chip:hover { border-color: var(--accent); color: var(--accent-bright); }

/* ---------- About / profiles ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 58px; align-items: start; }
.profiles { display: grid; gap: 12px; }
.profile-link {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease);
}
.profile-link:hover { transform: translateX(5px); border-color: var(--accent); }
.profile-link .arrow { color: var(--accent); transition: transform 0.5s var(--ease); }
.profile-link:hover .arrow { transform: translate(3px, -3px); }

/* ---------- FAQ ---------- */
.faq-item { padding: 26px 0; border-top: 1px solid var(--line); }
.faq-item:first-of-type { border-top: none; }
.faq-item h3 { margin-bottom: 10px; font-size: 20px; }
.faq-item p { max-width: 80ch; color: var(--muted); }

/* ---------- Contact / CTA card ---------- */
.contact-card {
  padding: 64px 56px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--surface);
}
.contact-card h2 { font-size: clamp(28px, 4vw, 44px); max-width: 18ch; }
.contact-card p { font-size: 17.5px; max-width: 60ch; color: var(--muted); }
.contact-card .hero-cta { margin-top: 34px; }
.contact-meta {
  display: flex; flex-wrap: wrap; gap: 18px 48px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.contact-meta .item { display: flex; flex-direction: column; gap: 5px; }
.contact-meta .item .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.contact-meta .item a { font-size: 18px; color: var(--text); font-weight: 500; transition: color 0.3s var(--ease); }
.contact-meta .item a:hover { color: var(--accent-bright); }

/* soft CTA used inside articles / hub */
.softcta {
  max-width: var(--maxw-read);
  margin: 52px auto 0;
  padding: 30px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--text) 2%, transparent);
}
.softcta h2 { font-size: 22px; margin-bottom: 10px; }
.softcta p { color: var(--muted); font-size: 15.5px; }
.softcta .hero-cta { margin-top: 20px; }

/* ---------- Footer ---------- */
footer.site { padding: 56px 0 60px; border-top: 1px solid var(--line); background: var(--ink); }
.foot-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.foot-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 16px; font-weight: 400; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot-col a { color: var(--muted); font-size: 14.5px; transition: color 0.3s var(--ease); }
.foot-col a:hover { color: var(--accent-bright); }
.foot-brand .brand { margin-bottom: 14px; }
.foot-brand p { font-size: 14px; color: var(--faint); max-width: 34ch; }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap;
  padding-top: 28px;
  font-size: 13.5px; color: var(--faint);
}
.foot-bottom .foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-bottom a { color: var(--muted); }
.foot-bottom a:hover { color: var(--accent-bright); }

/* ---------- Site search ---------- */
.search-wrap { position: relative; }
.search-input {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text);
  background: color-mix(in srgb, var(--text) 4%, transparent);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 10px 16px 10px 38px;
  width: 210px;
  transition: border-color 0.3s var(--ease), width 0.3s var(--ease);
}
.search-input::placeholder { color: var(--faint); }
.search-input:focus { border-color: var(--accent); width: 240px; outline: none; }
.search-wrap .s-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  max-width: 84vw;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
  z-index: 200;
}
.search-results.open { display: block; }
.search-results a { display: block; padding: 11px 13px; border-radius: 8px; color: var(--text); }
.search-results a:hover, .search-results a.active { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.search-results .sr-cat { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 3px; }
.search-results .sr-title { font-size: 14.5px; color: var(--heading); }
.search-results .sr-empty { padding: 16px; color: var(--faint); font-size: 14px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  * { animation: none !important; }
}
/* No-JS fallback: never hide reveal content when scripting is unavailable */
@media (scripting: none) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
.no-js .reveal { opacity: 1; transform: none; transition: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-photo { justify-self: start; }
  .hero-photo img { width: 200px; height: 200px; }
  .bp-grid, .about-grid, .feature-band { grid-template-columns: 1fr; gap: 34px; }
  .foot-top { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 800px) {
  .nav-menu, .search-wrap.desktop { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-open .nav-menu {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--surface);
    border-bottom: 1px solid var(--line-strong);
    border-top: 1px solid var(--line);
    padding: 16px 34px 24px;
    font-size: 14px;
  }
  .mobile-open .nav-menu .submenu {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none;
    border: none;
    padding: 4px 0 4px 14px;
    min-width: 0;
  }
  .mobile-open .has-sub[data-open="false"] .submenu { display: none; }
  .grid-3, .grid-2, .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 22px; }
  section { padding: 72px 0; }
  .hero { padding: 56px 0 68px; }
  .row { grid-template-columns: 44px 1fr; gap: 16px; }
  .contact-card { padding: 42px 24px; }
  .panel { padding: 30px 24px; }
  .toc ol { columns: 1; }
  .foot-top { grid-template-columns: 1fr; }
  .prose blockquote { font-size: 19px; }
}
