/* ============================================================
   NEURAL_ARCHIVE — Cyberpunk Theme
   tunglinn.github.io
   ============================================================ */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; }

body {
  background-color: #0A0A0B;
  color: #e0e2e8;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  overflow-x: hidden;
}

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

/* === GRAPH PAGE === */
body.graph-page {
  overflow: hidden;
  cursor: crosshair;
}

/* === SCANLINE SWEEP === */
.scanline {
  width: 100%;
  height: 120px;
  position: fixed;
  bottom: 100%;
  left: 0;
  pointer-events: none;
  z-index: 60;
  background: linear-gradient(
    0deg,
    rgba(0, 220, 230, 0) 0%,
    rgba(0, 220, 230, 0.06) 50%,
    rgba(0, 220, 230, 0) 100%
  );
  animation: scanline-sweep 12s linear infinite;
}

@keyframes scanline-sweep {
  0%   { bottom: 100%; }
  100% { bottom: -120px; }
}

/* === GRID OVERLAY === */
.grid-overlay {
  background-size: 40px 40px;
  background-image:
    linear-gradient(to right,  rgba(0, 220, 230, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 220, 230, 0.03) 1px, transparent 1px);
}

/* === GLASS PANEL === */
.glass-panel {
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 220, 230, 0.12);
}

/* === CLIPPED CORNER === */
.clipped-corner {
  clip-path: polygon(0% 0%, 82% 0%, 100% 18%, 100% 100%, 0% 100%);
}

/* === HEXAGON SHAPE === */
.hexagon {
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* === GLOW EFFECTS === */
.glow-cyan     { box-shadow: 0 0 16px rgba(0, 220, 230, 0.35); }
.glow-magenta  { box-shadow: 0 0 16px rgba(255,   0, 144, 0.35); }
.glow-violet   { box-shadow: 0 0 16px rgba(155,  93, 229, 0.35); }
.glow-accent   { box-shadow: 0 0 16px rgba(0,   255, 136, 0.35); }

.text-glow-cyan    { text-shadow: 0 0 10px rgba(0, 220, 230, 0.6); }
.text-glow-magenta { text-shadow: 0 0 10px rgba(255, 0, 144, 0.6); }
.text-glow-violet  { text-shadow: 0 0 10px rgba(155, 93, 229, 0.6); }

/* === NODE ANIMATIONS === */
@keyframes root-pulse {
  0%, 100% {
    box-shadow: 0 0 12px rgba(0, 220, 230, 0.4), inset 0 0 12px rgba(0, 220, 230, 0.05);
    transform: rotate(45deg) scale(1);
  }
  50% {
    box-shadow: 0 0 24px rgba(0, 220, 230, 0.6), inset 0 0 20px rgba(0, 220, 230, 0.08);
    transform: rotate(45deg) scale(1.04);
  }
}

.node-root-inner {
  animation: root-pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes category-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.82; }
}

.node-category {
  animation: category-pulse 4s ease-in-out infinite;
}

/* === GLITCH (site title) === */
@keyframes glitch {
  0%   { text-shadow:  0.04em 0 0 #ff0090, -0.04em 0 0 #00dce6; }
  14%  { text-shadow:  0.04em 0 0 #ff0090, -0.04em 0 0 #00dce6; }
  15%  { text-shadow: -0.04em 0 0 #ff0090,  0.04em 0 0 #00dce6; }
  49%  { text-shadow: -0.04em 0 0 #ff0090,  0.04em 0 0 #00dce6; }
  50%  { text-shadow:  0.04em 0 0 #ff0090, -0.04em 0 0 #00dce6; }
  99%  { text-shadow:  0.04em 0 0 #ff0090, -0.04em 0 0 #00dce6; }
  100% { text-shadow:  0.04em 0 0 #ff0090, -0.04em 0 0 #00dce6; }
}

.glitch { animation: glitch 6s steps(1) infinite; }

/* === GRAPH NODES === */
.graph-node {
  position: absolute;
  left: 50%;
  top: 50%;
}

.leaf-node {
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #0A0A0B; }
::-webkit-scrollbar-thumb { background: rgba(0, 220, 230, 0.25); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 220, 230, 0.45); }

/* === POST PAGE: PROSE === */
.post-prose h1,
.post-prose h2,
.post-prose h3,
.post-prose h4 {
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #00dce6;
  margin-top: 2.25rem;
  margin-bottom: 0.6rem;
}

.post-prose h1 { font-size: 1.35rem; }
.post-prose h2 {
  font-size: 1.1rem;
  border-left: 3px solid #ff0090;
  padding-left: 0.75rem;
  color: #e0e2e8;
}
.post-prose h3 { font-size: 0.95rem; color: #b9cacb; }
.post-prose h4 { font-size: 0.85rem; color: #849495; }

.post-prose p {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.85;
  color: #b9cacb;
  margin-bottom: 1.1rem;
}

.post-prose ul,
.post-prose ol {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: #b9cacb;
  padding-left: 1.5rem;
  margin-bottom: 1.1rem;
}

.post-prose li { margin-bottom: 0.3rem; }

.post-prose a {
  color: #00dce6;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.post-prose a:hover { color: #00ff88; }

.post-prose strong { color: #e0e2e8; font-weight: 600; }
.post-prose em { color: #b9cacb; font-style: italic; }

.post-prose code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  background: rgba(0, 220, 230, 0.07);
  border: 1px solid rgba(0, 220, 230, 0.18);
  padding: 0.1em 0.4em;
  color: #00dce6;
  border-radius: 2px;
}

.post-prose pre {
  background: rgba(0, 220, 230, 0.04);
  border: 1px solid rgba(0, 220, 230, 0.12);
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1.1rem;
}

.post-prose blockquote {
  border-left: 3px solid rgba(255, 0, 144, 0.5);
  padding-left: 1rem;
  color: #849495;
  font-style: italic;
  margin-bottom: 1.1rem;
}

/* === NODE LIST PANELS === */
.node-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 11, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.node-panel[hidden] { display: none; }

.node-panel-card {
  width: min(560px, calc(100vw - 2rem));
  max-height: min(80vh, 640px);
  background: rgba(10, 10, 11, 0.95);
  border: 1px solid rgba(0, 220, 230, 0.28);
  display: flex;
  flex-direction: column;
  animation: panel-in 0.28s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}
.node-panel-card--logs {
  border-color: rgba(255, 0, 144, 0.28);
}

.panel-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0, 220, 230, 0.1);
  flex-shrink: 0;
}
.node-panel-card--logs .panel-hdr {
  border-bottom-color: rgba(255, 0, 144, 0.1);
}
.panel-hdr-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #00dce6;
}
.node-panel-card--logs .panel-hdr-title { color: #ff0090; }
.panel-hdr-close {
  font-size: 14px;
  color: #849495;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  transition: color 0.15s;
}
.panel-hdr-close:hover { color: #e0e2e8; }

.panel-body {
  overflow-y: auto;
  flex: 1;
  padding: 6px 0;
}

.panel-row {
  display: flex;
  align-items: center;
  transition: background 0.15s;
}
.panel-row:hover { background: rgba(0, 220, 230, 0.05); }
.node-panel-card--logs .panel-row:hover { background: rgba(255, 0, 144, 0.05); }
.panel-row-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
}
.panel-row-live {
  flex-shrink: 0;
  padding: 10px 14px;
  font-size: 13px;
  color: #849495;
  border-left: 1px solid rgba(0, 220, 230, 0.08);
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
  line-height: 1;
}
.panel-row-live:hover { color: #00dce6; background: rgba(0, 220, 230, 0.06); }
.node-panel-card--logs .panel-row-live { border-left-color: rgba(255, 0, 144, 0.08); }
.node-panel-card--logs .panel-row-live:hover { color: #ff0090; background: rgba(255, 0, 144, 0.06); }

.panel-row-thumb {
  position: relative;
  width: 108px;
  height: 64px;
  flex-shrink: 0;
  overflow: hidden;
}
.panel-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.15) brightness(0.55) contrast(1.15);
  transition: filter 0.3s;
}
.panel-row-link:hover .panel-row-thumb img {
  filter: saturate(0.4) brightness(0.72);
}
.panel-row-thumb::before,
.panel-row-thumb::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  z-index: 3;
  pointer-events: none;
}
.panel-row-thumb::before {
  top: 3px; left: 3px;
  border-top: 1px solid rgba(0, 220, 230, 0.8);
  border-left: 1px solid rgba(0, 220, 230, 0.8);
}
.panel-row-thumb::after {
  bottom: 3px; right: 3px;
  border-bottom: 1px solid rgba(0, 220, 230, 0.8);
  border-right: 1px solid rgba(0, 220, 230, 0.8);
}
.node-panel-card--logs .panel-row-thumb::before { border-color: rgba(255, 0, 144, 0.8); }
.node-panel-card--logs .panel-row-thumb::after  { border-color: rgba(255, 0, 144, 0.8); }

.panel-row-info {
  flex: 1;
  min-width: 0;
}
.panel-row-name {
  font-size: 11px;
  color: #b9cacb;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
  margin-bottom: 4px;
}
.panel-row-link:hover .panel-row-name     { color: #00dce6; }
.node-panel-card--logs .panel-row-link:hover .panel-row-name { color: #ff0090; }
.panel-row-meta {
  font-size: 9px;
  color: #849495;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.panel-row-arrow {
  font-size: 11px;
  color: #849495;
  flex-shrink: 0;
  transition: color 0.15s, transform 0.15s;
}
.panel-row-link:hover .panel-row-arrow     { color: #00dce6; transform: translateX(3px); }
.node-panel-card--logs .panel-row-link:hover .panel-row-arrow { color: #ff0090; }

.panel-divider {
  height: 1px;
  margin: 0 18px;
  background: rgba(0, 220, 230, 0.07);
}
.node-panel-card--logs .panel-divider { background: rgba(255, 0, 144, 0.07); }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* === HOLOGRAM LEAF CARDS === */
.holo-leaf {
  display: block;
  width: 152px;
  background: rgba(10, 10, 11, 0.88);
  border: 1px solid rgba(0, 220, 230, 0.25);
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.holo-leaf:hover {
  border-color: rgba(0, 220, 230, 0.65);
  box-shadow: 0 0 20px rgba(0, 220, 230, 0.22), inset 0 0 8px rgba(0, 220, 230, 0.06);
}
/* Featured variant — larger, brighter, always-on glow */
.holo-leaf--featured {
  width: 192px;
  border-color: rgba(0, 220, 230, 0.5);
  box-shadow: 0 0 14px rgba(0, 220, 230, 0.18), inset 0 0 6px rgba(0, 220, 230, 0.04);
}
.holo-leaf--featured:hover {
  border-color: rgba(0, 220, 230, 0.9);
  box-shadow: 0 0 32px rgba(0, 220, 230, 0.38), inset 0 0 12px rgba(0, 220, 230, 0.08);
}
.holo-leaf--featured .holo-img-wrap {
  height: 110px;
}
.holo-leaf--featured .holo-img {
  filter: saturate(0.22) brightness(0.65) contrast(1.12);
}
.holo-leaf--featured:hover .holo-img {
  filter: saturate(0.45) brightness(0.8) contrast(1.08);
}
.holo-featured-star {
  font-size: 9px;
  color: #00dce6;
  flex-shrink: 0;
  margin-left: auto;
  text-shadow: 0 0 6px rgba(0, 220, 230, 0.7);
}
.holo-leaf-link {
  display: block;
  text-decoration: none;
}
.holo-live-btn {
  display: block;
  text-align: center;
  font-size: 8px;
  color: #00dce6;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 5px 8px;
  border-top: 1px solid rgba(0, 220, 230, 0.15);
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.holo-live-btn:hover {
  background: rgba(0, 220, 230, 0.1);
  color: #e0e2e8;
}

.holo-leaf--logs {
  border-color: rgba(255, 0, 144, 0.22);
}
.holo-leaf--logs:hover {
  border-color: rgba(255, 0, 144, 0.6);
  box-shadow: 0 0 20px rgba(255, 0, 144, 0.2), inset 0 0 8px rgba(255, 0, 144, 0.05);
}

.holo-img-wrap {
  position: relative;
  width: 100%;
  height: 90px;
  overflow: hidden;
}
.holo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.15) brightness(0.55) contrast(1.15);
  transition: filter 0.3s, transform 0.4s;
}
.holo-leaf:hover .holo-img {
  filter: saturate(0.35) brightness(0.7) contrast(1.1);
  transform: scale(1.05);
  animation: holo-flicker 0.18s step-end 3;
}

/* Tint overlay — cyan for projects, magenta for logs */
.holo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(0, 220, 230, 0.28) 0%, rgba(0, 60, 90, 0.18) 100%);
  mix-blend-mode: screen;
  pointer-events: none;
}
.holo-leaf--logs .holo-overlay {
  background: linear-gradient(155deg, rgba(255, 0, 144, 0.24) 0%, rgba(90, 0, 60, 0.15) 100%);
}

/* Scanlines */
.holo-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 220, 230, 0.045) 3px,
    rgba(0, 220, 230, 0.045) 4px
  );
  pointer-events: none;
}

/* Corner brackets */
.holo-img-wrap::before,
.holo-img-wrap::after {
  content: '';
  position: absolute;
  width: 9px;
  height: 9px;
  z-index: 3;
  pointer-events: none;
}
.holo-img-wrap::before {
  top: 4px; left: 4px;
  border-top: 1px solid rgba(0, 220, 230, 0.85);
  border-left: 1px solid rgba(0, 220, 230, 0.85);
}
.holo-img-wrap::after {
  bottom: 4px; right: 4px;
  border-bottom: 1px solid rgba(0, 220, 230, 0.85);
  border-right: 1px solid rgba(0, 220, 230, 0.85);
}
.holo-leaf--logs .holo-img-wrap::before {
  border-color: rgba(255, 0, 144, 0.8);
}
.holo-leaf--logs .holo-img-wrap::after {
  border-color: rgba(255, 0, 144, 0.8);
}

/* Label bar */
.holo-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 3px;
  border-top: 1px solid rgba(0, 220, 230, 0.1);
}
.holo-leaf--logs .holo-label {
  border-top-color: rgba(255, 0, 144, 0.1);
}
.holo-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #00dce6;
}
.holo-leaf--logs .holo-dot { background: #ff0090; }
.holo-title {
  font-size: 10px;
  color: #b9cacb;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}
.holo-leaf:hover .holo-title       { color: #00dce6; }
.holo-leaf--logs:hover .holo-title { color: #ff0090; }
.holo-meta {
  font-size: 8px;
  color: #849495;
  padding: 0 8px 6px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes holo-flicker {
  0%   { opacity: 1; }
  30%  { opacity: 0.78; }
  60%  { opacity: 1; }
  80%  { opacity: 0.86; }
  100% { opacity: 1; }
}

/* === MOBILE FALLBACK NAV === */
@media (max-width: 767px) {
  body.graph-page { overflow-y: auto; cursor: default; }
  #graph-main  { display: none !important; }
  #mobile-nav  { display: flex !important; }
}

@media (min-width: 768px) {
  #mobile-nav { display: none !important; }
}

