/* Custom styles for NCO Cyber Savvy Hub */
:root {
  --radius: 0.5rem;
  --background: oklch(0.975 0.008 230);
  --foreground: oklch(0.16 0.03 240);
  --surface: oklch(0.94 0.014 225);
  --card: oklch(0.99 0.005 225);
  --card-foreground: oklch(0.16 0.03 240);
  --popover: oklch(0.99 0.005 225);
  --popover-foreground: oklch(0.16 0.03 240);
  --primary: oklch(0.62 0.15 210);
  --primary-foreground: oklch(0.99 0.005 225);
  --secondary: oklch(0.92 0.018 225);
  --secondary-foreground: oklch(0.16 0.03 240);
  --muted: oklch(0.92 0.018 225);
  --muted-foreground: oklch(0.44 0.025 235);
  --accent: oklch(0.92 0.02 220);
  --accent-foreground: oklch(0.16 0.03 240);
  --destructive: oklch(0.6 0.22 25);
  --destructive-foreground: oklch(1 0 0);
  --border: oklch(0.35 0.04 235 / 14%);
  --input: oklch(0.35 0.04 235 / 18%);
  --ring: oklch(0.62 0.15 210);
  --red-team: oklch(0.56 0.22 22);
  --blue-team: oklch(0.54 0.16 210);
  --ink: oklch(0.14 0.035 240);
  --gradient-cyber: linear-gradient(135deg, oklch(0.14 0.035 240) 0%, oklch(0.22 0.07 225) 55%, oklch(0.3 0.12 205) 100%);
  --gradient-soft: linear-gradient(180deg, oklch(0.975 0.008 230) 0%, oklch(0.94 0.018 220) 100%);
  --shadow-glow: 0 0 40px oklch(0.62 0.15 210 / 0.35);
  --shadow-card: 0 12px 32px -14px oklch(0.16 0.03 240 / 0.18);
}

* {
  border-color: var(--border);
}

html {
  scrollbar-gutter: stable;
  scrollbar-width: none; /* Firefox */
  background-color: var(--background);
  color: var(--foreground);
  font-family: "Inter", ui-sans-serif, system-ui;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
} /* Chromium/Safari */

body {
  background-image:
    radial-gradient(1200px 600px at 85% -10%, oklch(0.62 0.15 210 / 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, oklch(0.56 0.22 22 / 0.05), transparent 60%),
    linear-gradient(oklch(0.35 0.04 235 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.35 0.04 235 / 0.045) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
  background-attachment: fixed;
  -ms-overflow-style: none;
}

/* -------- Animations -------- */
@keyframes scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}
.scanline::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, oklch(0.68 0.14 200 / 0.03), transparent);
  height: 120px;
  animation: scan 8s linear infinite;
  z-index: 100;
}

/* Dark hero section utility */
.dark-section {
  background: var(--gradient-cyber);
  color: oklch(0.98 0.005 220);
  position: relative;
}
.dark-section .muted { color: oklch(0.75 0.02 220); }
.grid-bg-dark {
  background-image:
    linear-gradient(oklch(1 0 0 / 0.06) 1px, transparent 1px),
    linear-gradient(90deg, oklch(1 0 0 / 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridpan 20s linear infinite;
}

/* Neon shine sweep */
@keyframes shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}
.shine-hover { position: relative; overflow: hidden; }
.shine-hover::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 40%, oklch(1 0 0 / 0.25) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.shine-hover:hover::before { transform: translateX(100%); }

/* Tilt cards */
.tilt { transition: transform 0.4s cubic-bezier(.2,.9,.3,1.2), box-shadow 0.3s; }
.tilt:hover { transform: perspective(900px) rotateX(2deg) rotateY(-2deg) translateY(-6px); box-shadow: var(--shadow-card); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.15); }
}
.pulse-dot { animation: pulse-dot 2s ease-in-out infinite; }

@keyframes glow {
  0%, 100% { filter: drop-shadow(0 0 8px oklch(0.65 0.2 240 / 0.6)) drop-shadow(0 0 20px oklch(0.65 0.2 240 / 0.3)); }
  50% { filter: drop-shadow(0 0 14px oklch(0.65 0.2 240 / 0.9)) drop-shadow(0 0 32px oklch(0.65 0.2 240 / 0.5)); }
}
.glow { animation: glow 3s ease-in-out infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.float { animation: float 4s ease-in-out infinite; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fade-up 0.8s ease-out both; }
.fade-up-delay-1 { animation: fade-up 0.8s ease-out 0.15s both; }
.fade-up-delay-2 { animation: fade-up 0.8s ease-out 0.3s both; }
.fade-up-delay-3 { animation: fade-up 0.8s ease-out 0.45s both; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-container {
  overflow: hidden;
  display: flex;
  white-space: nowrap;
}
.marquee {
  display: inline-block;
  animation: marquee 40s linear infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  45% { opacity: 1; }
  50% { opacity: 0.7; }
  55% { opacity: 1; }
}
.flicker { animation: flicker 4s infinite; }

@keyframes blink {
  50% { opacity: 0; }
}
.cursor-blink::after {
  content: "_";
  animation: blink 1s step-end infinite;
  margin-left: 4px;
  color: var(--red-team);
}

@keyframes gridpan {
  0% { background-position: 0 0; }
  100% { background-position: 40px 40px; }
}
.grid-bg {
  background-image:
    linear-gradient(oklch(0.18 0.02 235 / 0.06) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.18 0.02 235 / 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridpan 20s linear infinite;
}

.hover-lift { transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease; }
.hover-lift:hover { transform: translateY(-4px); }

/* -------- Technical / HUD Vibe -------- */

/* Corner-bracketed frame */
.tech-frame { position: relative; }
.tech-frame::before,
.tech-frame::after,
.tech-frame > .tf-b1,
.tech-frame > .tf-b2 {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border-color: oklch(0.62 0.15 210);
  border-style: solid;
  border-width: 0;
  pointer-events: none;
  transition: all 0.35s ease;
}
.tech-frame::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.tech-frame::after  { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.tech-frame > .tf-b1 { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.tech-frame > .tf-b2 { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.tech-frame:hover::before, .tech-frame:hover::after,
.tech-frame:hover > .tf-b1, .tech-frame:hover > .tf-b2 {
  width: 22px; height: 22px;
  filter: drop-shadow(0 0 6px oklch(0.62 0.15 210 / 0.7));
}

/* HUD tag */
.hud-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: oklch(0.62 0.15 210);
  padding: 4px 10px;
  border: 1px solid oklch(0.62 0.15 210 / 0.4);
  border-radius: 4px;
  background: oklch(0.62 0.15 210 / 0.06);
  position: relative;
}
.hud-tag::before {
  content: "";
  width: 6px; height: 6px; border-radius: 999px;
  background: oklch(0.62 0.15 210);
  box-shadow: 0 0 8px oklch(0.62 0.15 210);
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Terminal-style code block */
.terminal {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  background: oklch(0.14 0.035 240);
  color: oklch(0.85 0.02 220);
  border: 1px solid oklch(0.62 0.15 210 / 0.35);
  border-radius: 8px;
  padding: 14px 16px 14px 16px;
  font-size: 12px;
  line-height: 1.7;
  box-shadow: 0 20px 40px -20px oklch(0.14 0.035 240 / 0.6), inset 0 0 0 1px oklch(1 0 0 / 0.03);
  position: relative;
  overflow: hidden;
}
.terminal::before {
  content: "● ● ●";
  display: block;
  color: oklch(0.55 0.18 25);
  letter-spacing: 4px;
  font-size: 10px;
  margin-bottom: 10px;
  opacity: 0.8;
}
.terminal .prompt { color: oklch(0.62 0.15 210); }
.terminal .comment { color: oklch(0.55 0.02 220); }
.terminal .str { color: oklch(0.75 0.15 140); }
.terminal .kw  { color: oklch(0.7 0.18 25); }

/* Ticker / status line */
.status-strip {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: oklch(0.44 0.025 235);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, transparent, oklch(0.62 0.15 210 / 0.05), transparent);
}

/* Data readout */
.readout { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; }
.readout .k { color: oklch(0.44 0.025 235); letter-spacing: 0.18em; text-transform: uppercase; }
.readout .v { color: var(--ink); }
.dark-section .readout .v { color: inherit; }

/* Circuit-line divider */
.circuit-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, oklch(0.62 0.15 210 / 0.5), transparent);
  position: relative;
}
.circuit-line::before, .circuit-line::after {
  content: "";
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 999px;
  background: oklch(0.62 0.15 210);
  box-shadow: 0 0 10px oklch(0.62 0.15 210);
}
.circuit-line::before { left: 20%; }
.circuit-line::after  { right: 20%; }

/* Noise overlay */
.noise::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.2  0 0 0 0 0.5  0 0 0 0 0.7  0 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.35'/></svg>");
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* --- Tailwind CDN Fallbacks --- */
.cyber-header {
  background-color: oklch(0.14 0.035 240 / 95%) !important;
  border-bottom: 1px solid oklch(0.62 0.15 210 / 20%) !important;
  box-shadow: 0 4px 20px -4px oklch(0.14 0.035 240 / 50%) !important;
}

.cyber-mobile-nav {
  background-color: oklch(0.14 0.035 240) !important;
}

.cyber-hero-overlay {
  background: linear-gradient(to right, oklch(0.13 0.02 235 / 100%), oklch(0.13 0.02 235 / 85%) 55%, oklch(0.13 0.02 235 / 40%) 100%) !important;
}

.cyber-text-alert {
  color: oklch(0.75 0.14 180) !important;
}

.cyber-logo-glow {
  filter: drop-shadow(0 0 18px oklch(0.68 0.14 200 / 70%)) !important;
}

