/* ═══════════════════════════════════════════════════════════
   KAR-01 :: TELEMETRY OPERATOR PORTFOLIO
   Theme: DIGITAL_ABYSS / Cyberpunk Console
   ═══════════════════════════════════════════════════════════ */

:root {
  /* ─── Digital Abyss Palette ─── */
  --abyss:   #1C1C1C;
  --abyss-2: #0F0F0F;
  --abyss-3: #252525;
  --alert:   #FF3D00;
  --signal:  #00BFAE;
  --quantum: #8C1BFF;
  --beacon:  #FFD600;
  --bone:    #E8E8E8;
  --dim:     #6A6A6A;
  --line:    rgba(0, 191, 174, 0.18);
  --line-2:  rgba(255, 255, 255, 0.06);

  /* ─── Type ─── */
  --f-display: 'Major Mono Display', monospace;
  --f-ui:      'Share Tech Mono', monospace;
  --f-data:    'VT323', monospace;

  /* ─── Layout ─── */
  --top-h:     44px;
  --bottom-h:  28px;
  --side-w:    220px;
  --spec-w:    36px;

  /* ─── Parallax (set by JS) ─── */
  --px: 0;
  --py: 0;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
  background: var(--abyss-2);
  color: var(--bone);
  font-family: var(--f-ui);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0.02em;
  min-height: 100vh;
  cursor: crosshair;
  /* dotted grid base */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(0,191,174,0.08) 1px, transparent 0);
  background-size: 24px 24px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
ul, ol { list-style: none; }

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

/* ═══════════════════════════════════════════════════════════
   ATMOSPHERIC OVERLAYS
   ═══════════════════════════════════════════════════════════ */

.crt-scanlines {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9000;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.22) 3px,
    rgba(0, 0, 0, 0.22) 3px
  );
  mix-blend-mode: multiply;
}
.crt-flicker {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9001;
  background: rgba(0, 191, 174, 0.02);
  animation: flicker 5.2s infinite steps(1, end);
}
@keyframes flicker {
  0%, 92%, 100% { opacity: 1; }
  93% { opacity: 0.4; }
  94% { opacity: 0.9; }
  95% { opacity: 0.2; }
  96% { opacity: 1; }
}
.vignette {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 8999;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.6) 100%);
}
#rain-canvas {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════════
   BOOT SCREEN
   ═══════════════════════════════════════════════════════════ */

#boot-screen {
  position: fixed; inset: 0;
  background: var(--abyss-2);
  z-index: 9999;
  display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  padding: 8vw;
  font-family: var(--f-data);
  color: var(--signal);
  font-size: clamp(14px, 2.4vw, 22px);
  transition: opacity 0.25s ease-out;
}
#boot-screen.done { opacity: 0; pointer-events: none; }
#boot-text {
  white-space: pre-wrap;
  text-shadow: 0 0 8px rgba(0, 191, 174, 0.6);
}
.boot-cursor {
  display: inline-block;
  color: var(--signal);
  animation: blink 0.8s steps(1) infinite;
  margin-top: 0.4em;
}
@keyframes blink { 50% { opacity: 0; } }

/* ═══════════════════════════════════════════════════════════
   TOP BAR
   ═══════════════════════════════════════════════════════════ */

.top-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--top-h);
  z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 16px;
  background: linear-gradient(180deg, var(--abyss) 0%, rgba(28,28,28,0.92) 100%);
  border-bottom: 1px solid var(--line);
  font-family: var(--f-ui);
  font-size: 12px;
  letter-spacing: 0.08em;
  backdrop-filter: blur(6px);
}
.top-left, .top-right { display: flex; align-items: center; gap: 10px; }
.top-center { display: flex; align-items: baseline; gap: 8px; }
.callsign {
  color: var(--signal);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0, 191, 174, 0.5);
}
.divider { color: var(--dim); }
.muted { color: var(--dim); font-size: 11px; }
.mono-time {
  font-family: var(--f-data);
  font-size: 18px;
  color: var(--beacon);
  text-shadow: 0 0 8px rgba(255, 214, 0, 0.4);
  letter-spacing: 0.05em;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 10px var(--signal);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
.signal-bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 16px; }
.signal-bars span {
  display: block; width: 3px; background: var(--signal);
  box-shadow: 0 0 4px var(--signal);
  animation: barUp 1.4s ease-in-out infinite;
}
.signal-bars span:nth-child(1) { height: 30%; animation-delay: 0s; }
.signal-bars span:nth-child(2) { height: 50%; animation-delay: 0.1s; }
.signal-bars span:nth-child(3) { height: 70%; animation-delay: 0.2s; }
.signal-bars span:nth-child(4) { height: 85%; animation-delay: 0.3s; }
.signal-bars span:nth-child(5) { height: 100%; animation-delay: 0.4s; }
@keyframes barUp {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════ */

.sidebar {
  position: fixed;
  left: 0; top: var(--top-h);
  bottom: var(--bottom-h);
  width: var(--side-w);
  z-index: 50;
  display: flex; flex-direction: column;
  padding: 20px 0;
  background: linear-gradient(180deg, rgba(28,28,28,0.9), rgba(15,15,15,0.92));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(4px);
}
.sidebar-title {
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--dim);
  padding: 0 20px 14px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 14px;
}
.channel-list { flex: 1; padding: 0 12px; display: flex; flex-direction: column; gap: 2px; }
.channel-item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  cursor: pointer;
  border-left: 2px solid transparent;
  position: relative;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  font-size: 13px;
}
.channel-item .ch-num {
  font-family: var(--f-data);
  font-size: 18px;
  color: var(--dim);
  min-width: 24px;
  transition: color 0.18s;
}
.channel-item .ch-name {
  color: var(--bone);
  letter-spacing: 0.08em;
}
.channel-item:hover {
  background: rgba(0, 191, 174, 0.06);
  border-left-color: var(--signal);
}
.channel-item:hover .ch-num { color: var(--signal); }
.channel-item.active {
  background: rgba(255, 61, 0, 0.1);
  border-left-color: var(--alert);
}
.channel-item.active .ch-num {
  color: var(--alert);
  text-shadow: 0 0 8px rgba(255, 61, 0, 0.5);
}
.channel-item.active .ch-name { color: var(--alert); }
.channel-item.active::after {
  content: '►';
  position: absolute; right: 14px;
  color: var(--alert);
  font-size: 10px;
  animation: pulse 1.2s ease-in-out infinite;
}

.sidebar-vitals {
  padding: 16px 20px;
  border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 12px;
}
.vital-row {
  display: flex; justify-content: space-between;
  font-family: var(--f-data); font-size: 14px;
  color: var(--dim);
  margin-bottom: 4px;
}
.vital-row span:last-child { color: var(--signal); }
.vital-bar {
  height: 4px; background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  overflow: hidden;
}
.vital-fill {
  height: 100%; background: var(--signal);
  box-shadow: 0 0 6px var(--signal);
  width: 42%;
  transition: width 0.6s ease;
}
.vital-fill.alt { background: var(--quantum); box-shadow: 0 0 6px var(--quantum); }
.vital-fill.warn { background: var(--beacon); box-shadow: 0 0 6px var(--beacon); }

/* ═══════════════════════════════════════════════════════════
   MOBILE NAV (hidden on desktop)
   ═══════════════════════════════════════════════════════════ */

.mobile-nav {
  display: none;
  position: fixed; bottom: var(--bottom-h); left: 0; right: 0;
  z-index: 60;
  background: var(--abyss-2);
  border-top: 1px solid var(--line);
  padding: 8px 6px;
  justify-content: space-between; gap: 4px;
}
.mob-ch {
  flex: 1;
  font-family: var(--f-data);
  font-size: 18px;
  padding: 8px 0;
  color: var(--dim);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  transition: all 0.2s;
}
.mob-ch.active {
  color: var(--alert);
  border-color: var(--alert);
  box-shadow: 0 0 8px rgba(255,61,0,0.4);
  background: rgba(255,61,0,0.08);
}

/* ═══════════════════════════════════════════════════════════
   RIGHT SPECTRUM
   ═══════════════════════════════════════════════════════════ */

.spectrum {
  position: fixed;
  right: 0; top: var(--top-h);
  bottom: var(--bottom-h);
  width: var(--spec-w);
  z-index: 50;
  border-left: 1px solid var(--line);
  background: rgba(15,15,15,0.7);
  display: flex; flex-direction: column;
  justify-content: space-evenly;
  padding: 8px 6px;
  backdrop-filter: blur(4px);
}
.spectrum-bar {
  height: 6px;
  background: var(--signal);
  box-shadow: 0 0 4px var(--signal);
  transform-origin: left;
  transition: transform 0.15s ease;
}

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════ */

#main-content {
  margin-left: var(--side-w);
  margin-right: var(--spec-w);
  margin-top: var(--top-h);
  margin-bottom: var(--bottom-h);
  min-height: calc(100vh - var(--top-h) - var(--bottom-h));
  position: relative;
  z-index: 5;
}

.channel {
  display: none;
  padding: 40px 50px 80px;
  min-height: calc(100vh - var(--top-h) - var(--bottom-h));
  animation: channelTuneIn 0.45s ease-out;
}
.channel.active { display: block; }

@keyframes channelTuneIn {
  0% {
    opacity: 0;
    filter: brightness(2.5) hue-rotate(45deg) blur(4px);
    transform: scaleY(0.3);
    clip-path: inset(45% 0 45% 0);
  }
  30% {
    opacity: 0.6;
    filter: brightness(1.4) hue-rotate(20deg) blur(2px);
    transform: scaleY(1.05) translateX(-3px);
    clip-path: inset(0 0 0 0);
  }
  60% {
    opacity: 1;
    filter: brightness(1) blur(0);
    transform: scaleY(1) translateX(2px);
  }
  100% {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

.ch-header {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
  font-family: var(--f-ui);
  flex-wrap: wrap;
}
.ch-tag {
  color: var(--quantum);
  font-size: 13px;
  letter-spacing: 0.15em;
}
.ch-heading {
  font-family: var(--f-display);
  font-size: clamp(20px, 3vw, 28px);
  color: var(--bone);
  letter-spacing: 0.05em;
  flex: 1;
}
.ch-pill {
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid currentColor;
  letter-spacing: 0.15em;
}
.ch-pill.ok { color: var(--signal); background: rgba(0,191,174,0.05); }
.ch-pill.warn { color: var(--beacon); background: rgba(255,214,0,0.05); }

/* ═══════════════════════════════════════════════════════════
   CH01 :: HERO
   ═══════════════════════════════════════════════════════════ */

.hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 50px;
  align-items: start;
  position: relative;
  transform: translate(calc(var(--px) * -8px), calc(var(--py) * -4px));
  transition: transform 0.18s ease-out;
}

.hero-photo-wrap {
  display: flex; flex-direction: column; gap: 12px;
}
.photo-frame {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  background: var(--abyss-3);
  border: 1px solid var(--signal);
  box-shadow:
    0 0 0 4px rgba(0,191,174,0.05),
    0 0 30px rgba(0,191,174,0.2),
    inset 0 0 30px rgba(0,0,0,0.5);
  overflow: hidden;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.1) saturate(1.2); }
.photo-fallback {
  display: none;
  font-family: var(--f-display);
  font-size: 56px;
  color: var(--signal);
  text-align: center;
  line-height: 1;
  letter-spacing: 0.05em;
  padding-top: 30%;
}
.photo-frame.no-img .photo-fallback { display: block; }
.cnr {
  position: absolute; width: 18px; height: 18px;
  border: 2px solid var(--alert);
}
.cnr.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.cnr.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.cnr.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.cnr.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.photo-scan {
  position: absolute; left: 0; right: 0;
  height: 30px;
  background: linear-gradient(180deg, transparent, rgba(0, 191, 174, 0.25), transparent);
  pointer-events: none;
  animation: photoScan 3.5s linear infinite;
}
@keyframes photoScan {
  0% { top: -30px; }
  100% { top: 100%; }
}
.photo-meta {
  font-family: var(--f-data);
  font-size: 14px;
  color: var(--dim);
  line-height: 1.4;
}
.photo-meta div:first-child { color: var(--signal); }

.hero-text { min-width: 0; }
.hero-pre {
  font-family: var(--f-data);
  font-size: 18px;
  color: var(--signal);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  animation: typeBlink 1s steps(2) infinite;
}
@keyframes typeBlink { 50% { opacity: 0.7; } }

h1.glitch {
  font-family: var(--f-display);
  font-size: clamp(36px, 6.2vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--bone);
  position: relative;
  margin-bottom: 14px;
  text-transform: uppercase;
}
h1.glitch::before,
h1.glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  pointer-events: none;
}
h1.glitch::before {
  color: var(--alert);
  animation: glitchA 5s infinite steps(1, end);
  mix-blend-mode: screen;
}
h1.glitch::after {
  color: var(--signal);
  animation: glitchB 5s infinite steps(1, end);
  mix-blend-mode: screen;
}
@keyframes glitchA {
  0%, 100%   { transform: translate(0, 0); clip-path: inset(0 0 0 0); }
  92%        { transform: translate(-3px, 0); clip-path: inset(20% 0 60% 0); }
  93%        { transform: translate(2px, 0); clip-path: inset(60% 0 20% 0); }
  94%        { transform: translate(-2px, 0); clip-path: inset(40% 0 40% 0); }
  95%        { transform: translate(0, 0); clip-path: inset(0 0 0 0); }
}
@keyframes glitchB {
  0%, 100%   { transform: translate(0, 0); clip-path: inset(0 0 0 0); }
  92%        { transform: translate(3px, 0); clip-path: inset(70% 0 10% 0); }
  93%        { transform: translate(-2px, 0); clip-path: inset(10% 0 70% 0); }
  94%        { transform: translate(2px, 0); clip-path: inset(30% 0 50% 0); }
  95%        { transform: translate(0, 0); clip-path: inset(0 0 0 0); }
}

.hero-role {
  font-family: var(--f-ui);
  font-weight: 400;
  font-size: clamp(14px, 1.8vw, 18px);
  color: var(--quantum);
  letter-spacing: 0.1em;
  margin-bottom: 24px;
  text-shadow: 0 0 12px rgba(140, 27, 255, 0.4);
}

.hero-bio {
  font-size: 15px;
  color: rgba(232, 232, 232, 0.82);
  max-width: 620px;
  margin-bottom: 28px;
  line-height: 1.65;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 24px;
  margin-bottom: 32px;
  font-family: var(--f-ui);
  font-size: 13px;
  max-width: 620px;
}
.meta-grid > div {
  border-left: 2px solid var(--quantum);
  padding-left: 12px;
}
.meta-grid dt {
  color: var(--quantum);
  font-size: 10px;
  letter-spacing: 0.2em;
  margin-bottom: 2px;
}
.meta-grid dd { color: var(--bone); font-size: 12px; letter-spacing: 0.05em; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px;
  font-family: var(--f-ui);
  font-size: 13px;
  letter-spacing: 0.15em;
  border: 1px solid currentColor;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.btn.primary {
  color: var(--abyss);
  background: var(--alert);
  border-color: var(--alert);
  box-shadow: 0 0 20px rgba(255,61,0,0.4);
}
.btn.primary:hover {
  background: var(--beacon);
  border-color: var(--beacon);
  box-shadow: 0 0 30px rgba(255,214,0,0.6);
  transform: translate(-2px, -2px);
}
.btn.ghost {
  color: var(--signal);
}
.btn.ghost:hover {
  background: var(--signal);
  color: var(--abyss);
  box-shadow: 0 0 20px rgba(0,191,174,0.4);
}
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* Orbital SVG */
.orbital {
  position: absolute;
  right: -80px; top: -40px;
  width: 380px; height: 380px;
  opacity: 0.55;
  pointer-events: none;
  z-index: -1;
  filter: drop-shadow(0 0 8px rgba(0,191,174,0.3));
}
.sat-1 { animation: orbit1 12s linear infinite; transform-origin: 200px 200px; }
.sat-2 { animation: orbit2 18s linear infinite; transform-origin: 200px 200px; }
.sat-3 { animation: orbit3 22s linear infinite; transform-origin: 200px 200px; }
@keyframes orbit1 {
  from { transform: rotate(0) translateX(90px) rotate(0); }
  to   { transform: rotate(360deg) translateX(90px) rotate(-360deg); }
}
@keyframes orbit2 {
  from { transform: rotate(25deg) translate(140px, 0) rotate(-25deg); }
  to   { transform: rotate(385deg) translate(140px, 0) rotate(-385deg); }
}
@keyframes orbit3 {
  from { transform: rotate(-15deg) translate(180px, 0) rotate(15deg); }
  to   { transform: rotate(-375deg) translate(180px, 0) rotate(375deg); }
}
.sweep {
  transform-origin: 200px 200px;
  animation: sweep 3.5s linear infinite;
}
@keyframes sweep {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════
   CH01 :: OFF_DUTY_MODE (hobbies)
   ═══════════════════════════════════════════════════════════ */

.offduty {
  margin-top: 70px;
  padding-top: 32px;
  border-top: 1px dashed var(--line);
}
.offduty-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
  font-family: var(--f-ui);
  flex-wrap: wrap;
}
.od-tag {
  color: var(--quantum);
  font-size: 12px;
  letter-spacing: 0.18em;
}
.od-title {
  font-family: var(--f-display);
  font-size: 18px;
  color: var(--bone);
  letter-spacing: 0.05em;
  flex: 1;
}
.od-blink {
  font-size: 11px;
  color: var(--beacon);
  border: 1px solid var(--beacon);
  padding: 3px 9px;
  letter-spacing: 0.15em;
  animation: pulse 2s ease-in-out infinite;
}
.offduty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.od-card {
  border: 1px solid var(--line);
  background: var(--abyss);
  padding: 16px 18px;
  position: relative;
  transition: all 0.25s;
  overflow: hidden;
}
.od-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(0, 191, 174, 0.06));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
}
.od-card:hover {
  border-color: var(--signal);
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0, 191, 174, 0.15);
}
.od-card:hover::after { opacity: 1; }
.od-card:nth-child(2):hover { border-color: var(--beacon); box-shadow: 0 4px 16px rgba(255,214,0,0.15); }
.od-card:nth-child(3):hover { border-color: var(--quantum); box-shadow: 0 4px 16px rgba(140,27,255,0.15); }
.od-card:nth-child(4):hover { border-color: var(--alert); box-shadow: 0 4px 16px rgba(255,61,0,0.15); }

.od-icon {
  color: var(--signal);
  margin-bottom: 10px;
  transition: transform 0.3s, color 0.25s;
}
.od-card:nth-child(2) .od-icon { color: var(--beacon); }
.od-card:nth-child(3) .od-icon { color: var(--quantum); }
.od-card:nth-child(4) .od-icon { color: var(--alert); }
.od-card:hover .od-icon { transform: scale(1.15) rotate(-4deg); }

.od-card h5 {
  font-family: var(--f-display);
  font-size: 15px;
  color: var(--bone);
  margin-bottom: 6px;
  letter-spacing: 0.06em;
}
.od-card p {
  font-size: 12px;
  color: rgba(232,232,232,0.6);
  line-height: 1.45;
  font-family: var(--f-ui);
}

/* code element inside payload descriptions */
.p-desc code {
  font-family: var(--f-data);
  font-size: 14px;
  color: var(--beacon);
  background: rgba(255, 214, 0, 0.06);
  padding: 0 4px;
  border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════
   CH02 :: MISSION LOG
   ═══════════════════════════════════════════════════════════ */

.log-grid { display: grid; gap: 24px; max-width: 920px; }
.log-card {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(28,28,28,0.7), rgba(15,15,15,0.5));
  padding: 28px 30px;
  position: relative;
  transition: border-color 0.25s;
}
.log-card.current {
  border-left: 3px solid var(--alert);
}
.log-card::before {
  content: '';
  position: absolute; top: 12px; right: 12px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 8px var(--signal);
  animation: pulse 1.4s ease-in-out infinite;
}
.log-card:hover { border-color: var(--signal); }
.log-stamp {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
  font-family: var(--f-data);
  font-size: 16px;
  color: var(--dim);
  flex-wrap: wrap; gap: 8px;
}
.stamp-flag {
  color: var(--alert);
  font-size: 12px;
  letter-spacing: 0.2em;
  padding: 2px 8px;
  border: 1px solid var(--alert);
  font-family: var(--f-ui);
}
.log-card h3 {
  font-family: var(--f-display);
  font-size: clamp(22px, 3.2vw, 32px);
  color: var(--bone);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.log-org {
  color: var(--quantum);
  font-size: 14px;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
  text-shadow: 0 0 8px rgba(140, 27, 255, 0.3);
}
.log-points {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 22px;
}
.log-points li {
  padding-left: 22px;
  position: relative;
  color: rgba(232,232,232,0.85);
  font-size: 14px;
  line-height: 1.6;
}
.log-points li::before {
  content: '▶';
  position: absolute; left: 0; top: 2px;
  color: var(--signal);
  font-size: 10px;
}
.log-stack { display: flex; flex-wrap: wrap; gap: 8px; }
.log-stack span {
  font-family: var(--f-data);
  font-size: 13px;
  color: var(--signal);
  padding: 3px 10px;
  border: 1px solid var(--line);
  background: rgba(0, 191, 174, 0.04);
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════
   CH03 :: ASSETS
   ═══════════════════════════════════════════════════════════ */

.assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.asset-card {
  border: 1px solid var(--line);
  background: var(--abyss);
  padding: 18px 20px;
  transition: all 0.2s;
  position: relative;
}
.asset-card:hover {
  border-color: var(--signal);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 191, 174, 0.15);
}
.asset-card[data-tier="primary"] {
  border-left: 3px solid var(--alert);
}
.asset-head {
  display: flex; justify-content: space-between;
  font-family: var(--f-data);
  font-size: 14px;
  color: var(--dim);
  margin-bottom: 4px;
}
.asset-tag {
  color: var(--quantum);
  letter-spacing: 0.15em;
  font-size: 11px;
  font-family: var(--f-ui);
}
.asset-level { color: var(--beacon); }
.asset-card h4 {
  font-family: var(--f-display);
  font-size: 22px;
  color: var(--bone);
  margin: 6px 0 14px;
  letter-spacing: 0.02em;
}
.asset-bar {
  height: 3px;
  background: rgba(255,255,255,0.05);
  margin-bottom: 12px;
  overflow: hidden;
}
.asset-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--alert), var(--beacon));
  box-shadow: 0 0 8px rgba(255,61,0,0.5);
  width: 0;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.asset-card p {
  font-size: 13px;
  color: rgba(232,232,232,0.65);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   CH04 :: PAYLOADS
   ═══════════════════════════════════════════════════════════ */

.payloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.payload {
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(28,28,28,0.85), rgba(15,15,15,0.5));
  padding: 24px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  cursor: crosshair;
}
.payload::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--quantum);
  transition: width 0.25s, background 0.25s;
}
.payload:hover {
  border-color: var(--quantum);
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--quantum), 0 0 30px rgba(140,27,255,0.15);
}
.payload:hover::before { width: 6px; }
.payload:nth-child(3n)::before { background: var(--alert); }
.payload:nth-child(3n):hover { border-color: var(--alert); box-shadow: 6px 6px 0 var(--alert), 0 0 30px rgba(255,61,0,0.15); }
.payload:nth-child(3n+2)::before { background: var(--beacon); }
.payload:nth-child(3n+2):hover { border-color: var(--beacon); box-shadow: 6px 6px 0 var(--beacon), 0 0 30px rgba(255,214,0,0.15); }

.payload-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
  font-family: var(--f-ui);
}
.p-id {
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.2em;
}
.p-status {
  font-size: 10px;
  letter-spacing: 0.15em;
  padding: 3px 8px;
  border: 1px solid currentColor;
}
.p-status.deployed { color: var(--signal); background: rgba(0,191,174,0.06); }
.p-status.operational { color: var(--beacon); background: rgba(255,214,0,0.06); }
.p-status.maintained { color: var(--quantum); background: rgba(140,27,255,0.06); }

.payload h3 {
  font-family: var(--f-display);
  font-size: 22px;
  color: var(--bone);
  margin-bottom: 4px;
  letter-spacing: 0.01em;
  min-height: 26px;
}
.p-sub {
  color: var(--quantum);
  font-size: 12px;
  letter-spacing: 0.1em;
  font-family: var(--f-ui);
  margin-bottom: 14px;
}
.p-desc {
  font-size: 13px;
  color: rgba(232,232,232,0.75);
  line-height: 1.55;
  margin-bottom: 16px;
}
.p-stack {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 16px;
}
.p-stack span {
  font-family: var(--f-data);
  font-size: 13px;
  color: var(--signal);
  padding: 2px 8px;
  border: 1px solid rgba(0, 191, 174, 0.25);
  background: rgba(0, 191, 174, 0.04);
}
.p-mission {
  font-family: var(--f-data);
  font-size: 13px;
  color: var(--dim);
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════
   CH05 :: CREDENTIALS
   ═══════════════════════════════════════════════════════════ */

.cred-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 22px;
  max-width: 1100px;
}
.cred-card {
  border: 1px solid var(--line);
  padding: 28px 30px;
  background: var(--abyss);
  position: relative;
  transition: all 0.2s;
}
.cred-card.primary {
  border-color: rgba(255, 61, 0, 0.4);
  background: linear-gradient(135deg, rgba(255,61,0,0.05), transparent);
}
.cred-card:hover { transform: translateY(-3px); border-color: var(--signal); }
.cred-tag {
  font-family: var(--f-ui);
  font-size: 11px;
  color: var(--quantum);
  letter-spacing: 0.2em;
  margin-bottom: 14px;
}
.cred-card h3 {
  font-family: var(--f-display);
  font-size: clamp(18px, 2.4vw, 24px);
  color: var(--bone);
  margin-bottom: 12px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}
.cred-meta {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--f-data);
  font-size: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.cred-year { color: var(--signal); }
.cred-divider { color: var(--dim); }
.cred-cgpa { color: var(--beacon); }
.cred-loc {
  color: var(--dim);
  font-size: 13px;
  margin-bottom: 18px;
  letter-spacing: 0.05em;
}
.cred-desc {
  color: rgba(232,232,232,0.75);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 18px;
}
.cred-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cred-tags span {
  font-family: var(--f-data);
  font-size: 13px;
  color: var(--bone);
  padding: 2px 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}

/* ═══════════════════════════════════════════════════════════
   CH06 :: UPLINK
   ═══════════════════════════════════════════════════════════ */

.uplink { max-width: 980px; }
.uplink-intro { margin-bottom: 40px; }
.up-pre {
  font-family: var(--f-data);
  color: var(--alert);
  font-size: 18px;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.uplink-intro h2 {
  font-family: var(--f-display);
  font-size: clamp(28px, 5vw, 48px);
  color: var(--bone);
  margin-bottom: 16px;
  letter-spacing: 0;
  position: relative;
}
.uplink-intro h2.glitch::before { color: var(--alert); }
.uplink-intro h2.glitch::after { color: var(--signal); }
.uplink-intro p {
  color: rgba(232,232,232,0.7);
  max-width: 600px;
  font-size: 15px;
}

.uplink-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 60px;
}
.uplink-card {
  display: block;
  border: 1px solid var(--line);
  padding: 20px 22px;
  background: var(--abyss);
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.uplink-card::before {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--alert);
  box-shadow: 0 0 8px var(--alert);
  transition: width 0.3s;
}
.uplink-card:hover {
  border-color: var(--alert);
  transform: translateY(-4px);
  background: rgba(255,61,0,0.04);
}
.uplink-card:hover::before { width: 100%; }
.up-head {
  display: flex; justify-content: space-between;
  font-family: var(--f-ui);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.15em;
  margin-bottom: 18px;
}
.up-stat { color: var(--signal); }
.up-icon {
  color: var(--signal);
  margin-bottom: 14px;
  transition: color 0.25s, transform 0.25s;
}
.uplink-card:hover .up-icon {
  color: var(--alert);
  transform: scale(1.1) rotate(-3deg);
}
.uplink-card h4 {
  font-family: var(--f-display);
  font-size: 20px;
  color: var(--bone);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}
.up-val {
  font-family: var(--f-data);
  font-size: 15px;
  color: var(--signal);
  word-break: break-all;
}

.page-foot {
  border-top: 1px dashed var(--line);
  padding-top: 20px;
  font-family: var(--f-data);
  font-size: 14px;
  color: var(--dim);
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}

/* ═══════════════════════════════════════════════════════════
   BOTTOM TICKER
   ═══════════════════════════════════════════════════════════ */

.ticker {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bottom-h);
  z-index: 60;
  background: var(--abyss-2);
  border-top: 1px solid var(--line);
  overflow: hidden;
  display: flex; align-items: center;
}
.ticker-rail { width: 100%; overflow: hidden; }
.ticker-tape {
  display: inline-block;
  white-space: nowrap;
  font-family: var(--f-data);
  font-size: 15px;
  color: var(--signal);
  letter-spacing: 0.08em;
  animation: tickerScroll 60s linear infinite;
  will-change: transform;
}
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-tape .sep { color: var(--dim); margin: 0 14px; }
.ticker-tape .hi { color: var(--alert); }
.ticker-tape .lo { color: var(--quantum); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (≤1024px)
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  :root { --side-w: 180px; --spec-w: 0px; }
  .spectrum { display: none; }
  .hero { grid-template-columns: 220px 1fr; gap: 32px; }
  .orbital { width: 260px; height: 260px; right: -50px; top: -20px; }
  .channel { padding: 30px 32px 80px; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤720px)
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 720px) {
  :root {
    --top-h: 38px;
    --bottom-h: 56px;
    --side-w: 0px;
  }
  body { font-size: 14px; cursor: auto; }
  .top-bar { padding: 0 10px; font-size: 10px; }
  .top-center { display: none; }
  .top-left .muted, .top-right .muted { display: none; }
  .mono-time { font-size: 14px; }
  .sidebar { display: none; }
  .mobile-nav { display: flex; }
  .ticker { bottom: 0; height: 28px; }
  .mobile-nav { bottom: 28px; }
  #main-content {
    margin-left: 0; margin-right: 0;
    margin-bottom: calc(28px + 56px);
  }
  .channel { padding: 24px 18px 50px; }
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    transform: none;
  }
  .hero-photo-wrap { max-width: 220px; }
  .orbital { display: none; }
  h1.glitch { font-size: clamp(34px, 9vw, 56px); }
  .meta-grid { grid-template-columns: 1fr; gap: 10px; }
  .log-card { padding: 20px 18px; }
  .payloads-grid, .assets-grid { grid-template-columns: 1fr; }
  .cred-grid { grid-template-columns: 1fr; }
  .uplink-grid { grid-template-columns: 1fr; }
  /* dial back heavy effects on mobile */
  #rain-canvas { opacity: 0.25; }
  .crt-scanlines { background: repeating-linear-gradient(
    to bottom, transparent 0, transparent 3px, rgba(0,0,0,0.18) 4px, rgba(0,0,0,0.18) 4px
  ); }
}

/* ═══════════════════════════════════════════════════════════
   ACCESSIBILITY — reduced motion
   ═══════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  #rain-canvas, .photo-scan, .sweep { display: none; }
}
