/* ========================================
   FUTURISTIC PORTFOLIO ENHANCEMENTS
   ======================================== */

/* CSS Variables for Theme */
:root {
  --primary-color: #cdfe7d;
  --secondary-color: #905efb;
  --accent-cyan: #00d4ff;
  --accent-pink: #ff006e;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glow-blue: 0 0 20px rgba(0, 212, 255, 0.5);
  --glow-purple: 0 0 20px rgba(144, 94, 251, 0.5);
  --glow-pink: 0 0 20px rgba(255, 0, 110, 0.5);
}

/* Light Theme Variables */
[data-theme="light"] {
  --dark-bg: #ffffff;
  --text-color: #1a1a2e;
  --glass-bg: rgba(0, 0, 0, 0.03);
  --glass-border: rgba(0, 0, 0, 0.1);
}

/* Light mode overrides - remove dark background */
body:not(.dark-bg) {
  background: #f8f9fa !important;
  color: #1a1a2e !important;
}

body:not(.dark-bg) .main-bg {
  background: #ffffff !important;
}

body:not(.dark-bg) .banner-area,
body:not(.dark-bg) .header-area,
body:not(.dark-bg) .footer-area {
  background: #ffffff !important;
}

/* Ensure text is readable in light mode */
body:not(.dark-bg) h1,
body:not(.dark-bg) h2,
body:not(.dark-bg) h3,
body:not(.dark-bg) h4,
body:not(.dark-bg) h5,
body:not(.dark-bg) h6,
body:not(.dark-bg) p,
body:not(.dark-bg) span,
body:not(.dark-bg) a {
  color: #1a1a2e !important;
}

/* Light mode card styles */
body:not(.dark-bg) .service-card,
body:not(.dark-bg) .project-card,
body:not(.dark-bg) .blog-card,
body:not(.dark-bg) .pricing-card {
  background: #ffffff !important;
}

/* Contact page specific styles - ensure visibility */
body:not(.dark-bg) .contact-area,
body:not(.dark-bg) .contact-form,
body:not(.dark-bg) .contact-info,
body:not(.dark-bg) .form-control,
body:not(.dark-bg) input,
body:not(.dark-bg) textarea {
  background: #ffffff !important;
  color: #1a1a2e !important;
  border-color: #ddd !important;
}

body:not(.dark-bg) .breadcrumb-area,
body:not(.dark-bg) .breadcrumb-text {
  background: #f8f9fa !important;
  color: #1a1a2e !important;
}

/* Make sure sections are visible in light mode */
body:not(.dark-bg) section,
body:not(.dark-bg) .section {
  background: #ffffff !important;
  color: #1a1a2e !important;
}

/* Dark mode specific - keep dark background */
body.dark-bg,
body.dark-bg section,
body.dark-bg .section,
body.dark-bg .contact-area,
body.dark-bg .contact-form,
body.dark-bg .form-control,
body.dark-bg input,
body.dark-bg textarea {
  background: #0a0a0a !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Ensure scroll content is always visible */
#scrollsmoother-container {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Fix any visibility issues */
.mt-120,
.breadcrumb-area,
.contact-area {
  opacity: 1 !important;
  visibility: visible !important;
}

/* ========================================
   PARTICLE BACKGROUND
   ======================================== */
.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.6;
  animation: float 15s infinite ease-in-out;
}

.particle:nth-child(1) {
  width: 4px;
  height: 4px;
  background: var(--primary-color);
  left: 10%;
  top: 20%;
  animation-delay: 0s;
  box-shadow: 0 0 10px var(--primary-color);
}

.particle:nth-child(2) {
  width: 6px;
  height: 6px;
  background: var(--secondary-color);
  left: 20%;
  top: 80%;
  animation-delay: -2s;
  box-shadow: 0 0 15px var(--secondary-color);
}

.particle:nth-child(3) {
  width: 3px;
  height: 3px;
  background: var(--accent-cyan);
  left: 35%;
  top: 40%;
  animation-delay: -4s;
  box-shadow: 0 0 8px var(--accent-cyan);
}

.particle:nth-child(4) {
  width: 5px;
  height: 5px;
  background: var(--primary-color);
  left: 50%;
  top: 60%;
  animation-delay: -6s;
  box-shadow: 0 0 12px var(--primary-color);
}

.particle:nth-child(5) {
  width: 4px;
  height: 4px;
  background: var(--secondary-color);
  left: 65%;
  top: 30%;
  animation-delay: -8s;
  box-shadow: 0 0 10px var(--secondary-color);
}

.particle:nth-child(6) {
  width: 7px;
  height: 7px;
  background: var(--accent-pink);
  left: 80%;
  top: 70%;
  animation-delay: -10s;
  box-shadow: 0 0 15px var(--accent-pink);
}

.particle:nth-child(7) {
  width: 3px;
  height: 3px;
  background: var(--accent-cyan);
  left: 90%;
  top: 15%;
  animation-delay: -12s;
  box-shadow: 0 0 8px var(--accent-cyan);
}

.particle:nth-child(8) {
  width: 5px;
  height: 5px;
  background: var(--primary-color);
  left: 5%;
  top: 50%;
  animation-delay: -14s;
  box-shadow: 0 0 12px var(--primary-color);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  25% {
    transform: translateY(-30px) translateX(15px);
  }
  50% {
    transform: translateY(-15px) translateX(-10px);
  }
  75% {
    transform: translateY(-40px) translateX(20px);
  }
}

/* Grid Background */
.grid-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

/* ========================================
   SCROLL PROGRESS INDICATOR
   ======================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-cyan));
  z-index: 10000;
  box-shadow: var(--glow-blue);
  transition: width 0.1s ease-out;
}

.scroll-progress::after {
  content: '';
  position: absolute;
  right: 0;
  top: -5px;
  width: 12px;
  height: 12px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--accent-cyan);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
}

/* ========================================
   GLASSMORPHISM ENHANCEMENTS
   ======================================== */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  transition: all 0.4s ease;
}

.glass-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

.glass-nav {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-bottom: 1px solid var(--glass-border);
}

/* ========================================
   THEME TOGGLE
   ======================================== */
.theme-toggle {
  position: fixed;
  top: 100px;
  right: 30px;
  z-index: 99999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(144, 94, 251, 0.5);
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(144, 94, 251, 0.7);
}

.theme-toggle i {
  font-size: 22px;
  color: #fff;
  transition: all 0.3s ease;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.theme-toggle .sun-icon {
  display: none;
}

.theme-toggle .moon-icon {
  display: block;
}

[data-theme="light"] .theme-toggle .sun-icon {
  display: block;
}

[data-theme="light"] .theme-toggle .moon-icon {
  display: none;
}

/* Make sure button shows on all backgrounds */
.theme-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(144, 94, 251, 0.8), rgba(205, 254, 125, 0.8));
  z-index: -1;
}

/* ========================================
   TYPING EFFECT
   ======================================== */
.typing-wrapper {
  display: inline-block;
}

.typing-text {
  display: inline;
  border-right: 3px solid var(--primary-color);
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%, 50% {
    border-color: var(--primary-color);
  }
  51%, 100% {
    border-color: transparent;
  }
}

.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--primary-color);
  margin-left: 2px;
  animation: cursorBlink 1s infinite;
}

@keyframes cursorBlink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

/* ========================================
   3D TILT EFFECT
   ======================================== */
.tilt-card {
  transform-style: preserve-3d;
  transform: perspective(1000px);
  transition: transform 0.3s ease;
}

.tilt-card:hover {
  transform: perspective(1000px) rotateX(5deg) rotateY(-5deg) translateZ(20px);
}

.tilt-card .tilt-content {
  transform: translateZ(30px);
}

/* ========================================
   BUTTON ENHANCEMENTS
   ======================================== */
.ripple-btn {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
}

.ripple-btn::after {
  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: width 0.6s, height 0.6s;
}

.ripple-btn:active::after {
  width: 300px;
  height: 300px;
}

/* Glow button */
.glow-btn {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.glow-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
  z-index: -1;
}

.glow-btn:hover::before {
  left: 100%;
}

.glow-btn:hover {
  box-shadow: var(--glow-blue);
}

/* ========================================
   HOVER EFFECTS
   ======================================== */
.hover-lift {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hover-lift:hover {
  transform: translateY(-15px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.hover-glow {
  transition: all 0.3s ease;
}

.hover-glow:hover {
  box-shadow: var(--glow-purple);
}

/* ========================================
   RESPONSIVE ENHANCEMENTS
   ======================================== */
@media (max-width: 768px) {
  .theme-toggle {
    top: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
  
  .scroll-progress {
    height: 2px;
  }
  
  .scroll-progress::after {
    width: 8px;
    height: 8px;
  }
  
  .particle {
    opacity: 0.4;
  }
}

/* ========================================
   ANIMATIONS
   ======================================== */
.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-left {
  animation: fadeInLeft 0.8s ease-out forwards;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in-right {
  animation: fadeInRight 0.8s ease-out forwards;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.scale-in {
  animation: scaleIn 0.6s ease-out forwards;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========================================
   CUSTOM CURSOR ENHANCEMENTS
   ======================================== */
.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  transition: transform 0.1s ease;
  box-shadow: 0 0 10px var(--primary-color);
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 99998;
  transition: all 0.15s ease-out;
  opacity: 0.5;
}

.cursor-dot.hover {
  transform: scale(2);
}

.cursor-outline.hover {
  width: 60px;
  height: 60px;
  border-color: var(--secondary-color);
  opacity: 0.8;
}

/* ========================================
   SKILLS SECTION ENHANCEMENTS
   ======================================== */
.skill-bar {
  background: var(--glass-bg);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 10px;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.skill-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Circular Skill */
.circular-skill {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.circular-skill svg {
  transform: rotate(-90deg);
}

.circular-skill .progress-circle {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 1.5s ease;
}

.circular-skill .skill-value {
  position: absolute;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
}

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s ease;
  z-index: 9999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--glow-purple);
}

.back-to-top i {
  color: #000;
  font-size: 20px;
}

/* ========================================
   INTERSECTION OBSERVER ANIMATIONS
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease-out;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease-out;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.8s ease-out;
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}