:root {
  --primary: #00D9FF;       /* Bright cyan - pops on dark backgrounds */
  --secondary: #FF6B9D;     /* Bright pink accent */
  --dark: #111827;          /* Deep navy/almost black */
  --light: #F9FAFB;         /* Off-white */
  --card-bg: #FFFFFF;       /* Pure white */
  --accent: #C77DFF;        /* Bright purple accent */
  --accent-secondary: #7209B7; /* Deep purple */
  --warm: #FF6B35;          /* Warm orange for buttons */
  --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
  --gradient-dark: linear-gradient(135deg, var(--dark), #2D3748);
  --transition: all 0.3s ease-in-out;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.1);
  --border-radius: 12px;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Manrope', sans-serif;
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: transparent; /* Make background transparent for particle animation */
  color: var(--dark);
  line-height: 1.8;
  position: relative;
  font-size: 16px;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800; /* Bolder for dark backgrounds */
  line-height: 1.3;
  color: #FFFFFF; /* White for maximum contrast */
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7); /* Strong shadow for depth */
}

p {
  margin-bottom: 1.5rem;
  color: #E5E7EB; /* Light gray for dark backgrounds */
  font-weight: 600; /* Semi-bold for better visibility */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); /* Dark shadow for contrast */
  line-height: 1.7; /* Better line spacing */
}

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

a:hover {
  color: var(--secondary);
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Modern Navbar with Advanced Effects */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1rem 2rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow:
    0 2px 20px rgba(0, 0, 0, 0.05),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Navbar scroll effect */
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transform: translateY(0);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--primary);
  display: flex;
  align-items: center;
}

.logo-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding: 8px 16px;
  font-size: 0.95rem;
  border-radius: 25px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-icon {
  display: none;
}

/* Advanced navigation hover effects */
.nav-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 98, 255, 0.1), rgba(98, 54, 255, 0.1));
  border-radius: 25px;
  transform: scale(0);
  transition: all 0.3s ease;
  z-index: -1;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 2px;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
  transform: translateY(-2px);
}

.nav-links a:hover::before {
  transform: scale(1);
}

.nav-links a:hover::after, .nav-links a.active::after {
  width: 80%;
}

/* Hero Section with Advanced Effects */
.hero {
  min-height: 100vh;
  padding-top: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background: rgba(255, 255, 255, 0.3);
  overflow: hidden;
  perspective: 1000px; /* Enable 3D perspective for child elements */
}

/* Floating animation for hero content */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.hero-content {
  animation: float 6s ease-in-out infinite;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: var(--gradient-primary);
  opacity: 0.05;
  border-radius: 50%;
  z-index: 0;
}

.hero-content {
  max-width: 800px;
  padding: 3rem;
  z-index: 1;
  text-align: center; /* Center hero content */
  position: relative;
}

/* Set a fixed height for the typewriter text container */
.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  color: #1F2937; /* Much darker gray for better readability against particle background */
  max-width: 90%;
  line-height: 1.6;
  min-height: 80px; /* Add a minimum height to prevent layout shifts */
}

/* Ensure the typewriter text doesn't cause layout shifts */
.typewriter-text {
  display: block;
  min-height: 80px; /* Match the container height */
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  color: var(--dark);
  line-height: 1.1;
  position: relative;
  font-weight: 800;
}

.hero h1 span {
  color: var(--primary);
  position: relative;
}

.hero h1 span::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 8px;
  background: var(--accent);
  opacity: 0.3;
  z-index: -1;
}

/* Scroll Indicator - Repositioned to bottom of viewport */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--dark);
  font-size: 0.9rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.scroll-arrow {
  animation: scrollArrow 2s ease-in-out infinite;
  font-size: 1.5rem;
  margin-top: 10px;
}

/* Modern Buttons with Advanced Micro-interactions */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 1rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
  letter-spacing: 0.5px;
  transform-style: preserve-3d;
}

/* Ripple effect for all buttons */
.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s ease;
  z-index: -1;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--dark), #2D3748) !important;
  color: white !important;
  border: 2px solid var(--dark) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
  position: relative;
}

/* Magnetic hover effect for primary buttons */
.primary-btn:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  transform: translateY(-5px) scale(1.05);
  box-shadow:
    0 15px 35px rgba(0, 98, 255, 0.4),
    0 5px 15px rgba(0, 0, 0, 0.1) !important;
  color: white !important;
  border-color: var(--primary) !important;
}

/* Glowing effect */
.primary-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.primary-btn:hover::after {
  opacity: 0.2;
  animation: pulse 2s infinite;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--primary);
  border: 2px solid rgba(0, 98, 255, 0.3);
  position: relative;
}

/* Glassmorphism hover effect for secondary buttons */
.secondary-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-5px) scale(1.05);
  box-shadow:
    0 15px 35px rgba(0, 98, 255, 0.3),
    0 5px 15px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Shimmer effect for secondary buttons */
.secondary-btn::before {
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: translateX(-100%) translate(-50%, -50%);
}

.secondary-btn:hover::before {
  animation: shimmer 0.8s ease-in-out;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translate(-50%, -50%); }
  100% { transform: translateX(200%) translate(-50%, -50%); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.2; }
  50% { transform: scale(1.05); opacity: 0.1; }
}

/* Advanced Micro-interaction Styles */

/* Ripple effect for buttons */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Reveal animations */
.reveal-element {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal-element.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered reveal animation */
.reveal-element:nth-child(1) { transition-delay: 0.1s; }
.reveal-element:nth-child(2) { transition-delay: 0.2s; }
.reveal-element:nth-child(3) { transition-delay: 0.3s; }
.reveal-element:nth-child(4) { transition-delay: 0.4s; }
.reveal-element:nth-child(5) { transition-delay: 0.5s; }
.reveal-element:nth-child(6) { transition-delay: 0.6s; }

/* Floating label active state */
.form-label.active {
  transform: translateY(-25px) scale(0.85);
  color: var(--primary);
  background: rgba(255, 255, 255, 0.95);
}

/* Enhanced glassmorphism for various elements */
.glassmorphism {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Magnetic hover effect utility class */
.magnetic {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 3D transform utility classes */
.transform-3d {
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* Advanced Visual Effects */

/* Morphing SVG icons */
.morphing-icon {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.morphing-icon:hover {
  transform: scale(1.2) rotate(15deg);
}

/* Gradient text effect - optimized for dark backgrounds */
.gradient-text {
  background: linear-gradient(135deg, #00D9FF, #FF6B9D, #C77DFF, #7209B7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 300% 300%;
  animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Glowing border effect */
.glow-border {
  position: relative;
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, var(--primary), var(--secondary)) border-box;
}

.glow-border::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glow-border:hover::before {
  opacity: 0.7;
  animation: glow-pulse 2s infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

/* Particle trail effect for mouse movement */
.particle-trail {
  position: fixed;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, var(--primary), transparent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  animation: particle-fade 1s ease-out forwards;
}

@keyframes particle-fade {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0); }
}

/* Advanced loading states */
.loading-shimmer {
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

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



/* Section Styling */
.section {
  padding: 8rem 2rem;
  position: relative;
  text-align: center; /* Center all text in sections */
}

.section-light {
  background: rgba(255, 255, 255, 0.9); /* Semi-transparent white to show particles */
}

.section-dark {
  background: var(--dark);
  color: var(--light);
}

.section-gradient {
  background: var(--gradient-primary);
  color: white;
}

.section h2 {
  font-size: 2.75rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
  font-weight: 900; /* Extra bold */
  color: #FFFFFF; /* White for maximum contrast */
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.8); /* Strong shadow */
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 80px;
  height: 4px;
  background: var(--accent);
}

.section-center {
  text-align: center;
}

.section-center h2::after {
  left: 50%;
  transform: translateX(-50%);
}

/* Service Cards with Advanced 3D Effects - Single Row Centered Layout */
.service-cards {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 2.5rem; /* Increased gap for better spacing */
  margin-top: 4rem;
  perspective: 1000px; /* Enable 3D perspective */
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  max-width: 1600px; /* Allow more width for larger cards */
  margin-left: auto;
  margin-right: auto;
}

/* Responsive adjustments for service cards */
@media (max-width: 1400px) {
  .service-cards {
    gap: 2rem; /* Slightly smaller gap on medium screens */
  }

  .card {
    max-width: 320px; /* Slightly smaller on medium screens */
    min-width: 300px;
  }
}

@media (max-width: 1024px) {
  .service-cards {
    flex-wrap: wrap; /* Allow wrapping to 2x2 on tablets */
    justify-content: center;
    gap: 2rem;
  }

  .card {
    max-width: 400px; /* Larger cards when wrapped */
    min-width: 350px;
  }
}

@media (max-width: 768px) {
  .service-cards {
    flex-direction: column; /* Stack vertically on mobile */
    align-items: center;
    gap: 2rem;
  }

  .card {
    max-width: 500px; /* Full width on mobile */
    min-width: 300px;
  }
}

.card {
  background: rgba(255, 255, 255, 0.95); /* Glassmorphism background */
  backdrop-filter: blur(20px); /* Glassmorphism blur effect */
  -webkit-backdrop-filter: blur(20px);
  padding: 2.5rem;
  border-radius: 20px; /* More rounded for modern look */
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 2px 16px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8); /* Inner highlight */
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Smooth bounce effect */
  position: relative;
  overflow: hidden;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.2); /* Glassmorphism border */
  transform-style: preserve-3d; /* Enable 3D transforms */
  flex: 1; /* Equal width distribution in flex container */
  max-width: 350px; /* Larger width for better text readability */
  min-width: 320px; /* Increased minimum width */
  min-height: 280px; /* Taller cards for better proportions */
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--gradient-primary);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-15px) rotateX(5deg) rotateY(5deg); /* 3D hover effect */
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.15),
    0 8px 32px rgba(0, 98, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1); /* Enhanced glassmorphism */
  background: rgba(255, 255, 255, 0.98); /* Slightly more opaque on hover */
  border-color: rgba(0, 98, 255, 0.3); /* Colored border on hover */
}

.card:hover::before {
  width: 100%;
  opacity: 0.08;
  background: linear-gradient(135deg, var(--primary), var(--accent)); /* Gradient overlay */
}

.card h3 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  position: relative;
  text-align: center;
  font-weight: 800; /* Extra bold for dark backgrounds */
  color: #1F2937; /* Dark for card backgrounds (cards are white) */
}

.card p {
  text-align: center;
  color: #4B5563; /* Medium gray for card backgrounds */
  font-weight: 500; /* Medium weight */
  line-height: 1.6; /* Better spacing */
}

.card-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, rgba(0, 98, 255, 0.1), rgba(98, 54, 255, 0.1));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-size: 1.8rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(0, 98, 255, 0.2);
}

/* Icon hover effects with morphing */
.card:hover .card-icon {
  transform: scale(1.1) rotate(10deg);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 8px 25px rgba(0, 98, 255, 0.3);
  border-color: var(--primary);
}

/* Ripple effect for icons */
.card-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s ease;
}

.card:hover .card-icon::before {
  width: 100%;
  height: 100%;
}

/* Process Steps */
.process-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 4rem;
  position: relative;
}

.process-steps::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(0, 98, 255, 0.1);
  z-index: 0;
}

.process-step {
  flex: 1;
  min-width: 200px;
  text-align: center;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 2;
}

.process-step h3 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
  font-weight: 800; /* Extra bold for dark backgrounds */
  color: #FFFFFF; /* White for maximum contrast */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7); /* Strong shadow */
}

.process-step p {
  color: #E5E7EB; /* Light gray for dark backgrounds */
  font-weight: 600; /* Semi-bold for better visibility */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); /* Dark shadow */
  line-height: 1.6; /* Better spacing */
}

/* Portfolio Items */
.portfolio-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 40px;
}

.filter-btn {
  background: transparent;
  border: none;
  padding: 10px 24px;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--dark);
  font-weight: 500;
  border-radius: 30px;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  color: white;
}

.portfolio-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.5rem;
}

.portfolio-item {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.portfolio-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.portfolio-image {
  position: relative;
  overflow: hidden;
  height: 250px;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 98, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.portfolio-item:hover .portfolio-image img {
  transform: scale(1.1);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-content {
  padding: 1.5rem;
}

.portfolio-item h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.3rem;
  padding: 0 1.5rem;
  text-align: center;
  font-weight: 800; /* Extra bold for dark backgrounds */
  color: #FFFFFF; /* White for maximum contrast */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7); /* Strong shadow */
}

.portfolio-item p {
  padding: 0 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
  color: #E5E7EB; /* Light gray for dark backgrounds */
  font-weight: 600; /* Semi-bold for better visibility */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); /* Dark shadow */
  line-height: 1.6; /* Better spacing */
}

.view-project {
  background: rgba(255, 255, 255, 0.95); /* Semi-transparent white */
  color: var(--primary);
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 600;
  transition: var(--transition);
}

.view-project:hover {
  background: var(--dark);
  color: white;
  transform: translateY(-3px);
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0 1.5rem;
  padding: 0 1.5rem;
}

.tech-stack span {
  background: rgba(0, 98, 255, 0.1);
  color: var(--primary);
  padding: 5px 12px;
  font-size: 0.8rem;
  border-radius: 20px;
  font-weight: 500;
}

/* Contact Form */
.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem;
  margin-top: 3rem;
}

.contact-info, .contact-form-container {
  flex: 1;
  min-width: 300px;
}

.contact-intro {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: rgba(0, 98, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  color: var(--primary);
  font-size: 1.2rem;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 2rem;
}

.social-link {
  width: 45px;
  height: 45px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 98, 255, 0.1);
  color: var(--primary);
  border-radius: 12px;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-5px);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--dark);
}

.form-control {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid rgba(226, 232, 240, 0.5);
  border-radius: 15px;
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: rgba(249, 250, 251, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
}

/* Advanced focus effects with micro-interactions */
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow:
    0 0 0 4px rgba(0, 98, 255, 0.1),
    0 8px 25px rgba(0, 98, 255, 0.15);
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-2px) scale(1.02);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Floating label effect */
.form-group {
  position: relative;
  margin-bottom: 2rem;
}

.form-control:focus + .form-label,
.form-control:not(:placeholder-shown) + .form-label {
  transform: translateY(-25px) scale(0.85);
  color: var(--primary);
}

.form-label {
  position: absolute;
  top: 1rem;
  left: 1.25rem;
  transition: all 0.3s ease;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.9);
  padding: 0 0.5rem;
  border-radius: 4px;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.submit-btn {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 98, 255, 0.3);
}

/* Form Messages */
.form-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
}

.form-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Footer */
footer {
  background: var(--dark);
  padding: 5rem 2rem 2rem;
  color: white;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto 3rem;
  gap: 3rem;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: white;
}

.footer-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem;
}

.footer-section {
  min-width: 150px;
}

.footer-section h4 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  position: relative;
}

.footer-section h4::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.8rem;
}

.footer-section ul li a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer-section ul li a:hover {
  color: white;
  padding-left: 5px;
}

.footer-social {
  display: flex;
  gap: 15px;
  margin-bottom: 1.5rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: var(--transition);
}

.social-icon:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-5px);
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--light);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.pixel-loading {
  text-align: center;
}

.pixel-loading p {
  margin-top: 20px;
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  color: var(--dark);
}

/* Hero Background and Elements */
.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--dark);
  font-size: 0.8rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

/* Contact Section Enhancements */
.contact-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-info, .contact-form-container {
  flex: 1;
  min-width: 300px;
}

.contact-intro {
  margin-bottom: 30px;
}

.contact-details {
  margin-bottom: 30px;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.contact-icon {
  width: 30px;
  height: 30px;
  margin-right: 15px;
  background-color: var(--warm);
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--dark);
  color: var(--light);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  transform: translateY(-3px);
  background: var(--warm);
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-group input {
  width: auto;
}

.checkbox-group label {
  margin-bottom: 0;
}

/* Footer */
footer {
  background: var(--dark);
  padding: 3rem 2rem 1rem;
  color: var(--light);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto 30px;
  gap: 30px;
}

.footer-logo {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.footer-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
}

.footer-section {
  min-width: 150px;
}

.footer-section h4 {
  margin-bottom: 15px;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.9rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section li {
  margin-bottom: 10px;
}

.footer-section a {
  color: var(--light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--warm);
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.social-icon {
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: var(--warm);
}

.footer-email {
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--light);
  text-decoration: none;
  font-size: 0.8rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  opacity: 1;
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  padding: 1.5rem 2rem;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: block;
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-content p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.cookie-policy-link {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 500;
}

.cookie-policy-link:hover {
  color: white;
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-primary);
}

.accept-btn {
  background: var(--primary);
  color: white;
}

.accept-btn:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

.settings-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.settings-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
}

/* Cookie Settings Modal */
.cookie-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.cookie-modal {
  background: rgba(255, 255, 255, 0.98); /* Semi-transparent white with backdrop blur */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease-out;
}

.cookie-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.cookie-modal-header h3 {
  margin: 0;
  color: var(--dark);
  font-size: 1.5rem;
}

.cookie-modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.cookie-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--dark);
}

.cookie-modal-content {
  padding: 2rem;
}

.cookie-modal-content > p {
  margin-bottom: 2rem;
  color: #666;
  line-height: 1.6;
}

.cookie-category {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.cookie-category h4 {
  margin: 0;
  color: var(--dark);
  font-size: 1.1rem;
}

.cookie-category p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Cookie Toggle Switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 24px;
}

.cookie-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .cookie-slider {
  background-color: var(--primary);
}

input:checked + .cookie-slider:before {
  transform: translateX(26px);
}

.cookie-slider.essential {
  background-color: var(--accent) !important;
  cursor: not-allowed;
}

.cookie-modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.accept-all-btn {
  background: var(--primary) !important;
  color: white !important;
}

.save-settings-btn {
  background: var(--secondary) !important;
  color: white !important;
}

.reject-all-btn {
  background: transparent !important;
  color: var(--dark) !important;
  border: 1px solid #ddd !important;
}

.reject-all-btn:hover {
  background: #f5f5f5 !important;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--warm);
  color: var(--light);
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  z-index: 1000;
  transition: var(--transition);
}
#back-to-top:hover {
  background: var(--secondary);
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    right: -100%;
    top: 0;
    height: 100vh;
    width: 60%;
    background: var(--dark);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: var(--transition);
    z-index: 9;
  }
  .nav-links.nav-active {
    right: 0;
  }
  .burger {
    display: block;
    position: relative;
    z-index: 10;
  }
  .card, .game-item, .portfolio-item {
    width: 100%;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }

  /* Cookie banner mobile styles */
  .cookie-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .cookie-buttons {
    width: 100%;
    justify-content: center;
  }

  /* Cookie modal mobile styles */
  .cookie-modal {
    width: 95%;
    max-height: 90vh;
  }

  .cookie-modal-header,
  .cookie-modal-content,
  .cookie-modal-footer {
    padding: 1rem;
  }

  .cookie-modal-footer {
    flex-direction: column;
  }

  .cookie-modal-footer .cookie-btn {
    width: 100%;
    text-align: center;
  }

  .cookie-category {
    padding: 1rem;
  }

  .cookie-category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}
