/* Cyber/Matrix Theme Overhaul */
:root {
  /* Core Palette */
  --bg-dark: #0a0a0a;
  --bg-darker: #050505;
  --bg-card: rgba(10, 10, 10, 0.6);

  /* Accents */
  --primary: #00d4ff;
  /* Electric Blue */
  --secondary: #39FF14;
  /* Terminal Green */
  --accent: #ff0055;
  /* Glitch Red/Pink for contrast */

  /* Text */
  --text-main: #ffffff;
  --text-muted: #ccd6f6;

  /* Gradients */
  --gradient-cyber: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  --gradient-dark: linear-gradient(180deg, rgba(10, 10, 10, 0.9) 0%, rgba(5, 5, 5, 0.95) 100%);

  /* Effects */
  --glass: blur(10px);
  --border-glow: 0 0 10px rgba(0, 212, 255, 0.5);
  --text-glow: 0 0 5px rgba(0, 212, 255, 0.7);
  --box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);

  /* Typography */
  --font-mono: 'Fira Code', 'Roboto Mono', monospace;
  --font-sans: 'Inter', sans-serif;

  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Base Setup */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  /* Default text */
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Background Grid Overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  z-index: -2;
  pointer-events: none;
}

/* Background Vignette */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, transparent 40%, rgba(0, 0, 0, 0.8) 100%);
  z-index: -1;
  pointer-events: none;
}

/* Particles Container */
#tsparticles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  /* Behind everything */
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.btn,
.badge,
.date,
pre,
code {
  font-family: var(--font-mono);
  letter-spacing: -0.5px;
}

h1,
h2,
h3 {
  color: var(--primary);
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

p {
  color: var(--text-muted);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--secondary);
  text-shadow: 0 0 8px var(--secondary);
}

/* Navbar */
.navbar {
  background: rgba(10, 10, 10, 0.8) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.navbar-brand {
  font-weight: 700;
  color: var(--primary) !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-link {
  color: var(--text-muted) !important;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--secondary) !important;
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
}

/* Hero Section */
.hero {
  padding: 160px 0 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}

/* Sections Spacing */
.section {
  padding: 50px 0;
  /* Reduced to be more moderate */
  position: relative;
}

.hero h1.display-5 {
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(to right, #fff, var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.hero .lead {
  font-size: 1.25rem;
  color: var(--text-muted);
  border-left: 3px solid var(--secondary);
  padding-left: 1rem;
}

.hero .badge {
  background: transparent !important;
  border: 1px solid var(--secondary);
  color: var(--secondary);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

/* Buttons */
.btn-primary {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  font-family: var(--font-mono);
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--primary);
  transition: all 0.4s;
  z-index: -1;
  opacity: 0.2;
}

.btn-primary:hover {
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 20px var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-outline-light {
  border-color: var(--text-muted);
  color: var(--text-muted);
}

.btn-outline-light:hover {
  background: var(--text-muted);
  color: var(--bg-dark);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

/* Cards (Glassmorphism + Neon) */
.card-shadow,
.skills-card,
.portfolio-card,
.service-card,
.experience-card,
.stats-box,
.education-box,
.cert-box {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: var(--transition);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.card-shadow:hover,
.skills-card:hover,
.portfolio-card:hover,
.service-card:hover,
.experience-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15), inset 0 0 10px rgba(0, 212, 255, 0.05);
}

/* Glitch/Scan Effect on Hover */
.card-shadow:hover::after,
.portfolio-card:hover::after,
.about-card:hover::after,
.about-highlights:hover::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(to bottom,
      transparent,
      rgba(0, 212, 255, 0.1),
      transparent);
  transform: rotate(45deg);
  animation: scan 1.5s linear infinite;
  pointer-events: none;
}

@keyframes scan {
  0% {
    transform: translateY(-100%) rotate(45deg);
  }

  100% {
    transform: translateY(100%) rotate(45deg);
  }
}

/* Skill Items */
/* Skill Items - Remove default bullets */
.skills-list {
  list-style: none;
  padding-left: 0;
}

.skills-list li {
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.8rem 0;
  display: flex;
  align-items: center;
}

.skills-list li::before {
  content: ">";
  color: var(--secondary);
  font-family: var(--font-mono);
  margin-right: 10px;
  font-weight: bold;
}

.skills-list li:hover {
  padding-left: 10px;
  color: var(--text-main);
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* About List - Remove default bullets & Add Custom */
.about-list {
  list-style: none;
  padding-left: 0;
}

.about-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.about-list li::before {
  content: ">";
  color: var(--secondary);
  font-family: var(--font-mono);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Service Icons */
.service-icon {
  width: 60px;
  /* Reduced from 70px */
  height: 60px;
  /* Reduced from 70px */
  border-radius: 12px;
  background: rgba(0, 212, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  border: 1px solid var(--primary);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.service-icon i {
  font-size: 2rem;
  color: var(--primary);
}

.service-card:hover .service-icon {
  background: var(--primary);
  box-shadow: 0 0 20px var(--primary);
}

.service-card:hover .service-icon i {
  color: #000;
}

/* Experience Timeline */
.experience-card {
  padding: 2rem;
  border-left: 3px solid var(--secondary);
}

.experience-card ul {
  list-style: none;
  padding-left: 0;
}

.experience-card h3 {
  color: var(--text-main);
  font-family: var(--font-mono);
}

.experience-card .date {
  color: var(--secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: block;
}

.experience-card li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.experience-card li::before {
  color: var(--primary);
  content: "▹";
  position: absolute;
  left: 0;
}

/* Stats */
.stats-box {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(57, 255, 20, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
  font-family: var(--font-mono);
  color: var(--text-main);
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.stat-label {
  color: var(--primary);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

/* Forms */
.form-control {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main) !important;
  font-family: var(--font-mono);
}

.form-control:focus {
  background: rgba(0, 0, 0, 0.7);
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
  color: var(--text-main);
}

/* Ensure input text is visible */
input,
textarea {
  color: #fff !important;
}

/* Footer */
footer {
  background: rgba(5, 5, 5, 0.8);
  border-top: 1px solid rgba(0, 212, 255, 0.1);
  padding: 2rem 0;
  margin-top: 4rem;
}

.contact-icon {
  font-size: 1.5rem;
  margin: 0 10px;
  color: var(--text-muted);
  transition: var(--transition);
}

.contact-icon:hover {
  color: var(--secondary);
  transform: scale(1.2);
  text-shadow: 0 0 10px var(--secondary);
}

/* Utilities */
.text-primary {
  color: var(--primary) !important;
}

.text-secondary {
  color: var(--secondary) !important;
}

.bg-dark {
  background-color: var(--bg-dark) !important;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}

/* Responsive */
@media (max-width: 991px) {
  .hero {
    text-align: center;
    padding: 120px 0 30px;
    /* Reduced bottom padding further */
  }

  .hero .d-flex {
    justify-content: center !important;
  }

  .navbar-collapse {
    background: rgba(10, 10, 10, 0.95);
    padding: 1rem;
    border-radius: 0 0 12px 12px;
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-top: none;
  }

  .section {
    padding: 20px 0;
    /* Very tight spacing for mobile */
  }
}

/* Glitch Animation Keyframes */
@keyframes glitch {
  0% {
    transform: translate(0);
  }

  20% {
    transform: translate(-2px, 2px);
  }

  40% {
    transform: translate(-2px, -2px);
  }

  60% {
    transform: translate(2px, 2px);
  }

  80% {
    transform: translate(2px, -2px);
  }

  100% {
    transform: translate(0);
  }
}

.glitch-hover:hover {
  animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}

/* Typing Cursor */
.typed-cursor {
  color: var(--secondary);
  font-size: 1.2em;
}

/* Profile Photo */
.professional-photo {
  width: 100%;
  max-width: 400px;
  /* Slightly larger than before for impact */
  height: auto;
  aspect-ratio: 1/1;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
  filter: grayscale(20%) contrast(110%);
  transition: var(--transition);
}

.photo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-bottom: 2rem;
}

.photo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-bottom: 2rem;
}

.professional-photo:hover {
  filter: grayscale(0%);
  box-shadow: 0 0 30px var(--secondary);
  border-color: var(--secondary);
}