/* Load AFTER style.css. Overrides its tokens, so the old mint accent becomes cyan everywhere. */
:root {
  --bg: #0a0e14;
  --panel: rgba(14, 20, 30, 0.72);
  --line: rgba(76, 217, 255, 0.18);
  --grid: rgba(76, 217, 255, 0.05);
  --accent: #4cd9ff;
  --accent-color: #4cd9ff;
  --amber: #ffb454;
  --text: #e6edf3;
  --muted: #8b98a9;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --nav-h: 56px;
}

html {
  background: radial-gradient(900px 500px at 50% -10%, rgba(76, 217, 255, 0.10), transparent 70%), var(--bg);
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: var(--font-sans);
  background: transparent;
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Layout + numbered section titles ---------- */
main {
  counter-reset: sec;
}

main>section {
  max-width: 1120px;
  margin-inline: auto;
  padding-block: 2.5rem;
}

main>section:not(.intro) {
  counter-increment: sec;
}

h2.section-title {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.75rem;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--text) !important;
  /* beats the old global heading rule */
}

h2.section-title::before {
  content: "0" counter(sec);
  font: 500 0.8rem var(--font-mono);
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
}

h2.section-title::after {
  content: "";
  flex: 1;
  width: auto;
  height: 1px;
  margin: 0;
  border-radius: 0;
  background: linear-gradient(90deg, var(--line), transparent);
}

/* ---------- Panel (corner brackets) ---------- */
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  backdrop-filter: blur(10px);
}

.panel::before,
.panel::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent);
  pointer-events: none;
}

.panel::before {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
}

.panel::after {
  bottom: -1px;
  right: -1px;
  border-left: 0;
  border-top: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: transparent;
  font: 500 0.82rem var(--font-mono);
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--accent) !important;
  transition: background 0.15s, box-shadow 0.15s, color 0.15s;
}

.btn:hover {
  background: rgba(76, 217, 255, 0.12);
  box-shadow: 0 0 18px rgba(76, 217, 255, 0.25);
}

.btn--primary {
  background: var(--accent);
  color: #04121a !important;
}

.btn--primary:hover {
  background: var(--accent);
  box-shadow: 0 0 22px rgba(76, 217, 255, 0.45);
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--nav-h);
  padding: env(safe-area-inset-top, 0px) clamp(1rem, 5vw, 2rem) 0;
  background: rgba(10, 14, 20, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font: 700 0.95rem var(--font-mono);
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--text) !important;
}

.site-nav__links {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav__links::-webkit-scrollbar {
  display: none;
}

.site-nav__links a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid transparent;
  font: 500 0.78rem var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--muted) !important;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav__links a:hover {
  color: var(--text) !important;
}

.site-nav__links a.is-active {
  color: var(--text) !important;
  border-color: var(--accent);
}

.site-nav__resume {
  padding: 0.4rem 0.9rem;
  font-size: 0.75rem;
}

@media (max-width: 640px) {
  .site-nav__resume {
    display: none;
  }
}

/* ---------- Status dot ---------- */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
  .status-dot {
    animation: pulse 2.4s ease-in-out infinite;
  }

  @keyframes pulse {
    50% {
      opacity: 0.35;
    }
  }
}

/* ---------- Intro ---------- */
main>section.intro {
  padding-top: clamp(2.5rem, 7vw, 5rem);
  padding-bottom: 3rem;
}

.intro__grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

@media (max-width: 860px) {
  .intro__grid {
    grid-template-columns: 1fr;
  }
}

.eyebrow {
  margin-bottom: 0.75rem;
  font: 500 0.8rem var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "// ";
  opacity: 0.6;
}

.intro__name {
  margin-bottom: 1.25rem;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  text-shadow: 0 0 40px rgba(76, 217, 255, 0.25);
}

.intro__summary {
  max-width: 58ch;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
}

.intro__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.social {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.social a {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1.1rem;
  color: var(--muted) !important;
  transition: color 0.15s, border-color 0.15s;
}

.social a:hover {
  color: var(--accent) !important;
  border-color: var(--accent);
}

/* ---------- Status panel ---------- */
.status {
  padding: 1.25rem;
}

.status__head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.status__photo {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.status__label {
  display: block;
  font: 500 0.7rem var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.status__online {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font: 500 0.85rem var(--font-mono);
  color: var(--accent);
}

.status__rows {
  margin: 0;
}

.status__rows>div {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
}

.status__rows dt {
  font: 500 0.7rem var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.2rem;
}

.status__rows dd {
  margin: 0;
  font-size: 0.92rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0.5rem 0 0;
  padding: 0.9rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.stats strong {
  display: block;
  font: 700 1.35rem var(--font-display);
  color: var(--accent);
}

.stats span {
  display: block;
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--muted);
}

/* ---------- Boot sequence ---------- */
.boot {
  display: none;
}

html.booting .boot {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg);
}

html.booting body {
  overflow: hidden;
}

.boot {
  position: fixed;
  inset: 0;
}

.boot pre {
  position: absolute;

  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);

  width: min(560px, 90vw);
  min-height: 8.5em;

  margin: 0;

  white-space: pre-wrap;
  text-align: left;

  font: 500 0.95rem/1.8 var(--font-mono);
  color: var(--accent);
}

.boot.is-done {
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

/* =========================================================
   HUD UPGRADE — motion, ambient interface, and legacy cleanup
   ========================================================= */

/* The old stylesheet contains the original mint/green visual language.
   These selectors intentionally win because hud.css is loaded last. */
.project .content h3,
.project .content h4,
.case-modal h3,
.case-list dt,
.earlier li a,
footer a {
  color: var(--accent) !important;
}

.project .content h4 {
  text-shadow: 0 0 18px rgba(76, 217, 255, 0.12);
}

.project,
.company-block,
.status,
.earlier {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(14, 20, 30, 0.82), rgba(8, 13, 21, 0.62));
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.project {
  position: relative;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.project::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 35%, rgba(76, 217, 255, 0.08) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 650ms ease;
}

.project:hover {
  transform: translateY(-6px) !important;
  border-color: rgba(76, 217, 255, 0.42);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34), 0 0 28px rgba(76, 217, 255, 0.07);
}

.project:hover::after {
  transform: translateX(120%);
}

/* One grid = 3 / 3 / 1 on desktop. */
.tech-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 1rem;
}

.tech-grid .project {
  min-height: 100%;
}

/* Blue/cyan lightbox — removes the legacy mint glow. */
.modal-content {
  border: 1px solid rgba(76, 217, 255, 0.38);
  box-shadow:
    0 0 0 1px rgba(76, 217, 255, 0.06),
    0 0 24px rgba(76, 217, 255, 0.22),
    0 18px 70px rgba(0, 0, 0, 0.72) !important;
}

.close:hover {
  color: var(--accent) !important;
}

/* ---------- Ambient JARVIS/HUD layer ---------- */
.hud-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.hud-ambient::before {
  content: "";
  position: absolute;
  width: min(68vw, 820px);
  height: min(68vw, 820px);
  left: 50%;
  top: 34%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(76, 217, 255, 0.075);
  border-radius: 50%;
  box-shadow:
    0 0 0 48px rgba(76, 217, 255, 0.018),
    0 0 0 96px rgba(76, 217, 255, 0.012),
    inset 0 0 70px rgba(76, 217, 255, 0.018);
  animation: hud-orbit 32s linear infinite;
}

.hud-ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 49.94%, rgba(76, 217, 255, 0.035) 50%, transparent 50.06%),
    linear-gradient(0deg, transparent 0 49.94%, rgba(76, 217, 255, 0.025) 50%, transparent 50.06%);
  background-size: 100% 100%;
  mask-image: radial-gradient(circle at 50% 34%, #000 0%, transparent 48%);
  opacity: 0.7;
}

.hud-ambient__scan {
  position: absolute;
  left: 0;
  right: 0;
  top: -12vh;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(76, 217, 255, 0.35), transparent);
  box-shadow: 0 0 22px rgba(76, 217, 255, 0.2);
  opacity: 0.35;
  animation: hud-scan 11s linear infinite;
}

.hud-ambient__orb {
  position: absolute;
  border: 1px solid rgba(76, 217, 255, 0.10);
  border-radius: 50%;
  opacity: 0.7;
}

.hud-ambient__orb::before,
.hud-ambient__orb::after {
  content: "";
  position: absolute;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.hud-ambient__orb::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  top: 14%;
  left: 50%;
}

.hud-ambient__orb::after {
  width: 40%;
  height: 1px;
  top: 50%;
  left: 30%;
  opacity: 0.3;
}

.hud-ambient__orb--one {
  width: 190px;
  height: 190px;
  right: 5vw;
  top: 17%;
  animation: hud-float-one 15s ease-in-out infinite;
}

.hud-ambient__orb--two {
  width: 110px;
  height: 110px;
  left: 5vw;
  bottom: 18%;
  opacity: 0.45;
  animation: hud-float-two 19s ease-in-out infinite;
}

.hud-ambient__crosshair {
  position: absolute;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(76, 217, 255, 0.10);
  border-radius: 50%;
}

.hud-ambient__crosshair::before,
.hud-ambient__crosshair::after {
  content: "";
  position: absolute;
  background: rgba(76, 217, 255, 0.16);
}

.hud-ambient__crosshair::before {
  width: 100%;
  height: 1px;
  top: 50%;
}

.hud-ambient__crosshair::after {
  width: 1px;
  height: 100%;
  left: 50%;
}

.hud-ambient__crosshair--one {
  left: 8%;
  top: 42%;
}

.hud-ambient__crosshair--two {
  right: 11%;
  bottom: 10%;
  transform: scale(0.7);
  opacity: 0.55;
}

.hud-ambient__telemetry {
  position: absolute;
  right: 1.5rem;
  bottom: 1rem;
  font: 500 0.58rem var(--font-mono);
  letter-spacing: 0.14em;
  color: rgba(76, 217, 255, 0.25);
  white-space: nowrap;
  animation: hud-telemetry 4s ease-in-out infinite;
}

/* Reveal content as it enters the viewport. */
@media (prefers-reduced-motion: no-preference) {
  main>section:not(.intro) {
    animation: hud-section-in 700ms ease both;
    animation-timeline: view();
    animation-range: entry 0% cover 24%;
  }

  @keyframes hud-section-in {
    from {
      opacity: 0.45;
      transform: translateY(18px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes hud-scan {
    0% {
      transform: translateY(0);
    }

    100% {
      transform: translateY(112vh);
    }
  }

  @keyframes hud-orbit {
    from {
      transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
      transform: translate(-50%, -50%) rotate(360deg);
    }
  }

  @keyframes hud-float-one {

    0%,
    100% {
      transform: translate3d(0, 0, 0) rotate(0deg);
    }

    50% {
      transform: translate3d(-14px, 18px, 0) rotate(12deg);
    }
  }

  @keyframes hud-float-two {

    0%,
    100% {
      transform: translate3d(0, 0, 0);
    }

    50% {
      transform: translate3d(12px, -16px, 0);
    }
  }

  @keyframes hud-telemetry {

    0%,
    100% {
      opacity: 0.22;
    }

    50% {
      opacity: 0.48;
    }
  }
}

@media (max-width: 900px) {
  .tech-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .hud-ambient__orb--one {
    right: -50px;
  }

  .hud-ambient__telemetry {
    display: none;
  }
}

@media (max-width: 600px) {
  .tech-grid {
    grid-template-columns: 1fr !important;
  }

  .hud-ambient__orb--one {
    width: 130px;
    height: 130px;
    top: 22%;
  }

  .hud-ambient__crosshair {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {

  .hud-ambient *,
  .hud-ambient::before,
  .project,
  .project::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Keep the ambient layer behind the actual interface without hiding it behind html/body backgrounds. */
.hud-ambient {
  z-index: 0;
}

.site-nav,
main,
footer {
  position: relative;
  z-index: 1;
}

/* =========================================================
   CASE STUDY // HUD MODAL
   ========================================================= */

body.modal-open {
  overflow: hidden;
}

/* ---------- Modal shell ---------- */

.case-modal {
  position: fixed;
  inset: 0;
  margin: auto;

  width: min(860px, calc(100vw - 2rem));
  max-height: min(820px, calc(100vh - 3rem));

  padding: 0;
  border: 1px solid rgba(76, 217, 255, 0.28);
  border-radius: 4px;

  background:
    linear-gradient(135deg,
      rgba(76, 217, 255, 0.035),
      transparent 28%),
    linear-gradient(315deg,
      rgba(255, 180, 84, 0.025),
      transparent 30%),
    rgba(9, 14, 21, 0.96);

  color: var(--text);

  box-shadow:
    0 0 0 1px rgba(76, 217, 255, 0.04),
    0 0 40px rgba(76, 217, 255, 0.10),
    0 30px 100px rgba(0, 0, 0, 0.75);

  overflow: hidden;
  isolation: isolate;
}

/* ---------- Backdrop ---------- */

.case-modal::backdrop {
  background:
    radial-gradient(circle at center,
      rgba(20, 50, 70, 0.20),
      rgba(3, 6, 10, 0.90));

  backdrop-filter: blur(8px);
}

/* ---------- Minimal HUD scanline ---------- */
.case-modal::after {
  content: "";
  position: absolute;
  inset: -8%;
  pointer-events: none;
  z-index: 10;

  background:
    linear-gradient(to bottom,
      transparent 0%,
      transparent 24%,
      rgba(76, 217, 255, 0.055) 25%,
      rgba(76, 217, 255, 0.055) 25.12%,
      transparent 25.2%,
      transparent 74%,
      rgba(76, 217, 255, 0.035) 75%,
      rgba(76, 217, 255, 0.035) 75.12%,
      transparent 75.2%);

  background-size: 100% 100%;
  opacity: 0.5;
  animation: modalLines 2s ease-in-out infinite alternate;
}

@keyframes modalLines {
  from {
    transform: translateY(-7%);
  }

  to {
    transform: translateY(7%);
  }
}


/* =========================================================
     MODAL INNER
     ========================================================= */

.case-modal__inner {
  position: relative;

  max-height: min(820px, calc(100vh - 3rem));
  overflow-y: auto;

  padding: 2.25rem 2.25rem 2rem;

  scrollbar-width: thin;
  scrollbar-color:
    rgba(76, 217, 255, 0.35) transparent;
}

/* Chrome / Safari scrollbar */

.case-modal__inner::-webkit-scrollbar {
  width: 5px;
}

.case-modal__inner::-webkit-scrollbar-track {
  background: transparent;
}

.case-modal__inner::-webkit-scrollbar-thumb {
  background: rgba(76, 217, 255, 0.30);
}

.case-modal__inner::-webkit-scrollbar-thumb:hover {
  background: rgba(76, 217, 255, 0.60);
}


/* =========================================================
     HUD CORNER BRACKETS
     ========================================================= */

.case-modal__inner::before,
.case-modal__inner::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;

  pointer-events: none;
}

.case-modal__inner::before {
  top: 10px;
  left: 10px;

  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);

  opacity: 0.7;
}

.case-modal__inner::after {
  right: 10px;
  bottom: 10px;

  border-right: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);

  opacity: 0.7;
}


/* =========================================================
     HEADER
     ========================================================= */

.case-modal h3 {
  position: relative;

  margin: 0;
  padding-right: 3.5rem;

  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: -0.025em;

  color: var(--text);
}

/* Tiny HUD label above title */

.case-modal h3::before {
  content: "CASE STUDY // SYSTEM ANALYSIS";

  display: block;

  margin-bottom: 0.65rem;

  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.16em;

  color: var(--accent);

  opacity: 0.75;
}

/* Cyan underline */

.case-modal h3::after {
  content: "";

  display: block;

  width: 72px;
  height: 2px;

  margin-top: 0.9rem;

  background: var(--accent);

  box-shadow:
    0 0 10px rgba(76, 217, 255, 0.65);

  animation: modalPulse 2.5s ease-in-out infinite;
}

@keyframes modalPulse {

  0%,
  100% {
    opacity: 0.65;
  }

  50% {
    opacity: 1;
  }
}


/* =========================================================
     META / SUBHEADER
     ========================================================= */

.case-modal__meta {
  margin: 0.95rem 0 1.75rem;

  padding: 0.7rem 0.85rem;

  border-left: 2px solid rgba(76, 217, 255, 0.55);

  background: rgba(76, 217, 255, 0.035);

  color: var(--muted);

  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  line-height: 1.6;
  letter-spacing: 0.025em;
}


/* =========================================================
     CASE STUDY DATA GRID
     ========================================================= */

.case-list {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 1px;

  margin: 0;

  background: rgba(76, 217, 255, 0.10);

  border: 1px solid rgba(76, 217, 255, 0.10);
}


/* Each Problem / Decision / Outcome etc. becomes a panel */

.case-list>div {
  position: relative;

  min-width: 0;

  padding: 1.05rem 1.15rem 1.15rem;

  background:
    linear-gradient(135deg,
      rgba(76, 217, 255, 0.035),
      rgba(14, 20, 30, 0.80));

  transition:
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}


/* Small top-right telemetry marker */

.case-list>div::after {
  content: "";

  position: absolute;

  top: 10px;
  right: 10px;

  width: 4px;
  height: 4px;

  border-radius: 50%;

  background: var(--accent);

  box-shadow:
    0 0 8px rgba(76, 217, 255, 0.75);

  opacity: 0.55;
}


/* Hover makes individual data blocks feel alive */

.case-list>div:hover {
  background:
    linear-gradient(135deg,
      rgba(76, 217, 255, 0.075),
      rgba(14, 20, 30, 0.92));

  box-shadow:
    inset 2px 0 0 rgba(76, 217, 255, 0.55);

  transform: translateX(2px);
}


/* =========================================================
     LABELS
     ========================================================= */

.case-list dt {
  margin-bottom: 0.55rem;

  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 500;

  letter-spacing: 0.14em;
  text-transform: uppercase;

  color: var(--accent);
}

/* Number each section automatically */

.case-list {
  counter-reset: case-item;
}

.case-list dt::before {
  counter-increment: case-item;

  content: "0" counter(case-item) "  ";

  color: rgba(76, 217, 255, 0.35);
}


/* =========================================================
     CONTENT
     ========================================================= */

.case-list dd {
  margin: 0;

  color: #c6d0da;

  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  line-height: 1.7;
}


/* Inline code */

.case-list code {
  padding: 0.12rem 0.35rem;

  border: 1px solid rgba(76, 217, 255, 0.14);

  background: rgba(76, 217, 255, 0.055);

  color: #9ee8ff;

  font-family: "JetBrains Mono", monospace;
  font-size: 0.78em;
}


/* Links inside case study */

.case-list a {
  color: var(--accent);
  text-decoration: none;

  border-bottom: 1px solid rgba(76, 217, 255, 0.35);
}

.case-list a:hover {
  color: #fff;

  border-bottom-color: var(--accent);

  text-shadow:
    0 0 8px rgba(76, 217, 255, 0.55);
}


/* =========================================================
     CLOSE BUTTON
     ========================================================= */

.case-modal__close {
  position: absolute;

  top: 1.1rem;
  right: 1.15rem;

  z-index: 20;

  width: 36px;
  height: 36px;

  display: grid;
  place-items: center;

  border: 1px solid rgba(76, 217, 255, 0.22);
  border-radius: 2px;

  background: rgba(76, 217, 255, 0.035);

  color: var(--muted);

  font-family: "JetBrains Mono", monospace;
  font-size: 1.3rem;
  line-height: 1;

  cursor: pointer;

  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.case-modal__close:hover,
.case-modal__close:focus-visible {
  color: var(--accent);

  border-color: rgba(76, 217, 255, 0.7);

  background: rgba(76, 217, 255, 0.08);

  box-shadow:
    0 0 16px rgba(76, 217, 255, 0.16);

  transform: rotate(90deg);
}


/* =========================================================
     OPEN ANIMATION
     ========================================================= */

.case-modal[open] {
  animation: caseModalIn 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes caseModalIn {
  from {
    opacity: 0;
    transform:
      translateY(18px) scale(0.97);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform:
      translateY(0) scale(1);
    filter: blur(0);
  }
}


/* =========================================================
     STAGGER THE DATA PANELS
     ========================================================= */

.case-modal[open] .case-list>div {
  animation: caseItemIn 360ms ease both;
}

.case-modal[open] .case-list>div:nth-child(1) {
  animation-delay: 60ms;
}

.case-modal[open] .case-list>div:nth-child(2) {
  animation-delay: 90ms;
}

.case-modal[open] .case-list>div:nth-child(3) {
  animation-delay: 120ms;
}

.case-modal[open] .case-list>div:nth-child(4) {
  animation-delay: 150ms;
}

.case-modal[open] .case-list>div:nth-child(5) {
  animation-delay: 180ms;
}

.case-modal[open] .case-list>div:nth-child(6) {
  animation-delay: 210ms;
}

.case-modal[open] .case-list>div:nth-child(7) {
  animation-delay: 240ms;
}

.case-modal[open] .case-list>div:nth-child(8) {
  animation-delay: 270ms;
}

.case-modal[open] .case-list>div:nth-child(9) {
  animation-delay: 300ms;
}

@keyframes caseItemIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =========================================================
     IMAGE VIEWER
     Reuse the same HUD language
     ========================================================= */

.image-viewer {
  width: min(900px, calc(100vw - 2rem));
}

.image-viewer #iv-img {
  display: block;

  width: 100%;
  max-height: 58vh;

  object-fit: contain;

  margin: 0.5rem 0 1rem;

  border: 1px solid rgba(76, 217, 255, 0.16);

  background:
    radial-gradient(circle,
      rgba(76, 217, 255, 0.05),
      rgba(5, 9, 14, 0.9));

  box-shadow:
    inset 0 0 30px rgba(76, 217, 255, 0.04);
}

.image-viewer .case-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  margin-top: 0.25rem;

  padding: 0.55rem 0.85rem;

  border: 1px solid rgba(76, 217, 255, 0.35);
  border-radius: 2px;

  background: rgba(76, 217, 255, 0.045);

  color: var(--accent);

  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;

  text-decoration: none;

  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.image-viewer .case-btn:hover,
.image-viewer .case-btn:focus-visible {
  background: rgba(76, 217, 255, 0.10);

  border-color: var(--accent);

  box-shadow:
    0 0 18px rgba(76, 217, 255, 0.12);
}


/* =========================================================
     MOBILE
     ========================================================= */

@media (max-width: 700px) {

  .case-modal {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
  }

  .case-modal__inner {
    max-height: calc(100vh - 1rem);
    padding: 1.65rem 1rem 1.25rem;
  }

  .case-modal h3 {
    padding-right: 2.8rem;
    font-size: 1.45rem;
  }

  .case-modal h3::before {
    font-size: 0.55rem;
  }

  .case-modal__meta {
    margin-bottom: 1.25rem;
  }

  .case-list {
    grid-template-columns: 1fr;
  }

  .case-list dd {
    font-size: 0.84rem;
  }

  .case-modal__close {
    top: 0.8rem;
    right: 0.75rem;

    width: 32px;
    height: 32px;
  }
}


/* =========================================================
     REDUCED MOTION
     ========================================================= */

@media (prefers-reduced-motion: reduce) {

  .case-modal::after,
  .case-modal h3::after,
  .case-modal[open],
  .case-modal[open] .case-list>div {
    animation: none;
  }

  .case-list>div,
  .case-modal__close {
    transition: none;
  }
}

/* =========================================================
   IMAGE PREVIEW // HUD VIEWER
   ========================================================= */

#imageModal {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: none;

  padding: 2rem;

  background:
    radial-gradient(circle at center,
      rgba(20, 55, 75, 0.16),
      rgba(3, 7, 12, 0.94));

  backdrop-filter: blur(8px);
}


/* =========================================================
   IMAGE FRAME
   ========================================================= */

#imageModal .modal-content {
  position: absolute;

  top: 50%;
  left: 50%;

  width: auto;
  height: auto;

  max-width: min(88vw, 1200px);
  max-height: 78vh;

  transform: translate(-50%, -50%);

  object-fit: contain;

  border: 1px solid rgba(76, 217, 255, 0.30);

  background:
    radial-gradient(circle at center,
      rgba(76, 217, 255, 0.035),
      rgba(7, 11, 17, 0.96));

  box-shadow:
    0 0 0 1px rgba(76, 217, 255, 0.04),
    0 0 35px rgba(76, 217, 255, 0.12),
    0 30px 100px rgba(0, 0, 0, 0.75);

  animation: imageViewerIn 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}


@keyframes imageViewerIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.96);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0);
  }
}


/* =========================================================
   HUD CORNER BRACKETS AROUND IMAGE
   ========================================================= */

#imageModal::before,
#imageModal::after {
  content: "";

  position: absolute;

  width: 42px;
  height: 42px;

  pointer-events: none;

  z-index: 2;
}

#imageModal::before {
  top: 1.2rem;
  left: 1.2rem;

  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);

  opacity: 0.65;
}

#imageModal::after {
  right: 1.2rem;
  bottom: 1.2rem;

  border-right: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);

  opacity: 0.65;
}


/* =========================================================
   CLOSE BUTTON
   ========================================================= */

#imageModal .close {
  position: fixed;

  top: 1.25rem;
  right: 1.35rem;

  z-index: 5;

  width: 38px;
  height: 38px;

  display: grid;
  place-items: center;

  border: 1px solid rgba(76, 217, 255, 0.25);
  border-radius: 2px;

  background: rgba(9, 15, 24, 0.80);

  color: var(--muted);

  font-family: "JetBrains Mono", monospace;
  font-size: 1.4rem;
  line-height: 1;

  cursor: pointer;

  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}


#imageModal .close:hover,
#imageModal .close:focus-visible {
  color: var(--accent);

  border-color: var(--accent);

  background: rgba(76, 217, 255, 0.08);

  box-shadow:
    0 0 18px rgba(76, 217, 255, 0.18);

  transform: rotate(90deg);
}


/* =========================================================
   IMAGE CAPTION
   ========================================================= */

#imageModal #caption {
  position: absolute;

  left: 50%;
  bottom: 1.35rem;

  transform: translateX(-50%);

  max-width: min(80vw, 900px);

  padding: 0.55rem 0.9rem;

  border: 1px solid rgba(76, 217, 255, 0.18);

  background: rgba(7, 12, 18, 0.88);

  color: var(--text);

  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-align: center;

  box-shadow:
    0 0 18px rgba(76, 217, 255, 0.06);

  backdrop-filter: blur(6px);
}


/* =========================================================
   SMALL HUD TELEMETRY
   ========================================================= */

#imageModal #caption::before {
  content: "VISUAL // PREVIEW";

  display: block;

  margin-bottom: 0.25rem;

  color: var(--accent);

  font-size: 0.55rem;
  letter-spacing: 0.14em;

  opacity: 0.65;
}




/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

  #imageModal {
    padding: 1rem;
  }

  #imageModal .modal-content {
    max-width: 94vw;
    max-height: 76vh;
  }

  #imageModal .close {
    top: 0.75rem;
    right: 0.75rem;

    width: 34px;
    height: 34px;
  }

  #imageModal #caption {
    bottom: 0.8rem;

    max-width: 88vw;

    font-size: 0.6rem;
  }

  #imageModal::before {
    top: 0.7rem;
    left: 0.7rem;
  }

  #imageModal::after {
    right: 0.7rem;
    bottom: 0.7rem;
  }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  #imageModal,
  #imageModal .modal-content {
    animation: none;
  }

  #imageModal .close {
    transition: none;
  }
}

/* =========================================================
   IMAGE MODAL SCAN
   Same restrained two-line HUD treatment as the dialogs.
   ========================================================= */

#imageModal {
  overflow: hidden;
}

#imageModal .modal-scan {
  position: absolute;
  inset: -8%;
  z-index: 1;
  pointer-events: none;

  background:
    linear-gradient(to bottom,
      transparent 0%,
      transparent 24%,
      rgba(76, 217, 255, 0.045) 25%,
      rgba(76, 217, 255, 0.045) 25.12%,
      transparent 25.2%,
      transparent 74%,
      rgba(76, 217, 255, 0.028) 75%,
      rgba(76, 217, 255, 0.028) 75.12%,
      transparent 75.2%);

  background-size: 100% 100%;
  opacity: 0.45;
  animation: modalLines 2s ease-in-out infinite alternate;
}

#imageModal .modal-content,
#imageModal .close,
#imageModal #caption {
  z-index: 2;
}

/* The legacy .image-viewer is also a .case-modal, so it
   automatically receives the same moving scan treatment. */

@media (prefers-reduced-motion: reduce) {

  .case-modal::after,
  #imageModal .modal-scan {
    animation: none;
  }
}

/* =========================================================
   BOOT SCREEN — HUD ENVIRONMENT
   ========================================================= */

#boot {
  position: fixed;
  inset: 0;
  z-index: 99999;
  overflow: hidden;

  background:
    radial-gradient(circle at 50% 50%,
      rgba(76, 217, 255, 0.055) 0%,
      rgba(76, 217, 255, 0.018) 30%,
      transparent 65%),
    #070b11;
}

/* HUD grid + subtle vignette */
#boot::before {
  content: "";
  position: absolute;
  inset: -50%;

  background-image:
    linear-gradient(rgba(76, 217, 255, 0.045) 1px,
      transparent 1px),
    linear-gradient(90deg,
      rgba(76, 217, 255, 0.045) 1px,
      transparent 1px);

  background-size: 55px 55px;

  mask-image:
    radial-gradient(ellipse at center,
      black 0%,
      rgba(0, 0, 0, 0.7) 45%,
      transparent 78%);

  animation: bootGridDrift 16s linear infinite;

  pointer-events: none;
}

/* Central HUD reticle + crosshair */
#boot::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%);

  border: 1px solid rgba(76, 217, 255, 0.09);
  border-radius: 50%;

  box-shadow:
    0 0 0 55px rgba(76, 217, 255, 0.012),
    0 0 0 110px rgba(76, 217, 255, 0.008);

  pointer-events: none;
}

/* Horizontal + vertical targeting lines */
#boot {
  background-image:
    linear-gradient(90deg,
      transparent calc(50% - 180px),
      rgba(76, 217, 255, 0.035) calc(50% - 180px),
      rgba(76, 217, 255, 0.035) calc(50% - 179px),
      transparent calc(50% - 179px)),
    linear-gradient(90deg,
      transparent calc(50% + 180px),
      rgba(76, 217, 255, 0.035) calc(50% + 180px),
      rgba(76, 217, 255, 0.035) calc(50% + 181px),
      transparent calc(50% + 181px)),
    linear-gradient(transparent calc(50% - 180px),
      rgba(76, 217, 255, 0.035) calc(50% - 180px),
      rgba(76, 217, 255, 0.035) calc(50% - 179px),
      transparent calc(50% - 179px)),
    linear-gradient(transparent calc(50% + 180px),
      rgba(76, 217, 255, 0.035) calc(50% + 180px),
      rgba(76, 217, 255, 0.035) calc(50% + 181px),
      transparent calc(50% + 181px)),
    radial-gradient(circle at 50% 50%,
      rgba(76, 217, 255, 0.055),
      transparent 45%),
    #070b11;
}

/* Keep actual boot content above the HUD */
#boot-log,
#boot .boot__skip {
  position: relative;
  z-index: 5;
}

@keyframes bootGridDrift {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(55px, 55px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #boot::before {
    animation: none;
  }
}

/* =========================================================
   BOOT LOG — STABLE VISUAL CENTER
   ========================================================= */

#boot #boot-log {
  position: absolute !important;

  top: 50% !important;
  left: 50% !important;

  transform: translate(-50%, -50%) !important;

  width: 320px;
  min-height: 8.5em;

  margin: 0;
  box-sizing: border-box;

  white-space: pre-wrap;
  text-align: left;

  font: 500 0.95rem/1.8 var(--font-mono);
  color: var(--accent);

  z-index: 5;
}