/* ==========================================================================
   ROUTE 07 // GOLDEN LINE TRANSIT & ENGINEERING BLUEPRINT STYLESHEET
   Palette: Warm Technical Vellum (#f6ecd8), Deep Pine-Teal Ink (#123b3a),
            Maritime Night Abyss (#081624), Signal Amber (#e8a24a),
            High-Voltage Vermilion (#dd6b4d), Active Line Teal (#2e6f6a)
   ========================================================================== */

/* 1. SELF-HOSTED TYPOGRAPHY (@font-face matching bus-game/index.html) */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('vendor/fonts/barlow-condensed-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('vendor/fonts/barlow-condensed-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('vendor/fonts/barlow-condensed-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('vendor/fonts/barlow-condensed-800.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('vendor/fonts/dm-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('vendor/fonts/dm-sans-500.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('vendor/fonts/dm-sans-700.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('JetBrains Mono'), local('JetBrainsMono NF'), url('vendor/fonts/JetBrainsMono-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: local('JetBrains Mono SemiBold'), local('JetBrainsMono NF SemiBold'), url('vendor/fonts/JetBrainsMono-SemiBold.ttf') format('truetype');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('JetBrains Mono Bold'), local('JetBrainsMono NF Bold'), url('vendor/fonts/JetBrainsMono-Bold.ttf') format('truetype');
}

/* 2. DESIGN SYSTEM TOKENS */
:root {
  --paper: #f6ecd8;
  --paper-2: #efe2c8;
  --paper-3: #e4d4b4;
  --ink: #123b3a;
  --ink-2: #2d5b55;
  --ink-3: #5c756e;
  --abyss: #081624;
  --abyss-2: #0d2235;
  --accent: #e8a24a;
  --accent-dark: #b8731e;
  --coral: #dd6b4d;
  --teal: #2e6f6a;

  --font-display: 'Barlow Condensed', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --topbar-h: 62px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --card-surface: linear-gradient(180deg, rgba(249, 241, 225, 0.97) 0%, rgba(240, 228, 204, 0.94) 100%);
  --card-border: 1px solid rgba(18, 59, 58, 0.14);
  --card-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  --shadow-vellum: 0 16px 38px rgba(8, 22, 36, 0.12), 0 3px 10px rgba(8, 22, 36, 0.06);
  --shadow-hud: 0 18px 42px rgba(5, 16, 28, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

/* 3. BASE RESET & DOCUMENT SCAFFOLDING */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(18, 59, 58, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 59, 58, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 18% 0%, rgba(232, 162, 74, 0.14), transparent 48%),
    radial-gradient(circle at 85% 20%, rgba(46, 111, 106, 0.10), transparent 52%);
  background-size: 36px 36px, 36px 36px, 100% 100%, 100% 100%;
  color: var(--ink);
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--abyss);
}

img,
canvas,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

/* ==========================================================================
   4. TOPBAR NAVIGATION & TOOLBAR (#topbar)
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 20px;
  background: rgba(8, 22, 36, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(232, 162, 74, 0.28);
  color: var(--paper);
  box-shadow: 0 10px 28px rgba(4, 12, 20, 0.32);
}

.topbar-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.topbar-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.route-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent) 0%, var(--coral) 100%);
  color: #fffaf0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(221, 107, 77, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.route-badge-sm {
  width: 30px;
  height: 30px;
  font-size: 16px;
  border-radius: 8px;
}

.topbar-brand-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.topbar-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.06em;
  color: var(--paper);
  text-transform: uppercase;
}

.topbar-subtitle {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-top: 2px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: nowrap;
  justify-content: center;
  overflow-x: auto;
}

.top-nav a,
.nav-link {
  padding: 5px 8px;
  border-radius: 7px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(246, 236, 216, 0.78);
  border: 1px solid transparent;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
  white-space: nowrap;
}

.top-nav a:hover,
.nav-link:hover {
  color: var(--paper);
  background: rgba(246, 236, 216, 0.08);
}

.top-nav a.is-active,
.nav-link.is-active {
  color: var(--abyss);
  background: var(--paper);
  border-color: var(--accent);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.chip-group {
  display: inline-flex;
  align-items: center;
  background: rgba(13, 34, 53, 0.85);
  border: 1px solid rgba(246, 236, 216, 0.16);
  border-radius: 9px;
  padding: 2px;
  gap: 2px;
}

.chip-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(246, 236, 216, 0.82);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.chip-btn:hover {
  color: #ffffff;
  background: rgba(246, 236, 216, 0.1);
}

.chip-btn.is-active {
  background: var(--accent);
  color: var(--abyss);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 8px rgba(232, 162, 74, 0.3);
}

#btn-audio {
  background: rgba(13, 34, 53, 0.85);
  border: 1px solid rgba(246, 236, 216, 0.18);
  padding: 6px 11px;
}

#btn-audio.is-active {
  background: var(--teal);
  color: var(--paper);
  border-color: var(--accent);
}

/* Shared Buttons */
.btn-amber,
.btn-vellum,
.btn-outline-ink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, border-color 0.14s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-amber {
  background: linear-gradient(135deg, var(--accent) 0%, var(--coral) 100%);
  color: #fffdf7;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 20px rgba(221, 107, 77, 0.32);
}

.btn-amber:hover {
  transform: translateY(-1px);
  box-shadow: 0 11px 24px rgba(221, 107, 77, 0.44);
}

.btn-vellum {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid rgba(18, 59, 58, 0.22);
  box-shadow: 0 4px 12px rgba(8, 22, 36, 0.08);
}

.btn-vellum:hover {
  background: var(--paper-2);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
}

.btn-outline-ink {
  background: rgba(18, 59, 58, 0.06);
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.btn-outline-ink:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
}

.btn-lg {
  font-size: 15px;
  padding: 11px 18px;
  border-radius: 11px;
}

.btn-sm {
  font-size: 12.5px;
  padding: 6px 11px;
  border-radius: 8px;
}

/* ==========================================================================
   5. STAGE SECTION: 3D WEBGL VIEWPORT & TELEMETRY HUD (#stage-section)
   ========================================================================== */
.stage-section {
  position: relative;
  width: 100%;
  background: var(--abyss);
  border-bottom: 3px solid var(--accent);
}

.stage-viewport {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--topbar-h));
  min-height: 620px;
  max-height: 980px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #163850 0%, var(--abyss) 80%);
  user-select: none;
}

#world-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#world-canvas:active {
  cursor: grabbing;
}

.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(ellipse at center, transparent 52%, rgba(5, 14, 24, 0.42) 100%),
    linear-gradient(180deg, rgba(6, 16, 28, 0.26) 0%, transparent 18%, transparent 80%, rgba(6, 16, 28, 0.42) 100%);
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* 3D Projected Station Pins Layer */
.station-pins-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  overflow: hidden;
}

.station-pin,
.world-station-pin {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  background: rgba(8, 22, 36, 0.86);
  border: 1px solid rgba(232, 162, 74, 0.55);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(4, 12, 20, 0.48);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.station-pin:hover,
.world-station-pin:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--accent);
  z-index: 12;
}

.station-pin.is-active,
.world-station-pin.is-active {
  background: linear-gradient(135deg, var(--paper) 0%, var(--paper-2) 100%);
  color: var(--ink);
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 162, 74, 0.32), 0 10px 24px rgba(4, 12, 20, 0.55);
  z-index: 10;
}

.station-pin .pin-num,
.station-pin .pin-code,
.world-station-pin .pin-num,
.world-station-pin .pin-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--abyss);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.station-pin.is-active .pin-num,
.station-pin.is-active .pin-code {
  background: var(--coral);
  color: #fff;
}

.station-pin .pin-title,
.station-pin .pin-label {
  max-width: 165px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* HUD Overlay Structure */
.stage-hud {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 18px;
  gap: 12px;
}

.hud-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  pointer-events: none;
}

.hud-bottom-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  pointer-events: none;
}

.hud-card {
  pointer-events: auto;
  background: var(--card-surface);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  box-shadow: var(--shadow-hud);
  color: var(--ink);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Top-Left Telemetry Card (#hud-telemetry) */
.hud-telemetry-card {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 390px;
  max-width: 500px;
}

.hud-telemetry-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hud-metric-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hud-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.hud-clock-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hud-clock-val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
  color: var(--ink);
}

.hud-phase-chip {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(232, 162, 74, 0.24);
  color: var(--accent-dark);
  border: 1px solid rgba(184, 115, 30, 0.3);
}

.hud-metric-val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  line-height: 1.1;
  color: var(--ink);
}

.hud-mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
}

.hud-metric-divider {
  width: 1px;
  height: 28px;
  background: rgba(18, 59, 58, 0.14);
}

.hud-camera-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 7px;
  border-top: 1px solid rgba(18, 59, 58, 0.11);
}

.hud-cam-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.hud-cam-btn,
.hud-mini-btn {
  appearance: none;
  border: 1px solid rgba(18, 59, 58, 0.16);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.hud-cam-btn:hover,
.hud-mini-btn:hover {
  background: var(--paper-2);
  color: var(--ink);
  border-color: var(--ink-2);
}

.hud-cam-btn.is-active,
.hud-mini-btn.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* Top-Center Route Strip Card (#hud-route-strip) */
.hud-route-card {
  flex: 1;
  max-width: 640px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hud-route-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hud-route-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.hud-route-titles {
  min-width: 0;
}

.hud-station-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.04em;
  line-height: 1.05;
  color: var(--ink);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-station-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-stop-counter {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  background: rgba(18, 59, 58, 0.07);
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid rgba(18, 59, 58, 0.12);
  flex-shrink: 0;
}

.hud-stop-counter b {
  color: var(--coral);
  font-weight: 700;
}

/* 7-Dot Route Progress Track (#hud-route-track) */
.hud-route-track {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.hud-route-track::before {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(18, 59, 58, 0.15);
}

.hud-route-fill {
  position: absolute;
  left: 14px;
  top: 50%;
  height: 4px;
  width: 0%;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--accent), var(--coral));
  transition: width 0.25s ease;
  z-index: 1;
}

.stop-dot {
  position: relative;
  z-index: 2;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid rgba(18, 59, 58, 0.32);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.stop-dot span {
  pointer-events: none;
}

.stop-dot:hover {
  transform: scale(1.15);
  border-color: var(--accent-dark);
  color: var(--ink);
}

.stop-dot.is-passed {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--paper);
}

.stop-dot.is-active {
  background: var(--coral);
  border-color: #fffaf0;
  color: #fffaf0;
  transform: scale(1.22);
  box-shadow: 0 0 0 4px rgba(221, 107, 77, 0.28);
}

.hud-route-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid rgba(18, 59, 58, 0.1);
}

.hud-step-btn {
  appearance: none;
  border: 1px solid rgba(18, 59, 58, 0.18);
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.hud-step-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.hud-control-hint {
  font-size: 11px;
  color: var(--ink-3);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Bottom-Left Active Station & Identity Inspector (#hud-inspector) */
.hud-inspector-card {
  width: 440px;
  max-width: calc(100vw - 280px);
  max-height: 390px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: max-height 0.22s ease, opacity 0.2s ease;
}

#hud-inspector .hud-insp-kicker {
  color: var(--accent-dark);
}

#hud-inspector .hud-insp-title {
  color: var(--ink);
}

#hud-inspector .hud-insp-sub,
#hud-inspector .hud-insp-summary {
  color: var(--ink-2);
}

#hud-inspector .hud-insp-pill {
  background: rgba(18, 59, 58, 0.08);
  color: var(--ink);
  border-color: rgba(18, 59, 58, 0.22);
}

#hud-inspector .hud-insp-btn {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

#hud-inspector .hud-insp-btn:hover {
  background: var(--teal);
  color: var(--paper);
  border-color: var(--teal);
}

#hud-inspector .hud-insp-btn.is-primary {
  background: var(--accent);
  color: var(--abyss);
  border-color: var(--accent-dark);
}

#hud-inspector .hud-insp-btn.is-primary:hover {
  background: var(--coral);
  color: #fffaf0;
  border-color: var(--coral);
}

.hud-inspector-card.is-collapsed,
.stage-hud.is-minimized .hud-inspector-body {
  display: none;
}

.hud-inspector-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(18, 59, 58, 0.06);
  border-bottom: 1px solid rgba(18, 59, 58, 0.12);
}

.hud-inspector-tab-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inspector-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.inspector-tab:hover {
  background: rgba(18, 59, 58, 0.08);
  color: var(--ink);
}

.inspector-tab.is-active {
  background: var(--ink);
  color: var(--paper);
}

.hud-minimize-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(18, 59, 58, 0.2);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hud-minimize-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.hud-inspector-body {
  padding: 11px 14px;
  overflow-y: auto;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Inspector Dynamic Content Elements */
.inspector-station-head,
.inspector-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.inspector-code-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--ink);
  color: var(--accent);
  text-transform: uppercase;
}

.inspector-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.1;
  color: var(--ink);
  text-transform: uppercase;
}

.inspector-sub {
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 600;
}

.inspector-summary {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
}

.inspector-metrics-row,
.inspector-specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.inspector-metric-chip,
.inspector-spec-item {
  background: rgba(18, 59, 58, 0.06);
  border: 1px solid rgba(18, 59, 58, 0.12);
  border-radius: 7px;
  padding: 5px 7px;
}

.inspector-metric-chip span,
.inspector-spec-item span {
  display: block;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.inspector-metric-chip strong,
.inspector-spec-item strong {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink);
}

.inspector-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 2px;
}

/* Bottom-Right Radar Minimap Card (#hud-minimap-card) */
.hud-minimap-card {
  width: 214px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.hud-minimap-head,
.hud-minimap-foot {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.minimap-north {
  color: var(--coral);
  font-family: var(--font-mono);
}

.hud-minimap-canvas-wrap {
  width: 176px;
  height: 176px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(18, 59, 58, 0.22);
  background: var(--abyss);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.45);
}

#minimap-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ==========================================================================
   6. MAIN SCROLLABLE DOSSIER & SECTION HEADERS (#dossier-main)
   ========================================================================== */
.dossier-main {
  position: relative;
  z-index: 20;
  padding-bottom: 48px;
}

.dossier-section {
  padding: 64px 0 24px;
  position: relative;
}

.dossier-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 2px solid rgba(18, 59, 58, 0.14);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.section-index-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--accent);
}

.section-kicker {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.06;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-transform: uppercase;
}

.section-sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 900px;
}

/* ==========================================================================
   7. HERO / EXECUTIVE ENGINEERING BANNER (#hero-banner)
   ========================================================================== */
.hero-banner-section {
  padding-top: 36px;
}

.hero-card {
  background: var(--card-surface);
  border: 1.5px solid rgba(18, 59, 58, 0.18);
  border-radius: 22px;
  padding: 34px 36px;
  box-shadow: var(--shadow-vellum), var(--card-highlight);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--ink) 0%, var(--teal) 35%, var(--accent) 70%, var(--coral) 100%);
}

.hero-blueprint-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 32px;
  align-items: center;
}

.hero-kicker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(38px, 4.6vw, 62px);
  line-height: 0.98;
  letter-spacing: 0.03em;
  color: var(--ink);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.25;
  color: var(--teal);
  margin-bottom: 14px;
}

.hero-lead {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-2);
  margin-bottom: 18px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(18, 59, 58, 0.07);
  color: var(--ink);
  border: 1px solid rgba(18, 59, 58, 0.16);
}

.tech-badge-amber {
  background: rgba(232, 162, 74, 0.22);
  border-color: rgba(184, 115, 30, 0.4);
  color: var(--ink);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat-box {
  background: rgba(255, 252, 245, 0.72);
  border: 1px solid rgba(18, 59, 58, 0.16);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.stat-box:hover {
  transform: translateY(-2px);
  border-color: var(--accent-dark);
}

.stat-box-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.stat-box-code {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-3);
}

.stat-box-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(232, 162, 74, 0.25);
  color: var(--accent-dark);
}

.stat-box-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  line-height: 1;
  color: var(--ink);
}

.stat-box-value small {
  font-size: 15px;
  font-weight: 700;
  color: var(--coral);
  letter-spacing: 0.05em;
}

.stat-box-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-box-meta {
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-2);
}

/* ==========================================================================
   8. SECTION 01: 7 ARCHITECTURAL PAVILIONS (#stations-section)
   ========================================================================== */
.stations-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding: 10px 14px;
  background: var(--paper-2);
  border: 1px solid rgba(18, 59, 58, 0.14);
  border-radius: 14px;
}

.station-jump-btn,
.station-filter-btn {
  appearance: none;
  border: 1px solid rgba(18, 59, 58, 0.18);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 7px 13px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s ease;
}

.station-jump-btn:hover,
.station-filter-btn:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.station-jump-btn.is-active,
.station-filter-btn.is-active {
  background: var(--ink);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(18, 59, 58, 0.22);
}

.stations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.station-card {
  background: var(--card-surface);
  border: 1.5px solid rgba(18, 59, 58, 0.16);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-vellum), var(--card-highlight);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.station-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-dark);
}

.station-card.is-active {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(232, 162, 74, 0.22), var(--shadow-vellum);
}

.station-card-featured,
.station-card:first-child {
  grid-column: 1 / -1;
}

.station-card-media {
  position: relative;
  height: 220px;
  background: var(--abyss);
  overflow: hidden;
  border-bottom: 1px solid rgba(18, 59, 58, 0.15);
}

.station-card-featured .station-card-media,
.station-card:first-child .station-card-media {
  height: 290px;
}

.station-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.station-card:hover .station-card-media img {
  transform: scale(1.03);
}

.station-card-overlay-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.station-code-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 7px;
  background: rgba(8, 22, 36, 0.9);
  color: var(--accent);
  border: 1px solid rgba(232, 162, 74, 0.5);
  backdrop-filter: blur(6px);
}

.station-cat-badge {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 7px;
  background: rgba(246, 236, 216, 0.94);
  color: var(--ink);
}

.station-thumbs-strip {
  position: absolute;
  bottom: 10px;
  right: 12px;
  display: flex;
  gap: 6px;
}

.station-thumb-btn {
  width: 46px;
  height: 30px;
  border-radius: 5px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 0;
  background: var(--abyss);
}

.station-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.station-card-body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.station-card-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.station-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1.08;
  color: var(--ink);
  text-transform: uppercase;
}

.station-card-sub {
  font-size: 14px;
  font-weight: 600;
  color: var(--teal);
}

.station-card-path {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-3);
  background: rgba(18, 59, 58, 0.06);
  padding: 3px 8px;
  border-radius: 6px;
  align-self: flex-start;
}

.station-card-summary {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
}

.station-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 8px;
}

.station-metric-box {
  background: rgba(255, 252, 245, 0.75);
  border: 1px solid rgba(18, 59, 58, 0.13);
  border-radius: 10px;
  padding: 8px 10px;
}

.station-metric-label {
  display: block;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.station-metric-val {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.station-arch-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(18, 59, 58, 0.04);
  border: 1px solid rgba(18, 59, 58, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
}

.station-arch-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  padding-bottom: 5px;
  border-bottom: 1px dashed rgba(18, 59, 58, 0.12);
}

.station-arch-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.station-arch-mod {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink);
}

.station-arch-role {
  color: var(--ink-2);
  flex: 1;
}

.station-arch-loc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-dark);
  font-weight: 700;
  white-space: nowrap;
}

.station-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  color: var(--ink-2);
}

.station-highlights li {
  position: relative;
  padding-left: 16px;
}

.station-highlights li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--coral);
  font-weight: 700;
}

.station-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.station-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(18, 59, 58, 0.07);
  color: var(--ink-2);
  border: 1px solid rgba(18, 59, 58, 0.12);
}

.station-card-actions {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(18, 59, 58, 0.12);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==========================================================================
   9. SECTION 02: LIVE LABS WRAPPERS (#labs-section)
   ========================================================================== */
.lab-mount-wrapper {
  margin-bottom: 28px;
}

.lab-mount-wrapper:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   10. SECTION 03: ELEKTROTECHNIK & DUALES STUDIUM 2027 (#uni-section)
   ========================================================================== */
.uni-pitch-mount {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 28px;
}

.uni-pitch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.uni-pitch-card {
  background: var(--card-surface);
  border: 1.5px solid rgba(18, 59, 58, 0.16);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: var(--shadow-vellum), var(--card-highlight);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.uni-pitch-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--accent));
}

.uni-pitch-card h3,
.uni-pitch-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  line-height: 1.15;
  color: var(--ink);
  text-transform: uppercase;
}

.uni-pitch-card p,
.uni-pitch-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
}

.uni-credentials-strip {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
}

.uni-cred-panel,
.uni-lang-panel {
  background: var(--card-surface);
  border: 1.5px solid rgba(18, 59, 58, 0.16);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--shadow-vellum);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(18, 59, 58, 0.12);
}

.lang-matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.lang-card {
  background: rgba(255, 252, 245, 0.78);
  border: 1px solid rgba(18, 59, 58, 0.14);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lang-level-badge {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--accent);
}

.lang-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  color: var(--ink);
  text-transform: uppercase;
}

.lang-detail {
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-2);
}

.cred-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cred-item {
  background: rgba(255, 252, 245, 0.78);
  border: 1px solid rgba(18, 59, 58, 0.14);
  border-radius: 10px;
  padding: 10px 12px;
}

.cred-item span {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.cred-item strong {
  font-size: 13.5px;
  color: var(--ink);
}

/* ==========================================================================
   11. SECTION 04: VERIFIABLE SOURCE CODE VAULT (#code-section)
   ========================================================================== */
.code-vault-mount {
  background: var(--card-surface);
  border: 1.5px solid rgba(18, 59, 58, 0.18);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-vellum);
}

.code-vault-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--paper-2);
  border-bottom: 1px solid rgba(18, 59, 58, 0.15);
}

.code-tab-btn {
  appearance: none;
  border: 1px solid rgba(18, 59, 58, 0.18);
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 7px 13px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.14s ease;
}

.code-tab-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.code-tab-btn.is-active {
  background: var(--ink);
  color: var(--accent);
  border-color: var(--accent);
}

.code-vault-body {
  display: grid;
  grid-template-columns: 340px 1fr;
}

.code-vault-meta {
  padding: 22px;
  border-right: 1px solid rgba(18, 59, 58, 0.14);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.code-meta-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.1;
  color: var(--ink);
  text-transform: uppercase;
}

.code-meta-path {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-dark);
  background: rgba(232, 162, 74, 0.16);
  padding: 5px 9px;
  border-radius: 7px;
  word-break: break-all;
}

.code-meta-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

.code-meta-metrics {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.code-metric-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 5px 9px;
  border-radius: 7px;
  background: rgba(18, 59, 58, 0.07);
  color: var(--ink);
  border: 1px solid rgba(18, 59, 58, 0.12);
}

.code-vault-viewer {
  background: var(--abyss);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.code-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  background: var(--abyss-2);
  border-bottom: 1px solid rgba(246, 236, 216, 0.12);
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(246, 236, 216, 0.78);
}

.code-copy-btn {
  appearance: none;
  border: 1px solid rgba(232, 162, 74, 0.45);
  background: rgba(232, 162, 74, 0.15);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.code-copy-btn:hover {
  background: var(--accent);
  color: var(--abyss);
}

.code-pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  max-height: 520px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: #f4ead5;
  tab-size: 4;
}

/* ==========================================================================
   12. SECTION 05: SYSTEMS, HARDWARE RIG, TAILNET & CLOUD GPU (#systems-section)
   ========================================================================== */
.systems-mount {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.systems-top-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
}

.sys-card {
  background: var(--card-surface);
  border: 1.5px solid rgba(18, 59, 58, 0.16);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: var(--shadow-vellum), var(--card-highlight);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sys-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(18, 59, 58, 0.14);
}

.sys-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--ink);
  text-transform: uppercase;
}

.sys-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sys-spec-box {
  background: rgba(255, 252, 245, 0.78);
  border: 1px solid rgba(18, 59, 58, 0.14);
  border-radius: 10px;
  padding: 10px 12px;
}

.sys-spec-label {
  display: block;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.sys-spec-val {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.tailnet-table-wrap {
  overflow-x: auto;
}

.tailnet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tailnet-table th,
.tailnet-table td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(18, 59, 58, 0.12);
}

.tailnet-table th {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: rgba(18, 59, 58, 0.05);
}

.tailnet-ip {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
}

.tailnet-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(46, 111, 106, 0.15);
  color: var(--teal);
  font-weight: 700;
}

.cloud-gpu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.cloud-gpu-card {
  background: rgba(255, 252, 245, 0.8);
  border: 1px solid rgba(18, 59, 58, 0.15);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ==========================================================================
   13. SECTION 06: CHRONOLOGY & CONTACT (#journey-section)
   ========================================================================== */
.journey-mount {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 24px;
  align-items: start;
}

.journey-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  padding-left: 22px;
  border-left: 3px solid var(--accent);
}

.journey-item {
  background: var(--card-surface);
  border: 1.5px solid rgba(18, 59, 58, 0.16);
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: var(--shadow-vellum);
  position: relative;
}

.journey-item::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 20px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--coral);
  border: 2.5px solid var(--paper);
  box-shadow: 0 0 0 2px var(--accent-dark);
}

.journey-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.journey-date {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-dark);
  background: rgba(232, 162, 74, 0.2);
  padding: 2px 8px;
  border-radius: 6px;
}

.journey-loc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}

.journey-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  color: var(--ink);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.journey-detail {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

.contact-dispatch-card {
  background: var(--abyss);
  color: var(--paper);
  border: 1.5px solid var(--accent);
  border-radius: 18px;
  padding: 26px;
  box-shadow: var(--shadow-vellum);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--topbar-h) + 20px);
}

.contact-dispatch-card h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  color: var(--paper);
  text-transform: uppercase;
}

.contact-dispatch-card p {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(246, 236, 216, 0.82);
}

.contact-links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-row-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--abyss-2);
  border: 1px solid rgba(232, 162, 74, 0.28);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12.5px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.contact-row-link:hover {
  border-color: var(--accent);
  background: rgba(232, 162, 74, 0.14);
}

.contact-row-link span:first-child {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ==========================================================================
   14. FOOTER (.site-footer)
   ========================================================================== */
.site-footer {
  background: var(--abyss);
  color: var(--paper);
  border-top: 3px solid var(--accent);
  padding: 44px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(246, 236, 216, 0.14);
}

.footer-brand-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.05em;
  color: var(--paper);
}

.footer-brand-sub {
  font-size: 13px;
  color: var(--accent);
}

.footer-verification-note {
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(246, 236, 216, 0.78);
  margin-bottom: 16px;
  max-width: 580px;
}

.footer-contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: 8px;
  background: var(--abyss-2);
  border: 1px solid rgba(246, 236, 216, 0.16);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--paper);
  transition: border-color 0.14s ease;
}

.footer-contact-pill:hover {
  border-color: var(--accent);
}

.footer-pill-label {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.footer-col-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.shortcut-legend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(246, 236, 216, 0.85);
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--paper);
  color: var(--abyss);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  border-bottom: 2px solid var(--accent-dark);
}

.footer-bottom-bar {
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(246, 236, 216, 0.6);
}

/* ==========================================================================
   15. INTERACTIVE THEATER / APP MODAL (#app-modal)
   ========================================================================== */
.app-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 14, 24, 0.82);
  backdrop-filter: blur(8px);
}

.modal-dialog {
  position: relative;
  z-index: 2;
  width: min(1320px, 96vw);
  height: min(860px, 90vh);
  background: var(--paper);
  border: 2px solid var(--accent);
  border-radius: 18px;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: var(--abyss);
  color: var(--paper);
  border-bottom: 1px solid rgba(232, 162, 74, 0.35);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.modal-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--paper);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  appearance: none;
  border: 1px solid rgba(221, 107, 77, 0.6);
  background: var(--coral);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.modal-body {
  flex: 1;
  position: relative;
  background: var(--abyss);
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.modal-body img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ==========================================================================
   16. RESPONSIVE BREAKPOINTS (1440px, 1100px, 768px, 390px)
   ========================================================================== */
@media (max-width: 1200px) {
  .hero-blueprint-grid,
  .uni-credentials-strip,
  .systems-top-grid,
  .journey-mount,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .uni-pitch-grid,
  .cloud-gpu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .code-vault-body {
    grid-template-columns: 1fr;
  }

  .code-vault-meta {
    border-right: none;
    border-bottom: 1px solid rgba(18, 59, 58, 0.14);
  }
}

@media (max-width: 960px) {
  .topbar {
    flex-wrap: wrap;
    padding: 8px 14px;
  }

  .top-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .hud-top-row {
    flex-direction: column;
    align-items: stretch;
  }

  .hud-telemetry-card,
  .hud-route-card {
    max-width: 100%;
    min-width: 0;
  }

  .stations-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .stage-viewport {
    height: 680px;
    min-height: 580px;
  }

  .stage-hud {
    padding: 10px;
  }

  .hud-minimap-card {
    width: 146px;
    padding: 6px 8px;
  }

  .hud-minimap-canvas-wrap {
    width: 118px;
    height: 118px;
  }

  .hud-inspector-card {
    width: calc(100% - 156px);
    max-width: none;
    max-height: 220px;
  }

  .hero-card {
    padding: 22px 20px;
  }

  .hero-stats-grid,
  .uni-pitch-grid,
  .lang-matrix-grid,
  .cred-list,
  .sys-specs-grid,
  .cloud-gpu-grid,
  .shortcut-legend-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .dossier-container {
    padding: 0 14px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  #phase-switcher {
    display: none;
  }

  .hud-bottom-row {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .hud-minimap-card {
    display: none;
  }

  .hud-inspector-card {
    width: 100%;
    max-height: 205px;
  }

  .hud-metric-fps {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   17. DEVELOPER EDITORIAL POSTER & TORN-PAPER 3D RIFT HERO (#poster-hero-section)
   ========================================================================== */
.poster-hero-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f3efe6;
  color: #111618;
  border-bottom: 2px solid #111618;
}

.poster-paper-sheet {
  position: relative;
  background-color: #f3efe6;
  background-image:
    linear-gradient(to right, rgba(17, 22, 24, 0.075) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(17, 22, 24, 0.075) 1px, transparent 1px),
    linear-gradient(to right, rgba(17, 22, 24, 0.032) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(17, 22, 24, 0.032) 1px, transparent 1px),
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.65), transparent 55%),
    radial-gradient(circle at 82% 75%, rgba(215, 206, 188, 0.38), transparent 55%);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px, 100% 100%, 100% 100%;
  padding: 36px 0 28px;
}

.poster-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Masthead: Kicker + PORTF [EMBLEM] LIO */
.poster-masthead {
  text-align: center;
  margin-bottom: 28px;
}

.poster-kicker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 980px;
  margin: 0 auto 2px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(13px, 1.4vw, 18px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #111618;
}

.poster-wordmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 0.8vw, 12px);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(64px, 11.4vw, 152px);
  line-height: 0.86;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: #101416;
  margin: 0 auto;
  user-select: none;
}

.poster-word-left,
.poster-word-right {
  display: inline-block;
  transform: scaleX(1.06);
}

.poster-emblem-slot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(68px, 9.6vw, 132px);
  height: clamp(82px, 11.2vw, 154px);
  margin: 0 4px;
}

.poster-emblem-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: contrast(1.12);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.poster-emblem-slot:hover .poster-emblem-img {
  transform: scale(1.07) rotate(-3deg);
}

.poster-emblem-arrow {
  position: absolute;
  bottom: -44px;
  left: 50%;
  transform: translateX(-36%);
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  pointer-events: none;
}

.poster-emblem-arrow svg {
  width: 54px;
  height: 42px;
}

.poster-hand-note {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #111618;
  white-space: nowrap;
  transform: rotate(-6deg) translateY(-4px);
}

.poster-ornament-bar {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.poster-ornament-icons {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-size: 24px;
  color: #111618;
}

.ornament-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(17, 22, 24, 0.06);
  border: 1.5px solid rgba(17, 22, 24, 0.22);
  font-size: 17px;
}

.poster-quick-jumps {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.poster-jump-pill {
  appearance: none;
  border: 1.5px solid #111618;
  background: #ffffff;
  color: #111618;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.16s ease;
  box-shadow: 2px 2px 0 #111618;
}

.poster-jump-pill:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #ef1e26;
  border-color: #ef1e26;
}

.poster-jump-primary {
  background: #111618;
  color: #f3efe6;
  border-color: #111618;
  box-shadow: 3px 3px 0 #ef1e26;
}

.poster-jump-primary:hover {
  background: #ef1e26;
  color: #ffffff;
  border-color: #111618;
  box-shadow: 4px 4px 0 #111618;
}

/* 3-Column Editorial Grid */
.poster-three-col {
  display: grid;
  grid-template-columns: 300px minmax(0, 1.35fr) 320px;
  gap: 34px;
  align-items: start;
  margin-top: 12px;
}

/* Left Column: CAD Bounding Box with 8 Red Selection Handles */
.poster-col-figure {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cad-frame-toolbar {
  display: flex;
  gap: 4px;
}

.cad-mode-btn {
  flex: 1;
  appearance: none;
  border: 1.5px solid rgba(17, 22, 24, 0.3);
  background: rgba(255, 255, 255, 0.8);
  color: #111618;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cad-mode-btn.is-active {
  background: #ef1e26;
  border-color: #ef1e26;
  color: #ffffff;
}

.cad-selection-box {
  position: relative;
  border: 2px solid #ef1e26;
  background: #e9e6df;
  padding: 6px;
  box-shadow: 0 14px 32px rgba(17, 22, 24, 0.12);
}

.cad-handle {
  position: absolute;
  width: 9px;
  height: 9px;
  background: #ffffff;
  border: 2px solid #ef1e26;
  z-index: 5;
}

.cad-h-tl { top: -5px; left: -5px; }
.cad-h-tc { top: -5px; left: calc(50% - 4.5px); }
.cad-h-tr { top: -5px; right: -5px; }
.cad-h-ml { top: calc(50% - 4.5px); left: -5px; }
.cad-h-mr { top: calc(50% - 4.5px); right: -5px; }
.cad-h-bl { bottom: -5px; left: -5px; }
.cad-h-bc { bottom: -5px; left: calc(50% - 4.5px); }
.cad-h-br { bottom: -5px; right: -5px; }

.cad-coord-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  background: rgba(17, 22, 24, 0.84);
  color: #f3efe6;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  padding: 3px 7px;
  border-left: 2.5px solid #ef1e26;
  letter-spacing: 0.04em;
}

.cad-figure-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #dcd8cf;
}

.cad-figure-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.28s ease, filter 0.35s ease;
}

.cad-figure-img.is-visible {
  opacity: 1;
}

/* X-Ray Silhouette Bloom Mode (Inspired by Image 2) */
.cad-selection-box[data-mode="xray"] .cad-figure-img.is-visible {
  filter: invert(1) brightness(1.55) contrast(2.4) drop-shadow(0 0 18px #38bdf8);
}

.cad-xray-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.42), rgba(56, 189, 248, 0.18) 48%, transparent 75%),
    repeating-linear-gradient(0deg, rgba(17, 22, 24, 0.08) 0px, rgba(17, 22, 24, 0.08) 1px, transparent 1px, transparent 4px);
  transition: opacity 0.25s ease;
}

.cad-selection-box[data-mode="xray"] .cad-xray-overlay {
  opacity: 1;
}

.cad-xray-scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ef1e26, #38bdf8, transparent);
  box-shadow: 0 0 12px #38bdf8;
  animation: cadScan 2.6s ease-in-out infinite;
}

@keyframes cadScan {
  0%, 100% { top: 6%; }
  50% { top: 92%; }
}

.cad-xray-telemetry {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  background: rgba(17, 22, 24, 0.88);
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 5px 8px;
  display: flex;
  justify-content: space-between;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

/* Center Column: HELLO + EDUCATION */
.poster-col-bio {
  padding-top: 2px;
}

.poster-sec-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #ef1e26;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.poster-hello-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(46px, 5.4vw, 68px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #111618;
  margin-bottom: 12px;
}

.poster-hello-lead {
  font-size: 15px;
  font-weight: 700;
  color: #111618;
  margin-bottom: 10px;
  line-height: 1.45;
}

.poster-hello-body {
  font-size: 13.5px;
  line-height: 1.58;
  color: #262e33;
  margin-bottom: 10px;
}

.poster-hello-body code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(17, 22, 24, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
}

.poster-edu-block {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 2px solid #111618;
}

.poster-sub-heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #111618;
  margin-bottom: 8px;
}

.poster-edu-title {
  font-weight: 700;
  font-size: 14px;
  color: #111618;
}

.poster-edu-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #455056;
  margin-top: 2px;
  margin-bottom: 10px;
}

.poster-edu-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.poster-stat-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  background: #ffffff;
  border: 1.5px solid #111618;
  padding: 4px 8px;
  border-radius: 6px;
  color: #111618;
}

.poster-stat-pill b {
  color: #ef1e26;
}

/* Right Column: DEV STACK TILES + EXPERIENCE */
.dev-skill-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.dev-tile {
  aspect-ratio: 1 / 0.88;
  border-radius: 13px;
  background: #12171c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: 2px solid #26313a;
  box-shadow: 0 6px 14px rgba(17, 22, 24, 0.14);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.dev-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(17, 22, 24, 0.22);
}

.dev-tile-code {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.dev-tile-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(243, 239, 230, 0.76);
  margin-top: 4px;
}

.dev-tile-gl { border-color: #e8a24a; color: #e8a24a; background: linear-gradient(145deg, #1d160c, #11161b); }
.dev-tile-c  { border-color: #38bdf8; color: #38bdf8; background: linear-gradient(145deg, #0b1c29, #11161b); }
.dev-tile-py { border-color: #facc15; color: #facc15; background: linear-gradient(145deg, #211c09, #11161b); }
.dev-tile-go { border-color: #2dd4bf; color: #2dd4bf; background: linear-gradient(145deg, #09211f, #11161b); }
.dev-tile-kt { border-color: #fb7185; color: #fb7185; background: linear-gradient(145deg, #261017, #11161b); }
.dev-tile-ee { border-color: #ef1e26; color: #ef1e26; background: linear-gradient(145deg, #290d10, #11161b); }

.poster-exp-heading {
  padding-top: 12px;
  border-top: 2px solid #111618;
}

.poster-exp-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.poster-exp-item {
  padding-left: 10px;
  border-left: 3px solid #ef1e26;
}

.poster-exp-year {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: #111618;
}

.poster-exp-role {
  font-weight: 700;
  font-size: 13.5px;
  color: #111618;
  line-height: 1.25;
}

.poster-exp-org {
  font-size: 12px;
  color: #3c464d;
}

.poster-exp-desc {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #ef1e26;
  margin-top: 1px;
}

/* ==========================================================================
   MIDDLE RIFT: TORN PAPER SEAM + KINETIC TICKER + STICKER PORTRAIT
   ========================================================================== */
.poster-torn-rift {
  position: relative;
  background:
    radial-gradient(circle at 50% 52%, rgba(239, 30, 38, 0.24), transparent 46%),
    radial-gradient(circle at 20% 35%, rgba(232, 162, 74, 0.12), transparent 50%),
    linear-gradient(180deg, #0b0e12 0%, #11161d 50%, #090c10 100%);
  min-height: 410px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  padding: 36px 0 28px;
}

.torn-edge {
  position: absolute;
  left: 0;
  width: 100%;
  height: 64px;
  z-index: 3;
  pointer-events: none;
}

.torn-edge-top {
  top: -1px;
}

.torn-edge-bottom {
  bottom: -1px;
}

/* Tilted Giant Kinetic Ticker Behind Portrait */
.rift-marquee-wrap {
  position: absolute;
  left: -8%;
  right: -8%;
  top: 50%;
  transform: translateY(-50%) rotate(-3.5deg);
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.94;
}

.rift-marquee-track {
  display: flex;
  width: max-content;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(54px, 7.6vw, 104px);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #f6f3ec;
  white-space: nowrap;
  animation: riftMarquee 26s linear infinite;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.65);
}

.rift-marquee-track span {
  padding-right: 40px;
}

@keyframes riftMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Center Cutout Sticker Stage */
.rift-portrait-stage {
  position: relative;
  z-index: 6;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 24px;
}

.rift-sticker-holder {
  position: relative;
  width: clamp(270px, 31vw, 415px);
  margin-top: -54px;
  margin-bottom: -36px;
  z-index: 8;
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.72));
}

.rift-sticker-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.rift-sticker-holder:hover .rift-sticker-img {
  transform: scale(1.025) translateY(-3px);
}

.rift-telemetry-left,
.rift-telemetry-right {
  background: rgba(11, 15, 20, 0.84);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(243, 239, 230, 0.18);
  border-radius: 12px;
  padding: 12px 15px;
  color: #f3efe6;
  margin-bottom: 24px;
}

.rift-tele-code {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #ef1e26;
  margin-bottom: 4px;
}

.rift-tele-val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.rift-tele-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(243, 239, 230, 0.72);
  margin-top: 2px;
}

.rift-sticker-switcher {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.sticker-opt-btn {
  appearance: none;
  border: 1px solid rgba(243, 239, 230, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #f3efe6;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sticker-opt-btn.is-active,
.sticker-opt-btn:hover {
  background: #ef1e26;
  border-color: #ef1e26;
  color: #ffffff;
}

/* ==========================================================================
   LOWER DRAFTING SHEET: THE LAB & 3D GALLERY POLAROID STRIP
   ========================================================================== */
.poster-lab-strip {
  padding: 24px 0 38px;
}

.poster-lab-head {
  text-align: center;
  margin-bottom: 20px;
}

.poster-lab-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #ef1e26;
  margin-bottom: 4px;
}

.poster-lab-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #111618;
}

.poster-polaroids-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: stretch;
}

.lab-polaroid {
  appearance: none;
  text-align: left;
  background: #ffffff;
  border: 1.5px solid #111618;
  padding: 10px 10px 14px;
  box-shadow: 0 12px 26px rgba(17, 22, 24, 0.14);
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.2s ease;
}

.polaroid-tilt-left { transform: rotate(-2.4deg); }
.polaroid-tilt-midleft { transform: rotate(1.4deg) translateY(4px); }
.polaroid-tilt-center { transform: rotate(-1.5deg); }
.polaroid-tilt-right { transform: rotate(2.2deg) translateY(2px); }

.lab-polaroid:hover {
  transform: rotate(0deg) translateY(-6px) scale(1.03);
  border-color: #ef1e26;
  box-shadow: 0 18px 34px rgba(239, 30, 38, 0.22);
  z-index: 4;
}

.polaroid-photo-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0d151c;
  margin-bottom: 9px;
  border: 1px solid rgba(17, 22, 24, 0.15);
}

.polaroid-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.polaroid-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(17, 22, 24, 0.88);
  color: #f3efe6;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-left: 2px solid #ef1e26;
}

.polaroid-caption strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #111618;
}

.polaroid-caption span {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #4b565e;
  margin-top: 2px;
}

@media (max-width: 1060px) {
  .poster-three-col {
    grid-template-columns: 260px 1fr;
  }
  .poster-col-stack {
    grid-column: 1 / -1;
  }
  .dev-skill-tiles {
    grid-template-columns: repeat(6, 1fr);
  }
  .rift-portrait-stage {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .rift-telemetry-left,
  .rift-telemetry-right {
    display: none;
  }
  .poster-polaroids-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .poster-three-col {
    grid-template-columns: 1fr;
  }
  .dev-skill-tiles {
    grid-template-columns: repeat(3, 1fr);
  }
  .poster-polaroids-row {
    grid-template-columns: 1fr;
  }
}
