/* Modern Reset & Variables */
:root {
  --bg-dark: #0a0a0a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --neon-cyan: #00f3ff;
  --neon-purple: #bc13fe;
  --neon-green: #39ff14;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.95);
  --text-muted: rgba(255, 255, 255, 0.85);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Space Grotesk', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  position: relative;
  width: 100%;
  min-height: 100vh;
}

/* 3D Background Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  margin: 0;
  padding: 0;
}

/* Interactive Balls Canvas */
#balls-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  pointer-events: none;
  margin: 0;
  padding: 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  margin-bottom: 3rem;
}

.neon-text {
  color: #ffffff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.4);
  font-weight: 600;
}

.neon-accent {
  color: var(--neon-green);
  text-shadow: 0 0 20px rgba(57, 255, 20, 0.8), 0 0 40px rgba(57, 255, 20, 0.5), 0 0 60px rgba(57, 255, 20, 0.3);
  font-weight: 600;
}

.neon-text-purple {
  color: var(--neon-purple);
  text-shadow: 0 0 20px rgba(188, 19, 254, 0.8), 0 0 40px rgba(188, 19, 254, 0.5);
  font-weight: 600;
}

.neon-text-cyan {
  color: var(--neon-cyan);
  text-shadow: 0 0 20px rgba(0, 243, 255, 0.8), 0 0 40px rgba(0, 243, 255, 0.5);
  font-weight: 600;
}

.neon-text-green {
  color: var(--neon-green);
  text-shadow: 0 0 20px rgba(57, 255, 20, 0.8), 0 0 40px rgba(57, 255, 20, 0.5);
  font-weight: 600;
}

.text-light-70 {
  color: var(--text-secondary);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.text-light-50 {
  color: var(--text-muted);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.glass-card-dark {
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.glass-card-dark:hover {
  background: rgba(10, 10, 10, 0.85);
  border-color: rgba(57, 255, 20, 0.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(57, 255, 20, 0.15);
}

/* Skill Icon Colors */
.text-angular {
  color: #dd0031;
}

.text-typescript {
  color: #3178c6;
}

.text-dotnet {
  color: #512bd4;
}

/* Buttons */
.btn-neon {
  background: transparent;
  color: var(--neon-green);
  border: 1px solid var(--neon-green);
  padding: 0.8rem 2rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-neon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: var(--neon-green);
  transition: width 0.3s ease;
  z-index: -1;
}

.btn-neon:hover {
  color: #000;
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.4);
}

.btn-neon:hover::before {
  width: 100%;
}

.btn-outline-neon {
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.8rem 2rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.btn-outline-neon:hover {
  border-color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Hero Section */
.glitch-text {
  position: relative;
  color: #ffffff;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.5), 0 0 60px rgba(57, 255, 20, 0.3);
  animation: glitch-pulse 8s ease-in-out infinite;
}

@keyframes glitch-pulse {
  0%, 90%, 100% {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5), 0 0 60px rgba(57, 255, 20, 0.3);
  }
  93% {
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.8), 0 0 80px rgba(57, 255, 20, 0.5), 0 0 120px rgba(0, 243, 255, 0.2);
  }
  95% {
    text-shadow: -2px 0 #ff00c1, 2px 0 #00fff9, 0 0 40px rgba(255, 255, 255, 0.6);
  }
  96% {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5), 0 0 60px rgba(57, 255, 20, 0.3);
  }
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  overflow: hidden;
}

.glitch-text::before {
  left: 2px;
  text-shadow: -2px 0 #ff00c1;
  clip-path: inset(0 0 65% 0);
  animation: glitch-anim 6s infinite linear;
}

.glitch-text::after {
  left: -2px;
  text-shadow: 2px 0 #00fff9;
  clip-path: inset(65% 0 0 0);
  animation: glitch-anim2 6s infinite linear;
}

@keyframes glitch-anim {
  0%   { clip-path: inset(0 0 85% 0); transform: translate(-2px, 0); }
  8%   { clip-path: inset(15% 0 65% 0); transform: translate(2px, 0); }
  16%  { clip-path: inset(40% 0 45% 0); transform: translate(-1px, 1px); }
  24%  { clip-path: inset(0 0 75% 0); transform: translate(2px, -1px); }
  32%  { clip-path: inset(55% 0 25% 0); transform: translate(-2px, 0); }
  40%  { clip-path: inset(10% 0 70% 0); transform: translate(1px, 1px); }
  48%  { clip-path: inset(70% 0 10% 0); transform: translate(-1px, 0); }
  56%  { clip-path: inset(25% 0 55% 0); transform: translate(2px, -1px); }
  64%  { clip-path: inset(0 0 80% 0); transform: translate(-2px, 1px); }
  72%  { clip-path: inset(45% 0 35% 0); transform: translate(1px, 0); }
  80%  { clip-path: inset(80% 0 5% 0); transform: translate(-1px, -1px); }
  88%  { clip-path: inset(5% 0 75% 0); transform: translate(2px, 0); }
  100% { clip-path: inset(60% 0 20% 0); transform: translate(-2px, 0); }
}

@keyframes glitch-anim2 {
  0%   { clip-path: inset(80% 0 0 0); transform: translate(2px, 0); }
  8%   { clip-path: inset(50% 0 30% 0); transform: translate(-2px, 1px); }
  16%  { clip-path: inset(0 0 60% 0); transform: translate(1px, 0); }
  24%  { clip-path: inset(65% 0 15% 0); transform: translate(-1px, -1px); }
  32%  { clip-path: inset(20% 0 55% 0); transform: translate(2px, 0); }
  40%  { clip-path: inset(75% 0 5% 0); transform: translate(-2px, 1px); }
  48%  { clip-path: inset(30% 0 50% 0); transform: translate(1px, -1px); }
  56%  { clip-path: inset(85% 0 0 0); transform: translate(-1px, 0); }
  64%  { clip-path: inset(10% 0 70% 0); transform: translate(2px, 1px); }
  72%  { clip-path: inset(55% 0 25% 0); transform: translate(-2px, 0); }
  80%  { clip-path: inset(35% 0 45% 0); transform: translate(1px, -1px); }
  88%  { clip-path: inset(90% 0 0 0); transform: translate(-1px, 0); }
  100% { clip-path: inset(40% 0 40% 0); transform: translate(2px, 0); }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: fadeInUp 1.5s ease 1s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.mouse {
  width: 26px;
  height: 42px;
  border: 2px solid rgba(57, 255, 20, 0.4);
  border-radius: 20px;
  position: relative;
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.1), inset 0 0 8px rgba(57, 255, 20, 0.05);
  transition: all 0.3s ease;
}

.scroll-indicator:hover .mouse {
  border-color: rgba(57, 255, 20, 0.7);
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.3), inset 0 0 12px rgba(57, 255, 20, 0.1);
}

.wheel {
  width: 3px;
  height: 7px;
  background: var(--neon-green);
  border-radius: 3px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  box-shadow: 0 0 6px rgba(57, 255, 20, 0.6);
}

@keyframes scroll {
  0% {
    top: 6px;
    opacity: 1;
  }
  50% {
    opacity: 1;
  }
  100% {
    top: 22px;
    opacity: 0;
  }
}

/* Profile Image */
.profile-wrapper {
  padding: 10px;
}

.profile-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, var(--neon-green), transparent 70%);
  opacity: 0.15;
  filter: blur(40px);
  z-index: -1;
}

/* Feature Box */
.feature-box {
  padding: 1.5rem;
  border-left: 2px solid var(--neon-green);
  background: linear-gradient(90deg, rgba(57, 255, 20, 0.05), transparent);
}

.neon-icon {
  font-size: 2rem;
  color: var(--neon-green);
  filter: drop-shadow(0 0 5px rgba(57, 255, 20, 0.5));
}

/* Project Cards */
.project-card .card-img-wrapper {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover img {
  transform: scale(1.1);
}

.gradient-bg-1 {
  background: linear-gradient(135deg, #512bd4, #7b68ee);
}

.gradient-bg-2 {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.gradient-bg-3 {
  background: linear-gradient(135deg, #ffecd2, #fcb69f);
}

.gradient-bg-4 {
  background: linear-gradient(135deg, #434343, #000000);
}

.gradient-bg-5 {
  background: linear-gradient(135deg, #1e3c72, #2a5298);
}

.gradient-bg-6 {
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
}

.project-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.8);
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .overlay {
  opacity: 1;
}

/* Skills Section */
.skill-group {
  min-height: 250px;
}

.skill-item {
  font-size: 2.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.skill-item:hover {
  transform: translateY(-5px) scale(1.1);
  filter: drop-shadow(0 5px 10px rgba(0, 243, 255, 0.4));
}

.skill-icon-img {
  width: 2.5rem;
  height: 2.5rem;
  transition: all 0.3s ease;
}

.skill-item:hover .skill-icon-img {
  transform: scale(1.1);
  filter: drop-shadow(0 5px 10px rgba(0, 243, 255, 0.4));
}

/* Contact Section */
.contact-box {
  transition: all 0.3s ease;
}

.contact-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px -10px rgba(0, 243, 255, 0.3);
}

/* Badges */
.glass-badge {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

/* Sections */
section {
  position: relative;
  z-index: 1;
  padding-top: 8.5rem !important;
  padding-bottom: 8.5rem !important;
}

/* Hero Section Positioning */
#home {
  justify-content: center !important;
  align-items: center !important;
}

/* Section Title */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.3);
  margin-bottom: 3rem !important;
}

/* Navigation Bar */
.glass-nav {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(57, 255, 20, 0.1);
  padding: 1rem 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.glass-nav:hover {
  background: rgba(10, 10, 10, 0.95);
  border-bottom-color: rgba(57, 255, 20, 0.3);
}

.glass-nav.scrolled {
  background: rgba(10, 10, 10, 0.98);
  padding: 0.5rem 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 50px rgba(57, 255, 20, 0.1) !important;
  border-bottom-color: rgba(57, 255, 20, 0.4) !important;
}

.navbar-brand {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: 2px;
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
  text-shadow: 0 0 20px rgba(57, 255, 20, 0.5), 0 0 40px rgba(57, 255, 20, 0.3);
}

.navbar-nav {
  position: relative;
}

.nav-link {
  color: var(--text-secondary) !important;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.6rem 1.2rem !important;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  border-radius: 8px;
  font-weight: 500;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(57, 255, 20, 0.1), transparent);
  transition: left 0.5s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-green), var(--neon-purple));
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.nav-link:hover {
  color: var(--text-primary) !important;
  background: rgba(57, 255, 20, 0.05);
  border: 1px solid rgba(57, 255, 20, 0.2);
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
  transform: translateY(-2px);
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link:hover::after {
  width: 80%;
}

.nav-link.active {
  color: var(--neon-green) !important;
  background: rgba(57, 255, 20, 0.1);
  border: 1px solid rgba(57, 255, 20, 0.3);
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.2), inset 0 0 10px rgba(57, 255, 20, 0.1);
}

/* Mobile Menu Toggle */
.navbar-toggler {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: rgba(57, 255, 20, 0.1);
  border: 1px solid rgba(57, 255, 20, 0.3) !important;
}

.navbar-toggler:hover {
  background: rgba(57, 255, 20, 0.2);
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.3);
}

.navbar-toggler:hover i {
  transform: scale(1.1);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(57, 255, 20, 0.25);
}

.navbar-toggler i {
  transition: transform 0.3s ease;
}

/* Mobile Navigation */
@media (max-width: 991px) {
  .navbar-collapse {
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    margin-top: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(57, 255, 20, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: height 0.2s ease-in-out, opacity 0.2s ease-in-out !important;
  }

  .navbar-collapse.collapsing {
    transition: height 0.2s ease-in-out !important;
  }

  .navbar-nav {
    gap: 0.5rem !important;
  }

  .nav-link {
    padding: 0.8rem 1rem !important;
    margin: 0.25rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* Desktop hover effects */
@media (min-width: 992px) {
  .navbar-nav .nav-item {
    position: relative;
  }

  .navbar-nav .nav-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -15px;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--neon-green);
    transition: height 0.3s ease;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--neon-green);
  }

  .navbar-nav .nav-item:hover::before {
    height: 60%;
  }
}

/* Utilities */
.z-2 {
  z-index: 2;
}