/* ===============================
   ✨ GLOBAL ANIMATIONS
=============================== */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes fadeSlide {
  0% { opacity: 0; transform: translateY(-30px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes pulseBtn {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(71, 96, 106, 0.6); }
  50% { transform: scale(1.08); box-shadow: 0 0 15px 5px rgba(94, 123, 135, 0.4); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(71, 96, 106, 0.6); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes planeBounce {
  0%, 100% { transform: translateX(0) rotate(0); }
  50% { transform: translateX(4px) rotate(10deg); }
}

/* ============================
   🌟 PROJECT MODAL 3D PREMIUM STYLE
============================ */
.project-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(8px);
  transition: opacity 0.4s ease, visibility 0.4s ease;
  perspective: 1500px;
}

.project-modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 30px;
  max-width: 750px;
  width: 90%;
  color: #fff;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(15px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transform: scale(0.6) rotateY(-40deg);
  opacity: 0;
  animation: modal3DIn 0.8s cubic-bezier(0.25, 1.3, 0.5, 1) forwards;
}

/* ============================
   🌟 Modal Image Styling
============================ */
.modal-image-container {
  perspective: 1000px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}

.modal-image-container img {
  max-width: 90%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  transform: rotateY(-10deg) scale(0.95);
  transition: transform 0.6s ease, box-shadow 0.4s ease;
}

.modal-image-container img:hover {
  transform: rotateY(0deg) scale(1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

/* Close button */
.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.modal-close:hover {
  transform: scale(1.2) rotate(90deg);
  color: #5e7b87;
}

/* Titles & Text */
.modal-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 10px 0;
  color: #5ee7df;
  text-shadow: 0 0 10px rgba(94, 231, 223, 0.8);
}
.modal-company, .modal-tech, .modal-desc {
  margin: 10px 0;
  font-size: 1rem;
  color: #f1f1f1;
}

/* Visit Site Button */
.project-link {
  display: inline-block;
  margin-top: 15px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #5ee7df, #b490ca);
  border-radius: 30px;
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(94, 231, 223, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-link:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 25px rgba(94, 231, 223, 0.8);
}

/* ✨ 3D Entry Animation */
@keyframes modal3DIn {
  0% {
    transform: scale(0.6) rotateY(-40deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.05) rotateY(5deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotateY(0deg);
    opacity: 1;
  }
}

/* ✨ 3D Exit Animation */
@keyframes modal3DOut {
  0% {
    transform: scale(1) rotateY(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(0.6) rotateY(40deg);
    opacity: 0;
  }
}


/* ===============================
   🌿 3D EMERGING GROW + POP-UP EFFECT
=============================== */
.card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: 
    transform 0.5s cubic-bezier(0.25, 1.3, 0.5, 1),
    box-shadow 0.5s ease,
    filter 0.4s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  will-change: transform, box-shadow;
}

/* 🌟 Multi-Dimensional Pop & Emerge */
.card:hover {
  transform: 
    translateY(-25px)      /* lift upwards like emerging */
    scale(1.08) 
    rotateX(8deg) 
    rotateY(-6deg);
  box-shadow: 
    0 25px 45px rgba(0,0,0,0.25),  /* deeper drop shadow */
    0 8px 20px rgba(94, 231, 223, 0.25); /* subtle glow */
  filter: brightness(1.05);
}

/* ✨ Light shimmer/glow overlay */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(94, 231, 223, 0.25), rgba(180, 144, 202, 0.2));
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
}

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

/* 🖱 Press Down Effect */
.card:active {
  transform: translateY(-10px) scale(0.98) rotateX(3deg) rotateY(-2deg);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  filter: brightness(0.98);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Icon & Text Motion for Depth */
.card i, 
.card h3, 
.card p {
  position: relative;
  z-index: 1;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.card:hover i {
  transform: translateY(-10px) scale(1.2) rotateY(10deg);
}
.card:hover h3 {
  transform: translateY(-6px);
}
.card:hover p {
  transform: translateY(-4px);
  opacity: 1;
}



@keyframes floatCard {
  0% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-8px) scale(1.01); }
  100% { transform: translateY(0px) scale(1); }
}

.card {
  animation: floatCard 4s ease-in-out infinite;
}
