/* ============================================================
   DESIGN TOKENS — DARK MODE
============================================================ */
:root,
[data-theme="dark"] {
  --bg-base: #060913;
  --bg-deep: #03050a;
  --bg-surface: rgba(14, 22, 44, 0.55);
  --bg-surface-hov: rgba(20, 34, 66, 0.72);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-hov: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(255, 255, 255, 0.09);
  --border-glow: rgba(0, 242, 254, 0.32);
  --border-subtle: rgba(255, 255, 255, 0.05);
  --primary: #00f2fe;
  --primary-rgb: 0, 242, 254;
  --secondary: #9d4edd;
  --secondary-rgb: 157, 78, 221;
  --accent: #a8dadc;
  --accent-green: #10b981;
  --text-main: #f0f4ff;
  --text-sub: #b0bdd8;
  --text-muted: #6b7fa8;
  --canvas-bg: radial-gradient(ellipse at 50% 30%, #0a0f2e 0%, #03050a 100%);
  --grid-color: rgba(0, 242, 254, 0.015);
  --blur-sm: blur(8px);
  --blur-md: blur(16px);
  --blur-lg: blur(24px);
  --blur-xl: blur(40px);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-card-hov: 0 20px 60px rgba(0, 242, 254, 0.08), 0 8px 32px rgba(0, 0, 0, 0.5);
  --glass-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 40%);
  --glass-sheen-hov: linear-gradient(180deg, rgba(0, 242, 254, 0.08) 0%, rgba(0, 242, 254, 0) 40%);
  --nav-bg: rgba(6, 9, 19, 0.70);
  --nav-scrolled: rgba(3, 5, 10, 0.90);
  --footer-bg: rgba(3, 5, 10, 0.92);
  --mobile-bg: rgba(3, 5, 10, 0.96);
  --toggle-bg: rgba(255, 255, 255, 0.05);
  --toggle-border: rgba(0, 242, 254, 0.25);
}

/* ============================================================
   DESIGN TOKENS — LIGHT MODE
============================================================ */
[data-theme="light"] {
  --bg-base: #eef2fc;
  --bg-deep: #dfe6f5;
  --bg-surface: rgba(255, 255, 255, 0.62);
  --bg-surface-hov: rgba(255, 255, 255, 0.80);
  --bg-glass: rgba(255, 255, 255, 0.45);
  --bg-glass-hov: rgba(255, 255, 255, 0.65);
  --border-glass: rgba(255, 255, 255, 0.80);
  --border-glow: rgba(79, 70, 229, 0.35);
  --border-subtle: rgba(200, 210, 240, 0.60);
  --primary: #4f46e5;
  --primary-rgb: 79, 70, 229;
  --secondary: #7c3aed;
  --secondary-rgb: 124, 58, 237;
  --accent: #2563eb;
  --accent-green: #059669;
  --text-main: #1a1f3c;
  --text-sub: #374167;
  --text-muted: #6b7fa8;
  --canvas-bg: radial-gradient(ellipse at 50% 0%, #c7d2fe 0%, #e0e7ff 50%, #eef2fc 100%);
  --grid-color: rgba(79, 70, 229, 0.06);
  --blur-sm: blur(8px);
  --blur-md: blur(16px);
  --blur-lg: blur(24px);
  --blur-xl: blur(40px);
  --shadow-card: 0 4px 24px rgba(79, 70, 229, 0.10), 0 1px 4px rgba(100, 120, 200, 0.08);
  --shadow-card-hov: 0 16px 48px rgba(79, 70, 229, 0.15), 0 4px 16px rgba(79, 70, 229, 0.08);
  --glass-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.50) 0%, rgba(255, 255, 255, 0) 40%);
  --glass-sheen-hov: linear-gradient(180deg, rgba(79, 70, 229, 0.06) 0%, rgba(79, 70, 229, 0) 40%);
  --nav-bg: rgba(238, 242, 252, 0.72);
  --nav-scrolled: rgba(230, 236, 252, 0.92);
  --footer-bg: rgba(220, 228, 250, 0.90);
  --mobile-bg: rgba(238, 242, 252, 0.97);
  --toggle-bg: rgba(79, 70, 229, 0.08);
  --toggle-border: rgba(79, 70, 229, 0.25);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--primary-rgb), 0.3) transparent;
  overflow-x: hidden;
}

body {
  background: var(--bg-base);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.45s ease, color 0.45s ease;
}

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

/* Smooth theme transitions on key elements */
nav.topnav,
footer,
.glass-card,
.btn,
.chip,
.hero-badge-float,
.about-chip,
.skills-tab-btn,
.terminal-container,
.mobile-menu {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   CANVAS & OVERLAYS
============================================================ */
#network-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
  background: var(--canvas-bg);
  transition: background 0.5s ease;
}

.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 95%);
  -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 95%);
}

.orb-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  transition: background 0.5s ease;
}

[data-theme="dark"] .orb-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -100px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.15), transparent 70%);
}

[data-theme="dark"] .orb-2 {
  width: 500px;
  height: 500px;
  bottom: -100px;
  left: -100px;
  background: radial-gradient(circle, rgba(157, 78, 221, 0.15), transparent 70%);
}

[data-theme="dark"] .orb-3 {
  width: 350px;
  height: 350px;
  top: 50%;
  left: 40%;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.05), transparent 70%);
}

[data-theme="light"] .orb-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -100px;
  background: radial-gradient(circle, rgba(199, 210, 254, 0.65), transparent 70%);
}

[data-theme="light"] .orb-2 {
  width: 500px;
  height: 500px;
  bottom: -100px;
  left: -100px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.35), transparent 70%);
}

[data-theme="light"] .orb-3 {
  width: 350px;
  height: 350px;
  top: 50%;
  left: 40%;
  background: radial-gradient(circle, rgba(224, 231, 255, 0.55), transparent 70%);
}

/* ============================================================
   LAYOUT
============================================================ */
.wrap {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

/* ============================================================
   GLASS CARD
============================================================ */
.glass-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  padding: 28px;
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

/* Frosted sheen gradient overlay — sits BEHIND card content */
.glass-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: var(--glass-sheen);
  pointer-events: none;
  border-radius: 18px 18px 0 0;
  transition: background 0.35s ease;
  z-index: 0;
}

/* Top inset highlight line */
.glass-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  pointer-events: none;
  z-index: 0;
}

.glass-card:hover {
  background: var(--bg-surface-hov);
  border-color: var(--border-glow);
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hov);
}

.glass-card:hover::before {
  background: var(--glass-sheen-hov);
}

/* Spotlight border ring (child element approach) */
.spotlight-ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: transparent;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.glass-card.spotlight:hover .spotlight-ring {
  opacity: 1;
}

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent 60%);
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.85) 0%, rgba(var(--secondary-rgb), 0.65) 100%);
  color: #fff;
  border-color: rgba(var(--primary-rgb), 0.30);
  box-shadow: 0 4px 18px rgba(var(--primary-rgb), 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.20);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.30);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-glass);
  border-color: var(--border-glass);
  color: var(--text-main);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  background: var(--bg-glass-hov);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* ============================================================
   THEME TOGGLE BUTTON
============================================================ */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid var(--toggle-border);
  background: var(--toggle-bg);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  cursor: pointer;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.theme-toggle-btn:active {
  transform: translateY(0);
}

.toggle-track {
  width: 38px;
  height: 20px;
  border-radius: 10px;
  background: rgba(var(--primary-rgb), 0.18);
  border: 1px solid rgba(var(--primary-rgb), 0.30);
  position: relative;
  transition: background 0.35s ease;
  flex-shrink: 0;
}

[data-theme="light"] .toggle-track {
  background: rgba(var(--primary-rgb), 0.40);
}

.toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px rgba(var(--primary-rgb), 0.6);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.35s ease;
}

[data-theme="light"] .toggle-knob {
  transform: translateX(18px);
}

.toggle-icon {
  font-size: 14px;
  transition: transform 0.4s ease;
}

.theme-toggle-btn:hover .toggle-icon {
  transform: rotate(20deg);
}

/* ============================================================
   NAVIGATION
============================================================ */
nav.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: var(--blur-xl);
  -webkit-backdrop-filter: var(--blur-xl);
  border-bottom: 1px solid var(--border-glass);
}

nav.topnav::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), 0.3), transparent);
  pointer-events: none;
}

nav.topnav.scrolled {
  background: var(--nav-scrolled);
  border-bottom-color: rgba(var(--primary-rgb), 0.18);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.20);
}

nav.topnav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 16px;
}

.brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.08em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.brand span {
  color: var(--primary);
  text-shadow: 0 0 15px rgba(var(--primary-rgb), 0.4);
}

.brand-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.8);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.4);
    opacity: 1;
  }
}

.navlinks {
  display: flex;
  gap: 24px;
  list-style: none;
}

.navlinks a {
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--text-sub);
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  transition: color 0.3s ease;
}

.navlinks a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s ease;
  border-radius: 2px;
}

.navlinks a:hover,
.navlinks a.active {
  color: var(--text-main);
}

.navlinks a:hover::after,
.navlinks a.active::after {
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navtoggle {
  display: none;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  backdrop-filter: var(--blur-sm);
  transition: all 0.3s ease;
}

.navtoggle:hover {
  border-color: var(--primary);
  background: var(--bg-glass-hov);
}

/* ============================================================
   MOBILE MENU
============================================================ */
.mobile-menu {
  position: fixed;
  top: 76px;
  left: 0;
  width: 100%;
  background: var(--mobile-bg);
  border-bottom: 1px solid var(--border-glass);
  backdrop-filter: var(--blur-xl);
  -webkit-backdrop-filter: var(--blur-xl);
  z-index: 99;
  display: none;
  padding: 24px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.mobile-menu-links a {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-sub);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mobile-menu-links a:hover,
.mobile-menu-links a.active {
  color: var(--primary);
}

/* ============================================================
   HERO
============================================================ */
.hero {
  position: relative;
  padding: 140px 0 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero-text {
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(var(--primary-rgb), 0.06);
  border: 1px solid rgba(var(--primary-rgb), 0.18);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 99px;
  font-family: 'Fira Code', monospace;
  font-size: 12.5px;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: var(--blur-sm);
  box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.hero-tag span.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulseGlow 1.8s infinite;
  flex-shrink: 0;
}

@keyframes pulseGlow {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
    box-shadow: 0 0 14px var(--accent-green);
  }
  100% {
    transform: scale(0.9);
    opacity: 0.6;
  }
}

h1.name {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(48px, 6.5vw, 76px);
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--primary) 70%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.tagline {
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--text-sub);
  max-width: 620px;
  margin-bottom: 28px;
  font-weight: 400;
  line-height: 1.55;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 38px;
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  color: var(--text-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-item svg {
  color: var(--primary);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Terminal */
.terminal-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  backdrop-filter: var(--blur-lg);
  -webkit-backdrop-filter: var(--blur-lg);
  height: 420px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.terminal-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 100% 0%, rgba(var(--primary-rgb), 0.04), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.terminal-header {
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-glass);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}

.td-close {
  background: #ef4444;
  color: #ef4444;
}

.td-min {
  background: #f59e0b;
  color: #f59e0b;
}

.td-max {
  background: #10b981;
  color: #10b981;
}

.terminal-title {
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.terminal-body {
  padding: 18px;
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: auto;
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.5;
  color: #a7f3d0;
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 185, 129, 0.3) transparent;
  position: relative;
  z-index: 1;
}

[data-theme="light"] .terminal-body {
  color: #065f46;
}

.c-prompt {
  color: var(--primary);
}

.c-command {
  color: var(--text-main);
  font-weight: 500;
}

.c-info {
  color: #60a5fa;
}

.c-success {
  color: #34d399;
}

.c-warn {
  color: #fbbf24;
}

.c-error {
  color: #f87171;
}

.c-accent {
  color: #c084fc;
}

.terminal-line {
  margin-bottom: 8px;
  white-space: pre-wrap;
  opacity: 0;
  animation: fadeInLine 0.25s forwards ease;
}

@keyframes fadeInLine {
  to {
    opacity: 1;
  }
}

.terminal-controls {
  background: var(--bg-glass);
  border-top: 1px solid var(--border-glass);
  padding: 12px 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  position: relative;
  z-index: 1;
}

.terminal-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-family: 'Fira Code', monospace;
  font-size: 11.5px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: var(--blur-sm);
  transition: all 0.3s ease;
}

.terminal-btn:hover {
  background: rgba(var(--primary-rgb), 0.08);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 12px rgba(var(--primary-rgb), 0.12);
}

.hero-badge-float {
  position: absolute;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  padding: 8px 14px;
  border-radius: 10px;
  font-family: 'Fira Code', monospace;
  font-size: 11.5px;
  color: var(--accent);
  backdrop-filter: var(--blur-md);
  pointer-events: none;
  animation: floatMove 6s infinite ease-in-out;
  box-shadow: var(--shadow-card);
}

.badge-f1 {
  top: 12%;
  left: 8%;
  animation-delay: 0s;
}

.badge-f2 {
  bottom: 15%;
  left: 4%;
  animation-delay: 1.5s;
}

.badge-f3 {
  top: 8%;
  right: 40%;
  animation-delay: 3s;
}

.badge-f4 {
  bottom: 8%;
  right: 12%;
  animation-delay: 4.5s;
}

@keyframes floatMove {
  0% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-10px) rotate(1.5deg);
  }
  100% {
    transform: translateY(0) rotate(0);
  }
}

/* ============================================================
   SECTIONS
============================================================ */
section {
  padding: 100px 0;
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
}

section::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

section:last-of-type {
  border-bottom: none;
}

section:last-of-type::after {
  display: none;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 50px;
}

.section-num {
  font-family: 'Fira Code', monospace;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  border: 1px solid rgba(var(--primary-rgb), 0.25);
  padding: 2px 10px;
  border-radius: 6px;
  background: rgba(var(--primary-rgb), 0.05);
  backdrop-filter: var(--blur-sm);
}

h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   ABOUT
============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 48px;
  align-items: start;
}

.about-text p {
  color: var(--text-sub);
  font-size: 16.5px;
  margin-bottom: 20px;
  max-width: 65ch;
}

.about-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.about-chip {
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.05);
  border: 1px solid rgba(var(--primary-rgb), 0.18);
  padding: 6px 14px;
  border-radius: 8px;
  backdrop-filter: var(--blur-sm);
}

.stat-widget {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stat-card {
  text-align: center;
  padding: 32px 20px;
}

.stat-num {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(32px, 3.5vw, 44px);
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 13.5px;
  color: var(--text-sub);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ============================================================
   EXPERIENCE COUNTER CARDS
============================================================ */
.exp-counter-card {
  position: relative;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

#fulltime-card {
  border: 1.5px solid rgba(var(--primary-rgb), 0.45);
  box-shadow: 0 0 24px rgba(var(--primary-rgb), 0.12),
              0 0 60px rgba(var(--primary-rgb), 0.06);
}

.exp-counter-badge {
  display: inline-block;
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  color: var(--text-muted);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
}

.exp-counter-badge.max-badge {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
  border-color: rgba(var(--primary-rgb), 0.3);
  animation: badge-pulse 2.5s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.exp-counter-range {
  display: block;
  font-family: 'Outfit', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 8px;
  opacity: 0.7;
}

/* ============================================================
   TECHNICAL STACK
============================================================ */
.skills-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
  justify-content: center;
}

.skills-tab-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-sub);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  padding: 8px 18px;
  border-radius: 30px;
  cursor: pointer;
  backdrop-filter: var(--blur-sm);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.skills-tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.skills-tab-btn.active {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.20) 0%, rgba(var(--secondary-rgb), 0.15) 100%);
  border-color: var(--primary);
  color: var(--text-main);
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.15);
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 24px;
}

.skill-group h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-family: 'Fira Code', monospace;
  font-size: 11.5px;
  color: var(--text-sub);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  padding: 5px 11px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.04);
}

/* ============================================================
   TIMELINE (EXPERIENCE)
============================================================ */
.timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  opacity: 0.3;
}

.tl-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 40px;
}

.tl-item:last-child {
  margin-bottom: 0;
}

.tl-dot {
  position: absolute;
  left: 14px;
  top: 26px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 3px solid var(--secondary);
  box-shadow: 0 0 10px rgba(var(--secondary-rgb), 0.5);
  z-index: 2;
  transition: all 0.4s ease;
}

.tl-item.current .tl-dot {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.8);
  transform: scale(1.2);
}

.tl-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.tl-role {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.tl-date {
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.05);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  padding: 4px 12px;
  border-radius: 30px;
  font-weight: 600;
  letter-spacing: 0.05em;
  backdrop-filter: var(--blur-sm);
}

.tl-org {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tl-org svg {
  color: var(--primary);
}

.tl-item ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 4px;
}

.tl-item li {
  position: relative;
  padding-left: 20px;
  color: var(--text-sub);
  font-size: 15px;
}

.tl-item li::before {
  content: "\26A1";
  /* Lightning bolt emoji Unicode escape */
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 11px;
  color: var(--primary);
}

/* ============================================================
   PROJECTS
============================================================ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 28px;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.project-head h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
}

.project-badge {
  font-family: 'Fira Code', monospace;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid var(--primary);
  color: var(--primary);
  white-space: nowrap;
  background: rgba(var(--primary-rgb), 0.06);
  backdrop-filter: var(--blur-sm);
}

.project-badge.concept {
  border-color: var(--secondary);
  color: var(--secondary);
  background: rgba(var(--secondary-rgb), 0.06);
}

.project-desc {
  color: var(--text-sub);
  font-size: 14.5px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.project-label {
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 12px 0 8px;
  text-transform: uppercase;
}

.project-card .chip-row {
  margin-bottom: 12px;
}

/* ============================================================
   EXPLORE / CREDENTIALS
============================================================ */
.explore-note {
  color: var(--text-sub);
  font-size: 15.5px;
  margin-bottom: 35px;
  max-width: 65ch;
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 24px;
}

#credentials {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  width: 100%;
}

.cert-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.06);
  padding: 6px 14px;
  border-radius: 30px;
  backdrop-filter: var(--blur-sm);
}

.cert-badge svg {
  fill: none;
  stroke: var(--accent-green);
}

.edu-meta {
  font-family: 'Fira Code', monospace;
  font-size: 13.5px;
  color: var(--accent);
  margin: 4px 0 14px;
}

.edu-coursework {
  margin-top: 14px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

.edu-coursework p {
  font-size: 14.5px;
  color: var(--text-sub);
}

/* ============================================================
   FOOTER
============================================================ */
footer {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 120px 0 40px;
  background: var(--footer-bg);
  position: relative;
  border-top: 1px solid var(--border-glass);
  backdrop-filter: var(--blur-xl);
  -webkit-backdrop-filter: var(--blur-xl);
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(var(--secondary-rgb), 0.04), transparent 50%);
  pointer-events: none;
}

footer .wrap {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  width: 100%;
}

.footer-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
  height: 100%;
  margin-top: auto;
}

footer h2 {
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--primary) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

footer p.sub {
  color: var(--text-sub);
  max-width: 580px;
  margin: 0 auto 38px;
  font-size: 16px;
}

.contact-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 70px;
}

.copyright {
  color: var(--text-muted);
  font-size: 13px;
  font-family: 'Fira Code', monospace;
  border-top: 1px solid var(--border-subtle);
  padding-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

/* ============================================================
   TOAST & BACK-TO-TOP
============================================================ */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--primary);
  color: var(--text-main);
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.25), var(--shadow-card);
  z-index: 1000;
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: var(--blur-lg);
  -webkit-backdrop-filter: var(--blur-lg);
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  box-shadow: var(--shadow-card);
}

.scroll-top-btn.show {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: rgba(var(--primary-rgb), 0.1);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 16px rgba(var(--primary-rgb), 0.25);
  transform: translateY(-3px);
}

.scroll-top-btn:active {
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE MEDIA QUERIES
============================================================ */
@media (max-width: 1200px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-meta {
    align-items: center;
  }
  .cta-row {
    justify-content: center;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .hero-badge-float {
    display: none;
  }
}

@media (max-width: 768px) {
  nav.topnav .navlinks {
    display: none;
  }
  .navtoggle {
    display: block;
  }
  .wrap {
    padding: 0 24px;
  }
  section {
    padding: 70px 0;
  }
  .terminal-container {
    height: 380px;
  }
  .theme-toggle-btn .toggle-label {
    display: none;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 0 16px;
  }
  h1.name {
    font-size: clamp(34px, 11vw, 48px);
  }
  .hero {
    padding: 100px 0 60px;
  }
  .cta-row {
    flex-direction: column;
    width: 100%;
  }
  .cta-row .btn {
    width: 100%;
  }
  .btn {
    padding: 10px 16px;
    font-size: 13.5px;
    gap: 8px;
  }
  .terminal-controls {
    grid-template-columns: 1fr;
  }
  .terminal-container {
    height: 360px;
  }
  .terminal-body {
    font-size: 11.5px;
    padding: 12px;
  }
  .skills-tab-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  .tl-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .tl-date {
    margin-top: 4px;
  }
  .tl-role {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .glass-card:hover,
  .btn:hover {
    transform: none !important;
  }
  #network-canvas {
    display: none;
  }
}

/* ============================================================
   SECTION DECORATIVE GRAPHICS
============================================================ */

/* Shared: decorative SVG containers in sections */
.section-deco {
  position: absolute;
  pointer-events: none;
  opacity: 0.55;
  transition: opacity 0.5s ease;
}

[data-theme="light"] .section-deco {
  opacity: 0.45;
}

/* --- ABOUT: network node diagram (top-right) --- */
#about {
  overflow: hidden;
}

.deco-about {
  right: -40px;
  top: 40px;
  width: 340px;
  height: 320px;
}

/* --- SKILLS: circuit lines (bottom-left) --- */
#skills {
  overflow: hidden;
}

.deco-skills {
  left: -20px;
  bottom: 0px;
  width: 300px;
  height: 280px;
  opacity: 0.30;
}

/* --- EXPERIENCE: server rack (right side) --- */
#experience {
  overflow: hidden;
}

.deco-exp {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 160px;
  height: 400px;
  opacity: 0.35;
}

/* --- PROJECTS: data-flow nodes (top-right) --- */
#projects {
  overflow: hidden;
}

.deco-projects {
  right: -30px;
  top: 30px;
  width: 320px;
  height: 260px;
  opacity: 0.30;
}

/* --- EXPLORATIONS: neural mesh (left) --- */
#explorations {
  overflow: hidden;
}

.deco-explore {
  left: -30px;
  bottom: -20px;
  width: 300px;
  height: 300px;
  opacity: 0.28;
}

/* --- CREDENTIALS: cert seal (right) --- */
#credentials {
  overflow: hidden;
}

.deco-cred {
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  width: 220px;
  height: 220px;
  opacity: 0.22;
}

/* --- FOOTER: signal waves --- */
footer {
  overflow: hidden;
}

.deco-footer {
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 900px;
  height: 200px;
  opacity: 0.18;
}

/* Spin animation for seal deco */
@keyframes slowSpin {
  from {
    transform: translateY(-50%) rotate(0deg);
  }
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.deco-cred .seal-ring {
  transform-origin: 110px 110px;
  animation: slowSpin 40s linear infinite;
}

/* Pulse on network nodes */
@keyframes nodePulse {
  0%,
  100% {
    r: 5;
  }
  50% {
    r: 7;
  }
}

.deco-about .nd {
  animation: nodePulse 3s ease-in-out infinite;
}

.deco-about .nd:nth-child(2) {
  animation-delay: 0.6s;
}

.deco-about .nd:nth-child(3) {
  animation-delay: 1.2s;
}

.deco-about .nd:nth-child(4) {
  animation-delay: 1.8s;
}

.deco-about .nd:nth-child(5) {
  animation-delay: 2.4s;
}

/* Flowing dash animation */
@keyframes dashFlow {
  to {
    stroke-dashoffset: -100;
  }
}

.flow-line {
  stroke-dasharray: 8 6;
  animation: dashFlow 3s linear infinite;
}

.flow-line:nth-child(2) {
  animation-delay: 0.8s;
}

.flow-line:nth-child(3) {
  animation-delay: 1.6s;
}

/* Server rack LED blink */
@keyframes ledBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
}

.led-g {
  animation: ledBlink 1.4s ease-in-out infinite;
}

.led-g:nth-child(2) {
  animation-delay: 0.3s;
}

.led-g:nth-child(3) {
  animation-delay: 0.6s;
}

.led-g:nth-child(4) {
  animation-delay: 0.9s;
}

.led-g:nth-child(5) {
  animation-delay: 1.2s;
}

/* Neural mesh orbit */
@keyframes orbit {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -200;
  }
}

.neural-orbit {
  stroke-dasharray: 6 4;
  animation: orbit 4s linear infinite;
}

.neural-orbit:nth-child(even) {
  animation-direction: reverse;
}

@media (max-width: 992px) {
  .deco-about,
  .deco-exp,
  .deco-cred,
  .deco-projects {
    display: none;
  }
  .deco-skills {
    opacity: 0.18;
    width: 200px;
  }
  .deco-explore {
    width: 200px;
  }
}

/* ============================================================
   SPOTLIGHT & FLAGSHIP PROJECT ENHANCEMENTS
============================================================ */
.spotlight {
  position: relative;
  overflow: hidden;
}

.spotlight-ring {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(var(--primary-rgb), 0.15),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.spotlight:hover .spotlight-ring {
  opacity: 1;
}

/* FLAGSHIP CARD STYLING */
.flagship-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(14, 22, 44, 0.75) 0%, rgba(20, 34, 66, 0.60) 100%);
  border: 1px solid rgba(0, 242, 254, 0.4);
  box-shadow: 0 12px 40px rgba(0, 242, 254, 0.12), 0 4px 16px rgba(0, 0, 0, 0.6);
  padding: 36px;
  position: relative;
}

[data-theme="light"] .flagship-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(238, 242, 252, 0.85) 100%);
  border-color: rgba(79, 70, 229, 0.4);
  box-shadow: 0 12px 40px rgba(79, 70, 229, 0.15), 0 4px 16px rgba(100, 120, 200, 0.1);
}

.project-flagship-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.35);
  color: var(--primary);
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.15);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  animation: pulseGlow 1.8s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.3); }
}

.project-badge.flagship {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
}

/* AUDIT PIPELINE WORKFLOW */
.audit-pipeline-container {
  margin: 22px 0;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: 12px;
  padding: 16px 20px;
}

/* AUDIT PIPELINE WORKFLOW */
.audit-pipeline-container {
  margin: 24px 0;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(0, 242, 254, 0.22);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .audit-pipeline-container {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(79, 70, 229, 0.25);
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.06);
}

.pipeline-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.pipeline-title {
  font-family: 'Fira Code', monospace;
  font-size: 11.5px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.pipeline-badge {
  font-family: 'Fira Code', monospace;
  font-size: 10.5px;
  color: var(--secondary);
  background: rgba(157, 78, 221, 0.12);
  border: 1px solid rgba(157, 78, 221, 0.3);
  padding: 3px 10px;
  border-radius: 6px;
}

.pipeline-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  gap: 10px;
}

.p-step {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
  border-radius: 10px;
  transition: all 0.25s ease;
}

.p-step:hover {
  background: rgba(0, 242, 254, 0.08);
  border-color: rgba(0, 242, 254, 0.35);
  transform: translateY(-2px);
}

[data-theme="light"] .p-step {
  background: rgba(79, 70, 229, 0.04);
  border-color: rgba(79, 70, 229, 0.15);
}

[data-theme="light"] .p-step:hover {
  background: rgba(79, 70, 229, 0.08);
  border-color: var(--primary);
}

.p-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #03050a;
  font-weight: 800;
  font-family: 'Fira Code', monospace;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

[data-theme="light"] .p-num {
  color: #ffffff;
}

.p-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.p-info strong {
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  color: var(--text-main);
  letter-spacing: 0.01em;
}

.p-info small {
  font-family: 'Fira Code', monospace;
  font-size: 10px;
  color: var(--text-muted);
}

.p-arrow {
  display: none;
}

/* ENGINEERING PRINCIPLE BOX */
.engineering-principle-box {
  background: rgba(157, 78, 221, 0.08);
  border-left: 3px solid var(--secondary);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin-bottom: 22px;
}

.principle-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fira Code', monospace;
  font-size: 11.5px;
  color: var(--secondary);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.engineering-principle-box p {
  font-style: italic;
  font-size: 14.5px;
  color: var(--text-main);
  line-height: 1.5;
  margin: 0;
}

.chip.highlight {
  background: rgba(0, 242, 254, 0.08);
  border-color: rgba(0, 242, 254, 0.25);
  color: var(--text-main);
  font-weight: 500;
}

.chip.cisco-tag {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-weight: 600;
}

[data-theme="light"] .chip.cisco-tag {
  color: #059669;
  background: rgba(5, 150, 105, 0.1);
}

.next-roadmap-badge {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--text-sub);
  margin-top: 18px;
  margin-bottom: 24px;
}

.roadmap-icon {
  font-size: 16px;
}

/* BUTTON & LINKS ROW */
.project-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
  align-items: center;
}

.project-links-row .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 22px;
}

@media (max-width: 900px) {
  .pipeline-steps {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

@media (max-width: 768px) {
  .flagship-card {
    padding: 24px 20px;
  }
}

@media (max-width: 600px) {
  .pipeline-steps {
    grid-template-columns: 1fr;
  }
}
