/* horizondigital.dev — shared styles */
/* Trail of Bits / Galois / Ferrous lineage. Dense, technical, calm. */

:root {
  /* Color tokens — dark by default */
  --bg: #0a0d14;
  --bg-elev: #11151e;
  --bg-elev-2: #161b26;
  --border: #1c2331;
  --border-strong: #2a3344;
  --text: #e6e8eb;
  --text-dim: #9aa3b2;
  --text-mute: #6b7384;
  --accent: #3a6fd4;       /* deep blue primary */
  --accent-hi: #5a8df0;
  --cyan: #5bc5d8;          /* subtle cyan accent */
  --warn: #d4a23a;
  --ok: #4caf7d;

  /* Type */
  --ff-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Spacing scale */
  --pad-x: clamp(20px, 4vw, 56px);
  --maxw: 1280px;

  /* Density */
  --row-pad: 14px;
  --section-pad: 96px;
}

[data-density="compact"] {
  --row-pad: 10px;
  --section-pad: 64px;
}
[data-density="comfortable"] {
  --row-pad: 18px;
  --section-pad: 128px;
}

[data-theme="light"] {
  --bg: #f6f7f9;
  --bg-elev: #ffffff;
  --bg-elev-2: #eef0f4;
  --border: #d8dde6;
  --border-strong: #b9c1cf;
  --text: #0f131c;
  --text-dim: #4a5263;
  --text-mute: #6b7384;
  --accent: #1f4fb8;
  --accent-hi: #2a64df;
  --cyan: #1c8a9c;
}

[data-accent="teal"] { --accent: #1f8a8a; --accent-hi: #2faaaa; }
[data-accent="purple"] { --accent: #6a4fc7; --accent-hi: #8369e0; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv01";
}

/* Grid background — barely-there scan, gives it some technical texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px);
  background-size: 80px 100%;
  opacity: .35;
  z-index: 0;
  mask-image: linear-gradient(to bottom, transparent 0, black 200px, black calc(100% - 200px), transparent 100%);
}
[data-theme="light"] body::before { opacity: .5; }

a { color: inherit; text-decoration: none; }
a.link { color: var(--accent-hi); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent-hi) 30%, transparent); transition: border-color .15s, color .15s; }
a.link:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

button { font-family: inherit; }

/* Layout */
.shell {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ─── Header ───────────────────────────────────────────────────────────── */
.hd {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.hd-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 24px;
}
.hd-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.hd-brand .palm-slot {
  width: 28px;
  height: 28px;
  display: block;
  flex-shrink: 0;
}
.hd-brand .palm-slot image-slot {
  width: 28px;
  height: 28px;
  display: block;
}
.hd-brand-text {
  font-size: 13.5px;
  line-height: 1.1;
}
.hd-brand-text small {
  display: block;
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}
.hd-nav {
  display: flex;
  gap: 0;
  align-items: center;
}
.hd-nav a {
  font-size: 13px;
  padding: 6px 12px;
  color: var(--text-dim);
  border-radius: 4px;
  transition: color .12s, background .12s;
  letter-spacing: -0.003em;
}
.hd-nav a:hover { color: var(--text); }
.hd-nav a.is-current { color: var(--text); background: var(--bg-elev); }
.hd-nav .sep { color: var(--text-mute); padding: 0 4px; user-select: none; }
.hd-nav a + a::before {
  content: "|";
  color: var(--text-mute);
  margin-right: 12px;
  margin-left: -12px;
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}

.hd-cta {
  font-size: 12px;
  font-family: var(--ff-mono);
  letter-spacing: 0.03em;
  padding: 7px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--text);
  transition: border-color .12s, background .12s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hd-cta:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.hd-cta::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }

/* ─── Hero (3 variants, body[data-hero] selector) ─────────────────────── */
.hero {
  padding: 80px 0 96px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

/* Variant A — Editorial Statement */
body[data-hero="editorial"] .hero-editorial { display: block; }
body[data-hero="editorial"] .hero-dossier,
body[data-hero="editorial"] .hero-index { display: none; }

body[data-hero="dossier"] .hero-dossier { display: block; }
body[data-hero="dossier"] .hero-editorial,
body[data-hero="dossier"] .hero-index { display: none; }

body[data-hero="index"] .hero-index { display: block; }
body[data-hero="index"] .hero-editorial,
body[data-hero="index"] .hero-dossier { display: none; }

/* Editorial */
.hero-tagline {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-hi);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-tagline::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent-hi);
}
.hero-title {
  font-size: clamp(36px, 5.5vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 0 0 32px;
  max-width: 22ch;
  text-wrap: balance;
}
.hero-title em {
  font-style: normal;
  color: var(--text-dim);
}
.hero-body {
  max-width: 60ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0 0 40px;
}
.hero-body strong { color: var(--text); font-weight: 500; }

.hero-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--border);
  margin-top: 56px;
  padding-top: 24px;
}
.hero-meta dt {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 6px;
}
.hero-meta dd {
  margin: 0;
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--text);
}
.hero-meta > div + div { padding-left: 24px; border-left: 1px solid var(--border); }
.hero-meta > div { padding-right: 24px; }

/* Dossier variant — two column */
.hero-dossier .hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: start;
}
.hero-dossier .card-id {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 24px 28px;
  font-family: var(--ff-mono);
  font-size: 12.5px;
}
.hero-dossier .card-id-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.hero-dossier .card-id-hd b { color: var(--accent-hi); font-weight: 500; }
.hero-dossier .card-id-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  padding: 6px 0;
  gap: 16px;
}
.hero-dossier .card-id-row span:first-child { color: var(--text-mute); }
.hero-dossier .card-id-row span:last-child { color: var(--text); }
.hero-dossier .card-id-row .ok { color: var(--ok); }
.hero-dossier .card-id-row .pending { color: var(--warn); }

/* Index variant — table of contents style */
.hero-index .toc-title {
  font-family: var(--ff-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin-bottom: 40px;
}
.hero-index .toc-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
  transition: background .12s;
}
.hero-index .toc-row:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.hero-index .toc-row:first-of-type { border-top: 1px solid var(--border); }
.hero-index .toc-num {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--text-mute);
}
.hero-index .toc-name {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.hero-index .toc-meta {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero-index .lede {
  max-width: 56ch;
  margin-bottom: 56px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-dim);
}
.hero-index .lede strong { color: var(--text); font-weight: 500; }

/* ─── Section primitives ──────────────────────────────────────────────── */
.sec {
  padding: var(--section-pad) 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.sec-hd {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  margin-bottom: 56px;
  align-items: baseline;
}
.sec-eyebrow {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-top: 6px;
}
.sec-eyebrow b {
  color: var(--accent-hi);
  font-weight: 500;
  margin-right: 8px;
}
.sec-title {
  font-size: clamp(24px, 2.8vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0 0 12px;
  text-wrap: balance;
}
.sec-lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 56ch;
  margin: 0;
}

/* ─── Portfolio cards ─────────────────────────────────────────────────── */
.portfolio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.pf-card {
  background: var(--bg);
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 360px;
  transition: background .12s;
}
.pf-card:hover { background: var(--bg-elev); }
.pf-hd {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.pf-name {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.pf-status {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  color: var(--text-dim);
  white-space: nowrap;
}
.pf-status.live { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.pf-status.dev { color: var(--accent-hi); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.pf-status.research { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.pf-desc {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0;
}
.pf-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pf-list li::before { content: "›"; color: var(--text-mute); margin-right: 8px; }
.pf-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: var(--ff-mono);
  font-size: 11.5px;
}
.pf-foot .domain { color: var(--accent-hi); }
.pf-foot .arrow { color: var(--text-mute); }

/* ─── Capabilities table ──────────────────────────────────────────────── */
.cap-table {
  border-top: 1px solid var(--border);
  font-size: 14.5px;
}
.cap-row {
  display: grid;
  grid-template-columns: 240px 1fr 180px;
  gap: 40px;
  padding: var(--row-pad) 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.cap-row:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.cap-name {
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}
.cap-name .num {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--text-mute);
  margin-right: 12px;
  letter-spacing: 0.04em;
}
.cap-desc {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.55;
}
.cap-meta {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: right;
}
.cap-meta b {
  color: var(--accent-hi);
  font-weight: 500;
}

/* ─── Federal slab ────────────────────────────────────────────────────── */
.fed {
  background: var(--bg-elev);
  border: 1px solid var(--border);
}
.fed-inner {
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.fed-spec {
  font-family: var(--ff-mono);
  font-size: 12.5px;
}
.fed-spec h4 {
  font-family: var(--ff-sans);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  font-weight: 500;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.fed-spec h4:not(:first-child) { margin-top: 28px; }
.fed-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 5px 0;
  align-items: baseline;
}
.fed-row > span:first-child {
  color: var(--text-mute);
}
.fed-row > span:last-child { color: var(--text); }
.fed-row .ok { color: var(--ok); }
.fed-row .pending { color: var(--warn); }
.fed-row .accent { color: var(--accent-hi); }

.fed-side h3 {
  font-family: var(--ff-sans);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
}
.fed-side p {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0 0 24px;
}
.fed-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.fed-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  transition: border-color .12s, background .12s;
  cursor: pointer;
}
.fed-action:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.fed-action .lbl { color: var(--text); }
.fed-action .typ { color: var(--text-mute); }

/* ─── Founder ─────────────────────────────────────────────────────────── */
.bio {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: start;
}
.bio-card {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 20px;
}
.bio-name {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.bio-role {
  font-family: var(--ff-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-hi);
  margin-bottom: 24px;
}
.bio-portrait {
  width: 100%;
  aspect-ratio: 1 / 1;
  background:
    repeating-linear-gradient(45deg, var(--bg-elev-2) 0 12px, var(--bg) 12px 24px);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
img.bio-portrait {
  display: block;
  width: 240px;
  max-width: 100%;
  margin: 0 auto 20px;
  object-fit: cover;
  object-position: center 20%;
  background: var(--bg-elev);
}
.bio-creds {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  font-family: var(--ff-mono);
  font-size: 11.5px;
}
.bio-creds li {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--border);
}
.bio-creds li:last-child { border-bottom: none; }
.bio-creds li b { color: var(--text-mute); font-weight: 400; }
.bio-creds li span { color: var(--text); }

.bio-body p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-dim);
  margin: 0 0 16px;
}
.bio-body p strong { color: var(--text); font-weight: 500; }
.bio-body h4 {
  font-family: var(--ff-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  font-weight: 500;
  margin: 36px 0 12px;
}
.bio-work {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}
.bio-work-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.bio-work-row .org { font-weight: 500; }
.bio-work-row .note { color: var(--text-dim); font-size: 13.5px; margin-top: 3px; }
.bio-work-row .yr { font-family: var(--ff-mono); font-size: 11px; color: var(--text-mute); }

/* ─── Footer ──────────────────────────────────────────────────────────── */
.ft {
  padding: 64px 0 32px;
  font-size: 13px;
}
.ft-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.ft-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.ft-brand .palm-slot { width: 32px; height: 32px; flex-shrink: 0; }
.ft-brand-text { color: var(--text-dim); font-size: 13px; line-height: 1.5; max-width: 36ch; }
.ft-brand-text b { color: var(--text); font-weight: 500; }

.ft-col h5 {
  font-family: var(--ff-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 500;
  margin: 4px 0 16px;
}
.ft-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ft-col a { color: var(--text-dim); font-size: 13px; }
.ft-col a:hover { color: var(--text); }
.ft-col a .ext { color: var(--text-dim); font-family: var(--ff-mono); font-size: 10px; margin-left: 6px; }

.ft-bot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  gap: 24px;
  flex-wrap: wrap;
}
.ft-meta {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ft-meta b { color: var(--text-dim); font-weight: 400; }
.ft-meta-rows {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

/* ─── Hero links (homepage inline nav under intro) ────────────────────── */
.hero-links {
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--text-dim);
  margin: 0;
  letter-spacing: 0.02em;
}
.hero-links .sep { color: var(--text-mute); }

/* ─── Current Work — homepage 2x2 portfolio grid ──────────────────────── */
.portfolio.current-work {
  grid-template-columns: repeat(2, 1fr);
}

/* ─── Artifacts list (homepage + /work) ───────────────────────────────── */
.artifacts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.artifacts-list li {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
  color: var(--text-dim);
  font-family: var(--ff-mono);
  font-size: 13px;
  line-height: 1.6;
}
.artifacts-list li:last-child { border-bottom: none; }
.artifacts-list li strong { color: var(--text); font-weight: 500; margin-right: 12px; }
.artifacts-list li a.link { color: var(--accent-hi); border-bottom: none; }
.artifacts-list li a.link:hover { color: var(--cyan); }

/* ─── Utility ─────────────────────────────────────────────────────────── */
.mono { font-family: var(--ff-mono); }
.dim { color: var(--text-dim); }
.mute { color: var(--text-mute); }
.accent { color: var(--accent-hi); }

/* Pulse for "live status" dot */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 8px;
}
.dot.ok { background: var(--ok); animation: pulse 2.4s infinite; }
.dot.warn { background: var(--warn); animation: pulse 2.4s infinite; }
.dot.dev { background: var(--accent-hi); animation: pulse 2.4s infinite; }

/* Personality intensity — palm leakage. Default 15. */
[data-palm="0"] .palm-accent { display: none; }
[data-palm="high"] .hero-tagline { color: var(--cyan); }
[data-palm="high"] .hero-tagline::before { background: var(--cyan); }

/* Scaffolded page lede */
.scaffold {
  padding: 96px 0 160px;
  border-bottom: 1px solid var(--border);
}
.scaffold-eyebrow {
  font-family: var(--ff-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin-bottom: 24px;
}
.scaffold-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  max-width: 18ch;
  line-height: 1.05;
}
.scaffold-lede {
  font-size: 18px;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 60ch;
  margin: 0 0 64px;
}
.scaffold-stub {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.scaffold-stub + .scaffold-stub { border-top: none; }
.scaffold-stub h3 {
  font-family: var(--ff-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  font-weight: 500;
  margin: 0;
}
.scaffold-stub p {
  color: var(--text-dim);
  margin: 0 0 12px;
  line-height: 1.6;
  max-width: 60ch;
}
.scaffold-stub p:last-child { margin-bottom: 0; }
.scaffold-stub p strong { color: var(--text); font-weight: 500; }

/* Form (contact) */
.frm {
  display: grid;
  gap: 20px;
  max-width: 520px;
}
.frm label {
  display: grid;
  gap: 6px;
  font-family: var(--ff-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
}
.frm input, .frm textarea, .frm select {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--ff-sans);
  font-size: 14.5px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .12s, background .12s;
}
.frm input:focus, .frm textarea:focus, .frm select:focus {
  border-color: var(--accent);
  background: var(--bg-elev-2);
}
.frm textarea { min-height: 120px; resize: vertical; font-family: var(--ff-sans); }
.frm button {
  appearance: none;
  background: var(--accent);
  color: white;
  border: 1px solid var(--accent);
  padding: 12px 20px;
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  justify-self: start;
  transition: background .12s, border-color .12s;
}
.frm button:hover { background: var(--accent-hi); border-color: var(--accent-hi); }

/* Responsive */

/* Tablet — start collapsing multi-column grids; nav stays inline w/ brand */
@media (max-width: 900px) {
  .portfolio, .portfolio.current-work { grid-template-columns: 1fr; }
  .fed-inner, .bio, .hero-dossier .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .sec-hd, .scaffold-stub { grid-template-columns: 1fr; gap: 16px; }
  .cap-row { grid-template-columns: 1fr; gap: 8px; }
  .cap-meta { text-align: left; }
  .hero-meta { grid-template-columns: repeat(2, 1fr); }
  .hero-meta > div + div { padding-left: 0; border-left: none; }
  .hero-meta > div { padding: 0 0 16px; border-bottom: 1px solid var(--border); }
  .ft-top { grid-template-columns: 1fr 1fr; }
  .hd-inner { gap: 12px; }
  .hd-nav a { font-size: 12px; padding: 5px 8px; }
}

/* Mobile (≤720px) — phone portrait + iPhone-class widths down to 320px.
   Defensive rewrite: uses display:block on the header rather than
   flex-direction:column (more reliable on iOS Safari), disables
   backdrop-filter (known sticky+backdrop iOS bug), and forces nav
   visibility with !important against any inherited rule. */
@media (max-width: 720px) {

  /* prevent horizontal overflow + let long links wrap */
  html, body { max-width: 100vw; overflow-x: hidden; }
  body::before { display: none; }  /* drop decorative grid lines on mobile */
  * { max-width: 100%; }
  img, video, iframe, embed, object { max-width: 100%; height: auto; }
  a, code, .mono, .artifacts-list li, .fed-row, .fed-action, .bio-creds li,
  .pf-desc, .scaffold-stub p, .hero-body, .sec-lede, .scaffold-lede {
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
  }

  /* header — drop backdrop-filter (iOS Safari sticky bug) + use plain block layout */
  .hd {
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg);
  }
  .hd-inner {
    display: block !important;
    height: auto !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    min-height: 0;
  }
  .hd-brand {
    display: flex !important;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
  }
  .hd-brand-text { font-size: 14px; }
  .palm-slot { width: 32px !important; height: 32px !important; }

  /* nav — guaranteed visible, wraps, ::after pipes */
  .hd-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center;
    width: 100%;
    gap: 4px 0;
    font-size: 13.5px;
    margin: 0;
  }
  .hd-nav a {
    display: inline-flex !important;
    white-space: nowrap;
    padding: 4px 0;
    color: var(--text);
    background: transparent;
  }
  /* turn off the desktop ::before pipe (it expects gap-0 + negative margin) */
  .hd-nav a + a::before { display: none !important; }
  /* use ::after pipes; suppress on last */
  .hd-nav a:not(:last-child)::after {
    content: "|";
    margin: 0 10px;
    color: var(--text-mute);
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
  }
  .hd-nav a.is-current { background: transparent; color: var(--accent-hi); }

  /* hero: smaller, tighter */
  .hero { padding: 48px 0 56px; }
  .hero-title {
    font-size: clamp(28px, 9vw, 40px);
    line-height: 1.05;
    max-width: 100%;
  }
  .hero-body {
    font-size: 16px;
    line-height: 1.6;
    max-width: 100%;
    margin: 0 0 24px;
  }
  .hero-links { font-size: 12.5px; }

  /* scaffold pages: smaller titles + tighter padding */
  .scaffold { padding: 48px 0 80px; }
  .scaffold-title {
    font-size: clamp(28px, 8.5vw, 40px);
    line-height: 1.05;
    max-width: 100%;
  }
  .scaffold-lede { font-size: 16px; max-width: 100%; }
  .scaffold-stub { padding: 24px 0; }
  .scaffold-stub h3 { margin-bottom: 8px; }

  /* sec primitives (homepage) */
  .sec { padding: 56px 0; }
  .sec-title { font-size: clamp(22px, 6.5vw, 30px); }
  .sec-lede { font-size: 15px; }

  /* portfolio / Current Work cards */
  .pf-card { min-height: 0; padding: 22px 20px; }
  .pf-name { font-size: 20px; }
  .pf-desc { font-size: 14px; }

  /* /for-government plain-data block */
  .fed-inner { padding: 22px; }
  .fed-row {
    grid-template-columns: 96px 1fr;
    gap: 10px;
    font-size: 12px;
  }
  .fed-side h3 { font-size: 18px; }
  .fed-action { padding: 10px 12px; font-size: 11.5px; }
  .fed-action .lbl { overflow-wrap: anywhere; }

  /* /who-we-are bio */
  .bio { gap: 24px; }
  .bio-card { padding: 18px; }
  img.bio-portrait { width: 200px; }

  /* artifacts list */
  .artifacts-list li { font-size: 12px; padding: 10px 0; line-height: 1.55; }

  /* footer stacks */
  .ft { padding: 40px 0 24px; }
  .ft-top {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 28px;
  }
  .ft-brand-text { max-width: 100%; }
  .ft-bot { gap: 12px; }
  .ft-meta-rows { gap: 16px; }
}

/* ---------------------------------------------------------------------------
   Legal pages — added 2026-05-13 alongside privacy/terms/cookies rollout
   --------------------------------------------------------------------------- */

.scaffold-meta {
  color: var(--text-mute);
  font-family: var(--ff-mono);
  font-size: 12px;
  margin-top: -8px;
  margin-bottom: 32px;
}
.scaffold-meta strong {
  color: var(--text-dim);
  font-weight: 500;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 8px;
  font-size: 13px;
  line-height: 1.55;
}
.legal-table th,
.legal-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.legal-table th {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--ff-mono);
}
.legal-table td code {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--text);
}

.ft-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.ft-legal-links a {
  color: var(--text-dim);
  text-decoration: none;
}
.ft-legal-links a:hover { color: var(--text); }
.ft-legal-links a.is-current { color: var(--text); }

/* ───────────────────────── Accessibility ───────────────────────── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  font-family: var(--ff-sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  transition: top 120ms ease;
}
.skip-link:focus {
  top: 8px;
  outline: 2px solid var(--accent-hi);
  outline-offset: 2px;
}
