/* Scroll Animation Base Styles */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Animations for Cards */
.stagger-item {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.stagger-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-item:nth-child(1) { transition-delay: 0.05s; }
.stagger-item:nth-child(2) { transition-delay: 0.1s; }
.stagger-item:nth-child(3) { transition-delay: 0.15s; }
.stagger-item:nth-child(4) { transition-delay: 0.2s; }
.stagger-item:nth-child(5) { transition-delay: 0.25s; }
.stagger-item:nth-child(6) { transition-delay: 0.3s; }

/* Button Hover Effects */
.button-hover {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow;
}

.button-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

/* Project Card Hover */
.project-card {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  will-change: transform, box-shadow;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.project-card img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.project-card:hover img {
  transform: scale(1.05);
}

/* Press Card Shine Effect */
.press-card {
  position: relative;
  overflow: hidden;
}

.press-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: left;
}

.press-card:hover::before {
  left: 100%;
}

/* Timeline Drawing Animation */
.timeline-line {
  position: relative;
  overflow: hidden;
}

.timeline-line::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 0;
  background: linear-gradient(to bottom, #A78542, #0B1D3E);
  transition: height 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: height;
}

.timeline-line.visible::before {
  height: 100%;
}

/* Parallax Hero Background */
@media (min-width: 768px) {
  .parallax-bg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .stagger-item,
  .button-hover,
  .project-card,
  .project-card img,
  .press-card::before,
  .timeline-line::before,
  .parallax-bg {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
  
  .animate-on-scroll,
  .stagger-item {
    opacity: 1 !important;
  }
  
  .timeline-line::before {
    height: 100% !important;
  }
}
