/* Layout: spec-sheet sections on one column, mono eyebrows as section labels,
   data visuals full-width; dark-first with full light mode. */

@font-face { font-family: "Archivo"; font-style: normal; font-weight: 600 800; font-stretch: 112% 125%; font-display: swap; src: url(fonts/Archivo-600_800.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/IBMPlexSans.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/IBMPlexMono-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/IBMPlexMono-500.woff2) format("woff2"); }

:root {
  --bg: #0E1420;
  --surface: #151D2B;
  --surface-2: #1B2537;
  --line: #26324A;
  --fg: #E7EBF2;
  --muted: #9AA6B8;
  --accent: #F0B44C;
  --accent-ink: #1A1203;
  --track-cloud: #74A6FF;
  --track-appsec: #F0B44C;
  --track-federal: #4FC6AC;
  --track-software: #8F9AAE;
  --grid: rgba(154,166,184,.14);

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --step--1: .85rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem);
  --step-3: clamp(2.6rem, 1.6rem + 5vw, 5.2rem);
  --radius: 10px;
  --maxw: 1120px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F4F6F9; --surface: #FFFFFF; --surface-2: #EDF0F5; --line: #D6DCE6;
    --fg: #121826; --muted: #586378; --accent: #9A5F00; --accent-ink: #FFFFFF;
    --track-cloud: #2C66D1; --track-appsec: #B87300; --track-federal: #11806A; --track-software: #6A7488;
    --grid: rgba(88,99,120,.16);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F4F6F9; --surface: #FFFFFF; --surface-2: #EDF0F5; --line: #D6DCE6;
  --fg: #121826; --muted: #586378; --accent: #9A5F00; --accent-ink: #FFFFFF;
  --track-cloud: #2C66D1; --track-appsec: #B87300; --track-federal: #11806A; --track-software: #6A7488;
  --grid: rgba(88,99,120,.16);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 var(--step-0)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: max(16px, 4vw); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

.eyebrow {
  font: 500 var(--step--1)/1.3 var(--f-mono);
  text-transform: uppercase; letter-spacing: .09em; color: var(--accent);
}

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.brand-mark { font: 800 1rem/1 var(--f-display); font-stretch: 125%; background: var(--fg); color: var(--bg); padding: 6px 7px; border-radius: 4px; }
.brand-host { font: 400 .9rem var(--f-mono); color: var(--muted); }
.topbar nav { display: flex; gap: 22px; margin-left: auto; }
.topbar nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.topbar nav a:hover { color: var(--fg); }
.theme-toggle { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; }
.theme-toggle svg { width: 18px; height: 18px; }
@media (max-width: 760px) {
  .topbar nav, .brand-host { display: none; }
  .theme-toggle { margin-left: auto; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 8px; font-weight: 600; text-decoration: none; font-size: 1rem; transition: transform .15s ease, background-color .15s ease; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { color: var(--fg); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface); }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center;
  padding-block: clamp(40px, 7vw, 96px) 48px;
}
.hero h1 {
  font: 800 var(--step-3)/.95 var(--f-display); font-stretch: 125%;
  letter-spacing: -.02em; margin-block: 16px 22px;
}
.thesis { font-size: var(--step-1); line-height: 1.45; font-weight: 500; max-width: 36ch; }
.lede { color: var(--muted); margin-top: 16px; max-width: 58ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.badges { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.badges li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .88rem; }
.badges svg { width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.portrait { margin: 0; justify-self: center; width: min(100%, 340px); display: grid; gap: 14px; }
.portrait-frame { position: relative; padding: 14px; }
.portrait img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 6px; filter: saturate(.9) contrast(1.03); }
.portrait-frame::after { content: ""; position: absolute; inset: 14px; border-radius: 6px; background: linear-gradient(transparent 60%, color-mix(in srgb, var(--bg) 35%, transparent)); pointer-events: none; }
.corner { position: absolute; width: 26px; height: 26px; border: 0 solid var(--accent); }
.corner.tl { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; }
.corner.tr { top: 0; right: 0; border-top-width: 3px; border-right-width: 3px; }
.corner.bl { bottom: 0; left: 0; border-bottom-width: 3px; border-left-width: 3px; }
.corner.br { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; }
.portrait figcaption { display: flex; align-items: center; justify-content: center; gap: 8px; font: 400 .82rem var(--f-mono); color: var(--muted); text-align: center; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--track-federal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--track-federal) 25%, transparent); flex: none; }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .portrait { order: -1; justify-self: start; width: min(62%, 240px); }
  .portrait figcaption { justify-content: flex-start; text-align: left; }
}

/* Proof strip */
.proof { padding-block: 8px 24px; }
.proof-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-block: 1px solid var(--line); }
.proof-grid > div { padding: 24px 20px 24px 0; }
.proof-grid > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.proof-grid dt { font: 800 2.4rem/1 var(--f-display); font-stretch: 112%; font-variant-numeric: tabular-nums; }
.proof-grid dd { margin: 8px 0 0; color: var(--muted); font-size: .95rem; line-height: 1.45; }
@media (max-width: 760px) {
}

/* Sections */
.section { padding-block: clamp(56px, 8vw, 96px) 0; }
.section-head { display: grid; gap: 10px; margin-bottom: 28px; max-width: 70ch; }
.section h2, .contact h2 { font: 700 var(--step-2)/1.12 var(--f-display); font-stretch: 112%; letter-spacing: -.01em; }
.section-sub { color: var(--muted); }

/* Legend */
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; font: 400 .85rem var(--f-mono); color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }

/* Career chart */
.chart-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.career-chart { padding: 12px 8px 4px; }
.career-chart svg { display: block; width: 100%; height: auto; }
.career-chart text { font-family: var(--f-mono); fill: var(--muted); }
.career-chart .bar { cursor: pointer; transition: opacity .15s ease; }
.career-chart .bar:hover, .career-chart .bar:focus-visible { opacity: .8; }
.career-chart .bar:focus { outline: none; }
.career-chart .bar:focus-visible rect { stroke: var(--fg); stroke-width: 2; }
.career-chart .lbl { fill: var(--fg); font-size: 12px; }

.gridline { stroke: var(--grid); stroke-width: 1; }
.t-cloud    { fill: var(--track-cloud); }
.t-appsec   { fill: var(--track-appsec); }
.t-federal  { fill: var(--track-federal); }
.t-software { fill: var(--track-software); }
.today { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 4; }
.pulse { transform-box: fill-box; transform-origin: center; animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.6); opacity: .5; } }
.dbar { fill: var(--accent); }
.depth-chart .dlabel { fill: var(--fg); }

/* Role panel */
.role-panel { margin-top: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.role-nav { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font: 400 .82rem var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.role-hint { margin-right: auto; }
#role-count { white-space: nowrap; }
.role-nav button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font-size: 1rem; cursor: pointer; }
.role-nav button:hover { border-color: var(--accent); }
.roles { list-style: none; margin: 0; padding: 0; }
.roles > li {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 6px 32px;
  padding: 24px 24px 24px 30px; position: relative; scroll-margin-top: 90px;
}
.roles > li + li { border-top: 1px solid var(--line); }
.js .roles > li { display: none; }
.js .roles > li.is-active { display: grid; border-top: 0; animation: rise .25s ease both; }
@keyframes rise { from { transform: translateY(6px); } }
.roles > li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: var(--radius) 0 0 var(--radius); background: var(--c, var(--muted)); }
.roles > li[data-track="cloud"]    { --c: var(--track-cloud); }
.roles > li[data-track="appsec"]   { --c: var(--track-appsec); }
.roles > li[data-track="federal"]  { --c: var(--track-federal); }
.roles > li[data-track="software"] { --c: var(--track-software); }
.role-meta { grid-row: span 2; display: grid; gap: 4px; align-content: start; }
.role-dates { font: 500 .85rem var(--f-mono); color: var(--c); font-variant-numeric: tabular-nums; }
.role-org { color: var(--muted); font-size: .92rem; line-height: 1.4; }
.roles h3 { font: 700 1.2rem/1.3 var(--f-display); font-stretch: 112%; }
.roles ul { margin: 0; padding-left: 1.1em; color: var(--muted); display: grid; gap: 6px; max-width: 72ch; }
.roles ul li::marker { color: var(--c); }
.career-chart .hit { fill: transparent; }
.career-chart .has-active .bar { opacity: .45; }
.career-chart .has-active .bar.is-active, .career-chart .has-active .bar:hover { opacity: 1; }
.career-chart .bar.is-active .lbl { fill: var(--accent); font-weight: 500; }
.career-chart .today-lbl { fill: var(--accent); }
@media (max-width: 700px) {
  .roles > li { grid-template-columns: minmax(0, 1fr); padding: 20px 18px 20px 22px; }
  .role-meta { grid-row: auto; }
}

/* SDLC pipeline */
.pipeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; position: relative; }
.pipeline::before { content: ""; position: absolute; left: 28px; right: 28px; top: 27px; height: 2px; background: linear-gradient(90deg, var(--track-software), var(--track-appsec), var(--track-cloud)); opacity: .6; }
.pipeline > li { position: relative; min-width: 0; display: grid; align-content: start; gap: 6px; }
.node { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--accent); position: relative; z-index: 1; margin-bottom: 8px; }
.node svg { width: 26px; height: 26px; fill: none; stroke: var(--fg); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.stage-name { font: 700 1.2rem/1.2 var(--f-display); font-stretch: 112%; }
.stage-work { color: var(--muted); font-size: .9rem; line-height: 1.4; min-height: 2.8em; }
.chips { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font: 400 .78rem/1.2 var(--f-mono); padding: 4px 8px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); }
@media (max-width: 1000px) {
  .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 32px; }
  .pipeline::before { display: none; }
}
@media (max-width: 600px) {
  .pipeline { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .pipeline::before { display: block; left: 27px; right: auto; top: 28px; bottom: 28px; width: 2px; height: auto; background: linear-gradient(180deg, var(--track-software), var(--track-appsec), var(--track-cloud)); }
  .pipeline > li { grid-template-columns: 56px minmax(0, 1fr); column-gap: 16px; padding-bottom: 24px; }
  .pipeline > li > :not(.node) { grid-column: 2; }
  .node { grid-row: 1 / span 3; margin: 0; }
  .stage-work { min-height: 0; }
}
.also { margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 14px 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.also > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.also dt { font: 500 .78rem var(--f-mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.also dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; }
.also dd span { font-size: .95rem; }

/* Depth chart */
.depth-chart { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 20px clamp(12px, 3vw, 28px) 12px; }
.depth-chart svg { display: block; width: 100%; height: auto; }
.depth-chart text { font-family: var(--f-body); fill: var(--fg); }
.depth-chart .tick { font-family: var(--f-mono); fill: var(--muted); font-size: 12px; }
.depth-chart .val { font-family: var(--f-mono); font-size: 13px; }

/* Cases */
.cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.case { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; min-width: 0; display: grid; align-content: start; gap: 6px; position: relative; overflow: hidden; }
.case[data-track="cloud"]    { --c: var(--track-cloud); }
.case[data-track="appsec"]   { --c: var(--track-appsec); }
.case[data-track="federal"]  { --c: var(--track-federal); }
.case-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; padding-bottom: 16px; margin-bottom: 8px; border-bottom: 1px dashed var(--line); }
.case-metric { font: 800 clamp(2.2rem, 1.6rem + 2vw, 3rem)/1 var(--f-display); font-stretch: 118%; color: var(--c); letter-spacing: -.01em; }
.case-metric-label { color: var(--muted); font-size: .92rem; max-width: 22ch; line-height: 1.35; }
.case h3 { font: 700 1.22rem/1.25 var(--f-display); font-stretch: 112%; }
.case-tag { font: 400 .8rem var(--f-mono); color: var(--muted); }
.flow { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 0; counter-reset: f; }
.flow li { position: relative; padding: 0 0 14px 26px; font-size: .95rem; line-height: 1.45; }
.flow li:last-child { padding-bottom: 0; }
.flow li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--c); background: var(--surface); z-index: 1; }
.flow li:last-child::before { background: var(--c); }
.flow li:not(:last-child)::after { content: ""; position: absolute; left: 8px; top: 14px; bottom: -4px; width: 2px; background: color-mix(in srgb, var(--c) 40%, transparent); }
.flow span { display: block; font: 500 .72rem var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
@media (max-width: 800px) { .cases { grid-template-columns: minmax(0, 1fr); } }

/* Recommendations */
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 700px) { .quotes { grid-template-columns: minmax(0, 1fr); } }
.quote { margin: 0; padding: 26px 26px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 14px; align-content: space-between; }
.quote blockquote { margin: 0; font: 500 1.15rem/1.5 var(--f-body); position: relative; padding-top: 28px; }
.quote blockquote::before { content: "\201C"; position: absolute; top: -14px; left: -4px; font: 800 3.6rem/1 var(--f-display); color: var(--accent); }
.quote figcaption { color: var(--fg); font-size: .9rem; font-weight: 600; }
.quote figcaption span { color: var(--muted); font-weight: 400; font: 400 .8rem var(--f-mono); margin-left: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Contact + footer */
.contact { margin-top: clamp(64px, 9vw, 110px); padding-block: 48px; display: grid; gap: 16px; justify-items: start; border-top: 1px solid var(--line); }
.contact p { color: var(--muted); max-width: 60ch; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 24px calc(32px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); color: var(--muted); font: 400 .82rem var(--f-mono); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 404 */
.notfound { padding-block: 18vh 12vh; display: grid; gap: 14px; justify-items: start; }
.notfound h1 { font: 800 var(--step-3)/1 var(--f-display); font-stretch: 118%; letter-spacing: -.02em; }
