/* ============================================
   THE CLAW FILES — Cyberpunk Marine Explorer
   ============================================ */

:root {
  --bg-deep: #03050f;
  --bg-panel: rgba(6, 12, 26, 0.88);
  --bg-sidebar: rgba(4, 8, 15, 0.92);
  --bg-entry: #08101f;
  --bg-highlight: rgba(10, 22, 40, 0.95);
  --cyan: #00e5ff;
  --cyan-dim: rgba(0, 229, 255, 0.25);
  --cyan-glow: rgba(0, 229, 255, 0.08);
  --magenta: #ff0099;
  --magenta-dim: rgba(255, 0, 153, 0.25);
  --purple: #7b2fff;
  --neon-green: #39ff14;
  --gold: #c9a84c;
  --text-primary: #cce8ff;
  --text-muted: #3d6080;
  --text-faint: #1a3040;
  --text-bright: #e8f8ff;
  --border-cyan: rgba(0, 229, 255, 0.3);
  --border-dark: rgba(0, 229, 255, 0.06);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Lora', Georgia, serif;
  --font-mono: 'Source Code Pro', 'Courier New', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 113%; overflow-x: hidden; }

/* ---- SCANLINES ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 229, 255, 0.015) 2px,
    rgba(0, 229, 255, 0.015) 4px
  );
  pointer-events: none;
  z-index: 1000;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========================================
   BACKGROUND SYSTEM
   ======================================== */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.22) saturate(1.8) hue-rotate(10deg);
  transition: background-image 1.5s ease, opacity 1.5s ease;
  opacity: 0;
}

.bg-image.loaded {
  opacity: 1;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(123,47,255,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(255,0,153,0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(0,229,255,0.05) 0%, transparent 70%),
    repeating-linear-gradient(0deg, transparent, transparent 60px, rgba(0,229,255,0.02) 60px, rgba(0,229,255,0.02) 61px),
    repeating-linear-gradient(90deg, transparent, transparent 60px, rgba(0,229,255,0.012) 60px, rgba(0,229,255,0.012) 61px);
}

/* ========================================
   ATMOSPHERIC CLUTTER LAYER
   ======================================== */
.clutter-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

/* ---- SONAR ---- */
.sonar-origin {
  position: absolute;
  bottom: 80px;
  left: 60px;
  width: 120px;
  height: 120px;
}

.sonar-dot {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan), 0 0 16px var(--cyan);
}

.sonar-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  border: 1px solid var(--cyan);
  opacity: 0;
}

.sonar-ring-1 { width: 80px; height: 80px; animation: sonar-pulse 4s ease-out infinite 0s; }
.sonar-ring-2 { width: 80px; height: 80px; animation: sonar-pulse 4s ease-out infinite 1.3s; }
.sonar-ring-3 { width: 80px; height: 80px; animation: sonar-pulse 4s ease-out infinite 2.6s; }

@keyframes sonar-pulse {
  0%   { transform: translate(-50%, -50%) scale(0.1); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(4); opacity: 0; }
}

/* ---- COMPASS ROSE ---- */
.compass-rose {
  position: absolute;
  top: 90px;
  right: 60px;
  width: 80px;
  height: 80px;
  opacity: 0.18;
  animation: compass-rotate 40s linear infinite;
}

@keyframes compass-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.compass-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--cyan);
}

.compass-needle {
  position: absolute;
  top: 50%; left: 50%;
  background: var(--cyan);
}

.compass-needle-ns {
  width: 1px; height: 70%;
  transform: translate(-50%, -50%);
}

.compass-needle-ew {
  width: 70%; height: 1px;
  transform: translate(-50%, -50%);
}

.compass-cardinal {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
}

.compass-N { top: 2px; left: 50%; transform: translateX(-50%); }
.compass-S { bottom: 2px; left: 50%; transform: translateX(-50%); }
.compass-E { right: 4px; top: 50%; transform: translateY(-50%); }
.compass-W { left: 4px; top: 50%; transform: translateY(-50%); }

/* ---- HUD READOUTS ---- */
.hud-tl {
  position: absolute;
  top: 90px;
  left: 20px;
  opacity: 0.22;
}

.hud-br {
  position: absolute;
  bottom: 60px;
  right: 20px;
  text-align: right;
  opacity: 0.22;
}

.hud-line {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.8;
}

.hud-val {
  color: var(--cyan);
  margin-left: 0.5rem;
}

/* ---- GHOST COORDINATES ---- */
.ghost-coord {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: rgba(0, 229, 255, 0.08);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.ghost-coord-1 { top: 35%; left: 5%; transform: rotate(-15deg); }
.ghost-coord-2 { top: 55%; right: 8%; transform: rotate(8deg); }
.ghost-coord-3 { top: 15%; left: 30%; transform: rotate(3deg); }
.ghost-coord-4 { bottom: 25%; left: 15%; transform: rotate(-5deg); }
.ghost-coord-5 { top: 70%; right: 20%; transform: rotate(12deg); }

/* ---- CIRCUIT SVG ---- */
.circuit-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---- ANIMATIONS ---- */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes blink-slow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes glitch {
  0%, 100% { clip-path: none; transform: none; }
  92% { clip-path: none; transform: none; }
  93% { clip-path: polygon(0 20%, 100% 20%, 100% 25%, 0 25%); transform: translate(-4px, 0); color: var(--magenta); }
  94% { clip-path: polygon(0 60%, 100% 60%, 100% 65%, 0 65%); transform: translate(4px, 0); color: var(--cyan); }
  95% { clip-path: none; transform: none; }
  96% { clip-path: polygon(0 40%, 100% 40%, 100% 42%, 0 42%); transform: translate(-2px, 0); }
  97% { clip-path: none; transform: none; }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-2deg); filter: drop-shadow(0 0 20px rgba(0,229,255,0.7)); }
  50% { transform: translateY(-12px) rotate(2deg); filter: drop-shadow(0 0 35px rgba(255,0,153,0.7)); }
}

.blink-slow { animation: blink-slow 2.5s step-end infinite; }

/* ========================================
   APP LAYER (above clutter)
   ======================================== */
.app {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- HEADER ---- */
.site-header {
  background: linear-gradient(180deg, rgba(2,4,8,0.97) 0%, var(--bg-panel) 100%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-cyan);
  box-shadow: 0 0 40px rgba(0,229,255,0.1), 0 1px 0 var(--cyan);
  padding: 1.5rem 2rem 0;
  flex-shrink: 0;
  position: relative;
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--magenta), var(--cyan), transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding-bottom: 1.2rem;
}

.compass-header {
  font-size: 2.5rem;
  color: var(--cyan);
  opacity: 0.8;
  filter: drop-shadow(0 0 12px var(--cyan));
  animation: float 6s ease-in-out infinite;
}

.header-center { text-align: center; flex: 1; }

.site-title {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  color: var(--cyan);
  text-shadow: 0 0 30px rgba(0,229,255,0.6), 0 0 60px rgba(0,229,255,0.3);
  line-height: 1.1;
  margin-bottom: 0.3rem;
  animation: glitch 9s infinite;
}

.site-title {
  cursor: pointer;
  transition: text-shadow 0.2s ease;
}
.site-title:hover {
  text-shadow: 0 0 40px rgba(0,229,255,0.9), 0 0 80px rgba(0,229,255,0.4);
}

.site-subtitle {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  min-height: 1.2em;
}

.cursor-blink {
  color: var(--cyan);
  animation: blink 1.1s step-end infinite;
  font-size: 0.6rem;
  margin-left: 1px;
}

/* ---- FLYING NANOBOT EASTER EGG ---- */
.flying-nanobot {
  position: fixed;
  width: 36px;
  height: 36px;
  pointer-events: none;
  z-index: 9999;
  filter: drop-shadow(0 0 10px rgba(0,229,255,0.6));
  opacity: 0.8;
}

.nanobot-sprite {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px solid var(--cyan);
  object-fit: cover;
  animation: nanobot-flight 45s infinite;
}

@keyframes nanobot-flight {
  0% { transform: translate(5%, 10%) scale(1); }
  15% { transform: translate(92%, 15%) scale(0.9); }
  30% { transform: translate(85%, 75%) scale(1.1); }
  45% { transform: translate(10%, 60%) scale(0.95); }
  60% { transform: translate(70%, 5%) scale(1); }
  75% { transform: translate(20%, 85%) scale(1.05); }
  90% { transform: translate(95%, 50%) scale(0.9); }
  100% { transform: translate(5%, 10%) scale(1); }
}

@media (max-width: 768px) {
  .flying-nanobot {
    width: 27px;
    height: 27px;
    filter: drop-shadow(0 0 8px rgba(0,229,255,0.4));
  }
}

/* ---- DISPATCH SIGN-OFF ---- */
.dispatch-signoff {
  margin-top: 3rem;
  padding-top: 0;
}

.signoff-divider {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.signoff-divider .rope-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan-dim), rgba(255,0,153,0.2), var(--cyan-dim), transparent);
}

.signoff-divider .rope-knot {
  color: var(--cyan);
  font-size: 0.7rem;
  filter: drop-shadow(0 0 6px var(--cyan));
}

.signoff-body {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.2rem 0;
}

.signoff-portrait {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 20px rgba(0,229,255,0.4);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.signoff-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
}

.signoff-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.signoff-detail {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.signoff-back {
  background: transparent;
  border: 1px solid var(--border-dark);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

.signoff-back:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-dim);
}

.dispatch-count { text-align: right; min-width: 80px; }

.count-number {
  display: block;
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 600;
  color: var(--magenta);
  text-shadow: 0 0 20px rgba(255,0,153,0.6);
  line-height: 1;
}

.count-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.header-divider {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  max-width: 1400px;
  margin: 0 auto;
}

.rope-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan-dim), rgba(255,0,153,0.2), var(--cyan-dim), transparent);
}

.rope-knot {
  color: var(--cyan);
  font-size: 0.7rem;
  filter: drop-shadow(0 0 6px var(--cyan));
}

/* ---- MAIN LAYOUT ---- */
.main-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* ---- SIDEBAR ---- */
.sidebar {
  width: 300px;
  min-width: 300px;
  background: var(--bg-sidebar);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--border-cyan);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-dark);
  background: rgba(0,229,255,0.04);
}

.sidebar-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--cyan);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0,229,255,0.5);
}

.entry-list { flex: 1; overflow-y: auto; padding: 0.5rem 0; }
.entry-list::-webkit-scrollbar { width: 3px; }
.entry-list::-webkit-scrollbar-track { background: transparent; }
.entry-list::-webkit-scrollbar-thumb { background: var(--cyan-dim); border-radius: 2px; }

.loading-state, .empty-state {
  padding: 2rem 1.2rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.7;
}

.entry-item {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid rgba(0,229,255,0.05);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.entry-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: linear-gradient(180deg, var(--cyan), var(--magenta));
  transition: width 0.2s ease;
}

.entry-item:hover { background: rgba(0,229,255,0.04); }
.entry-item:hover::before { width: 2px; }

.entry-item.active { background: rgba(0,229,255,0.07); }
.entry-item.active::before { width: 3px; box-shadow: 0 0 8px var(--cyan); }

.entry-item-date {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--magenta);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
  text-shadow: 0 0 8px rgba(255,0,153,0.4);
}

.entry-item-location {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--cyan);
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
  opacity: 0.7;
}

.entry-item-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-bright);
  line-height: 1.3;
  margin-bottom: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.entry-item-summary {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- CONTENT PANEL ---- */
.content-panel {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
}

.content-panel { scrollbar-width: thin; scrollbar-color: #00e5ff transparent; }
.content-panel::-webkit-scrollbar { width: 6px; }
.content-panel::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); }
.content-panel::-webkit-scrollbar-thumb {
  background: var(--cyan);
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(0,229,255,0.6);
}
.content-panel::-webkit-scrollbar-thumb:hover {
  background: var(--magenta);
  box-shadow: 0 0 12px rgba(255,0,153,0.7);
}

/* ---- LOCATION BANNER ---- */
.location-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.5rem;
  background: rgba(0, 229, 255, 0.05);
  border-bottom: 1px solid var(--border-cyan);
  flex-shrink: 0;
}

.location-icon { font-size: 0.9rem; flex-shrink: 0; }

.location-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.location-row1 {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.location-row2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.location-filing {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.location-name {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0,229,255,0.5);
}

.location-hotel {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  opacity: 0.7;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-coords {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--neon-green);
  letter-spacing: 0.06em;
  text-shadow: 0 0 8px rgba(57,255,20,0.4);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- WELCOME SPLASH ---- */
.welcome-splash {
  max-width: 620px;
  margin: 3rem auto;
  text-align: center;
  padding: 2rem;
}

.nanobot-portrait {
  width: 160px;
  height: 160px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 30px rgba(0,229,255,0.4), 0 0 60px rgba(123,47,255,0.2);
  animation: float 6s ease-in-out infinite;
}

.nanobot-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.welcome-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 1.2rem;
  text-shadow: 0 0 20px rgba(0,229,255,0.5);
}

.welcome-text {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 1rem;
  line-height: 1.8;
}

.latest-btn {
  background: transparent;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  padding: 0.8rem 1.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  box-shadow: 0 0 15px var(--cyan-dim), inset 0 0 15px rgba(0,229,255,0.04);
  margin-top: 1rem;
}

.latest-btn:hover {
  background: var(--cyan);
  color: var(--bg-deep);
  box-shadow: 0 0 30px var(--cyan-dim);
}

/* ---- RESEARCH ENTRY ---- */
.research-entry {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 2.5rem;
  flex: 1;
}

.entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-cyan);
}

.entry-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--magenta);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(255,0,153,0.4);
}

.entry-divider { color: var(--text-faint); }
.entry-label { color: var(--text-muted); text-shadow: none; }

.back-btn {
  background: transparent;
  border: 1px solid var(--border-dark);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.05em;
}

.back-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-dim);
}

/* ---- MARKDOWN CONTENT ---- */
.entry-body {
  overflow-wrap: break-word;
  word-break: break-word;
}

.entry-body h1 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--cyan);
  line-height: 1.3;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(0,229,255,0.4);
}

.entry-body h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-dark);
  position: relative;
}

.entry-body h2::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 60px; height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  box-shadow: 0 0 8px var(--cyan);
}

.entry-body h2:first-of-type {
  background: linear-gradient(135deg, rgba(0,229,255,0.06) 0%, rgba(255,0,153,0.03) 100%);
  border: 1px solid var(--border-cyan);
  box-shadow: 0 0 20px rgba(0,229,255,0.05);
  padding: 1.2rem 1.5rem;
  margin-top: 2rem;
}

.entry-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-cyan), transparent);
  margin: 2rem 0;
}

.entry-body p { margin-bottom: 1rem; color: var(--text-primary); }
.entry-body strong { color: var(--text-bright); font-weight: 600; }
.entry-body em { color: var(--magenta); font-style: italic; }

.entry-body ul { list-style: none; padding: 0; margin-bottom: 1.2rem; }
.entry-body ul li { padding: 0.35rem 0 0.35rem 1.5rem; position: relative; color: var(--text-primary); }
.entry-body ul li::before {
  content: '◆';
  position: absolute;
  left: 0; top: 0.65rem;
  color: var(--cyan);
  font-size: 0.45rem;
  text-shadow: 0 0 6px var(--cyan);
}

.entry-body a { color: var(--cyan); text-decoration: none; border-bottom: 1px solid var(--border-cyan); transition: all 0.2s; }

.entry-body img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border-cyan);
  box-shadow: 0 0 20px rgba(0,229,255,0.1);
  margin: 1rem 0 0.5rem;
  display: block;
}

.entry-body img + em {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
}
.entry-body a:hover { color: var(--text-bright); text-shadow: 0 0 10px rgba(0,229,255,0.4); }

.entry-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-entry);
  border: 1px solid var(--border-dark);
  padding: 0.15em 0.4em;
  border-radius: 2px;
  color: var(--neon-green);
  text-shadow: 0 0 8px rgba(57,255,20,0.4);
}

.entry-body blockquote {
  border-left: 3px solid var(--magenta);
  box-shadow: 0 0 20px rgba(255,0,153,0.08);
  padding: 0.8rem 1.2rem;
  margin: 1.5rem 0;
  background: rgba(255,0,153,0.04);
  font-style: italic;
  color: var(--text-muted);
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--bg-sidebar);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-cyan);
  padding: 0.8rem 2rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.footer-sep { margin: 0 0.5rem; color: var(--cyan); text-shadow: 0 0 6px var(--cyan); }

/* ---- IG EMBEDS ---- */
.ig-embed-wrapper { margin: 1.5rem 0; }
.ig-embed-wrapper .instagram-media { margin: 0 auto !important; }

/* ---- MOBILE SIGN-OFF ---- */
@media (max-width: 600px) {
  .signoff-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 1rem 0;
  }
  .signoff-portrait {
    width: 64px;
    height: 64px;
    margin-top: 0;
  }
  .signoff-text {
    justify-content: flex-start;
  }
  .signoff-name {
    white-space: normal;
    font-size: 1rem;
  }
  .signoff-back {
    width: 100%;
    max-width: 280px;
  }
}

.footer-ig {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-ig:hover { color: var(--magenta); text-shadow: 0 0 8px rgba(255,0,153,0.5); }

.ig-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  justify-content: flex-end;
}

.ig-link:hover {
  color: var(--magenta);
  text-shadow: 0 0 10px rgba(255,0,153,0.5);
}

.ig-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: inherit;
  filter: drop-shadow(0 0 4px currentColor);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .main-layout { flex-direction: column; }
  .sidebar { width: 100%; min-width: unset; max-height: 40vh; border-right: none; border-bottom: 1px solid var(--border-cyan); }
  .site-title { font-size: 1.7rem; letter-spacing: 0.12em; }
  .header-left, .header-right { display: none; }
  .hud-tl, .hud-br, .compass-rose, .ghost-coord { display: none; }
  .research-entry { padding: 1.5rem; }
}
