/* =========================================================================
   FUTURE PROJECT PAGES (Part 3) — shared stylesheet
   Used by the four planned-project pages in projects/:
     ground-traffic-control-system.html, video-based-tracking.html,
     autonomous-navigation.html, fiber-optic-intrusion-detection.html
   Sections 1–5 repeat the design tokens, base styles, header and hero of the
   existing project pages (index.html and projects/*.html), so the new pages
   look identical. Sections 6+ are components specific to planned work.
   ========================================================================= */

/* 1. DESIGN TOKENS — same values as index.html and the project pages */
:root {
  --navy-900: #0B1424;
  --navy-800: #14243A;
  --navy-700: #1d3150;
  --cyan: #35C6D9;
  --cyan-ink: #0B7C8C;
  --cyan-soft: rgba(53, 198, 217, .12);
  --amber: #F2B544;
  --amber-ink: #8a5a00;
  --violet: #6347c2;
  --violet-ink: #5b3fb0;
  --white: #FFFFFF;
  --bg-light: #F4F7FB;
  --text: #263449;
  --text-muted: #55657b;
  --text-on-dark: #E6EEF6;
  --muted-on-dark: #9FB1C5;
  --line: #dde5ef;
  --line-dark: rgba(159, 177, 197, .18);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --fs-xs: .78rem;
  --fs-sm: .9rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
  --fs-h2: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  --fs-h1: clamp(2.1rem, 1.5rem + 2.8vw, 3.6rem);

  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --section-pad: clamp(4rem, 3rem + 4vw, 7rem);
  --container: 1180px;
  --gutter: clamp(1rem, .5rem + 2vw, 2rem);
  --header-h: 68px;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(11, 20, 36, .06), 0 1px 3px rgba(11, 20, 36, .08);
  --shadow: 0 6px 24px rgba(11, 20, 36, .08);
  --shadow-lg: 0 18px 48px rgba(11, 20, 36, .16);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* 2. BASE */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 8px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; font-family: var(--font-sans); font-size: var(--fs-base); line-height: 1.65;
  color: var(--text); background: var(--bg-light); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; color: var(--navy-900); letter-spacing: -.015em; }
p { margin: 0 0 var(--space-4); }
ul, ol { margin: 0; padding: 0; }
a { color: var(--cyan-ink); text-underline-offset: 3px; }
a:hover { color: var(--navy-800); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
strong { color: var(--navy-900); font-weight: 600; }
code { font-family: var(--font-mono); font-size: .88em; background: var(--bg-light); border: 1px solid var(--line); border-radius: 5px; padding: .05rem .35rem; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 200;
  background: var(--white); color: var(--navy-900); padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm); font-weight: 600; box-shadow: var(--shadow);
}
.skip-link:focus { top: var(--space-3); }

/* 3. REUSABLE COMPONENTS (shared look with the other project pages) */
.section { padding-block: var(--section-pad); }
.section--white { background: var(--white); }
.section--light { background: var(--bg-light); }
.section--dark { background: var(--navy-900); color: var(--text-on-dark); }
.section--dark h2, .section--dark h3, .section--dark h4 { color: var(--white); }
.section--dark strong { color: var(--white); }
.section--blueprint {
  background-color: #eef3f9;
  background-image:
    linear-gradient(rgba(11, 124, 140, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 124, 140, .06) 1px, transparent 1px);
  background-size: 28px 28px;
}

.section-head { max-width: 780px; margin-bottom: var(--space-7); }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan-ink); margin-bottom: var(--space-3);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.section--dark .eyebrow, .hero .eyebrow { color: var(--cyan); }
.section-title { font-size: var(--fs-h2); font-weight: 800; margin-bottom: var(--space-4); }
.section-lead { font-size: var(--fs-lg); color: var(--text-muted); margin: 0; }
.section--dark .section-lead { color: var(--muted-on-dark); }
.section--dark p { color: var(--muted-on-dark); }
.sub-title { font-size: 1.2rem; font-weight: 700; margin: var(--space-7) 0 var(--space-4); }
.sub-title:first-child { margin-top: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 46px; padding: .7rem 1.25rem; border-radius: 10px;
  font: 600 var(--fs-sm)/1.2 var(--font-sans); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s, color .2s, box-shadow .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--cyan); color: var(--navy-900); }
.btn--primary:hover { background: #5ad3e3; color: var(--navy-900); box-shadow: 0 8px 24px rgba(53, 198, 217, .28); }
.btn--outline { border-color: rgba(230, 238, 246, .35); color: var(--white); background: transparent; }
.btn--outline:hover { border-color: var(--cyan); color: var(--cyan); }
.btn--ghost { color: var(--white); background: rgba(255, 255, 255, .06); }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); color: var(--white); }

.tag-list { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; }
.tag {
  display: inline-block; padding: .22rem .6rem; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 600; line-height: 1.5;
  background: var(--cyan-soft); color: var(--cyan-ink);
}
.hero .tag, .section--dark .tag { color: var(--cyan); background: rgba(53, 198, 217, .1); }

/* Labels separating planned work, concept illustrations and existing work */
.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .18rem .6rem; border-radius: 999px; white-space: nowrap;
  font: 700 .7rem/1.5 var(--font-sans); letter-spacing: .08em; text-transform: uppercase;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--planned { color: var(--violet-ink); background: #eee8fd; }
.badge--concept { color: var(--amber-ink); background: #fdf3df; }
.badge--existing { color: #0a6b45; background: #e3f6ee; }
.hero .badge--planned, .section--dark .badge--planned { color: #c7b5ff; background: rgba(183, 156, 255, .12); }
.hero .badge--concept, .section--dark .badge--concept { color: var(--amber); background: rgba(242, 181, 68, .1); }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--space-5); box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c8d6e6; }
.card h3 { font-size: 1.05rem; margin-bottom: var(--space-2); }
.card p { margin: 0; color: var(--text-muted); font-size: .95rem; }
.card p + p { margin-top: var(--space-2); }
.section--dark .card { background: var(--navy-800); border-color: var(--line-dark); box-shadow: none; }
.section--dark .card p { color: var(--muted-on-dark); }

.check-list { list-style: none; display: grid; gap: .55rem; }
.check-list li { position: relative; padding-left: 1.6rem; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: .8rem; height: .45rem;
  border-left: 2px solid var(--cyan-ink); border-bottom: 2px solid var(--cyan-ink); transform: rotate(-45deg);
}
.section--dark .check-list li::before { border-color: var(--cyan); }
.dash-list { list-style: none; display: grid; gap: .5rem; }
.dash-list li { position: relative; padding-left: 1.3rem; }
.dash-list li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px;
  border: 1.5px dashed var(--cyan-ink); border-radius: 2px;
}

.note {
  display: flex; gap: var(--space-3); align-items: flex-start; margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5); border-radius: var(--radius);
  background: #fdf8ec; border: 1px solid #f1e0b6; color: #5d4a1d; font-size: var(--fs-sm);
}
.note svg { width: 20px; height: 20px; flex: none; margin-top: .15rem; color: var(--amber-ink); }
.note p { margin: 0; color: inherit; }
.note strong { color: #4a3a12; }

/* Figures */
.figure { margin: 0; }
.figure-frame {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--navy-900); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.figure-frame img { width: 100%; height: auto; }
.figure-frame--light { background: var(--white); }
.figure figcaption {
  margin-top: var(--space-3); font-size: var(--fs-sm); color: var(--text-muted);
  display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: baseline;
}
.section--dark .figure figcaption, .hero .figure figcaption { color: var(--muted-on-dark); }
.figure--zoom a { display: block; cursor: zoom-in; color: inherit; text-decoration: none; }
.img-missing {
  display: grid; place-items: center; text-align: center; gap: var(--space-2);
  min-height: 200px; padding: var(--space-6); color: var(--muted-on-dark); font-size: var(--fs-sm);
  background: repeating-linear-gradient(45deg, #101d31, #101d31 12px, #0d1829 12px, #0d1829 24px);
}
.img-missing strong { color: var(--white); display: block; }

/* Inline SVG diagrams */
.diagram { margin: 0; }
.diagram-frame {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(.6rem, .3rem + 1.2vw, 1.25rem); box-shadow: var(--shadow-sm);
}
.diagram-frame svg { width: 100%; height: auto; }
.diagram-frame--dark { background: var(--navy-900); border-color: var(--line-dark); }
.section--dark .diagram-frame { background: var(--navy-800); border-color: var(--line-dark); box-shadow: none; }
.diagram figcaption { margin-top: var(--space-3); font-size: var(--fs-sm); color: var(--text-muted); display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: baseline; }
.section--dark .diagram figcaption { color: var(--muted-on-dark); }
.diagram-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.diagram-scroll > svg { min-width: 640px; }

.split { display: grid; gap: var(--space-7); align-items: start; }
.split > * { min-width: 0; }
/* Let wide content (equations, tables, diagrams) scroll inside its own box instead of
   stretching grid tracks past the viewport. */
.eq-grid > *, .grid-cards > *, .hw-grid > *, .phases > *, .flow > *,
.layers > *, .loop > *, .distinct-pair > *, .layer-split > *, .facts > *, .hero-grid > * { min-width: 0; }
.flow-step > div { min-width: 0; }
.stack { display: grid; gap: var(--space-5); }
.prose p { font-size: 1.02rem; }
.prose p:last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}

/* 4. HEADER & NAVIGATION (same as the other project pages) */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: rgba(11, 20, 36, .92);
  -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-dark);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: var(--space-4); }
.logo {
  font-weight: 800; letter-spacing: .08em; font-size: .98rem; color: var(--white);
  text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: .55rem;
}
.logo:hover { color: var(--white); }
.logo-sep { color: var(--cyan); font-weight: 400; }
.logo-mark { width: 26px; height: 26px; flex: none; }
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; cursor: pointer;
  background: transparent; border: 1px solid var(--line-dark); color: var(--white);
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
.nav-menu { list-style: none; display: flex; flex-wrap: nowrap; align-items: center; gap: .1rem; }
.nav-menu a {
  display: flex; align-items: center; gap: .35rem; padding: .45rem .45rem; border-radius: 8px;
  color: var(--muted-on-dark); text-decoration: none; font-size: .8rem; font-weight: 500; white-space: nowrap;
}
.nav-menu a svg { width: 15px; height: 15px; }
.nav-menu a:hover, .nav-menu a[aria-current="true"] { color: var(--white); background: rgba(255, 255, 255, .06); }
.nav-menu a[aria-current="true"] { box-shadow: inset 0 -2px 0 var(--cyan); }
.nav-menu .nav-back a { color: var(--cyan); border: 1px solid rgba(53, 198, 217, .35); margin-right: .4rem; }
.nav-menu .nav-back a:hover { background: rgba(53, 198, 217, .1); color: var(--white); }
@media (max-width: 1240px) {
  .js .nav-toggle { display: inline-flex; }
  .js .nav-menu {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0;
    padding: var(--space-3) var(--gutter) var(--space-5);
    background: var(--navy-900); border-bottom: 1px solid var(--line-dark); box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s, transform .2s var(--ease), visibility 0s linear .2s;
  }
  .js .nav-menu.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .2s var(--ease); }
  .js .nav-menu a { padding: .8rem .75rem; font-size: var(--fs-base); border-bottom: 1px solid var(--line-dark); border-radius: 0; }
  .js .nav-menu a[aria-current="true"] { box-shadow: inset 3px 0 0 var(--cyan); }
  .js .nav-menu .nav-back a { border: 0; border-bottom: 1px solid var(--line-dark); margin: 0; }
  html:not(.js) .site-header { height: auto; position: static; }
  html:not(.js) .nav { flex-direction: column; align-items: flex-start; padding-block: var(--space-3); }
  html:not(.js) .nav-menu { flex-wrap: wrap; }
}

/* 5. HERO */
.hero {
  position: relative; overflow: hidden; color: var(--text-on-dark);
  background:
    radial-gradient(1000px 560px at 85% 25%, rgba(53, 198, 217, .14), transparent 60%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
  padding-block: clamp(2.5rem, 2rem + 4vw, 5.5rem) clamp(3.5rem, 2rem + 5vw, 6rem);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(53, 198, 217, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 198, 217, .06) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
}
.hero-grid { position: relative; display: grid; gap: var(--space-7); align-items: center; }
.hero-grid > * { min-width: 0; }
.breadcrumb { font-size: var(--fs-sm); color: var(--muted-on-dark); margin-bottom: var(--space-5); }
.breadcrumb a { color: var(--muted-on-dark); }
.breadcrumb a:hover { color: var(--cyan); }
.project-num { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .1em; color: var(--cyan); }
.hero h1 { color: var(--white); font-size: var(--fs-h1); font-weight: 800; letter-spacing: -.025em; margin: var(--space-3) 0 var(--space-4); }
.hero-subtitle { font-size: var(--fs-xl); font-weight: 600; color: var(--cyan); margin-bottom: var(--space-5); line-height: 1.4; }
.hero-desc p { color: var(--muted-on-dark); font-size: 1.04rem; max-width: 40rem; }
.hero-desc p:first-child { color: var(--text-on-dark); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-6) 0 var(--space-5); }
.hero-visual .figure-frame { border-color: var(--line-dark); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.hero-status { margin: 0 0 var(--space-2); }
.back-link { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--fs-sm); font-weight: 600; color: var(--muted-on-dark); text-decoration: none; }
.back-link svg { width: 16px; height: 16px; }
.back-link:hover { color: var(--cyan); }
.facts {
  position: relative; display: grid; gap: 1px; margin: var(--space-7) 0 0;
  background: var(--line-dark); border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden;
}
.fact { background: rgba(20, 36, 58, .85); padding: var(--space-4) var(--space-5); }
.fact dt { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .12em; color: var(--cyan); font-weight: 700; margin-bottom: .2rem; }
.fact dd { margin: 0; font-size: var(--fs-sm); color: var(--text-on-dark); }

/* =========================================================================
   6. PLANNED-WORK COMPONENTS
   ========================================================================= */

/* Status banner: the page-wide "planned, not implemented" statement */
.status-banner {
  display: flex; gap: var(--space-3); align-items: flex-start;
  padding: var(--space-4) var(--space-5); border-radius: var(--radius);
  background: #f3effd; border: 1px solid #ddd2fa; color: #3f2f7a; font-size: var(--fs-sm);
}
.status-banner svg { width: 20px; height: 20px; flex: none; margin-top: .15rem; color: var(--violet-ink); }
.status-banner p { margin: 0; color: inherit; }
.status-banner strong { color: #2f2163; }
.status-strip { background: var(--white); border-bottom: 1px solid var(--line); padding-block: var(--space-5); }

/* Before / proposed comparison */
.distinct-pair { display: grid; gap: var(--space-3); margin-top: var(--space-5); }
.distinct-pair > div { padding: var(--space-4) var(--space-5); border-radius: var(--radius); font-size: var(--fs-sm); color: var(--text-muted); }
.distinct-pair b { display: block; font-size: .95rem; margin-bottom: .25rem; }
.distinct-pair .is-now { background: #f1faf5; border: 1px solid #bfe8d3; }
.distinct-pair .is-now b { color: #0a6b45; }
.distinct-pair .is-future { background: #f6f3fe; border: 1px dashed #c9b9f5; }
.distinct-pair .is-future b { color: var(--violet-ink); }

/* Layered architecture (HTML/CSS; reads top to bottom on every screen size) */
.layers { list-style: none; display: grid; gap: 28px; counter-reset: layer; }
.layer {
  counter-increment: layer; position: relative; display: grid; gap: var(--space-3);
  padding: var(--space-4) var(--space-5); border-radius: var(--radius);
  background: var(--navy-800); border: 1px solid rgba(159, 177, 197, .28); color: var(--text-on-dark);
}
.layer::before {
  content: "L" counter(layer); position: absolute; top: var(--space-4); right: var(--space-5);
  font: 700 .7rem/1 var(--font-mono); letter-spacing: .08em; color: var(--cyan);
}
.layer h4 { color: var(--white); font-size: 1rem; padding-right: 2.5rem; }
.layer p { margin: 0; font-size: .86rem; color: var(--muted-on-dark); }
.layer-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; }
.layer-chips li { padding: .15rem .55rem; border-radius: 999px; font: 600 .74rem/1.6 var(--font-sans); color: var(--cyan); background: rgba(53, 198, 217, .1); border: 1px solid rgba(53, 198, 217, .25); }
.layer--sense { border-color: rgba(242, 181, 68, .5); }
.layer--sense .layer-chips li { color: var(--amber); background: rgba(242, 181, 68, .08); border-color: rgba(242, 181, 68, .3); }
.layer--core { border-color: rgba(53, 198, 217, .55); }
.layer--out { border: 2px solid var(--cyan); background: #0f1e33; }
.layer--human { border-color: rgba(123, 224, 181, .5); }
.layer--human .layer-chips li { color: #7be0b5; background: rgba(123, 224, 181, .08); border-color: rgba(123, 224, 181, .3); }
.layer-split { display: grid; gap: var(--space-3); }
.layer-split > div { padding: var(--space-3) var(--space-4); border-radius: 10px; background: rgba(11, 20, 36, .55); border: 1px solid var(--line-dark); }
.layer-split h5 { margin: 0 0 .2rem; font-size: .88rem; color: var(--white); }
.layer-split p { font-size: .8rem; }
.layer:not(:last-child)::after {
  content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 28px; transform: translateX(-50%);
  background: linear-gradient(var(--cyan), var(--cyan)) top / 2px calc(100% - 7px) no-repeat;
}
.layer:not(:last-child) > .arrowhead {
  position: absolute; left: 50%; top: calc(100% + 21px); transform: translateX(-50%);
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 7px solid var(--cyan);
}
.arch-panel {
  background: var(--navy-900); border: 1px solid var(--line-dark); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: clamp(1rem, .6rem + 2vw, 2rem);
  background-image: radial-gradient(700px 320px at 50% 0%, rgba(53, 198, 217, .09), transparent 70%);
}
.arch-panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-4); align-items: center; margin-bottom: var(--space-5); }
.arch-panel-head h3 { color: var(--white); font-size: 1.05rem; }
.arch-panel-note { margin: var(--space-5) 0 0; font-size: var(--fs-xs); color: var(--muted-on-dark); }

/* Numbered processing pipeline */
.flow { list-style: none; display: grid; gap: var(--space-4); counter-reset: step; }
.flow-step {
  counter-increment: step; position: relative; display: grid; grid-template-columns: auto 1fr; gap: var(--space-4);
  padding: var(--space-5); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.flow-step:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--cyan-ink); }
.flow-step::before {
  content: counter(step, decimal-leading-zero); width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font: 800 .95rem/1 var(--font-mono); color: var(--white); background: var(--c, var(--cyan-ink));
}
.flow-step h3 { font-size: 1rem; margin-bottom: .3rem; }
.flow-step p { margin: 0; font-size: .92rem; color: var(--text-muted); }
.flow-step .flow-io { display: block; margin-top: .45rem; font: 500 .76rem/1.45 var(--font-mono); color: var(--cyan-ink); }

/* Operational loop (Observe → … → Evaluate) */
.loop { list-style: none; display: grid; gap: var(--space-3); counter-reset: loop; }
.loop li {
  counter-increment: loop; position: relative; padding: var(--space-4); border-radius: var(--radius);
  background: var(--navy-800); border: 1px solid var(--line-dark); color: var(--muted-on-dark); font-size: .88rem;
}
.loop li::before { content: counter(loop, decimal-leading-zero); display: block; font: 700 .72rem/1 var(--font-mono); color: var(--cyan); margin-bottom: .4rem; }
.loop b { display: block; color: var(--white); font-size: 1rem; margin-bottom: .2rem; }
.loop li.is-human { border-color: rgba(123, 224, 181, .5); }
.loop li.is-human::before { color: #7be0b5; }
.loop-return { margin-top: var(--space-3); font-size: var(--fs-xs); color: var(--muted-on-dark); display: flex; gap: .5rem; align-items: center; }
.loop-return svg { width: 18px; height: 18px; color: var(--cyan); flex: none; }

/* Lifecycle chips (alert or track states) */
.states { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.states li { display: inline-flex; align-items: center; gap: var(--space-2); }
.states li:not(:last-child)::after { content: ""; width: 18px; height: 2px; background: var(--cyan-ink); }
.states span { padding: .35rem .7rem; border-radius: 8px; font-size: var(--fs-sm); font-weight: 600; color: var(--navy-900); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }

/* Equations (native MathML, same treatment as the existing Kalman page) */
math { font-family: "STIX Two Math", "Cambria Math", "Latin Modern Math", "DejaVu Math TeX Gyre", math, serif; }
math[display="block"] { font-size: 1.18rem; }
.eq-math { overflow-x: auto; overflow-y: hidden; padding: .35rem 0; -webkit-overflow-scrolling: touch; }
.eq-math math { margin: 0; }
@media (max-width: 479px) { math[display="block"] { font-size: 1.04rem; } }
.eq-grid { display: grid; gap: var(--space-5); }
.eq-panel { padding: var(--space-5); border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--g, var(--cyan-ink)); box-shadow: var(--shadow-sm); }
.eq-panel h3 { font-size: 1.02rem; margin-bottom: var(--space-2); }
.eq-panel .eq-math { margin: var(--space-2) 0 var(--space-3); }
.eq-panel p { font-size: .93rem; color: var(--text-muted); }
.eq-panel p:last-child { margin-bottom: 0; }
.eq-label { display: block; font: 700 var(--fs-xs)/1.4 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .2rem; }
.vars { margin: var(--space-3) 0 0; display: grid; gap: .1rem; font-size: .9rem; }
.vars div { display: grid; grid-template-columns: minmax(3.2rem, auto) 1fr; gap: var(--space-3); align-items: baseline; padding: .35rem 0; border-top: 1px solid var(--line); }
.vars dt { text-align: center; }
.vars dd { margin: 0; color: var(--text-muted); }
.g-model { --g: #1d6f8c; }
.g-est { --g: var(--cyan-ink); }
.g-assoc { --g: var(--violet); }
.g-traffic { --g: #9a6a0e; }
.worked {
  margin-top: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: 10px;
  background: var(--bg-light); border: 1px dashed #b9c9da; font-size: .88rem; color: var(--text);
}
.worked b { color: var(--navy-900); }

/* Specification / metric tables (stack into cards on narrow screens) */
.spec { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); font-size: .92rem; }
.spec caption { text-align: left; caption-side: bottom; padding-top: var(--space-3); font-size: var(--fs-xs); color: var(--text-muted); }
.spec th, .spec td { padding: .75rem .95rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.spec thead th { background: var(--navy-900); color: var(--white); font-size: .86rem; }
.spec tbody th { color: var(--navy-900); background: var(--bg-light); font-size: .9rem; width: 26%; }
.spec td { color: var(--text-muted); line-height: 1.5; }
.spec tbody tr:last-child th, .spec tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 639px) {
  .spec, .spec tbody, .spec tr, .spec th, .spec td { display: block; width: 100%; }
  .spec { border: 0; background: transparent; box-shadow: none; overflow: visible; }
  .spec thead { display: none; }
  .spec tbody { display: grid; gap: var(--space-3); }
  .spec tr { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
  .spec tbody th { width: 100%; background: var(--navy-900); color: var(--white); }
  .spec td { display: grid; gap: .15rem; border-bottom: 1px solid var(--line); }
  .spec td:last-child { border-bottom: 0; }
  .spec td::before { content: attr(data-label); font-weight: 700; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--navy-900); }
  .spec caption { display: block; }
}

/* File tree */
.tree {
  margin: 0; padding: var(--space-5); border-radius: var(--radius); overflow-x: auto;
  background: var(--navy-900); color: var(--text-on-dark); border: 1px solid var(--line-dark);
  font: 500 .84rem/1.6 var(--font-mono); white-space: pre;
}
.tree b { color: var(--cyan); font-weight: 600; }
.tree i { color: var(--muted-on-dark); font-style: normal; }

/* Challenge cards */
.grid-cards { list-style: none; display: grid; gap: var(--space-4); }
.card .card-tag { display: inline-block; margin-bottom: var(--space-2); font: 700 .68rem/1 var(--font-mono); letter-spacing: .1em; color: var(--cyan-ink); text-transform: uppercase; }
.card .mitigation { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px dashed var(--line); font-size: .88rem; color: var(--text); }
.card .mitigation b { color: var(--cyan-ink); }
.section--dark .card .card-tag { color: var(--cyan); }

/* Hardware cards */
.hw-grid { list-style: none; display: grid; gap: var(--space-4); }
.hw-card { overflow: hidden; padding: 0; }
.hw-card .hw-body { padding: var(--space-4) var(--space-5) var(--space-5); }
.hw-card .hw-role { display: block; font: 700 .7rem/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--cyan-ink); margin-bottom: .3rem; }
.hw-card .hw-body .badge { margin-top: var(--space-3); white-space: normal; }

/* Roadmap phases */
.phases { list-style: none; position: relative; display: grid; gap: var(--space-4); }
.phase {
  position: relative; display: grid; gap: var(--space-2); padding: var(--space-5);
  background: var(--white); border: 1.5px dashed #a9bdd2; border-radius: var(--radius);
}
.phase-top { display: flex; flex-wrap: wrap; gap: .3rem .75rem; align-items: baseline; }
.phase-num { font: 800 .78rem/1 var(--font-mono); letter-spacing: .08em; color: var(--white); background: var(--violet); padding: .35rem .5rem; border-radius: 6px; }
.phase-when { font: 600 .74rem/1 var(--font-mono); color: var(--text-muted); }
.phase h3 { font-size: 1.02rem; }
.phase ul { list-style: none; display: grid; gap: .3rem; font-size: .9rem; color: var(--text-muted); }
.phase ul li { position: relative; padding-left: 1rem; }
.phase ul li::before { content: ""; position: absolute; left: 0; top: .65em; width: 6px; height: 2px; background: var(--violet); }
.phase .deliverable { margin: var(--space-2) 0 0; padding-top: var(--space-2); border-top: 1px solid var(--line); font-size: .88rem; color: var(--text); }
.phase .deliverable b { color: var(--violet-ink); }
.roadmap-note { margin-top: var(--space-5); font-size: var(--fs-sm); color: var(--text-muted); }


/* Author / proposer panel with the profile photograph */
.author {
  display: grid; gap: var(--space-5); align-items: center; padding: var(--space-5);
  border-radius: var(--radius-lg); background: var(--navy-800); border: 1px solid var(--line-dark);
}
.author-photo {
  width: 132px; aspect-ratio: 816 / 1233; border-radius: var(--radius); overflow: hidden;
  border: 2px solid rgba(53, 198, 217, .55); box-shadow: 0 0 0 6px rgba(53, 198, 217, .06); background: var(--navy-700);
}
.author-photo img { width: 100%; height: 100%; object-fit: cover; }
.author-role { display: block; font: 700 var(--fs-xs)/1.4 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); margin-bottom: .25rem; }
.author h3 { font-size: 1.2rem; margin-bottom: var(--space-2); }
.author p { margin: 0 0 var(--space-3); font-size: .95rem; }
.author p:last-child { margin-bottom: 0; }

/* Contribution banner */
.value-banner {
  margin-top: var(--space-7); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); border-radius: var(--radius-lg);
  background: var(--navy-800); border: 1px solid var(--line-dark); text-align: center;
  background-image: radial-gradient(700px 260px at 50% 0%, rgba(53, 198, 217, .14), transparent 70%);
}
.value-banner .tagline { font-size: clamp(1.15rem, 1rem + 1vw, 1.6rem); font-weight: 800; color: var(--white); letter-spacing: -.01em; margin-bottom: var(--space-3); }
.value-banner .tagline span { color: var(--cyan); }
.value-banner p { max-width: 48rem; margin: 0 auto; }

/* Previous / next future project */
.pager { list-style: none; display: grid; gap: var(--space-3); margin-top: var(--space-7); }
.pager a {
  display: grid; gap: .2rem; padding: var(--space-4) var(--space-5); border-radius: var(--radius);
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line-dark); color: var(--text-on-dark); text-decoration: none;
  transition: border-color .2s, background-color .2s;
}
.pager a:hover { border-color: rgba(53, 198, 217, .55); background: rgba(53, 198, 217, .06); color: var(--white); }
.pager small { font: 700 .7rem/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); }
.pager span { font-weight: 600; }
.pager .is-next { text-align: right; }

/* 7. CONTACT & FOOTER */
.contact { position: relative; overflow: hidden; }
.contact::after {
  content: ""; position: absolute; right: -180px; top: -180px; width: 520px; height: 520px; border-radius: 50%;
  border: 1px solid rgba(53, 198, 217, .12);
  box-shadow: 0 0 0 70px rgba(53, 198, 217, .025), 0 0 0 140px rgba(53, 198, 217, .02);
  pointer-events: none;
}
.contact-inner { position: relative; z-index: 1; max-width: 760px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.site-footer { background: #070e1a; color: var(--muted-on-dark); padding-block: var(--space-6); font-size: var(--fs-sm); border-top: 1px solid var(--line-dark); }
.footer-grid { display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between; align-items: center; }
.footer-name { color: var(--white); font-weight: 700; }
.site-footer a { color: var(--cyan); }
.site-footer a:hover { color: var(--white); }

/* 8. LIGHTBOX (native <dialog>; links open the image directly without JS) */
.lightbox {
  width: min(1200px, calc(100vw - 2rem)); max-width: none; max-height: calc(100vh - 2rem);
  padding: 0; border: 1px solid var(--line-dark); border-radius: var(--radius); background: var(--navy-900); color: var(--text-on-dark);
}
.lightbox::backdrop { background: rgba(5, 10, 19, .82); }
.lightbox figure { margin: 0; }
.lightbox img { width: 100%; height: auto; max-height: calc(100vh - 9rem); object-fit: contain; background: #050a13; }
.lightbox figcaption { padding: var(--space-3) var(--space-5) var(--space-4); padding-right: 4rem; font-size: var(--fs-sm); color: var(--muted-on-dark); }
.lightbox-close {
  position: absolute; top: .6rem; right: .6rem; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: rgba(11, 20, 36, .85); color: var(--white); border: 1px solid var(--line-dark);
}
.lightbox-close svg { width: 18px; height: 18px; }
.lightbox-close:hover { border-color: var(--cyan); color: var(--cyan); }

/* 9. RESPONSIVE (mobile first) */
@media (max-width: 479px) {
  .states { flex-direction: column; align-items: flex-start; }
  .states li { flex-direction: column; align-items: flex-start; gap: .25rem; }
  .states li:not(:last-child)::after { width: 2px; height: 12px; margin-left: 1rem; }
  .vars div { grid-template-columns: 2.8rem 1fr; }
}
@media (min-width: 560px) {
  .author { grid-template-columns: auto 1fr; }
  .pager { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 640px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .loop { grid-template-columns: repeat(3, 1fr); }
  .grid-cards, .hw-grid, .eq-grid--2, .distinct-pair { grid-template-columns: repeat(2, 1fr); }
  .phases { grid-template-columns: repeat(2, 1fr); }
  .layer-split { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
  .facts { grid-template-columns: repeat(4, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split--wide-left { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
  .split--wide-right { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .flow { grid-template-columns: repeat(3, 1fr); }
  .loop { grid-template-columns: repeat(6, 1fr); }
  .grid-cards { grid-template-columns: repeat(3, 1fr); }
  .hw-grid { grid-template-columns: repeat(3, 1fr); }
  .phases { grid-template-columns: repeat(3, 1fr); }
  .layer-split--4 { grid-template-columns: repeat(4, 1fr); }
  .layer-split--3 { grid-template-columns: repeat(3, 1fr); }
  .sticky { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}
@media (min-width: 1080px) {
  .flow--4 { grid-template-columns: repeat(4, 1fr); }
  .hw-grid--5 { grid-template-columns: repeat(5, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .btn:hover, .card:hover, .flow-step:hover { transform: none; }
}
@media print {
  .site-header, .hero-actions, .lightbox, .pager { display: none; }
  .section { padding-block: 1.5rem; }
  .hero, .section--dark { background: #fff !important; color: #000 !important; }
  .hero h1, .section--dark h2, .section--dark h3 { color: #000 !important; }
}
