/* Additional Interactive Elements CSS */

/* Preloader Styles */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--darker-bg);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

.preloader-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 80px;
  height: 80px;
  position: relative;
}

.loader-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--primary-color);
  border-bottom-color: var(--secondary-color);
  animation: spin 1.5s linear infinite;
}

.loader-inner:before,
.loader-inner:after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 3px solid transparent;
}

.loader-inner:before {
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border-top-color: var(--secondary-color);
  border-bottom-color: var(--primary-color);
  animation: spin 2s linear infinite reverse;
}

.loader-inner:after {
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  border-top-color: var(--primary-color);
  border-bottom-color: var(--secondary-color);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Enhanced Hover Effects */
.skill-item {
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              box-shadow 0.5s ease, 
              border-color 0.5s ease;
  overflow: hidden;
  z-index: 1;
}

.skill-item:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
                rgba(108, 99, 255, 0.2) 0%, 
                rgba(255, 107, 107, 0.2) 100%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.skill-item:hover {
  transform: translateY(-15px) scale(1.03);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border-color: var(--primary-color);
}

.skill-item:hover:before {
  opacity: 1;
}

.skill-item:hover .skill-icon {
  transform: scale(1.2) rotate(10deg);
  animation: pulse 2s infinite;
}

.skill-item:after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0.5);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.skill-item:hover:after {
  opacity: 1;
  transform: scale(1);
}

/* Project Card Enhanced Hover */
.project-card {
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              box-shadow 0.5s ease, 
              border-color 0.5s ease;
  overflow: hidden;
}

.project-card:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
                rgba(108, 99, 255, 0.2) 0%, 
                rgba(255, 107, 107, 0.2) 100%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.project-card:hover {
  transform: translateY(-15px) scale(1.03);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border-color: var(--primary-color);
}

.project-card:hover:before {
  opacity: 1;
}

.project-card:after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0.5);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.project-card:hover:after {
  opacity: 1;
  transform: scale(1);
}

.project-card .project-header {
  position: relative;
  overflow: hidden;
}

.project-card .project-header:before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  width: 20px;
  height: 20px;
  background-color: var(--primary-color);
  border-radius: 50%;
  opacity: 0;
  transition: all 0.5s ease;
}

.project-card:hover .project-header:before {
  opacity: 0.8;
  transform: scale(20);
  z-index: -1;
}

/* Timeline Enhanced Animations */
.timeline-item {
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-item:hover {
  transform: translateX(10px);
}

.timeline-item:nth-child(even):hover {
  transform: translateX(-10px);
}

.timeline-content {
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              box-shadow 0.5s ease, 
              border-color 0.5s ease;
  overflow: hidden;
}

.timeline-content:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
                rgba(108, 99, 255, 0.1) 0%, 
                rgba(255, 107, 107, 0.1) 100%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.timeline-content:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
  border-color: var(--primary-color);
}

.timeline-content:hover:before {
  opacity: 1;
}

.timeline-icon {
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              box-shadow 0.5s ease;
}

.timeline-item:hover .timeline-icon {
  transform: scale(1.2) rotate(360deg);
  box-shadow: 0 0 0 8px var(--dark-bg), 0 0 0 12px rgba(108, 99, 255, 0.3);
}

/* Enhanced Button Animations */
.btn {
  overflow: hidden;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.btn:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
                transparent 0%, 
                rgba(255, 255, 255, 0.2) 50%, 
                transparent 100%);
  transition: left 0.7s ease;
  z-index: -1;
}

.btn:hover:before {
  left: 100%;
}

.btn:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
                rgba(108, 99, 255, 0) 0%, 
                rgba(255, 107, 107, 0) 100%);
  z-index: -2;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.btn:hover:after {
  opacity: 1;
}

.btn-primary {
  box-shadow: 0 5px 15px rgba(108, 99, 255, 0.4);
}

.btn-primary:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(108, 99, 255, 0.6);
}

.btn-outline-light {
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

.btn-outline-light:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

/* Enhanced Social Icons */
.social-icons a {
  overflow: hidden;
  position: relative;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              color 0.3s ease, 
              background-color 0.3s ease;
}

.social-icons a:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 50%;
}

.social-icons a:hover {
  transform: translateY(-8px) rotate(360deg);
  color: #ffffff;
}

.social-icons a:hover:before {
  opacity: 1;
}

.social-icons a:after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0.5);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.social-icons a:hover:after {
  opacity: 1;
  transform: scale(1);
}

/* Enhanced Profile Image */
.profile-image-container {
  position: relative;
  perspective: 1000px;
}

.profile-image {
  transition: transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              box-shadow 0.7s ease, 
              border 0.7s ease;
  transform-style: preserve-3d;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border: 4px solid rgba(255, 255, 255, 0.1);
}

.profile-image-container:hover .profile-image {
  transform: rotateY(10deg) rotateX(10deg);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  border: 4px solid rgba(108, 99, 255, 0.3);
}

.profile-image-container:before,
.profile-image-container:after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  transition: all 0.7s ease;
  z-index: -1;
}

.profile-image-container:before {
  top: -20px;
  left: -20px;
  background: linear-gradient(45deg, var(--primary-color), transparent);
  opacity: 0.3;
}

.profile-image-container:after {
  bottom: -20px;
  right: -20px;
  background: linear-gradient(45deg, transparent, var(--secondary-color));
  opacity: 0.3;
}

.profile-image-container:hover:before {
  transform: translateX(-10px) translateY(-10px);
  opacity: 0.5;
}

.profile-image-container:hover:after {
  transform: translateX(10px) translateY(10px);
  opacity: 0.5;
}

/* Enhanced Section Headers */
.section-header h2 {
  position: relative;
  overflow: hidden;
  padding-bottom: 10px;
}

.section-header h2:before {
  content: attr(data-text);
  position: absolute;
  top: -1.2em;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.25em;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--primary-color);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-header:hover h2:before {
  opacity: 1;
  transform: translateX(-50%) translateY(5px);
}

.section-divider {
  position: relative;
  overflow: hidden;
}

.section-divider:before,
.section-divider:after {
  transition: transform 0.5s ease, background-color 0.5s ease;
}

.section-header:hover .section-divider:before {
  transform: translateX(-10px) scale(1.5);
  background-color: var(--secondary-color);
}

.section-header:hover .section-divider:after {
  transform: translateX(10px) scale(1.5);
  background-color: var(--primary-color);
}

/* Enhanced Form Interactions */
.form-control {
  transition: border-color 0.3s ease, 
              box-shadow 0.3s ease, 
              background-color 0.3s ease, 
              transform 0.3s ease;
}

.form-control:focus {
  transform: translateY(-3px);
  border-color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(108, 99, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.1);
}

.form-label {
  transition: color 0.3s ease, transform 0.3s ease;
}

.form-control:focus + .form-label,
.form-group:focus-within .form-label {
  color: var(--primary-color);
  transform: translateY(-3px);
}

/* Interactive Progress Bars */
.progress {
  overflow: visible;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.progress-bar {
  position: relative;
  border-radius: 4px;
  transition: width 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.progress-bar:before {
  content: attr(aria-valuenow) '%';
  position: absolute;
  right: 0;
  top: -25px;
  background: var(--primary-color);
  color: var(--text-primary);
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.75rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.progress-bar:after {
  content: '';
  position: absolute;
  right: 10px;
  top: -10px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--primary-color);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.skill-item:hover .progress-bar:before,
.skill-item:hover .progress-bar:after {
  opacity: 1;
  transform: translateY(0);
}

/* Interactive Contact Items */
.contact-item {
  transition: transform 0.3s ease;
}

.contact-item:hover {
  transform: translateX(10px);
}

.contact-item i {
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              background 0.3s ease;
}

.contact-item:hover i {
  transform: rotate(360deg);
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

/* Enhanced Footer Links */
.footer-links li {
  transition: transform 0.3s ease;
}

.footer-links li:hover {
  transform: translateX(10px);
}

.footer-links a {
  position: relative;
  padding-left: 0;
  transition: padding-left 0.3s ease, color 0.3s ease;
}

.footer-links a:before {
  transition: color 0.3s ease, transform 0.3s ease;
}

.footer-links a:hover {
  padding-left: 5px;
  color: var(--primary-color);
}

.footer-links a:hover:before {
  color: var(--secondary-color);
  transform: scale(1.2);
}

/* Enhanced Footer Contact */
.footer-contact li {
  transition: transform 0.3s ease;
}

.footer-contact li:hover {
  transform: translateX(10px);
}

.footer-contact li i {
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              color 0.3s ease;
}

.footer-contact li:hover i {
  transform: rotate(360deg);
  color: var(--secondary-color);
}

/* Back to Top Button Enhanced */
.back-to-top {
  overflow: hidden;
  transition: transform 0.3s ease, 
              box-shadow 0.3s ease, 
              opacity 0.3s ease, 
              visibility 0.3s ease;
}

.back-to-top:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.back-to-top:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(108, 99, 255, 0.6);
}

.back-to-top:hover:before {
  opacity: 1;
}

.back-to-top i {
  transition: transform 0.3s ease;
}

.back-to-top:hover i {
  transform: translateY(-5px);
}

/* Glowing Text Effect */
.text-glow {
  text-shadow: 0 0 10px rgba(108, 99, 255, 0.5), 
               0 0 20px rgba(108, 99, 255, 0.3), 
               0 0 30px rgba(108, 99, 255, 0.1);
  animation: textGlow 2s infinite alternate;
}

@keyframes textGlow {
  from {
    text-shadow: 0 0 10px rgba(108, 99, 255, 0.5), 
                 0 0 20px rgba(108, 99, 255, 0.3), 
                 0 0 30px rgba(108, 99, 255, 0.1);
  }
  to {
    text-shadow: 0 0 20px rgba(108, 99, 255, 0.8), 
                 0 0 30px rgba(108, 99, 255, 0.5), 
                 0 0 40px rgba(108, 99, 255, 0.3);
  }
}

/* Floating Animation */
.floating {
  animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

/* Pulse Animation */
.pulse {
  animation: pulse 2s infinite;
}

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

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Typing Effect */
.typing-effect {
  visibility: hidden;
  overflow: hidden;
  border-right: 0.15em solid var(--primary-color);
  white-space: nowrap;
  margin: 0 auto;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--primary-color) }
}

/* 3D Card Effect */
.card-3d {
  transition: transform 0.5s ease;
  transform-style: preserve-3d;
}

.card-3d:hover {
  transform: perspective(1000px) rotateX(10deg) rotateY(10deg);
}

/* Neon Border Effect */
.neon-border {
  position: relative;
}

.neon-border:before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  z-index: -1;
  background: linear-gradient(45deg, 
                var(--primary-color), 
                var(--secondary-color), 
                var(--primary-color), 
                var(--secondary-color));
  background-size: 400% 400%;
  border-radius: inherit;
  animation: neonGlow 3s ease infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.neon-border:hover:before {
  opacity: 1;
}

@keyframes neonGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

/* Ripple Effect */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple:after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
}

.ripple:focus:after,
.ripple:active:after {
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0) translate(-50%, -50%);
    opacity: 1;
  }
  100% {
    transform: scale(20, 20) translate(-50%, -50%);
    opacity: 0;
  }
}

/* Shine Effect */
.shine {
  position: relative;
  overflow: hidden;
}

.shine:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 100%
  );
  transform: skewX(-25deg);
  transition: left 0s ease;
}

.shine:hover:before {
  left: 125%;
  transition: left 0.7s ease;
}

/* Particle Background */
#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 9999;
  transition: opacity 0.3s ease-in-out;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary-color);
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary-color);
  transition: transform 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

/* Keyboard Focus Styles */
.keyboard-focus {
  outline: 3px solid var(--primary-color) !important;
  outline-offset: 3px !important;
}

/* Reduced Motion */
.reduced-motion * {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

.section-header h2 {
  position: relative;
  display: inline-block;
  padding-top: 2.5rem;
  overflow: visible;
}

.section-header h2::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -150%);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25rem;
  color: var(--primary-color);
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 1;
  pointer-events: none;
}

.section-header h2:hover::before {
  opacity: 1;
  transform: translate(-50%, -180%);
}


