/* style.css - refactor to modern tactical dashboard (static, no external scripts) */

:root {
  /* Base canvas */
  --canvas: #050607;
  --canvas-2: #07090b;

  /* Surfaces (glass layers) */
  --surface-0: rgba(10, 12, 16, 0.40);
  --surface-1: rgba(16, 18, 24, 0.62);
  --surface-2: rgba(20, 23, 30, 0.72);
  --surface-3: rgba(26, 30, 40, 0.80);

  /* Strokes */
  --stroke: rgba(255, 255, 255, 0.10);
  --stroke-2: rgba(255, 255, 255, 0.16);
  --stroke-3: rgba(0, 255, 65, 0.22);

  /* Text */
  --text-hi: #f5f7fb;
  --text: #d5d9e2;
  --text-muted: rgba(213, 217, 226, 0.74);
  --text-dim: rgba(213, 217, 226, 0.56);

  /* Accents */
  --term: #00ff41;      /* primary */
  --tac: #6ea8ff;       /* secondary (muted slate-blue) */
  --amber: #ffbf00;     /* warning */
  --danger: #ff3344;    /* danger */

  --accent: var(--term);
  --accent-2: var(--tac);

  /* Geometry */
  --radius: 14px;
  --radius-sm: 12px;
  --cut: 18px;          /* corner cut size for cards */
  --max: 1240px;

  /* Effects */
  --blur: 14px;
  --sat: 145%;
  --shadow-0: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  --shadow-1: 0 18px 54px rgba(0, 0, 0, 0.62);
  --shadow-2: 0 10px 28px rgba(0, 0, 0, 0.55);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --dur-1: 120ms;
  --dur-2: 240ms;
  --dur-3: 520ms;

  /* Type */
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --fw-body: 450;
  --fw-strong: 650;
  --fw-heavy: 850;

  /* HUD texture */
  --grid: 44px;
  --scan: 3px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

html {
  color-scheme: dark;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-bottom: 76px;
  font-family: var(--font-body);
  font-weight: var(--fw-body);
  color: var(--text);
  line-height: 1.6;
  background:
    radial-gradient(1200px 900px at 12% 0%, rgba(110, 168, 255, 0.10), transparent 55%),
    radial-gradient(900px 700px at 88% 10%, rgba(0, 255, 65, 0.06), transparent 60%),
    radial-gradient(900px 700px at 40% 110%, rgba(255, 191, 0, 0.035), transparent 60%),
    linear-gradient(180deg, var(--canvas-2), var(--canvas));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scanlines + vignette (high-definition, low obstruction) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 800px at 50% 10%, rgba(255, 255, 255, 0.035), transparent 58%),
    radial-gradient(1000px 700px at 50% 120%, rgba(0, 0, 0, 0.55), transparent 52%),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.00) 0px,
      rgba(255, 255, 255, 0.00) calc(var(--scan) - 1px),
      rgba(255, 255, 255, 0.03) var(--scan)
    );
  opacity: 0.07;
  mix-blend-mode: overlay;
}

/* Grid overlay + corner marks (less obtrusive, more precise) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    /* corner ticks */
    linear-gradient(var(--term), var(--term)) 18px 18px / 24px 2px no-repeat,
    linear-gradient(var(--term), var(--term)) 18px 18px / 2px 24px no-repeat,
    linear-gradient(var(--term), var(--term)) calc(100% - 42px) 18px / 24px 2px no-repeat,
    linear-gradient(var(--term), var(--term)) calc(100% - 20px) 18px / 2px 24px no-repeat,
    linear-gradient(var(--term), var(--term)) 18px calc(100% - 20px) / 24px 2px no-repeat,
    linear-gradient(var(--term), var(--term)) 18px calc(100% - 42px) / 2px 24px no-repeat,
    linear-gradient(var(--term), var(--term)) calc(100% - 42px) calc(100% - 20px) / 24px 2px no-repeat,
    linear-gradient(var(--term), var(--term)) calc(100% - 20px) calc(100% - 42px) / 2px 24px no-repeat,

    /* primary grid */
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),

    /* center crosshair (very faint) */
    linear-gradient(rgba(0, 255, 65, 0.10), rgba(0, 255, 65, 0.10)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(rgba(0, 255, 65, 0.10), rgba(0, 255, 65, 0.10)) 0 50% / 100% 1px no-repeat;
  background-size:
    24px 2px,
    2px 24px,
    24px 2px,
    2px 24px,
    24px 2px,
    2px 24px,
    24px 2px,
    2px 24px,
    var(--grid) var(--grid),
    var(--grid) var(--grid),
    1px 100%,
    100% 1px;
  opacity: 0.045;
  mix-blend-mode: screen;
}

a {
  color: rgba(0, 255, 65, 0.92);
  text-decoration: none;
}
a:hover, a:focus {
  color: rgba(0, 255, 65, 1);
  text-decoration: underline;
}

::selection { background: var(--term); color: #000; }

:focus-visible {
  outline: 2px solid var(--term);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(0, 255, 65, 0.12);
}

.skip-link {
  position: absolute;
  top: 12px;
  left: -9999px;
  padding: 10px 12px;
  background: rgba(12, 14, 18, 0.92);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  box-shadow: var(--shadow-2);
  z-index: 2000;
}
.skip-link:focus { left: 12px; }

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(6, 8, 10, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--sat));
}

.class-bar {
  background: rgba(0, 0, 0, 0.26);
  border-bottom: 1px solid rgba(0, 255, 65, 0.18);
}
.class-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px 18px;
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--font-mono);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: rgba(245, 247, 251, 0.78);
}
.class-mark { color: rgba(0, 255, 65, 0.95); }
.class-note { color: rgba(213, 217, 226, 0.70); }

.nav-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.brand {
  font-family: var(--font-head);
  font-weight: var(--fw-heavy);
  letter-spacing: 0.03em;
  color: var(--text-hi);
  text-transform: uppercase;
  white-space: nowrap;
}
.brand-sep {
  color: rgba(213, 217, 226, 0.55);
  font-family: var(--font-mono);
  font-weight: var(--fw-strong);
}
.brand-call {
  font-family: var(--font-mono);
  font-weight: var(--fw-heavy);
  color: rgba(0, 255, 65, 0.90);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: hud-flicker 5.2s steps(1, end) infinite;
}

header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
header nav a {
  position: relative;
  color: rgba(0, 255, 65, 0.90);
  font-weight: var(--fw-strong);
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  transition: background var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out);
}
header nav a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 5px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.55), transparent);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out);
}
header nav a:hover, header nav a:focus {
  color: var(--text-hi);
  background: rgba(18, 20, 26, 0.60);
  border-color: rgba(0, 255, 65, 0.22);
  text-decoration: none;
  transform: translateY(-1px);
}
header nav a:hover::after, header nav a:focus::after {
  opacity: 1;
  transform: translateY(0);
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 44px 18px 64px;
}

/* Bento */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  align-items: start;
  grid-auto-flow: dense;
}

.span-12 { grid-column: span 12; }
.span-7 { grid-column: span 12; }
.span-5 { grid-column: span 12; }

.section { scroll-margin-top: 110px; }

/* Type */
h1, h2, h3 {
  margin: 0 0 10px;
  line-height: 1.12;
  color: var(--text-hi);
  letter-spacing: -0.02em;
}

h1 {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 2.7vw, 2.55rem);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

h2 {
  font-family: var(--font-head);
  font-size: clamp(1.22rem, 1.85vw, 1.70rem);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h3 {
  font-family: var(--font-head);
  font-size: 1.02rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

p { margin: 0 0 12px; }
.muted { color: var(--text-muted); }

/* Panel (glass) */
.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(180deg, rgba(22, 25, 32, 0.72), rgba(8, 10, 14, 0.55));
  box-shadow: var(--shadow-0), var(--shadow-1);
  padding: 18px;
  backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  container-type: inline-size;
  container-name: panel;
  transition: transform var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 38%),
    radial-gradient(800px 260px at 50% -10%, rgba(110, 168, 255, 0.10), transparent 60%),
    radial-gradient(760px 260px at 18% 10%, rgba(0, 255, 65, 0.06), transparent 60%);
  opacity: 0.60;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(0, 255, 65, 0.80), rgba(0, 255, 65, 0.80)) 12px 12px / 18px 2px no-repeat,
    linear-gradient(rgba(0, 255, 65, 0.80), rgba(0, 255, 65, 0.80)) 12px 12px / 2px 18px no-repeat,
    linear-gradient(rgba(0, 255, 65, 0.80), rgba(0, 255, 65, 0.80)) calc(100% - 30px) 12px / 18px 2px no-repeat,
    linear-gradient(rgba(0, 255, 65, 0.80), rgba(0, 255, 65, 0.80)) calc(100% - 12px) 12px / 2px 18px no-repeat,
    linear-gradient(rgba(0, 255, 65, 0.80), rgba(0, 255, 65, 0.80)) 12px calc(100% - 12px) / 18px 2px no-repeat,
    linear-gradient(rgba(0, 255, 65, 0.80), rgba(0, 255, 65, 0.80)) 12px calc(100% - 30px) / 2px 18px no-repeat,
    linear-gradient(rgba(0, 255, 65, 0.80), rgba(0, 255, 65, 0.80)) calc(100% - 30px) calc(100% - 12px) / 18px 2px no-repeat,
    linear-gradient(rgba(0, 255, 65, 0.80), rgba(0, 255, 65, 0.80)) calc(100% - 12px) calc(100% - 30px) / 2px 18px no-repeat;
  opacity: 0.06;
}

.panel > * { position: relative; }

@media (hover: hover) and (pointer: fine) {
  .panel:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 255, 65, 0.28);
    box-shadow: var(--shadow-0), var(--shadow-1), 0 0 38px rgba(0, 255, 65, 0.08);
  }
}

.panel-label {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(213, 217, 226, 0.72);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.10);
  padding: 6px 10px;
  border-radius: 999px;
}

/* Hero */
.hero {
  min-height: calc(100vh - 180px);
}

.hero-top {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .hero { min-height: auto; }
  .hero-top { grid-template-columns: 1fr; }
}

.hero-primary { padding-right: 4px; }
.hero-secondary { padding-left: 4px; }

.mast-name {
  font-family: var(--font-head);
  font-size: clamp(2.8rem, 5.3vw, 4.6rem);
  font-weight: var(--fw-heavy);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 0.98;
  margin: 0 0 10px;
  text-shadow: 0 0 28px rgba(0, 255, 65, 0.06);
}
.mast-line {
  font-family: var(--font-mono);
  font-size: clamp(1.00rem, 1.7vw, 1.35rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 255, 65, 0.92);
  margin: 0 0 14px;
}
.mast-tag {
  font-family: var(--font-body);
  font-size: clamp(1.10rem, 2.0vw, 1.90rem);
  font-weight: 560;
  letter-spacing: 0.01em;
  color: rgba(245, 247, 251, 0.88);
  margin: 0 0 10px;
}

.role {
  margin-top: 10px;
  color: var(--text-dim);
  font-weight: 650;
  letter-spacing: 0.01em;
}

.telemetry {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(245, 247, 251, 0.74);
}
.telemetry-item {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.20);
  transition: border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .telemetry-item:hover {
    border-color: rgba(110, 168, 255, 0.26);
    box-shadow: 0 0 0 1px rgba(110, 168, 255, 0.06) inset;
  }
}

/* CTA */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 10, 14, 0.42);
  color: var(--text-hi);
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  transition: transform var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out);
}

.btn::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(rgba(0, 255, 65, 0.70), rgba(0, 255, 65, 0.70)) 8px 8px / 12px 2px no-repeat,
    linear-gradient(rgba(0, 255, 65, 0.70), rgba(0, 255, 65, 0.70)) 8px 8px / 2px 12px no-repeat,
    linear-gradient(rgba(0, 255, 65, 0.70), rgba(0, 255, 65, 0.70)) calc(100% - 20px) 8px / 12px 2px no-repeat,
    linear-gradient(rgba(0, 255, 65, 0.70), rgba(0, 255, 65, 0.70)) calc(100% - 8px) 8px / 2px 12px no-repeat;
  opacity: 0.0;
  transition: opacity var(--dur-1) var(--ease-out);
}

.btn:hover, .btn:focus {
  text-decoration: none;
  border-color: rgba(0, 255, 65, 0.22);
  background: rgba(18, 20, 26, 0.66);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.06) inset, 0 16px 46px rgba(0, 0, 0, 0.55);
}
.btn:hover::after, .btn:focus::after { opacity: 0.55; }

.btn.primary {
  background: rgba(0, 255, 65, 0.92);
  color: #000;
  border-color: rgba(0, 255, 65, 0.32);
  box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.14) inset, 0 0 28px rgba(0, 255, 65, 0.12);
}
.btn.primary:hover, .btn.primary:focus {
  background: rgba(0, 255, 65, 1);
  border-color: rgba(0, 255, 65, 0.62);
  box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.18) inset, 0 0 40px rgba(0, 255, 65, 0.16);
}

.btn.secondary {
  border-color: rgba(110, 168, 255, 0.22);
}
.btn.secondary:hover, .btn.secondary:focus {
  border-color: rgba(110, 168, 255, 0.40);
  box-shadow: 0 0 0 1px rgba(110, 168, 255, 0.08) inset, 0 16px 46px rgba(0, 0, 0, 0.55), 0 0 34px rgba(110, 168, 255, 0.08);
}

/* Definition lists */
.dl {
  display: grid;
  grid-template-columns: minmax(120px, max-content) 1fr;
  gap: 8px 14px;
  align-items: baseline;
  margin-top: 10px;
}
@media (max-width: 760px) { .dl { grid-template-columns: 1fr; } }

.dl dt {
  color: rgba(213, 217, 226, 0.58);
  font-weight: 760;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.dl dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

/* BLUF emphasis */
.dl.bluf {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(0, 255, 65, 0.08), rgba(0, 0, 0, 0.18));
  border: 1px solid rgba(0, 255, 65, 0.18);
  box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.05) inset;
}
.dl.bluf dt { color: rgba(0, 255, 65, 0.86); }
.dl.bluf dd { color: rgba(245, 247, 251, 0.88); }

/* Tags + KPI */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(245, 247, 251, 0.72);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.kpi {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}
.kpi-item {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.kpi-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text-hi);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

/* Cards */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
/* Container-driven responsiveness: fixes narrow desktop panels (eg span-5) */
@container panel (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
}

@container panel (max-width: 560px) {
  .dl { grid-template-columns: 1fr; }
  .dl dt { margin-top: 10px; }
  .dl dt:first-child { margin-top: 0; }
}


.card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.24));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  backdrop-filter: blur(calc(var(--blur) - 2px)) saturate(calc(var(--sat) - 10%));
  -webkit-backdrop-filter: blur(calc(var(--blur) - 2px)) saturate(calc(var(--sat) - 10%));
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  transition: transform var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 220px at 20% 10%, rgba(110, 168, 255, 0.10), transparent 60%),
    radial-gradient(600px 220px at 70% 0%, rgba(0, 255, 65, 0.06), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 40%);
  opacity: 0.60;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(0, 255, 65, 0.70), rgba(0, 255, 65, 0.70)) 10px 10px / 14px 2px no-repeat,
    linear-gradient(rgba(0, 255, 65, 0.70), rgba(0, 255, 65, 0.70)) 10px 10px / 2px 14px no-repeat,
    linear-gradient(rgba(110, 168, 255, 0.70), rgba(110, 168, 255, 0.70)) calc(100% - 24px) 10px / 14px 2px no-repeat,
    linear-gradient(rgba(110, 168, 255, 0.70), rgba(110, 168, 255, 0.70)) calc(100% - 12px) 10px / 2px 14px no-repeat;
  opacity: 0.06;
}

.card > * { position: relative; }

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 255, 65, 0.24);
    background: rgba(18, 20, 26, 0.56);
    box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.06) inset, 0 18px 46px rgba(0, 0, 0, 0.55), 0 0 28px rgba(0, 255, 65, 0.06);
  }
}

.readout {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.22);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 247, 251, 0.70);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height var(--dur-3) var(--ease-out), opacity var(--dur-2) var(--ease-out);
}

.card:hover .readout,
.card:focus-within .readout {
  max-height: 200px;
  opacity: 1;
}

/* Status pills */
.status {
  display: inline-flex;
  align-items: center;
  margin: 2px 0 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 247, 251, 0.72);
}
.status.good { border-color: rgba(0, 255, 65, 0.28); color: rgba(0, 255, 65, 0.92); }
.status.warn { border-color: rgba(255, 191, 0, 0.30); color: rgba(255, 191, 0, 0.95); }
.status.bad  { border-color: rgba(255, 51, 68, 0.30); color: rgba(255, 51, 68, 0.95); }
.status.dim  { border-color: rgba(255, 255, 255, 0.12); color: rgba(213, 217, 226, 0.70); }
.status.info { border-color: rgba(110, 168, 255, 0.28); color: rgba(110, 168, 255, 0.92); }

/* Portrait */
.portrait-card {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.portrait {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: url("/headshot.png") center / cover no-repeat;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.05) inset;
}
.portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.00) 0px,
      rgba(255, 255, 255, 0.00) 2px,
      rgba(255, 255, 255, 0.03) 3px
    );
  opacity: 0.08;
  mix-blend-mode: overlay;
}
.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(520px 260px at 28% 10%, rgba(0, 255, 65, 0.08), transparent 60%),
    radial-gradient(560px 260px at 72% 0%, rgba(110, 168, 255, 0.10), transparent 62%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.22));
}

.portrait-meta {
  margin-top: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.portrait-meta-top {
  color: rgba(245, 247, 251, 0.82);
  font-size: 0.74rem;
}
.portrait-meta-sub {
  margin-top: 6px;
  color: rgba(110, 168, 255, 0.80);
  font-size: 0.72rem;
}

/* Hero sweep */
.hero-sweep {
  position: absolute;
  inset: -40% -40%;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0%, rgba(0, 255, 65, 0.10) 45%, rgba(0, 255, 65, 0.06) 55%, transparent 100%);
  transform: translateX(-55%) rotate(-8deg);
  opacity: 0.0;
  mix-blend-mode: screen;
  animation: hud-sweep 6.5s linear infinite;
}

.hero-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 420px at 50% 0%, rgba(110, 168, 255, 0.10), transparent 58%),
    repeating-linear-gradient(
      to bottom,
      rgba(0, 255, 65, 0.00) 0px,
      rgba(0, 255, 65, 0.00) 7px,
      rgba(0, 255, 65, 0.02) 8px
    );
  opacity: 0.10;
  mix-blend-mode: screen;
}

@keyframes hud-sweep {
  0%   { transform: translateX(-55%) rotate(-8deg); opacity: 0.0; }
  6%   { opacity: 0.10; }
  22%  { opacity: 0.0; }
  100% { transform: translateX(55%) rotate(-8deg); opacity: 0.0; }
}

@keyframes hud-flicker {
  0%, 100% { text-shadow: 0 0 0 rgba(0, 255, 65, 0.00); }
  45% { text-shadow: 0 0 18px rgba(0, 255, 65, 0.10); }
  48% { text-shadow: 0 0 22px rgba(0, 255, 65, 0.14); }
  52% { text-shadow: 0 0 14px rgba(0, 255, 65, 0.08); }
}

/* Pre blocks */
pre {
  margin-top: 10px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  font-family: var(--font-mono);
  line-height: 1.35;
  font-size: 0.86rem;
  tab-size: 2;
}

/* Utilities */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }

/* Footer */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}
.foot-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px 18px 34px;
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 18px;
}
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr; } }

.fine {
  color: rgba(213, 217, 226, 0.70);
  font-size: 0.92rem;
  line-height: 1.55;
}

@media (min-width: 980px) {
  .span-7 { grid-column: span 7; }
  .span-5 { grid-column: span 5; }
}

/* Statusbar */
.statusbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1500;
  background: rgba(0, 0, 0, 0.28);
  border-top: 1px solid rgba(0, 255, 65, 0.18);
  backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--sat));
}
.statusbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: rgba(245, 247, 251, 0.72);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  body::before { opacity: 0.05; }
  body::after { opacity: 0.04; }
  .btn:hover, .card:hover, .panel:hover { transform: none; }
}

/* Print */
@media print {
  body { background: #fff; color: #000; }
  a { color: #006400; text-decoration: underline; }
  header { position: static; background: #fff; border-bottom: 1px solid #333; }
  .panel, .card { box-shadow: none; background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  body::before, body::after, .hero-sweep, .hero-scan, .statusbar { display: none; }
}
