/* ==========================================================================
   PortfolioAI Animation and Responsive System Stylesheet
   ========================================================================== */

/* 1. Global Page Loader & AI Orb Animations */
@keyframes orbPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 35px rgba(37, 99, 235, 0.65), 0 0 15px rgba(6, 182, 212, 0.4);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 55px rgba(124, 58, 237, 0.8), 0 0 25px rgba(37, 99, 235, 0.5);
  }
}

@keyframes floatParticles {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(180deg);
  }
}

.ai-orb-pulse {
  animation: orbPulse 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* 2. Skeleton Loading Shimmers */
@keyframes shimmerAnim {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton-shimmer {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
  background-size: 200% 100%;
  animation: shimmerAnim 1.5s infinite linear;
}

/* Skeleton layouts mapping */
.skeleton-container .skeleton-item {
  display: block;
}
.skeleton-container .skeleton-content {
  display: none !important;
}
.skeleton-container.loaded .skeleton-item {
  display: none !important;
}
.skeleton-container.loaded .skeleton-content {
  display: block !important;
  animation: pageFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 3. Page Fade In / Slide Up Transitions */
@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-page-in {
  animation: pageFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Blur overlay state */
.blur-content {
  filter: blur(4px);
  pointer-events: none;
  transition: filter 0.3s ease;
}

/* 4. Responsive Tables (Transformed into visual cards on Mobile) */
@media (max-width: 768px) {
  .responsive-table-cards,
  .responsive-table-cards thead,
  .responsive-table-cards tbody,
  .responsive-table-cards th,
  .responsive-table-cards td,
  .responsive-table-cards tr {
    display: block !important;
    width: 100% !important;
  }
  
  .responsive-table-cards thead {
    display: none !important; /* Hide standard head headers */
  }
  
  .responsive-table-cards tr {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  }
  
  .responsive-table-cards td {
    padding: 6px 4px !important;
    border: none !important;
    border-bottom: 1px solid rgba(241, 245, 249, 0.85) !important;
    text-align: left !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  
  .responsive-table-cards td:last-child {
    border-bottom: none !important;
    margin-top: 4px;
  }
  
  /* Add dynamic mobile label attribute using data-label */
  .responsive-table-cards td::before {
    content: attr(data-label);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 10px;
    color: #94a3b8;
    margin-right: 8px;
  }
}

/* 5. Button Ripple Effects */
.btn-ripple-container {
  position: relative;
  overflow: hidden;
}

.ripple-effect {
  position: absolute;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  transform: scale(0);
  animation: rippleAnimation 0.6s linear;
  pointer-events: none;
}

@keyframes rippleAnimation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* 6. Card Lifting Micro-interactions */
.card-hover-lift {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.08), 0 8px 16px -8px rgba(0, 0, 0, 0.08);
  border-color: rgba(37, 99, 235, 0.15) !important;
}

/* 7. Modal Enhancements */
.modal-scale-up {
  opacity: 0;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.modal-active .modal-scale-up {
  opacity: 1;
  transform: scale(1) translateY(0);
}
