/* Colors / Theme tokens */
:root {
  --bg-dark: #0f0f10;
  --accent: #ffcc33;
  --accent-strong: #ffd84f;
  --text-light: #f9f9f9;
  --text-dim: #9ca3af;
  --panel-bg: rgba(255,255,255,0.03);
  --panel-border: rgba(255,255,255,0.08);
  --ring-soft: rgba(255,204,51,0.4);
  --ring-hard: rgba(255,204,51,0.8);
  --grid-line: rgba(255,255,255,0.03);
}

/* Base body styling */
body.bg-dark {
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,204,51,0.07) 0%, transparent 60%);
  background-repeat: no-repeat;
  background-size: 800px 800px;
  color: var(--text-light);
  min-height: 100vh;
  position: relative;
}

/* Fonts */
.font-display {
  font-family: "Press Start 2P", monospace;
}
.font-body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

/* Accent helpers */
.text-accent {
  color: var(--accent);
}
.text-accent-strong {
  color: var(--accent-strong);
}

/* Cards / panels */
.card-soft {
  background-color: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 0 24px rgba(0,0,0,0.8);
}

/* Background grid overlay (global subtle bg decoration) */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(
    circle at 50% 20%,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 40%,
    rgba(0,0,0,0) 90%
  );
  pointer-events: none;
  z-index: 0;
}

/* HERO atmosphere layers */

/* slow pulsing glow behind hero headline */
@keyframes pulse-slow {
  0%, 100% { opacity: .4; filter: blur(60px); }
  50% { opacity: .7; filter: blur(80px); }
}
.animate-pulse-slow {
  animation: pulse-slow 6s ease-in-out infinite;
}

/* drifting holo grid overlay in hero */
.tile-grid {
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  transform: translateZ(0);
  animation: grid-pan 20s linear infinite;
}
@keyframes grid-pan {
  0%   { background-position: 0px 0px; }
  100% { background-position: 200px 200px; }
}

/* noise / scanline texture layer */
/* This is intentionally lo-fi and subtle */
.noise-layer {
  background-image: repeating-radial-gradient(circle at 0 0,
    rgba(255,255,255,0.05) 0 1px,
    rgba(0,0,0,0) 1px 100%
  );
  mix-blend-mode: screen;
  opacity: 0.08;
  image-rendering: pixelated;
  animation: noise-shift 1s steps(4) infinite;
}
@keyframes noise-shift {
  0%   { transform: translate3d(0,0,0); }
  100% { transform: translate3d(-10%,5%,0); }
}

/* Status chip + blinking cursor */
.status-chip {
  position: relative;
  background: radial-gradient(circle at 0% 0%, rgba(255,204,51,0.07) 0%, rgba(0,0,0,0) 70%), rgba(0,0,0,0.4);
  border: 1px solid rgba(255,204,51,0.4);
  box-shadow:
    0 0 20px rgba(255,204,51,0.4),
    0 30px 80px rgba(0,0,0,0.9);
}
.cursor {
  background: var(--accent);
  width: 6px;
  height: 0.7em;
  display: inline-block;
  margin-left: 4px;
  box-shadow: 0 0 8px var(--accent);
  animation: blink 1s steps(2) infinite;
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50%     { opacity: 0; }
}

/* Header frame states (desktop header "arms" on scroll).
   JS will toggle .scrolled on #site-header */
.header-frame {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.07) inset,
    0 20px 60px rgba(0,0,0,0.8);
  transition: box-shadow .3s, background-color .3s;
}
.header-frame.scrolled {
  background-color: rgba(15,15,16,0.8);
  box-shadow:
    0 1px 0 var(--accent) inset,
    0 30px 80px rgba(0,0,0,0.9),
    0 0 30px rgba(255,204,51,0.3);
}

/* Nav link hover / active underline glow */
.nav-link {
  position: relative;
  color: rgba(255,255,255,0.6);
  font-size: 0.7rem;
  font-family: "Press Start 2P", monospace;
  letter-spacing: -0.03em;
  transition: color .15s;
}
.nav-link:hover {
  color: var(--accent);
  text-shadow: 0 0 12px var(--ring-soft);
}
.nav-link[data-active="true"] {
  color: var(--accent);
}
.nav-link[data-active="true"]::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: radial-gradient(circle at 50% 0%, var(--accent) 0%, rgba(0,0,0,0) 70%);
  box-shadow: 0 0 8px var(--ring-soft), 0 0 24px var(--ring-hard);
  border-radius: 999px;
}

/* Footer link style */
.footer-link {
  color: rgba(255,255,255,0.6);
  transition: color .15s;
}
.footer-link:hover {
  color: var(--accent);
  text-shadow: 0 0 12px var(--ring-soft);
}

/* Project card hover effect override (extra glow).
   We wrap each in .card-3d (see below) and overlay .glow-sheen */
.project-card:hover {
  box-shadow:
    0 0 30px rgba(255,204,51,0.25),
    0 40px 120px rgba(0,0,0,0.9);
}

/* holographic sheen overlay that appears on hover */
.glow-sheen {
  background: radial-gradient(
    circle at 20% 20%,
    rgba(255,204,51,0.08) 0%,
    transparent 70%
  );
  filter: blur(40px);
  mix-blend-mode: screen;
  pointer-events: none;
  border-radius: 0.75rem;
}

/* 3D tilt wrapper for project cards */
.card-3d {
  background: var(--panel-bg);
  border-radius: 0.75rem;
  border: 1px solid var(--panel-border);
  box-shadow:
    0 30px 80px rgba(0,0,0,0.8),
    0 0 60px rgba(255,204,51,0.08);
  transform-style: preserve-3d;
  transition:
    box-shadow .2s,
    transform .15s;
}
.card-3d:hover {
  box-shadow:
    0 40px 120px rgba(0,0,0,0.9),
    0 0 80px rgba(255,204,51,0.18);
}

/* Scroll reveal animation */
.reveal-block {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal-block.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile menu panel slide/scale feel.
   We'll toggle [data-open="true"]/false with JS. */
#mobileMenuPanel[data-open="true"] {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
#mobileMenuPanel[data-open="false"] {
  opacity: 0;
  transform: translateY(-0.5rem) scale(0.98);
  pointer-events: none;
  /* We'll still 'display: none' via inline style in JS when closed, after anim. */
}



/* Utility: retro-chip block in header logo */
.retro-chip {
  background-color: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow:
    0 0 20px rgba(255,204,51,0.4),
    0 30px 80px rgba(0,0,0,0.9);
}

/* Little "SYSTEM LOG" separator text row, mostly handled inline with Tailwind,
   but we keep a class hook if we want to theme them all later */
.data-separator {
  text-shadow: 0 0 8px rgba(0,0,0,0.8);
}

.footer-frame {
  box-shadow:
    0 -1px 0 rgba(255,255,255,0.07) inset,
    0 -20px 60px rgba(0,0,0,0.8);
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 0.12rem 0.32rem;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Keep block code clean */
.prose pre code { background: transparent; border: 0; padding: 0; }

/* Make standalone <code> elements start on a new line when they follow a block */
.prose > h1 + code,
.prose > h2 + code,
.prose > h3 + code,
.prose > h4 + code,
.prose > h5 + code,
.prose > h6 + code,
.prose > p + code,
.prose > ul + code,
.prose > ol + code {
  display: block;
  margin-top: 0.5em;
}
