/* ==========================================================
   V-SANDBOX — Shared Design System
   Single source of truth for styles used across all pages.
   ========================================================== */

:root {
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  background-color: #0B0C10;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0B0C10; }
::-webkit-scrollbar-thumb { background: #1F2833; border: 1px solid rgba(0,255,102,0.2); }
::-webkit-scrollbar-thumb:hover { background: #00FF66; }

/* ── Backgrounds ── */
.grid-bg {
  background-image:
    linear-gradient(rgba(0,255,102,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,102,0.04) 1px, transparent 1px);
  background-size: 42px 42px;
}

/* ── Glow Effects ── */
.glow-lime   { box-shadow: 0 0 12px rgba(0,255,102,0.35), inset 0 0 6px rgba(0,255,102,0.08); }
.glow-cyan   { box-shadow: 0 0 12px rgba(0,212,255,0.35), inset 0 0 6px rgba(0,212,255,0.08); }
.glow-orange { box-shadow: 0 0 12px rgba(255,119,0,0.35), inset 0 0 6px rgba(255,119,0,0.08); }
.glow-text   { text-shadow: 0 0 8px rgba(0,255,102,0.55), 0 0 22px rgba(0,255,102,0.25); }
.glow-text-cyan { text-shadow: 0 0 8px rgba(0,212,255,0.55), 0 0 22px rgba(0,212,255,0.25); }

.glow-hover  { transition: box-shadow .2s ease, border-color .2s ease; }
.glow-hover:hover { box-shadow: 0 0 18px rgba(0,255,102,0.45); }
.glow-hover-cyan:hover { box-shadow: 0 0 18px rgba(0,212,255,0.45); }

.glow-hover-orange { transition: box-shadow .2s ease, border-color .2s ease; }
.glow-hover-orange:hover { box-shadow: 0 0 18px rgba(255,119,0,0.45); }

/* ── Logo ── */
.logo-text {
  position: relative;
  display: inline-block;
  letter-spacing: -0.04em;
}

/* ── Blinking cursor ── */
.blink { animation: blink 1.05s step-end infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Scanlines overlay ── */
.scanlines::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.06) 3px,
    rgba(0,0,0,0) 4px
  );
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ── Navbar link underline ── */
.nav-link { position: relative; }
.nav-link::after {
  content: "";
  position: absolute; left: 0; bottom: -4px;
  height: 1px; width: 0;
  background: #00FF66;
  transition: width .25s ease;
}
.nav-link:hover::after { width: 100%; }

/* ── Success flash ── */
.success-flash { animation: flashGreen .9s ease; }
@keyframes flashGreen {
  0%   { background-color: rgba(0,255,102,0); }
  30%  { background-color: rgba(0,255,102,0.18); }
  100% { background-color: rgba(0,255,102,0); }
}

/* ── Log line animation ── */
.log-line { animation: fadeUp .3s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Terminal windows ── */
.terminal-window {
  border: 1px solid #1F2833;
  background-color: #121212;
  overflow: hidden;
  border-radius: 0.375rem;
}
.terminal-header {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #1F2833;
  background-color: rgba(31,40,51,0.4);
}
.terminal-dot { width: 0.75rem; height: 0.75rem; border-radius: 50%; }
.terminal-dot-red    { background: rgba(255,59,59,0.8); }
.terminal-dot-yellow { background: rgba(255,204,0,0.8); }
.terminal-dot-green  { background: rgba(0,255,102,0.8); }
.terminal-body {
  padding: 1.25rem 1.5rem;
  font-size: 0.85rem; line-height: 1.7;
  color: #D1D5DB;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .blink, .countbox::after { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .log-line { animation: none; }
  html { scroll-behavior: auto; }
  .animate-scroll { animation: none; }
}

/* ── Responsive: tiny screens (<380px) ── */
@media (max-width: 380px) {
  .hero-logo  { font-size: 1.75rem !important; }
  .status-sep { display: none !important; }
  .resp-stack { flex-direction: column !important; align-items: center !important; gap: 0.25rem !important; }
}
