/* ===== GENERAL ANIMATION CLASSES ===== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}



/* ===== 3D CARD EFFECT ===== */
.card-3d {
  perspective: 1000px;
  transition: all 0.3s ease;
}

.card-3d-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.card-3d:hover .card-3d-inner {
  transform: rotateY(10deg) rotateX(5deg);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.card-3d::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
  border-radius: 0.5rem;
}

.card-3d:hover::before {
  opacity: 1;
}

.shine {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-3d:hover .shine {
  opacity: 1;
}

/* ===== ANIMATED SKILL VISUALIZATION ===== */
.skill-circle {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
}

.skill-circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.skill-circle svg circle {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
}

.skill-circle .background {
  stroke: rgba(59, 130, 246, 0.1);
}

body.dark-mode .skill-circle .background {
  stroke: rgba(59, 130, 246, 0.2);
}

.skill-circle .progress {
  stroke: var(--primary);
  stroke-dasharray: 283; /* 2 * PI * (r - stroke-width/2) */
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 1.5s ease;
}

.skill-circle .percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: 700;
}



/* ===== 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;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary);
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary);
  transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}

.cursor-hover {
  transform: translate(-50%, -50%) scale(1.5);
  background-color: transparent;
  border-color: var(--accent);
  width: 60px;
  height: 60px;
}

/* Hide cursor on mobile devices */
@media (max-width: 768px) {
  .cursor-dot,
  .cursor-outline {
    display: none;
  }
  body.cursor-custom {
    cursor: auto;
  }
}

/* ===== INTERACTIVE TIMELINE ===== */
.timeline-item {
  transition: transform 0.3s ease;
}

.timeline-item:hover {
  transform: scale(1.03);
}

.timeline-dot {
  transition: transform 0.3s ease, background 0.3s ease;
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.5);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.timeline-content {
  position: relative;
  overflow: hidden;
}

.timeline-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  transition: height 0.5s ease;
}

.timeline-item:hover .timeline-content::before {
  height: 100%;
}

.timeline-date {
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.timeline-item:hover .timeline-date {
  background-color: rgba(59, 130, 246, 0.2);
  transform: translateX(5px);
}


/* ===== FLOATING ELEMENTS ===== */
.float-animation {
  animation: float 6s ease-in-out infinite;
}

.float-animation-delay-1 {
  animation-delay: 1s;
}

.float-animation-delay-2 {
  animation-delay: 2s;
}

.float-animation-delay-3 {
  animation-delay: 3s;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* ===== WATER-LIKE WAVE BACKGROUND ===== */
.wave-container {
  position: relative;
  overflow: hidden;
  
}

.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100px;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 100" xmlns="http://www.w3.org/2000/svg"><path fill="%233b82f6" fill-opacity="0.3" d="M0,50 C150,100 350,0 600,50 C850,100 1050,0 1200,50 L1200,100 L0,100 Z"/></svg>') repeat-x;
  background-size: 1200px 100px;
  animation: wave-move 8s linear infinite, wave-animation 10s linear infinite, wave-bob 6s ease-in-out infinite;
  opacity: 0.5;
}

.wave:nth-child(2) {
  bottom: 10px;
  animation: wave-move 12s linear infinite reverse;
  opacity: 0.5;
}

.wave:nth-child(3) {
  bottom: 20px;
  animation: wave-move 16s linear infinite;
  opacity: 0.3;
}

@keyframes wave-move {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
@keyframes wave-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Optional: Dark mode version */
body.dark-mode .wave {
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 100" xmlns="http://www.w3.org/2000/svg"><path fill="%238b5cf6" fill-opacity="0.3" d="M0,50 C150,100 350,0 600,50 C850,100 1050,0 1200,50 L1200,100 L0,100 Z"/></svg>') repeat-x;
}


/* ===== ANIMATED COUNTERS ===== */
.counter-container {
  text-align: center;
  margin: 2rem 0;
}

.counter {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.counter-label {
  font-size: 1rem;
  color: var(--light-text);
}

body.dark-mode .counter-label {
  color: var(--dark-text);
}

/* ===== IMAGE REVEAL EFFECT ===== */
.image-reveal {
  position: relative;
  overflow: hidden;
}

.image-reveal img {
  transform: scale(1.1);
  transition: transform 0.5s ease;
}

.image-reveal:hover img {
  transform: scale(1);
}

.image-reveal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary);
  transform: translateX(-100%);
  z-index: 1;
}

.image-reveal::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--accent);
  transform: translateX(-100%);
  z-index: 1;
}

.image-reveal.animate::before {
  animation: image-reveal 1.5s cubic-bezier(0.77, 0, 0.18, 1) forwards;
}

.image-reveal.animate::after {
  animation: image-reveal 1.5s 0.3s cubic-bezier(0.77, 0, 0.18, 1) forwards;
}

@keyframes image-reveal {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(100%);
  }
}
