/* =========================================================
   PROJECT AEGIS v6 — NOC CONSOLE AESTHETIC
   Fonts: Sora (display) · JetBrains Mono (operational)
   ========================================================= */

:root {
  /* Core palette — terminal phosphor + alert orange + signal cyan */
  --bg-0:        #060912;
  --bg-1:        #0a0f1c;
  --bg-2:        #0e1626;
  --panel:       #101a2c;
  --panel-hi:    #142136;
  --border:      #1c2c47;
  --border-hi:   #2a3f63;

  --ink:         #eaf2ff;
  --ink-dim:     #b0bdd5;
  --muted:       #6f8099;
  --soft:        #4a5a76;

  /* Signal colors — earned, not decorative */
  --cyan:        #58a6ff;        /* primary action / OK */
  --cyan-deep:   #0091ff;
  --green:       #5ef598;        /* operational status */
  --green-deep:  #1fc66f;
  --orange:      #ff9f1c;        /* attention / kicker */
  --orange-deep: #ff7a00;
  --amber:       #ffd166;        /* warning */
  --red:         #ff5a6e;        /* error / P1 */
  --magenta:     #c364ff;        /* P2 */

  --grid-line:   rgba(88,166,255,.06);
  --shadow:      0 24px 80px rgba(0,8,28,.55);

  --r:           18px;
  --r-sm:        12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Sora', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  background: var(--bg-0);
  color: var(--ink);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;

  /* Subtle grid texture across the entire page — NOC vibe */
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    radial-gradient(circle at 12% -10%, rgba(88,166,255,.10), transparent 40%),
    radial-gradient(circle at 88% 8%, rgba(255,159,28,.07), transparent 35%);
  background-size: 64px 64px, 64px 64px, 100% 100%, 100% 100%;
  background-attachment: fixed;
}

.mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
.dim  { color: var(--muted); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.shell {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
}

/* =========================================================
   STATUS BAR (top strip)
   ========================================================= */
.statusbar {
  background: #04070e;
  border-bottom: 1px solid var(--border);
  font-size: 0.74rem;
  padding: 7px 0;
  position: relative;
  z-index: 25;
}
.statusbar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.statusbar .sep { color: var(--soft); }
.statusbar b { color: var(--ink); font-weight: 600; }
.statusbar-cta { margin-left: auto; }
.statusbar-cta a {
  color: var(--cyan);
  font-weight: 500;
  transition: color .15s;
}
.statusbar-cta a:hover { color: var(--ink); }

.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 4px;
}
.dot-green  { background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 2.4s ease-in-out infinite; }
.dot-cyan   { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.dot-orange { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.dot-red    { background: var(--red); box-shadow: 0 0 8px var(--red); animation: pulse 2.4s ease-in-out infinite; }
.dot-soft   { background: var(--soft); }
.dot-green-text { color: var(--green); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(6, 9, 18, 0.82);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-badge {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
  color: var(--bg-0);
  border-radius: 11px;
  box-shadow: 0 0 24px rgba(88,166,255,.35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-title { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; }
.brand-sub { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.04em; }

.navlinks {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 0.9rem;
  color: var(--ink-dim);
}
.navlinks a {
  font-weight: 500;
  transition: color .15s;
  position: relative;
}
.navlinks a:hover { color: var(--cyan); }
.nav-cta {
  background: var(--cyan);
  color: var(--bg-0) !important;
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 600 !important;
  box-shadow: 0 8px 24px rgba(88,166,255,.22);
}
.nav-cta:hover { background: var(--ink) !important; }

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: transform .25s, opacity .2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
}
.mobile-menu a {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  color: var(--ink-dim);
}
.mobile-menu a:hover { background: var(--panel); color: var(--cyan); }
.mobile-menu.open { display: flex; }

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
h1, h2, h3, h4 {
  margin: 0;
  font-family: 'Sora', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
  color: var(--ink);
}
h1 {
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  font-weight: 800;
}
h1 em {
  font-style: normal;
  color: var(--cyan);
  position: relative;
}
h1 em::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 6%;
  height: 5px;
  background: var(--cyan);
  opacity: 0.18;
  border-radius: 2px;
}
h2 {
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  font-weight: 700;
}
h2 em {
  font-style: normal;
  color: var(--orange);
}
h3 {
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h4 { font-size: 0.86rem; font-weight: 600; }

p { color: var(--ink-dim); margin: 0 0 12px; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 500;
  margin-bottom: 16px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  color: var(--ink);
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  transition: all .18s;
  cursor: pointer;
}
.btn:hover {
  border-color: var(--cyan);
  background: rgba(88,166,255,.08);
  transform: translateY(-1px);
}
.btn.primary {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
  border: 0;
  color: var(--bg-0);
  box-shadow: 0 14px 36px rgba(88,166,255,.28);
}
.btn.primary:hover {
  background: var(--ink);
  color: var(--bg-0);
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(255,255,255,.18);
}

.btnrow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  padding: 64px 0 90px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 70% 0%, rgba(88,166,255,.14), transparent 50%),
    radial-gradient(ellipse at 10% 100%, rgba(255,159,28,.06), transparent 55%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.95fr;
  gap: 50px;
  align-items: center;
}
.hero-left h1 { margin: 18px 0 22px; }
.lead {
  font-size: 1.1rem;
  max-width: 580px;
  color: var(--ink-dim);
}

.hero-callouts {
  display: grid;
  gap: 12px;
  margin-top: 28px;
  max-width: 600px;
}
.callout {
  padding: 14px 18px;
  background: rgba(255,255,255,.025);
  border-left: 3px solid var(--cyan);
  border-radius: 0 12px 12px 0;
  font-size: 0.95rem;
  color: var(--ink-dim);
  line-height: 1.55;
}
.callout:nth-child(2) { border-left-color: var(--orange); }
.callout-label {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.callout b { color: var(--ink); font-weight: 600; }
.callout em { font-style: italic; color: var(--cyan); }

.proof {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.proof-item {
  padding: 14px 12px;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.proof-item b {
  display: block;
  font-size: 1.4rem;
  color: var(--cyan);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.proof-unit {
  font-size: 0.7rem;
  color: var(--muted);
  margin-left: 4px;
  font-weight: 500;
}
.proof-item span {
  font-size: 0.74rem;
  color: var(--ink-dim);
  display: block;
  margin-top: 4px;
}

/* hero right side */
.hero-right { display: flex; flex-direction: column; gap: 22px; }

/* =========================================================
   TERMINAL COMPONENT
   ========================================================= */
.terminal {
  background: #04060d;
  border: 1px solid var(--border-hi);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: #0a1020;
  border-bottom: 1px solid var(--border);
}
.tdot {
  width: 12px; height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.td-red    { background: #ff5f57; }
.td-yellow { background: #febc2e; }
.td-green  { background: #28c840; }
.terminal-title {
  font-size: 0.74rem;
  color: var(--muted);
  margin-left: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.terminal-body {
  padding: 18px 20px;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--ink-dim);
  white-space: pre-wrap;
  word-break: break-word;
}
.t-prompt { color: var(--green); font-weight: 600; }
.t-cmd    { color: var(--cyan); }
.t-out    { color: var(--ink-dim); }
.t-warn   { color: var(--amber); }
.t-err    { color: var(--red); }
.t-ok     { color: var(--green); }
.t-blink {
  display: inline-block;
  background: var(--cyan);
  width: 8px;
  height: 1em;
  animation: blink 1.1s steps(2, start) infinite;
  vertical-align: middle;
}
@keyframes blink { to { visibility: hidden; } }

/* topology preview */
.topology-link { display: block; }
.topology {
  margin: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.01));
  border: 1px solid var(--border-hi);
  border-radius: 16px;
  padding: 14px;
  cursor: zoom-in;
  transition: transform .18s, border-color .18s;
}
.topology:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
}
.topology img {
  border-radius: 10px;
  border: 1px solid var(--border);
}
.topology figcaption {
  margin-top: 10px;
  font-size: 0.73rem;
  color: var(--muted);
}

/* =========================================================
   SECTIONS — common
   ========================================================= */
section { padding: 96px 0; position: relative; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 36px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}
.section-head > div { flex: 1 1 480px; }
.section-head p { max-width: 540px; margin: 0; }

/* =========================================================
   THESIS — the bridge section, lives between hero and production
   ========================================================= */
.section-thesis {
  padding-top: 70px;
  padding-bottom: 70px;
  position: relative;
}
.section-thesis::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 60%;
  max-width: 700px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-hi), transparent);
}

.section-head-tight { margin-bottom: 32px; }

.thesis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.thesis-card {
  position: relative;
  background: linear-gradient(180deg, var(--panel), rgba(16,26,44,0.7));
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 32px 28px 26px;
  transition: border-color .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.thesis-card:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
}
.thesis-num {
  font-size: 0.75rem;
  color: var(--cyan);
  letter-spacing: 0.18em;
  margin-bottom: 14px;
  font-weight: 600;
}
.thesis-card h3 {
  font-size: 1.32rem;
  line-height: 1.18;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.thesis-card p {
  font-size: 0.96rem;
  color: var(--ink-dim);
  flex-grow: 1;
  margin-bottom: 20px;
  line-height: 1.6;
}
.thesis-card p em {
  font-style: normal;
  color: var(--ink);
  font-weight: 500;
}
.thesis-link {
  font-size: 0.78rem;
  color: var(--cyan);
  letter-spacing: 0.04em;
  transition: color .15s, transform .15s;
  align-self: flex-start;
}
.thesis-link:hover {
  color: var(--ink);
  transform: translateX(3px);
}

/* center thesis card subtly emphasized */
.thesis-card:nth-child(2) {
  background: linear-gradient(180deg, var(--panel-hi), rgba(20,33,54,0.7));
}

/* =========================================================
   PRODUCTION INCIDENTS — distinct tier above lab section
   ========================================================= */
.section-production {
  background:
    linear-gradient(180deg, transparent, rgba(255,90,110,.04), transparent),
    radial-gradient(circle at 90% 20%, rgba(255,90,110,.06), transparent 40%);
  position: relative;
}
.section-production::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  opacity: 0.6;
}

/* methodology pull-quote at top of production section */
.methodology-quote {
  margin: 0 0 40px;
  padding: 22px 28px;
  background: linear-gradient(135deg, rgba(255,90,110,.04), rgba(255,159,28,.03));
  border-left: 3px solid var(--red);
  border-radius: 0 14px 14px 0;
  position: relative;
}
.methodology-quote .quote-mark {
  display: block;
  font-size: 0.7rem;
  color: var(--red);
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}
.methodology-quote p {
  font-family: 'Sora', sans-serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 10px;
}
.methodology-quote .quote-attr {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  font-style: italic;
}

/* P1 severity pill — reserved for production */
.sev-p1 {
  background: rgba(255,90,110,.16);
  color: var(--red);
  border: 1px solid rgba(255,90,110,.35);
}

/* PRODUCTION badge — appears on every production incident */
.incident-prod-tag {
  background: linear-gradient(135deg, var(--red), var(--orange-deep));
  color: var(--bg-0);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.66rem;
}

/* override the cyan/orange left bar — production cards get red */
.prod-incident::before {
  background: linear-gradient(180deg, var(--red), var(--orange-deep)) !important;
  width: 4px !important;
}
.prod-incident:nth-child(odd)::before {
  background: linear-gradient(180deg, var(--red), var(--orange-deep)) !important;
}
.prod-incident:hover { border-color: rgba(255,90,110,.4); }

/* architecture before/after diagram (Spectrum WAN story) */
.rca-architecture {
  background: #04060d;
  border: 1px solid var(--border-hi);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 0.78rem;
  color: var(--ink-dim);
  line-height: 1.5;
}
.arch-label {
  font-size: 0.7rem;
  color: var(--red);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  display: block;
}
.arch-label-after {
  color: var(--green);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.arch-diagram {
  white-space: pre;
  color: var(--ink-dim);
  font-size: 0.78rem;
  line-height: 1.5;
  overflow-x: auto;
}

/* triage timeline (Ransomware story) */
.triage-timeline {
  background: #04060d;
  border: 1px solid var(--border-hi);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 0.78rem;
  line-height: 1.5;
}
.tt-row {
  display: grid;
  grid-template-columns: 56px 16px 1fr;
  gap: 4px;
  align-items: start;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}
.tt-row:last-child { border-bottom: none; }
.tt-t {
  color: var(--cyan);
  font-weight: 600;
}
.tt-t.t-ok { color: var(--green); }
.tt-line {
  border-left: 1px solid var(--border);
  margin-left: 4px;
  height: 100%;
  min-height: 14px;
}
.tt-desc {
  color: var(--ink-dim);
  font-size: 0.78rem;
}
.tt-desc b { color: var(--ink); font-weight: 600; }

/* the "containment win" callout */
.rca-win {
  background: rgba(94,245,152,.05);
  border-left: 2px solid var(--green);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  font-size: 0.92rem;
  color: var(--ink-dim);
  margin: 0;
}
.rca-win em {
  color: var(--green);
  font-style: normal;
  font-weight: 500;
}

/* =========================================================
   INCIDENTS
   ========================================================= */
.section-incidents {
  background: linear-gradient(180deg, transparent, rgba(255,159,28,.025), transparent);
}

.incident-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px 30px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s;
}
.incident-card:hover { border-color: var(--border-hi); }
.incident-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--orange), var(--red));
}
.incident-card:nth-child(odd)::before {
  background: linear-gradient(180deg, var(--cyan), var(--cyan-deep));
}

.incident-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.incident-id {
  color: var(--muted);
  font-weight: 600;
}
.incident-sev {
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.sev-p2 { background: rgba(255,90,110,.12); color: var(--red); border: 1px solid rgba(255,90,110,.25); }
.sev-p3 { background: rgba(255,159,28,.12); color: var(--orange); border: 1px solid rgba(255,159,28,.25); }
.sev-p4 { background: rgba(195,100,255,.12); color: var(--magenta); border: 1px solid rgba(195,100,255,.25); }
.incident-status {
  color: var(--green);
  font-weight: 600;
}
.incident-mttr {
  color: var(--muted);
  margin-left: auto;
}
.incident-mttr b { color: var(--ink); font-weight: 600; }

.incident-card h3 {
  font-size: 1.42rem;
  margin: 2px 0 14px;
  letter-spacing: -0.02em;
}
.impact {
  font-size: 0.96rem;
  color: var(--ink-dim);
  margin-bottom: 22px;
}
.impact b { color: var(--orange); font-weight: 600; }

.incident-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 22px;
  margin-bottom: 20px;
}
.rca-label {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.rca-steps {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-dim);
  font-size: 0.93rem;
  line-height: 1.65;
}
.rca-steps li { margin-bottom: 8px; }
.rca-steps code {
  background: rgba(88,166,255,.08);
  color: var(--cyan);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: 'JetBrains Mono', monospace;
}

.rca-terminal {
  background: #04060d;
  border: 1px solid var(--border-hi);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--ink-dim);
}
.rca-term-line { margin-top: 8px; }
.rca-term-line:first-child { margin-top: 0; }
.rca-term-out { padding-left: 18px; color: var(--ink-dim); }

.rca-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 6px;
  padding-top: 22px;
  border-top: 1px dashed var(--border);
}
.rca-pill {
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.88rem;
  color: var(--ink-dim);
  line-height: 1.55;
}
.rca-pill span {
  display: block;
  font-size: 0.7rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.rca-pill code {
  background: rgba(88,166,255,.08);
  color: var(--cyan);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: 'JetBrains Mono', monospace;
}

/* condensed incident layout */
.incident-grid-compact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 8px;
}
.rca-mini {
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.88rem;
  color: var(--ink-dim);
  line-height: 1.55;
}
.rca-mini .rca-label { color: var(--cyan); }
.rca-mini code {
  background: rgba(88,166,255,.08);
  color: var(--cyan);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: 'JetBrains Mono', monospace;
}

/* =========================================================
   INCIDENT REPORTS (v11 — full RCA format)
   ========================================================= */
.incident-report {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0;
  margin: 40px 0;
  position: relative;
  overflow: hidden;
}
.incident-report:hover { border-color: var(--border-hi); }
.incident-report::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--cyan), var(--cyan-deep));
  z-index: 1;
}
.incident-report:nth-of-type(3)::before {
  background: linear-gradient(180deg, var(--orange), var(--red));
}
.incident-report:nth-of-type(4)::before {
  background: linear-gradient(180deg, var(--magenta, #c364ff), var(--cyan));
}

.report-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  background: rgba(4, 6, 13, .55);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.rsb-id { color: var(--muted); font-weight: 700; }
.rsb-sev {
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.rsb-status { color: var(--green); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.rsb-status .dot { width: 8px; height: 8px; }
.rsb-meta { color: var(--muted); margin-left: auto; }
.rsb-meta b { color: var(--ink); font-weight: 700; }

.report-headline {
  font-size: 1.6rem;
  line-height: 1.25;
  margin: 24px 28px 0;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.report-summary {
  margin: 18px 28px 24px;
  padding: 18px 22px;
  background: rgba(88, 166, 255, .04);
  border-left: 3px solid var(--cyan);
  border-radius: 6px;
}
.report-summary p {
  margin: 6px 0 0;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink);
}
.report-summary p b { color: var(--cyan); font-weight: 700; }
.report-summary p i { color: var(--ink-dim); font-style: italic; }

.section-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.report-body {
  padding: 0 28px;
}
.report-body.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 24px;
}
.report-col { min-width: 0; }
.report-block {
  margin-bottom: 22px;
}
.report-block ul, .report-block ol {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-dim);
  font-size: 0.92rem;
  line-height: 1.55;
}
.report-block ul li, .report-block ol li {
  margin-bottom: 7px;
}
.report-block ul li b, .report-block ol li b { color: var(--ink); font-weight: 700; }
.report-block code {
  background: rgba(88, 166, 255, .08);
  color: var(--cyan);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.86em;
  font-family: 'JetBrains Mono', monospace;
}

ul.ruled-out { list-style: none; padding-left: 0; }
ul.ruled-out li {
  position: relative;
  padding-left: 24px;
  color: var(--soft);
}
ul.ruled-out li::before {
  content: '✕';
  position: absolute;
  left: 4px;
  color: var(--red);
  opacity: 0.7;
  font-weight: 700;
}
ul.ruled-out li s {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 90, 110, .5);
}

ol.investigation-steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}
ol.investigation-steps li {
  counter-increment: step;
  position: relative;
  padding: 10px 0 10px 44px;
  border-bottom: 1px dashed rgba(74, 90, 118, .25);
}
ol.investigation-steps li:last-child { border-bottom: none; }
ol.investigation-steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.05em;
}

.report-evidence {
  margin: 8px 28px 24px;
}
.report-evidence .terminal {
  margin-top: 8px;
}
.evidence-note {
  margin-top: 10px;
  font-size: 0.72rem;
  color: var(--soft);
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.report-root-cause {
  margin: 0 28px 24px;
  padding: 18px 22px;
  background: rgba(255, 159, 28, .05);
  border-left: 3px solid var(--orange);
  border-radius: 6px;
}
.report-root-cause p {
  margin: 6px 0;
  font-size: 0.97rem;
  line-height: 1.55;
  color: var(--ink);
}
.report-root-cause p b { color: var(--orange); font-weight: 700; }

.report-lessons {
  margin: 0 28px 24px;
}
.report-lessons ul {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-dim);
  font-size: 0.96rem;
  line-height: 1.55;
}
.report-lessons ul li {
  margin-bottom: 9px;
}
.report-lessons ul li b { color: var(--ink); font-weight: 700; }

.report-skills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 18px 28px 24px;
  border-top: 1px solid var(--border);
  background: rgba(4, 6, 13, .35);
}
.skills-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-right: 8px;
}
.skill-pill {
  display: inline-block;
  padding: 4px 11px;
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
  background: rgba(88, 166, 255, .06);
  border: 1px solid rgba(88, 166, 255, .18);
  border-radius: 999px;
}

.terminal-body .t-comment {
  color: var(--soft);
  font-style: italic;
}
.terminal-body .t-good {
  color: var(--green);
  font-weight: 700;
}

/* =========================================================
   ROUTING SECTION
   ========================================================= */
.section-routing { padding-top: 70px; }
.topology-block {
  display: grid;
  grid-template-columns: 1.5fr 0.85fr;
  gap: 18px;
  margin-bottom: 40px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
}
.topology-fullbtn {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
}
.topology-fullbtn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s;
}
.topology-fullbtn:hover img { transform: scale(1.02); }
.topology-zoom {
  position: absolute;
  bottom: 12px; right: 12px;
  background: rgba(0,0,0,.75);
  color: var(--cyan);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  border: 1px solid var(--border-hi);
}
.topology-legend {
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  color: var(--ink-dim);
}
.topology-legend > div {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.topology-legend > div:last-child { border-bottom: 0; }
.legend-key {
  display: inline-block;
  min-width: 88px;
  color: var(--cyan);
  font-weight: 500;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.route-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color .18s, transform .18s;
}
.route-card:hover { border-color: var(--cyan); transform: translateY(-2px); }
.route-card.tall { grid-row: span 2; }
.route-card img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #04060d;
  border-bottom: 1px solid var(--border);
  cursor: zoom-in;
}
.route-card.tall img { height: 460px; }
.route-card .body { padding: 18px 20px; }
.route-tag {
  font-size: 0.7rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.route-card h3 { font-size: 1.08rem; margin-bottom: 4px; }
.route-card p { font-size: 0.88rem; margin: 0; }

/* =========================================================
   OPS CENTER
   ========================================================= */
.section-ops {
  background: linear-gradient(180deg, transparent, rgba(88,166,255,.02), transparent);
}
.ops-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.op-metric {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 18px 20px;
}
.op-num {
  display: block;
  font-size: 1.6rem;
  color: var(--green);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.op-lbl {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-dim);
  margin-top: 4px;
}
.ops-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.ops-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color .18s, transform .18s;
}
.ops-card:hover { border-color: var(--cyan); transform: translateY(-2px); }
.ops-card.tall img { height: 460px; }
.ops-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top;
  background: #04060d;
  border-bottom: 1px solid var(--border);
  cursor: zoom-in;
}
.ops-card .body { padding: 18px 22px; }
.ops-card h3 { font-size: 1.08rem; }
.ops-card p { font-size: 0.9rem; margin: 4px 0 0; }
.ops-stack { display: grid; gap: 18px; }
.ops-extras {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* =========================================================
   AUTOMATION
   ========================================================= */
.section-automation {
  background:
    radial-gradient(circle at 80% 20%, rgba(255,159,28,.04), transparent 50%),
    linear-gradient(180deg, transparent, rgba(255,159,28,.02), transparent);
}
.auto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.auto-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 26px 28px;
  position: relative;
  overflow: hidden;
  transition: border-color .18s, transform .18s;
}
.auto-card:hover { border-color: var(--orange); transform: translateY(-2px); }
.auto-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
}
.auto-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}
.auto-tag {
  color: var(--orange);
  letter-spacing: 0.08em;
  font-weight: 500;
}
.auto-status {
  color: var(--green);
  font-weight: 500;
}
.auto-card h3 { font-size: 1.22rem; margin-bottom: 10px; }
.auto-card p {
  font-size: 0.96rem;
  color: var(--ink-dim);
  margin-bottom: 18px;
}
.auto-card code {
  background: rgba(88,166,255,.08);
  color: var(--cyan);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.86em;
}
.auto-stack {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}
.auto-stack span::before {
  content: '› ';
  color: var(--cyan);
  font-weight: 600;
}

/* =========================================================
   EVOLUTION TIMELINE
   ========================================================= */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--orange));
  opacity: 0.3;
}
.t-stage {
  position: relative;
  padding-left: 80px;
  margin-bottom: 28px;
}
.t-stage-num {
  position: absolute;
  left: 0; top: 6px;
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  background: var(--bg-1);
  border: 2px solid var(--cyan);
  border-radius: 50%;
  color: var(--cyan);
  font-weight: 600;
  font-size: 0.9rem;
}
.t-stage.current .t-stage-num {
  background: var(--cyan);
  color: var(--bg-0);
  box-shadow: 0 0 24px rgba(88,166,255,.5);
  animation: pulse 2.4s ease-in-out infinite;
}
.t-stage-content {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  align-items: center;
}
.t-stage-content > a { display: block; overflow: hidden; border-radius: 12px; }
.t-stage-content img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  transition: transform .25s;
}
.t-stage-content > a:hover img { transform: scale(1.03); }
.t-stage-content h3 { font-size: 1.18rem; margin-bottom: 6px; }
.t-stage-content p { font-size: 0.92rem; margin: 0; }
.t-now {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.7rem;
  background: var(--cyan);
  color: var(--bg-0);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.08em;
  font-weight: 600;
  vertical-align: middle;
}

/* =========================================================
   EVIDENCE GALLERY
   ========================================================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.gallery a { display: block; }
.gallery figure {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  transition: border-color .18s, transform .18s;
}
.gallery a:hover figure {
  border-color: var(--cyan);
  transform: translateY(-2px);
}
.gallery img {
  width: 100%;
  height: 165px;
  object-fit: cover;
}
.gallery figcaption {
  padding: 10px 12px;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* =========================================================
   CERTS
   ========================================================= */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.cert {
  display: block;
  padding: 22px 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: border-color .18s, transform .18s;
  position: relative;
}
.cert:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
}
.cert-icon {
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}
.cert b {
  font-size: 1.18rem;
  display: block;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.cert-issuer {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 4px 0 12px;
  letter-spacing: 0.05em;
}
.cert p { font-size: 0.86rem; margin: 0; }
.cert-extras {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.82rem;
  color: var(--muted);
}
.cert-extras span { display: inline; }

/* =========================================================
   CTA / CONTACT
   ========================================================= */
.section-cta { padding-bottom: 60px; }
.cta {
  background: linear-gradient(135deg, var(--panel), var(--panel-hi));
  border: 1px solid var(--border-hi);
  border-radius: 28px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 44px;
  align-items: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 100% 0%, rgba(88,166,255,.12), transparent 50%);
}
.cta h2 { margin: 16px 0 16px; }
.cta p { font-size: 1rem; max-width: 540px; }
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.terminal.mini .terminal-body {
  font-size: 0.78rem;
  padding: 16px 18px;
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
}
.foot-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.74rem;
}

/* =========================================================
   REAL-WORLD HANDS-ON — Rivera + personal arc, with memory photos
   ========================================================= */
.section-handson {
  padding-top: 80px;
  padding-bottom: 80px;
  background:
    linear-gradient(180deg, transparent, rgba(255,159,28,.03), transparent),
    radial-gradient(circle at 15% 30%, rgba(255,159,28,.05), transparent 45%);
  position: relative;
}
.section-handson::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  opacity: 0.5;
}

.handson-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 26px;
  margin-top: 36px;
}

.handson-card {
  background: linear-gradient(180deg, var(--panel), rgba(16,26,44,0.7));
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px 30px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s;
}
.handson-card:hover {
  border-color: var(--border-hi);
}
.handson-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--orange), var(--cyan));
}

/* MEMORY CARD — the old build photos */
.memory-card {
  display: flex;
  flex-direction: column;
}
.memory-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 22px;
}
.memory-photos figure {
  margin: 0;
  background: #04060d;
  border: 1px solid var(--border-hi);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.memory-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 3 / 4;
  filter: saturate(0.92) contrast(1.02);
  transition: filter .25s;
}
.memory-photos figure:hover img {
  filter: saturate(1.0) contrast(1.0);
}
.memory-photos figcaption {
  padding: 8px 10px;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  border-top: 1px solid var(--border);
  background: #06080f;
}
.memory-body h3 {
  font-size: 1.32rem;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin-bottom: 12px;
}
.memory-body p {
  color: var(--ink-dim);
  font-size: 0.96rem;
  line-height: 1.6;
  margin: 0;
}

/* RIVERA CARD — honest framing */
.rivera-card {
  display: flex;
  flex-direction: column;
}
.handson-num {
  font-size: 0.74rem;
  color: var(--cyan);
  letter-spacing: 0.16em;
  margin-bottom: 12px;
  font-weight: 600;
}
.rivera-card h3 {
  font-size: 1.32rem;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin-bottom: 14px;
}
.rivera-card > p {
  color: var(--ink-dim);
  font-size: 0.96rem;
  line-height: 1.6;
  margin: 0 0 18px;
}
.handson-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.handson-list li {
  color: var(--ink-dim);
  font-size: 0.92rem;
  line-height: 1.55;
  padding-left: 14px;
  position: relative;
}
.handson-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
}
.handson-list .mono.dim {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  margin-right: 2px;
}
.handson-honest {
  margin: 0;
  padding: 10px 14px;
  font-size: 0.76rem !important;
  background: rgba(255,159,28,.05);
  border-left: 2px solid var(--orange);
  border-radius: 0 6px 6px 0;
  color: var(--muted) !important;
  font-style: italic;
}

/* =========================================================
   CONTACT HEADSHOT — added in v10
   ========================================================= */
.contact-headshot {
  background: linear-gradient(180deg, var(--panel), rgba(16,26,44,0.7));
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  margin-bottom: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
}
.contact-headshot img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 0 4px rgba(88,166,255,0.08);
  flex-shrink: 0;
}
.headshot-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.92rem;
}
.headshot-label .dim {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.headshot-label span:not(.dim) {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* =========================================================
   RESPONSIVE — mobile first matters
   ========================================================= */
@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .topology-block {
    grid-template-columns: 1fr;
  }
  .route-grid { grid-template-columns: repeat(2, 1fr); }
  .route-card.tall { grid-row: span 1; }
  .route-card.tall img { height: 220px; }
  .ops-grid { grid-template-columns: 1fr; }
  .ops-card.tall img { height: 280px; }
  .ops-extras { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .auto-grid { grid-template-columns: 1fr; }
  .thesis-grid { grid-template-columns: 1fr; }
  .handson-grid { grid-template-columns: 1fr; }
  .cta {
    grid-template-columns: 1fr;
    padding: 36px;
  }
  .navlinks { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 780px) {
  section { padding: 64px 0; }
  .hero { padding: 40px 0 60px; }

  .proof {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .incident-grid { grid-template-columns: 1fr; gap: 18px; }
  .rca-row { grid-template-columns: 1fr; }
  .incident-grid-compact { grid-template-columns: 1fr; }
  .ops-metrics { grid-template-columns: repeat(2, 1fr); }
  .ops-extras { grid-template-columns: 1fr; }
  .route-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .cert-grid { grid-template-columns: 1fr; }
  .memory-photos { grid-template-columns: 1fr 1fr; }
  .contact-headshot { padding: 14px; }
  .contact-headshot img { width: 72px; height: 72px; }

  .t-stage { padding-left: 0; }
  .timeline::before { display: none; }
  .t-stage-num {
    position: static;
    margin-bottom: 12px;
  }
  .t-stage-content { grid-template-columns: 1fr; }

  .incident-card { padding: 22px 20px; }
  .incident-head { font-size: 0.65rem; }
  .incident-mttr { margin-left: 0; }

  /* incident-report mobile */
  .report-body.two-col { grid-template-columns: 1fr; gap: 0; }
  .report-status-bar { padding: 12px 18px; font-size: 0.62rem; gap: 8px; }
  .rsb-meta { margin-left: 0; }
  .report-headline { font-size: 1.25rem; margin: 18px 18px 0; }
  .report-summary, .report-root-cause, .report-evidence, .report-lessons { margin-left: 18px; margin-right: 18px; }
  .report-body { padding: 0 18px; }
  .report-summary p { font-size: 0.94rem; }
  .report-skills { padding: 14px 18px 18px; }

  .cta { padding: 28px 22px; }
  .cta h2 { font-size: 1.8rem; }

  .statusbar { font-size: 0.65rem; }
  .statusbar-cta { width: 100%; margin-top: 4px; margin-left: 0; }
  .statusbar .sep:nth-of-type(n+3) { display: none; }
}

@media (max-width: 520px) {
  h1 { font-size: 2.4rem; }
  .hero-callouts { font-size: 0.88rem; }
  .terminal-body { font-size: 0.7rem; padding: 14px 12px; }
  .rca-terminal { font-size: 0.7rem; }
  .btn { padding: 10px 16px; font-size: 0.84rem; }
}

/* =========================================================
   ANIMATIONS — staggered reveal
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  .hero-left > * {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.7s cubic-bezier(0.2,0.9,0.3,1) forwards;
  }
  .hero-left > *:nth-child(1) { animation-delay: 0.05s; }
  .hero-left > *:nth-child(2) { animation-delay: 0.12s; }
  .hero-left > *:nth-child(3) { animation-delay: 0.19s; }
  .hero-left > *:nth-child(4) { animation-delay: 0.26s; }
  .hero-left > *:nth-child(5) { animation-delay: 0.33s; }
  .hero-left > *:nth-child(6) { animation-delay: 0.40s; }
  .hero-right > * {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.7s cubic-bezier(0.2,0.9,0.3,1) forwards;
  }
  .hero-right > *:nth-child(1) { animation-delay: 0.30s; }
  .hero-right > *:nth-child(2) { animation-delay: 0.45s; }
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll-triggered reveal for cards
   NOTE: .incident-report intentionally excluded — these blocks are too tall
   for the IntersectionObserver threshold to fire reliably on mobile, which
   would leave them stuck at opacity: 0. They render visible by default. */
@media (prefers-reduced-motion: no-preference) {
  .incident-card,
  .auto-card,
  .route-card,
  .ops-card,
  .t-stage,
  .cert,
  .thesis-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.2,0.9,0.3,1),
                transform 0.6s cubic-bezier(0.2,0.9,0.3,1);
  }
  .incident-card.in-view,
  .auto-card.in-view,
  .route-card.in-view,
  .ops-card.in-view,
  .t-stage.in-view,
  .cert.in-view,
  .thesis-card.in-view {
    opacity: 1;
    transform: translateY(0);
  }
}
