/* Additional styles for enhanced features */

/* Dark/Light Mode Styles */
:root {
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --text-primary: #ffffff;
  --text-secondary: #d1d5db;
  --accent-color: #fcd34d;
  --border-color: rgba(255, 255, 255, 0.1);
}

.dark {
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --text-primary: #ffffff;
  --text-secondary: #d1d5db;
  --accent-color: #fcd34d;
  --border-color: rgba(255, 255, 255, 0.1);
}

.light {
  --bg-primary: #f9fafb;
  --bg-secondary: #f3f4f6;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --accent-color: #eab308;
  --border-color: rgba(0, 0, 0, 0.1);
}

/* Reading Progress Indicator */
.reading-progress {
  transform-origin: left;
  will-change: transform, width;
  z-index: 9999;
}

/* Animation Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes progress {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

@keyframes scrollPulse {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}

/* Animation Classes */
.animate-fadeInUp {
  animation: fadeInUp 0.8s ease forwards;
}

.animate-fadeInDown {
  animation: fadeInDown 0.8s ease forwards;
}

.animate-fadeInLeft {
  animation: fadeInLeft 0.8s ease forwards;
}

.animate-fadeInRight {
  animation: fadeInRight 0.8s ease forwards;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-bounce-slow {
  animation: bounce 2s ease-in-out infinite;
}

.animate-progress {
  animation: progress 1.5s ease-out forwards;
}

.animate-scroll-pulse {
  animation: scrollPulse 1.5s ease-in-out infinite;
}

/* Animation Delays */
.delay-100 {
  animation-delay: 100ms;
}

.delay-200 {
  animation-delay: 200ms;
}

.delay-300 {
  animation-delay: 300ms;
}

.delay-400 {
  animation-delay: 400ms;
}

.delay-500 {
  animation-delay: 500ms;
}

/* Intersection Observer Animation Classes */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-on-scroll.fade-up {
  transform: translateY(20px);
}

.animate-on-scroll.fade-down {
  transform: translateY(-20px);
}

.animate-on-scroll.fade-left {
  transform: translateX(-20px);
}

.animate-on-scroll.fade-right {
  transform: translateX(20px);
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translate(0, 0);
}

/* Counter Animation Styles */
.counter-value {
  transition: color 0.3s ease;
}

/* Dark Mode Toggle Styles */
.dark-mode-toggle {
  transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
  transform: rotate(15deg);
}

/* Statistics Section Enhancement */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Lazy Loading Image Placeholders */
.lazy-image-container {
  background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

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

/* Responsive Adjustments */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll, .animate-fadeInUp, .animate-fadeInDown, 
  .animate-fadeInLeft, .animate-fadeInRight, .animate-pulse, 
  .animate-bounce-slow, .animate-progress, .animate-scroll-pulse {
    animation: none;
    transition: none;
  }
  
  .counter-value, .stat-card, .dark-mode-toggle {
    transition: none;
  }
  
  .dark-mode-toggle:hover {
    transform: none;
  }
  
  .stat-card:hover {
    transform: none;
    box-shadow: none;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Additional Accessibility Features */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

  /* Footer Styles */
  .footer {
    background: linear-gradient(to bottom, #111827, #0f172a);
    border-top: 1px solid rgba(255, 215, 0, 0.1);
    position: relative;
    overflow: hidden;
  }

  .footer::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(
      circle,
      rgba(255, 215, 0, 0.15) 0%,
      rgba(255, 165, 0, 0.05) 50%,
      transparent 70%
    );
    filter: blur(50px);
    opacity: 0.7;
    bottom: -150px;
    right: -150px;
    z-index: 0;
  }

  .footer-link {
    color: #d1d5db;
    transition: all 0.3s ease;
  }

  .footer-link:hover {
    background: linear-gradient(45deg, #ffd700, #ffa500);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transform: translateX(5px);
  }

  .social-icon {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .social-icon:hover {
    transform: translateY(-3px);
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
  }

  .tech-logo {
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all 0.3s ease;
    max-width: 100%;
    max-height: 30px;
  }

  .tech-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
  }

  .back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(25, 25, 35, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.2);
    color: #ffd700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
  }

  .back-to-top.visible {
    opacity: 1;
    visibility: visible;
  }

  .back-to-top:hover {
    background: rgba(35, 35, 45, 0.9);
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  }

    /* Nav styles */
    .nav-link {
      color: #d1d5db;
      font-weight: 500;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-link:hover {
      background: linear-gradient(45deg, #ffd700, #ffa500);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }

    .dropdown-trigger {
      display: flex;
      align-items: center;
      transition: all 0.3s ease;
    }

    .dropdown-menu {
      position: absolute;
      top: 100%;
      left: 0;
      margin-top: 0.5rem;
      width: 600px;
      background-color: #1f2937;
      border-radius: 0.5rem;
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
      transform: translateY(-0.5rem);
    }

    .group:hover .dropdown-menu,
    .dropdown-menu.active {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }

    /* Active states for menu items */
    .mobile-menu.active {
      max-height: 500px !important;
    }

    .dropdown-item {
      display: flex;
      align-items: center;
      padding: 0.75rem;
      border-radius: 0.5rem;
      color: #d1d5db;
      transition: all 0.3s ease;
    }

    .dropdown-item:hover {
      background-color: #374151;
      transform: translateX(0.5rem);
    }

    .dropdown-icon {
      width: 1.25rem;
      height: 1.25rem;
      margin-right: 0.75rem;
      color: #eab308;
    }

    /* Mobile Menu Animation */
    .mobile-menu {
      transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Backdrop Blur Effect */
    nav {
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }

    /* Accordion Transitions */
    .accordion div {
      transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Premium Dropdown Footer */
    .dropdown-menu > div:last-child {
      border-top: 1px solid #374151;
      background-color: #1f2937;
      padding: 1rem;
    }

    .dropdown-menu > div:last-child h3 {
      color: #eab308;
      font-size: 0.875rem;
      font-weight: 600;
      margin-bottom: 0.5rem;
    }