@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

:root {
  --bg-deep: #050510;
  --bg-darker: #0a0a1a;
  --neon-violet: #7C3AED;
  --neon-cyan: #06B6D4;
  --neon-pink: #EC4899;
  --glass-bg: rgba(10, 10, 26, 0.4);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-muted: #a0a0b0;
  --font-main: 'Space Grotesk', sans-serif;
  --font-code: 'Fira Code', monospace;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-main);
  overflow-x: hidden;
}

/* Global 3D Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--neon-violet), var(--neon-cyan));
  border-radius: 5px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  color: var(--text-primary);
  font-weight: 700;
}

.text-gradient {
  background: linear-gradient(45deg, var(--neon-cyan), var(--neon-violet), var(--neon-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.font-code {
  font-family: var(--font-code);
}

/* Glassmorphism Utilities */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* --- CYBERPUNK FLOATING GLASS NAVBAR --- */
.cyber-navbar {
  display: flex !important;
  top: 20px;
  left: 5%;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 30px;
  background: rgba(10, 10, 26, 0.5) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(6, 182, 212, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 
              0 0 30px rgba(124, 58, 237, 0.1),
              inset 0 0 15px rgba(6, 182, 212, 0.1);
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 1000;
  padding: 10px 20px !important;
}

/* Scroll collapse state styled in CSS via JS scroll-class */
.cyber-navbar.navbar-scrolled {
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  border-radius: 0;
  background: rgba(5, 5, 16, 0.85) !important;
  border-bottom: 1px solid rgba(6, 182, 212, 0.4);
  border-top: none;
  border-left: none;
  border-right: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8),
              0 0 40px rgba(6, 182, 212, 0.15);
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

.cyber-brand {
  position: relative;
  perspective: 500px;
  text-decoration: none !important;
}

.cyber-brand h1 {
  font-size: 1.6rem !important;
  letter-spacing: 2px;
  text-shadow: 0 0 15px rgba(6, 182, 212, 0.6);
  transition: text-shadow 0.3s ease, transform 0.3s ease;
}

.cyber-brand:hover h1 {
  text-shadow: 0 0 25px rgba(236, 72, 153, 0.9), 0 0 10px var(--neon-cyan);
  transform: translateZ(10px) rotateY(-5deg);
}

.brand-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(6, 182, 212, 0.3) 0%, transparent 70%);
  z-index: -1;
  filter: blur(10px);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.cyber-brand:hover .brand-glow {
  opacity: 1;
}

/* Nav links futuristic updates */
.cyber-navbar .navbar-nav .nav-link {
  color: var(--text-primary) !important;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 1px;
  padding: 10px 20px !important;
  margin: 0 5px;
  border-radius: 20px;
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

.cyber-navbar .navbar-nav .nav-link::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(124, 58, 237, 0.15));
  border-radius: 20px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: -1;
}

.cyber-navbar .navbar-nav .nav-link:hover::before,
.cyber-navbar .navbar-nav .nav-link.active::before {
  opacity: 1;
  transform: scale(1);
}

.cyber-navbar .navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15%;
  width: 70%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-violet), transparent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.cyber-navbar .navbar-nav .nav-link:hover::after,
.cyber-navbar .navbar-nav .nav-link.active::after {
  transform: scaleX(1);
}

.cyber-navbar .navbar-nav .nav-link:hover,
.cyber-navbar .navbar-nav .nav-link.active {
  color: #fff !important;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.8);
}

/* High-Tech Custom Toggler Burger */
.cyber-toggler {
  border: 1px solid rgba(6, 182, 212, 0.4) !important;
  background: rgba(10, 10, 26, 0.5) !important;
  border-radius: 8px;
  padding: 8px 12px !important;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
  transition: all 0.3s ease;
}

.cyber-toggler:hover {
  border-color: var(--neon-pink) !important;
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.4);
}

.cyber-toggler-inner {
  width: 20px;
  height: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cyber-toggler-inner span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--neon-cyan);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cyber-toggler:not(.collapsed) .cyber-toggler-inner span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  background-color: var(--neon-pink);
}

.cyber-toggler:not(.collapsed) .cyber-toggler-inner span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.cyber-toggler:not(.collapsed) .cyber-toggler-inner span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  background-color: var(--neon-pink);
}

/* Navbar ambient hover light glow */
.navbar-glow {
  position: absolute;
  bottom: -20px;
  left: 10%;
  width: 80%;
  height: 20px;
  background: radial-gradient(ellipse, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.7;
  transition: all 0.5s ease;
}

.cyber-navbar.navbar-scrolled .navbar-glow {
  bottom: -15px;
  background: radial-gradient(ellipse, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
}

/* Hero Section */
.hero-container {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: transparent !important;
  z-index: 1;
}

/* --- THE HOLOGRAPHIC HUD SCANNING CHAMBER --- */
.hud-scanning-chamber {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 2000px;
  transform-style: preserve-3d;
}

.hud-ring-outer,
.hud-ring-inner {
  position: absolute;
  width: 110%;
  height: 110%;
  top: -5%;
  left: -5%;
  pointer-events: none;
  z-index: 1;
  transform-style: preserve-3d;
}

.hud-ring-outer {
  animation: spinOuter 25s linear infinite;
  transform: translateZ(-30px);
}

.hud-ring-inner {
  animation: spinInner 15s linear infinite reverse;
  transform: translateZ(35px) scale(0.95);
}

.hud-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.4));
}

@keyframes spinOuter {
  0% { transform: translateZ(-30px) rotate(0deg); }
  100% { transform: translateZ(-30px) rotate(360deg); }
}

@keyframes spinInner {
  0% { transform: translateZ(35px) scale(0.95) rotate(0deg); }
  100% { transform: translateZ(35px) scale(0.95) rotate(360deg); }
}

/* Corner bracket indicators */
.hud-brackets {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 3;
  transform: translateZ(45px);
}

.hud-bracket {
  position: absolute;
  width: 25px;
  height: 25px;
  border: 2px solid var(--neon-cyan);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  filter: drop-shadow(0 0 5px var(--neon-cyan));
}

.bracket-tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.bracket-tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.bracket-bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.bracket-br { bottom: 0; right: 0; border-left: none; border-top: none; }

.hud-scanning-chamber:hover .hud-bracket {
  width: 35px;
  height: 35px;
  border-color: var(--neon-pink);
  filter: drop-shadow(0 0 10px var(--neon-pink));
}

/* Data coordinate tags */
.hud-coord {
  position: absolute;
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  pointer-events: none;
  z-index: 3;
  text-shadow: 0 0 5px rgba(6, 182, 212, 0.5);
  animation: pulseOpacity 2s infinite alternate;
}

.coord-left {
  left: -35px;
  top: 40px;
  transform: rotate(-90deg) translateZ(40px);
  transform-origin: left top;
}

.coord-right {
  right: -35px;
  bottom: 40px;
  transform: rotate(90deg) translateZ(40px);
  transform-origin: right bottom;
}

@keyframes pulseOpacity {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* Redesign image wrapper inside HUD context */
.hero-image-wrapper {
  position: relative;
  width: 90%;
  height: 90%;
  border-radius: 20px;
  z-index: 2;
  transform-style: preserve-3d;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  border: 1px solid rgba(124, 58, 237, 0.4);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  transform: translateZ(10px);
  transition: transform 0.5s ease;
}

.hero-glow {
  position: absolute;
  top: -10%; left: -10%; width: 120%; height: 120%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.4) 0%, transparent 70%);
  z-index: 1;
  filter: blur(30px);
  animation: pulseGlow 4s infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.1); opacity: 0.85; }
}

/* Neon laser scanning line */
.hud-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
  box-shadow: 0 0 15px var(--neon-cyan), 0 0 30px var(--neon-cyan);
  z-index: 5;
  pointer-events: none;
  animation: scanAvatar 4s ease-in-out infinite alternate;
  transform: translateZ(25px);
}

.hud-scan-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(to bottom, rgba(6, 182, 212, 0.25), transparent);
  z-index: 4;
  pointer-events: none;
  animation: scanAvatarGlow 4s ease-in-out infinite alternate;
  transform: translateZ(20px);
  transform-origin: top center;
}

@keyframes scanAvatar {
  0% { top: 0%; }
  100% { top: 100%; }
}

@keyframes scanAvatarGlow {
  0% { top: 0%; transform: translateZ(20px) scaleY(1); }
  100% { top: 100%; transform: translateZ(20px) scaleY(-1); }
}

.hero-content {
  position: relative;
  z-index: 2;
  perspective: 1000px;
}

.hero-tilt {
  transform-style: preserve-3d;
  transition: transform 0.1s ease;
}

/* --- CYBER BADGE GREETING --- */
.cyber-greeting {
  display: inline-block;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.4) !important;
  padding: 6px 16px;
  border-radius: 6px;
  color: var(--neon-cyan) !important;
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
  font-family: var(--font-code);
  font-size: 0.95rem;
  letter-spacing: 2px;
  box-shadow: inset 0 0 10px rgba(124, 58, 237, 0.2);
  margin-bottom: 20px !important;
  animation: glowPulse 2s infinite alternate;
}

@keyframes glowPulse {
  0% { box-shadow: inset 0 0 10px rgba(124, 58, 237, 0.2), 0 0 5px rgba(6, 182, 212, 0.2); }
  100% { box-shadow: inset 0 0 20px rgba(124, 58, 237, 0.4), 0 0 15px rgba(6, 182, 212, 0.5); }
}

/* --- CYBERPUNK TEXT GLITCH (Clip-Path & Multi-Shadows) --- */
.text-glitch {
  position: relative;
  color: #fff;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.text-glitch::before,
.text-glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
}

.text-glitch::before {
  left: 2px;
  text-shadow: -2px 0 var(--neon-pink);
  clip: rect(44px, 450px, 56px, 0);
  animation: glitchAnim1 5s infinite linear alternate-reverse;
}

.text-glitch::after {
  left: -2px;
  text-shadow: -2px 0 var(--neon-cyan), 0 2px var(--neon-violet);
  clip: rect(85px, 450px, 140px, 0);
  animation: glitchAnim2 5s infinite linear alternate-reverse;
}

@keyframes glitchAnim1 {
  0%, 85% { clip: rect(0, 0, 0, 0); transform: skew(0deg); opacity: 0; }
  86% { clip: rect(15px, 9999px, 66px, 0); transform: skew(0.5deg); opacity: 1; }
  89% { clip: rect(78px, 9999px, 115px, 0); transform: skew(0.8deg); opacity: 0.8; }
  92% { clip: rect(12px, 9999px, 80px, 0); transform: skew(0.2deg); opacity: 0.9; }
  95% { clip: rect(112px, 9999px, 13px, 0); transform: skew(-0.2deg); opacity: 1; }
  98%, 100% { clip: rect(0, 0, 0, 0); transform: skew(0deg); opacity: 0; }
}

@keyframes glitchAnim2 {
  0%, 82% { clip: rect(0, 0, 0, 0); transform: skew(0deg); opacity: 0; }
  83% { clip: rect(123px, 9999px, 34px, 0); transform: skew(-0.2deg); opacity: 1; }
  87% { clip: rect(3px, 9999px, 45px, 0); transform: skew(-0.6deg); opacity: 0.8; }
  90% { clip: rect(45px, 9999px, 20px, 0); transform: skew(-0.5deg); opacity: 0.9; }
  94% { clip: rect(15px, 9999px, 66px, 0); transform: skew(0.5deg); opacity: 1; }
  97%, 100% { clip: rect(0, 0, 0, 0); transform: skew(0deg); opacity: 0; }
}

/* --- CYBER FUSION CORE BUTTON SYSTEM --- */
.btn-fusion-core-wrapper {
  position: relative;
  display: inline-block;
  padding: 10px;
  z-index: 10;
  transform-style: preserve-3d;
}

.btn-corner-bracket {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(6, 182, 212, 0.4);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  pointer-events: none;
}

.btn-bracket-tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.btn-bracket-tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.btn-bracket-bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.btn-bracket-br { bottom: 0; right: 0; border-left: none; border-top: none; }

.btn-fusion-core-wrapper:hover .btn-corner-bracket {
  width: 20px;
  height: 20px;
  border-color: var(--neon-pink);
  filter: drop-shadow(0 0 5px var(--neon-pink));
}

.btn-fusion-core {
  background: linear-gradient(45deg, var(--neon-violet), var(--neon-pink)) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.5),
              inset 0 0 15px rgba(255, 255, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  z-index: 1;
  letter-spacing: 2px;
  font-weight: 600 !important;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.btn-fusion-core::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(45deg, var(--neon-pink), var(--neon-cyan));
  z-index: -1;
  transition: opacity 0.4s ease;
  opacity: 0;
}

.btn-fusion-core:hover::before {
  opacity: 1;
}

.btn-fusion-core:hover {
  box-shadow: 0 0 25px rgba(236, 72, 153, 0.7),
              0 0 45px rgba(6, 182, 212, 0.4),
              inset 0 0 20px rgba(255, 255, 255, 0.4);
  transform: translateY(-3px) translateZ(15px);
  border-color: rgba(255, 255, 255, 0.5) !important;
}

.btn-core-glow {
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: scale(0.5);
  pointer-events: none;
  z-index: 0;
}

.btn-fusion-core:hover .btn-core-glow {
  opacity: 1;
  transform: scale(1);
}

/* Sweeping Flare line across the button on hover */
.btn-fusion-core::after {
  content: '';
  position: absolute;
  top: -50%; left: -60%; width: 20%; height: 200%;
  background: rgba(255, 255, 255, 0.4);
  transform: rotate(30deg);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: all 0s;
}

.btn-fusion-core:hover::after {
  left: 150%;
  opacity: 1;
  transition: all 0.8s ease-in-out;
}

/* About Code Terminal */
.code-terminal {
  background: #0d1117;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.15);
  overflow: hidden;
  position: relative;
}
.code-terminal-header {
  background: #161b22;
  padding: 10px 15px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--glass-border);
}
.code-terminal-dot {
  width: 12px; height: 12px; border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }
.code-terminal-body {
  padding: 20px;
  font-family: var(--font-code);
  color: #a5d6ff;
  font-size: 14px;
  line-height: 1.6;
}

/* Projects Enhancements: Sci-Fi Datapad Grid */
.project-list {
  perspective: 2000px;
}

.sci-fi-card {
  position: relative;
  background: linear-gradient(145deg, rgba(15, 15, 25, 0.9), rgba(5, 5, 15, 0.95));
  border: 1px solid rgba(6, 182, 212, 0.18);
  border-radius: 16px;
  padding: 32px;
  height: 100%;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

/* Subtle inner ambient glow */
.card-bg-glow {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 16px;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.card-bg-glow::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 0%, rgba(6, 182, 212, 0.12), transparent 70%);
  opacity: 0.6;
  transition: opacity 0.4s ease;
}

.sci-fi-card:hover .card-bg-glow::before {
  opacity: 1;
}

/* Laser Scanner Disabled - removed distracting scanning overlay */
.laser-scanner {
  display: none !important;
}

.sci-fi-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65), 0 0 25px rgba(6, 182, 212, 0.25), inset 0 0 15px rgba(124, 58, 237, 0.15);
  z-index: 10;
}

/* Content container */
.sci-fi-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-title {
  color: var(--neon-cyan);
  font-weight: 700;
  margin-bottom: 14px;
  font-size: 1.4rem;
  letter-spacing: 0.5px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.sci-fi-card:hover .project-title {
  color: #fff;
  text-shadow: 0 0 12px rgba(6, 182, 212, 0.6);
}

.project-desc {
  color: #cbd5e1;
  flex-grow: 1;
  font-size: 0.95rem;
  line-height: 1.6;
}

.project-tags {
  margin-bottom: 24px;
}

.neon-badge {
  display: inline-block;
  background: rgba(124, 58, 237, 0.12);
  color: #d8b4fe;
  border: 1px solid rgba(124, 58, 237, 0.35);
  padding: 4px 12px;
  border-radius: 20px;
  margin-right: 6px;
  margin-bottom: 8px;
  font-family: var(--font-code, monospace);
  font-size: 0.75rem;
  transition: all 0.25s ease;
}

.neon-badge:hover {
  background: rgba(6, 182, 212, 0.2);
  color: #fff;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.project-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-neon {
  color: var(--text-primary);
  border: 1px solid rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.05);
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 1;
  transform: none;
}

.sci-fi-card:hover .btn-neon {
  border-color: rgba(6, 182, 212, 0.6);
}

.sci-fi-card .btn-neon:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: var(--neon-cyan);
  color: #fff !important;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.5), inset 0 0 10px rgba(6, 182, 212, 0.2);
  transform: translateY(-2px);
}

/* Special GitHub Card */
.github-special {
  border: 2px dashed var(--neon-violet);
  background: rgba(124, 58, 237, 0.05);
}

.github-special:hover {
  border-style: solid;
  border-color: var(--neon-pink);
  box-shadow: 0 0 30px rgba(236, 72, 153, 0.2), inset 0 0 20px rgba(236, 72, 153, 0.1);
}
.github-special i {
  transition: transform 0.5s ease;
}
.github-special:hover i {
  transform: rotateY(360deg);
  color: var(--neon-pink) !important;
}

/* Solar System Skills */
.solar-system {
  position: relative;
  width: 1400px;
  height: 1400px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.sun {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, var(--neon-cyan), var(--neon-violet));
  border-radius: 50%;
  position: absolute;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 40px var(--neon-cyan), inset 0 0 20px rgba(255,255,255,0.8);
  animation: pulseSun 3s infinite alternate;
  font-weight: bold;
  font-size: 1.5rem;
}

@keyframes pulseSun {
  0% { transform: scale(1); box-shadow: 0 0 30px var(--neon-cyan); }
  100% { transform: scale(1.1); box-shadow: 0 0 60px var(--neon-violet); }
}

.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(6, 182, 212, 0.4);
  animation: orbitSpin linear infinite;
}

/* North = 0s, East (90deg) = -25% duration, South (180deg) = -50% duration, West (270deg) = -75% duration */
.orbit-1 { width: 180px; height: 180px; animation-duration: 60s; animation-delay: 0s; } /* North */
.orbit-2 { width: 340px; height: 340px; animation-duration: 60s; animation-delay: -15s; } /* East */
.orbit-3 { width: 520px; height: 520px; animation-duration: 60s; animation-delay: -30s; } /* South */
.orbit-4 { width: 720px; height: 720px; animation-duration: 60s; animation-delay: -45s; } /* West */
.orbit-5 { width: 900px; height: 900px; animation-duration: 60s; animation-delay: 0s; } /* North */
.orbit-6 { width: 1080px; height: 1080px; animation-duration: 60s; animation-delay: -15s; } /* East */
.orbit-7 { width: 1260px; height: 1260px; animation-duration: 60s; animation-delay: -30s; } /* South */
.orbit-8 { width: 1440px; height: 1440px; animation-duration: 60s; animation-delay: -45s; } /* West */

@keyframes orbitSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.planet {
  position: absolute;
  top: -20px; left: 50%;
  transform: translateX(-50%);
  transform-origin: center;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: bold;
  font-size: 0.75rem;
  box-shadow: 0 0 15px rgba(255,255,255,0.3);
  animation: counterSpin linear infinite;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}

.planet:hover {
  box-shadow: 0 0 40px var(--neon-cyan), inset 0 0 15px #fff;
  z-index: 50;
}

.orbit-1 .planet { width: 45px; height: 45px; top: -22.5px; background: linear-gradient(45deg, #f89820, #5382a1); animation-duration: 60s; animation-delay: 0s; }
.orbit-2 .planet { width: 50px; height: 50px; top: -25px; background: linear-gradient(45deg, #306998, #ffe873); color: #333; animation-duration: 60s; animation-delay: -15s; }
.orbit-3 .planet { width: 55px; height: 55px; top: -27.5px; background: linear-gradient(45deg, #00d8ff, #282c34); animation-duration: 60s; animation-delay: -30s; }
.orbit-4 .planet { width: 60px; height: 60px; top: -30px; background: linear-gradient(45deg, #306998, #ffd43b); color: #333; animation-duration: 60s; animation-delay: -45s; }
.orbit-5 .planet { width: 65px; height: 65px; top: -32.5px; background: linear-gradient(45deg, #f89820, #5382a1); animation-duration: 60s; animation-delay: 0s; }
.orbit-6 .planet { width: 70px; height: 70px; top: -35px; background: linear-gradient(45deg, #00599c, #ffffff); color: #333; animation-duration: 60s; animation-delay: -15s; }
.orbit-7 .planet { width: 75px; height: 75px; top: -37.5px; background: linear-gradient(45deg, #276dc3, #8a8a8a); color: #fff; animation-duration: 60s; animation-delay: -30s; }
.orbit-8 .planet { width: 80px; height: 80px; top: -40px; background: linear-gradient(45deg, #f89820, #5382a1); color: #fff; animation-duration: 60s; animation-delay: -45s; }

.asteroid-belt {
  display: none; /* Asteroids moved to moons or planets */
}

@keyframes counterSpin {
  0% { transform: translateX(-50%) rotate(0deg); }
  100% { transform: translateX(-50%) rotate(-360deg); }
}

.moon-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px dotted rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: orbitSpin linear infinite;
}

.m-orb-1 { width: 100px; height: 100px; margin-left: -50px; margin-top: -50px; animation-duration: 8s; }
.m-orb-2 { width: 130px; height: 130px; margin-left: -65px; margin-top: -65px; animation-duration: 12s; }
.m-orb-3 { width: 160px; height: 160px; margin-left: -80px; margin-top: -80px; animation-duration: 16s; }
.m-orb-4 { width: 190px; height: 190px; margin-left: -95px; margin-top: -95px; animation-duration: 20s; }
.m-orb-5 { width: 220px; height: 220px; margin-left: -110px; margin-top: -110px; animation-duration: 24s; }

.moon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--glass-bg);
  border: 1px solid var(--neon-violet);
  color: #fff;
  font-size: 0.6rem;
  padding: 4px 10px;
  border-radius: 12px;
  white-space: nowrap;
  animation: counterSpin linear infinite;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
  cursor: pointer;
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.moon:hover {
  background: rgba(124, 58, 237, 0.4);
  box-shadow: 0 0 20px var(--neon-cyan);
  border-color: var(--neon-cyan);
}

/* Moon orbit sizes are strictly defined by .m-orb-* classes to prevent overlap */


/* Contact Section */
.contact-card {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(15px);
}
.social-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s;
  border-color: var(--glass-border) !important;
  color: var(--text-primary) !important;
}
.social-icon:hover {
  transform: translateY(-5px);
  background: var(--neon-violet) !important;
  border-color: var(--neon-violet) !important;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.5);
}

/* Service overrides */
.service-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}
.service-card .card-front, .service-card .card-back {
  background: var(--glass-bg) !important;
}

/* Quantum Holo-Carousel */
.scene {
  width: 100%;
  max-width: 350px;
  height: 400px;
  position: relative;
  perspective: 2000px;
  margin: 0 auto 50px auto;
}

.carousel-3d {
  width: 100%;
  height: 100%;
  position: absolute;
  transform-style: preserve-3d;
}

.carousel__cell {
  position: absolute;
  width: 320px;
  height: auto;
  left: 15px;
  top: 15px;
  /* Not hiding backface so we can see the glowing borders of cards in the back */
  backface-visibility: visible;
  transform-style: preserve-3d;
}

.holo-card {
  position: relative;
  background: linear-gradient(135deg, rgba(20, 20, 40, 0.7), rgba(10, 10, 20, 0.9));
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 20px;
  padding: 40px 30px;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  transform-style: preserve-3d;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  z-index: 1;
}

/* Background layers that need overflow hidden */
.holo-card-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 20px;
  overflow: hidden;
  z-index: -1;
}

.holo-card-bg::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.holo-card:hover .holo-card-bg::before {
  opacity: 1;
}

/* Scanline effect */
.holo-card-bg::after {
  content: '';
  position: absolute;
  top: -100%; left: 0; right: 0; height: 30%;
  background: linear-gradient(to bottom, transparent, rgba(6, 182, 212, 0.2), transparent);
  animation: scanline 4s linear infinite;
  opacity: 0;
  transition: opacity 0.3s;
}

.holo-card:hover .holo-card-bg::after {
  opacity: 1;
}

@keyframes scanline {
  0% { top: -30%; }
  100% { top: 130%; }
}

.holo-card:hover {
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 20px 60px rgba(6, 182, 212, 0.4), inset 0 0 30px rgba(124, 58, 237, 0.2);
  z-index: 10;
}

/* Sweeping Laser Border */
.laser-border {
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  border-radius: 22px;
  padding: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-violet), transparent);
  background-size: 200% 100%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.holo-card:hover .laser-border {
  opacity: 1;
  animation: laserSweep 2s linear infinite;
}

@keyframes laserSweep {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes laserBurst {
  0% { opacity: 0; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(2); }
  100% { opacity: 1; filter: brightness(1); }
}

.holo-icon-wrapper {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  transform: translateZ(20px);
}

.holo-card:hover .holo-icon-wrapper {
  background: rgba(124, 58, 237, 0.3);
  border-color: var(--neon-violet);
  box-shadow: 0 0 30px var(--neon-violet), inset 0 0 15px var(--neon-cyan);
}

.holo-icon-wrapper i {
  transition: all 0.5s ease;
  font-size: 2.5em;
  color: var(--neon-cyan);
}

.holo-card:hover .holo-icon-wrapper i {
  color: #fff !important;
  text-shadow: 0 0 15px var(--neon-cyan), 0 0 30px var(--neon-violet);
}

.holo-content {
  transform: translateZ(10px);
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.holo-title {
  color: var(--text-primary);
  margin-bottom: 15px;
  transition: color 0.3s;
  font-family: var(--font-code);
  font-size: 1.5rem;
}

.holo-card:hover .holo-title {
  color: var(--neon-cyan);
  text-shadow: 0 0 15px rgba(6, 182, 212, 0.6);
}

.holo-desc {
  font-size: 1rem;
  line-height: 1.6;
}

/* Advanced Achievement 3D Hover Effects */
.achievement-card {
  perspective: 1200px;
}

.achievement-box {
  background: rgba(10, 10, 26, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 30px;
  height: 100%;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  transform-style: preserve-3d;
  position: relative;
  z-index: 1;
  color: var(--text-primary);
}

.achievement-box::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  box-shadow: inset 0 0 0 2px transparent;
  transition: box-shadow 0.6s;
  z-index: -1;
}

.achievement-box:hover {
  transform: rotateY(-18deg) rotateX(10deg) translateZ(30px) scale(1.05);
  background: rgba(124, 58, 237, 0.22);
  border-color: var(--neon-cyan);
  box-shadow: 
    -20px 20px 50px rgba(0, 0, 0, 0.75),
    0 0 40px rgba(6, 182, 212, 0.45),
    inset 0 0 25px rgba(236, 72, 153, 0.3);
  z-index: 10;
}

/* Alternate angle for even grid items for engaging dynamic directionality */
.achievement-card:nth-child(even) .achievement-box:hover {
  transform: rotateY(18deg) rotateX(10deg) translateZ(30px) scale(1.05);
  box-shadow: 
    20px 20px 50px rgba(0, 0, 0, 0.75),
    0 0 40px rgba(6, 182, 212, 0.45),
    inset 0 0 25px rgba(236, 72, 153, 0.3);
}

.achievement-box:hover::after {
  box-shadow: inset 0 0 20px var(--neon-cyan), inset 0 0 35px var(--neon-violet);
  animation: pulseBorder 2s infinite alternate;
}

@keyframes pulseBorder {
  0% { box-shadow: inset 0 0 10px var(--neon-cyan), inset 0 0 20px var(--neon-violet); }
  100% { box-shadow: inset 0 0 25px var(--neon-cyan), inset 0 0 40px var(--neon-violet); }
}

.achievement-box .achievement-content {
  transform-origin: center;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.achievement-box:hover .achievement-content {
  transform: translateZ(45px) scale(1.03);
  text-shadow: 0 8px 20px rgba(0,0,0,0.8);
}

.achievement-box .achievement-content i {
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.achievement-box:hover .achievement-content i {
  color: var(--neon-pink) !important;
  text-shadow: 0 0 20px var(--neon-pink);
  transform: scale(1.15);
}
.text-primary, h1.text-primary, h2.text-primary, h3.text-primary, h4.text-primary, h5.text-primary {
  color: var(--neon-cyan) !important;
}
.bg-light {
  background-color: transparent !important;
}
.bg-white {
  background-color: var(--glass-bg) !important;
}
.text-dark, .text-muted {
  color: var(--text-muted) !important;
}
.navbar-brand h1 {
  color: white !important;
}
.navbar-brand.bg-secondary {
  background-color: rgba(124, 58, 237, 0.2) !important;
  border: 1px solid var(--neon-violet);
  backdrop-filter: blur(10px);
}

/* Typed Text cursor */
.typed-cursor {
  color: var(--neon-pink);
  font-weight: 700;
  font-size: 2.5rem;
}
/* Make all gray section backgrounds transparent */
section, 
div[id="about"], 
div[id="skill"], 
div[id="services"], 
div[id="project"], 
div[id="team"], 
div[id="achievements"] {
    background: transparent !important;
    background-color: transparent !important;
}

.services-section {
    background: transparent !important;
}

.services-section::before, .services-section::after {
    display: none !important;
}

/* --- THE HOLOGRAPHIC CLEARANCE BADGE (About Section) --- */
.holo-badge {
  position: relative;
  background: rgba(10, 10, 26, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 20px;
  padding: 40px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  cursor: crosshair;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.holo-badge:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(6, 182, 212, 0.2);
  border-color: var(--neon-cyan);
}

.foil-glare {
  position: absolute;
  top: 0; left: -150%; width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: skewX(-25deg);
  transition: all 0.5s ease;
  z-index: 1;
  pointer-events: none;
}

.holo-badge:hover .foil-glare {
  left: 150%;
  transition: all 0.8s ease;
}

.scanner-beam {
  position: absolute;
  top: -10px; left: 0; width: 100%; height: 2px;
  background: var(--neon-pink);
  box-shadow: 0 0 15px var(--neon-pink), 0 0 30px var(--neon-pink);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}

.holo-badge:hover .scanner-beam {
  opacity: 1;
  animation: scanBadge 1.5s ease-in-out infinite alternate;
}

@keyframes scanBadge {
  0% { top: 0; }
  100% { top: 100%; }
}

.badge-content {
  position: relative;
  z-index: 3;
}

/* --- NEURAL CIRCUIT TIMELINE (Expertise Section) --- */
.circuit-scene {
  perspective: 2000px;
  position: relative;
  width: 100%;
  height: 600px;
}

.circuit-board-3d {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
  transform-style: preserve-3d;
}

.circuit-board-3d.flipped {
  transform: rotateY(180deg);
}

.circuit-face {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  background: rgba(10, 10, 25, 0.8);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(124, 58, 237, 0.1);
  overflow: hidden;
}

.circuit-back {
  transform: rotateY(180deg);
  border-color: rgba(236, 72, 153, 0.3);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(236, 72, 153, 0.1);
}

.circuit-grid-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(rgba(6, 182, 212, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.05) 1px, transparent 1px);
  background-size: 25px 25px;
  z-index: 1;
}

.circuit-back .circuit-grid-bg {
  background-image: 
    linear-gradient(rgba(236, 72, 153, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236, 72, 153, 0.05) 1px, transparent 1px);
}

.circuit-node {
  position: relative;
  padding: 20px 20px 20px 35px;
  border-left: 2px solid rgba(6, 182, 212, 0.8);
  background: rgba(6, 182, 212, 0.05);
  border-radius: 0 10px 10px 0;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-top: 1px solid rgba(6, 182, 212, 0.1);
  border-right: 1px solid rgba(6, 182, 212, 0.1);
  border-bottom: 1px solid rgba(6, 182, 212, 0.1);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  margin-bottom: 15px;
  z-index: 10;
}

.circuit-back .circuit-node {
  border-left-color: rgba(236, 72, 153, 0.8);
  background: rgba(236, 72, 153, 0.05);
  border-top: 1px solid rgba(236, 72, 153, 0.1);
  border-right: 1px solid rgba(236, 72, 153, 0.1);
  border-bottom: 1px solid rgba(236, 72, 153, 0.1);
}

.circuit-node:hover {
  border-left-color: var(--neon-cyan);
  border-top: 1px solid var(--neon-cyan);
  border-right: 1px solid var(--neon-cyan);
  border-bottom: 1px solid var(--neon-cyan);
  background: rgba(6, 182, 212, 0.2);
  transform: translateX(10px) translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5), inset 0 0 15px var(--neon-cyan), 0 0 20px rgba(6, 182, 212, 0.4);
}

.circuit-back .circuit-node:hover {
  border-left-color: var(--neon-pink);
  border-top: 1px solid var(--neon-pink);
  border-right: 1px solid var(--neon-pink);
  border-bottom: 1px solid var(--neon-pink);
  background: rgba(236, 72, 153, 0.2);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5), inset 0 0 15px var(--neon-pink), 0 0 20px rgba(236, 72, 153, 0.4);
}

.node-dot {
  position: absolute;
  left: -9px;
  top: 25px;
  width: 16px;
  height: 16px;
  background: var(--neon-cyan);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 15px var(--neon-cyan);
  transition: all 0.3s ease;
  animation: pulseNode 2s infinite;
}

@keyframes pulseNode {
  0% { box-shadow: 0 0 15px var(--neon-cyan), 0 0 0 0 rgba(6, 182, 212, 0.7); }
  70% { box-shadow: 0 0 15px var(--neon-cyan), 0 0 0 15px rgba(6, 182, 212, 0); }
  100% { box-shadow: 0 0 15px var(--neon-cyan), 0 0 0 0 rgba(6, 182, 212, 0); }
}

.circuit-back .node-dot {
  background: var(--neon-pink);
  box-shadow: 0 0 15px var(--neon-pink);
  animation: pulseNodePink 2s infinite;
}

@keyframes pulseNodePink {
  0% { box-shadow: 0 0 15px var(--neon-pink), 0 0 0 0 rgba(236, 72, 153, 0.7); }
  70% { box-shadow: 0 0 15px var(--neon-pink), 0 0 0 15px rgba(236, 72, 153, 0); }
  100% { box-shadow: 0 0 15px var(--neon-pink), 0 0 0 0 rgba(236, 72, 153, 0); }
}

.circuit-node:hover .node-dot {
  background: #fff;
  border-color: var(--neon-cyan);
  transform: scale(1.4);
  animation: none;
  box-shadow: 0 0 25px var(--neon-cyan);
}

.circuit-back .circuit-node:hover .node-dot {
  background: #fff;
  border-color: var(--neon-pink);
  animation: none;
  box-shadow: 0 0 25px var(--neon-pink);
}

/* Glitch on hover for H5 inside node */
.circuit-node h5 {
  transition: text-shadow 0.3s ease;
}

.circuit-node:hover h5 {
  animation: glitch-text-mini 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
  color: var(--neon-cyan) !important;
}

.circuit-back .circuit-node:hover h5 {
  color: var(--neon-pink) !important;
}

@keyframes glitch-text-mini {
  0% { transform: translate(0) }
  20% { transform: translate(-2px, 1px) }
  40% { transform: translate(-1px, -1px) }
  60% { transform: translate(2px, 1px) }
  80% { transform: translate(1px, -1px) }
  100% { transform: translate(0) }
}

.circuit-line {
  border-top: 1px dashed rgba(6, 182, 212, 0.5);
  opacity: 1;
}

.circuit-back .circuit-line {
  border-top-color: rgba(236, 72, 153, 0.5);
}

/* Tab buttons */
.circuit-tabs-controls .btn-neon {
  cursor: pointer;
  padding: 10px 25px;
  font-weight: 600;
}
.circuit-tabs-controls .btn-neon.active {
  background: rgba(124, 58, 237, 0.3);
  border-color: var(--neon-violet);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.6);
  color: #fff;
}

/* --- QUANTUM COMM-LINK (Contact Section) --- */
.quantum-comm-link {
  background: rgba(5, 5, 10, 0.9);
  border: 1px solid rgba(124, 58, 237, 0.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(124, 58, 237, 0.05);
  position: relative;
  overflow: hidden;
}

/* Glitch text effect */
.terminal-glitch {
  position: relative;
  display: inline-block;
}
.terminal-glitch::before, .terminal-glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}
.terminal-glitch::before {
  color: var(--neon-pink);
  z-index: -1;
  animation: glitch-anim-1 10s infinite linear alternate-reverse;
}
.terminal-glitch::after {
  color: var(--neon-violet);
  z-index: -2;
  animation: glitch-anim-2 12s infinite linear alternate-reverse;
}
@keyframes glitch-anim-1 {
  0%, 90% { clip-path: inset(100% 0 0 0); transform: translate(0, 0); }
  92% { clip-path: inset(20% 0 80% 0); transform: translate(-2px, 1px); }
  95% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
  98% { clip-path: inset(40% 0 50% 0); transform: translate(-2px, 2px); }
  100% { clip-path: inset(80% 0 5% 0); transform: translate(2px, -2px); }
}
@keyframes glitch-anim-2 {
  0%, 88% { clip-path: inset(100% 0 0 0); transform: translate(0, 0); }
  90% { clip-path: inset(10% 0 60% 0); transform: translate(2px, -1px); }
  93% { clip-path: inset(30% 0 20% 0); transform: translate(-2px, 1px); }
  96% { clip-path: inset(70% 0 10% 0); transform: translate(2px, -2px); }
  100% { clip-path: inset(20% 0 50% 0); transform: translate(-2px, 2px); }
}

.quantum-input-group {
  position: relative;
  font-family: var(--font-code);
}

.quantum-label {
  color: var(--neon-violet);
  font-size: 0.85rem;
  letter-spacing: 2px;
  margin-bottom: 8px;
  display: block;
}

.quantum-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.quantum-input-wrapper.text-area-wrapper {
  align-items: flex-start;
}

.bracket-left, .bracket-right {
  color: rgba(6, 182, 212, 0.3);
  font-size: 1.5rem;
  font-weight: 300;
  transition: all 0.3s ease;
}

.quantum-input-wrapper.text-area-wrapper .bracket-left,
.quantum-input-wrapper.text-area-wrapper .bracket-right {
  line-height: 1;
  padding-top: 8px;
}

.quantum-input {
  background: transparent;
  border: none;
  color: #fff;
  width: 100%;
  padding: 10px 15px;
  outline: none;
  font-family: var(--font-code);
}

.quantum-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.crosshair {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.quantum-input-wrapper.text-area-wrapper .crosshair {
  top: 20px;
}

.quantum-input:focus ~ .bracket-left,
.quantum-input:focus ~ .bracket-right {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan);
}

.quantum-input:focus ~ .crosshair {
  opacity: 1;
  border-color: var(--neon-pink);
  animation: targetLock 1s infinite alternate;
}

@keyframes targetLock {
  0% { transform: translateY(-50%) scale(1) rotate(0deg); }
  100% { transform: translateY(-50%) scale(1.2) rotate(45deg); }
}

.btn-quantum-core {
  position: relative;
  background: transparent;
  border: 1px solid rgba(236, 72, 153, 0.3);
  color: var(--neon-pink);
  padding: 15px;
  font-family: var(--font-code);
  font-size: 1.2rem;
  letter-spacing: 3px;
  border-radius: 5px;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
  z-index: 1;
}

.btn-quantum-core:hover {
  border-color: var(--neon-pink);
  color: #fff;
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.5);
}

.core-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(236, 72, 153, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
  z-index: -1;
}

.btn-quantum-core:hover .core-glow {
  width: 300px;
  height: 300px;
}

/* Scrambling animation classes */
.scramble-fade-out {
  animation: scrambleOut 1.5s forwards;
}

@keyframes scrambleOut {
  0% { opacity: 1; filter: blur(0); transform: translateY(0); }
  20% { transform: translateX(-5px) skewX(10deg); }
  40% { transform: translateX(5px) skewX(-10deg); filter: blur(2px); color: var(--neon-cyan); }
  60% { transform: translateY(-20px); filter: blur(4px); letter-spacing: 10px; opacity: 0.5; }
  100% { transform: translateY(-100px); filter: blur(10px); letter-spacing: 20px; opacity: 0; }
}

/* --- MOBILE RESPONSIVENESS (Responsive Fixes) --- */

/* Tablet breakpoint */
@media (max-width: 991px) {
  /* Hero: Stack vertically, center everything */
  .hero-container .row {
    flex-direction: column-reverse;
    text-align: center;
  }
  
  .hero-container .col-lg-7,
  .hero-container .col-lg-5 {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
  }
  
  .hero-container .col-lg-7 {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .hero-container .d-flex.align-items-center.pt-5 {
    justify-content: center;
  }
  
  /* Reduce HUD chamber */
  .hud-scanning-chamber {
    height: 300px !important;
    max-width: 300px !important;
    margin-bottom: 30px;
  }
  
  /* Hero name sizing */
  .display-3 {
    font-size: 2.8rem !important;
  }
  
  /* Disable parallax on touch devices */
  .float-parallax {
    transform: none !important;
  }
}

@media (max-width: 768px) {
  /* Hero Section */
  .display-3 {
    font-size: 2.2rem !important;
  }
  
  .hud-scanning-chamber {
    height: 250px !important;
    max-width: 250px !important;
  }
  
  /* Hide HUD coordinates to declutter */
  .hud-coord {
    display: none;
  }
  
  /* Smaller brackets */
  .hud-bracket {
    width: 18px;
    height: 18px;
  }
  
  /* Code Terminal */
  .code-terminal {
    overflow-x: auto;
  }
  
  .code-terminal-body {
    font-size: 12px;
  }
  
  /* Services 3D Carousel */
  .scene {
    transform: scale(0.65);
    transform-origin: top center;
    height: 300px !important;
  }
  
  /* General Spacing */
  .py-6 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }
  
  .my-6 {
    margin-top: 4rem !important;
    margin-bottom: 4rem !important;
  }
  
  /* Cyber greeting */
  .cyber-greeting {
    font-size: 0.8rem;
  }
  
  /* Typed text */
  .typed-text-output {
    font-size: 1.1rem;
  }
  
  /* Button sizing */
  .btn-fusion-core {
    padding: 12px 30px !important;
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  /* Small phone */
  .display-3 {
    font-size: 1.8rem !important;
  }
  
  .hud-scanning-chamber {
    height: 200px !important;
    max-width: 200px !important;
  }
  
  /* Hide HUD rings on very small screens */
  .hud-ring-outer,
  .hud-ring-inner {
    opacity: 0.4;
  }
  
  .hud-bracket {
    width: 14px;
    height: 14px;
  }
  
  /* Navbar adjustments */
  .cyber-navbar {
    left: 2% !important;
    width: 96% !important;
    padding: 8px 12px !important;
  }
  
  .cyber-brand h1 {
    font-size: 1.2rem !important;
  }
  
  /* Section headings */
  .display-5 {
    font-size: 1.8rem !important;
  }
  
  .display-6 {
    font-size: 1.4rem !important;
  }
  
  /* Circuit nodes */
  .circuit-node {
    padding: 15px 15px 15px 25px;
  }
  
  .circuit-node h5 {
    font-size: 0.95rem;
  }
  
  /* Holo cards */
  .holo-card {
    padding: 25px 20px;
  }
  
  /* Project cards */
  .sci-fi-card {
    padding: 20px;
  }
  
  .project-title {
    font-size: 1.2rem;
  }
  
  /* Achievement cards */
  .achievement-box {
    padding: 20px;
  }
  
  /* Contact form */
  .quantum-comm-link {
    padding: 25px !important;
  }
  
  .btn-quantum-core {
    font-size: 1rem;
    letter-spacing: 1px;
  }
}
