/* ═══════════════════════════════════════════════
   3D CURVED CAROUSEL STYLE SYSTEM
   Designed for premium cinematic depth & smooth motion
   ═══════════════════════════════════════════════ */

/* Skills Section Wrapper */
#skills-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: rgba(250, 249, 247, 0.92) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Glowing Indicator Badge - Rectangular Modern Style */
.skills-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(244, 96, 12, 0.08);
  border: 1px solid rgba(244, 96, 12, 0.25);
  padding: 0.35rem 0.85rem;
  border-radius: 8px; /* Sleek square/rounded card style instead of pill */
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #f4600c;
  text-transform: uppercase;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #f4600c;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: #f4600c;
  animation: pulse-ring 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(2.8); opacity: 0; }
}

/* 3D Perspective Viewport */
#carousel-perspective {
  position: relative;
  width: 100%;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  perspective-origin: 50% 28%;
  overflow: visible;
}

/* Cylinder Track */
#carousel-track {
  position: relative;
  width: 280px;
  height: 210px;
  transform-style: preserve-3d;
  transition: transform 0.1s linear; /* Continuous linear transition */
  will-change: transform;
}

/* Card Outer Container */
.carousel-card {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  cursor: pointer;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.4s ease, opacity 0.4s ease;
  will-change: transform, opacity;
}

/* Blurred Ambient Reflection/Shadow under card */
.carousel-card::after {
  content: "";
  position: absolute;
  bottom: -25px;
  left: 5%;
  width: 90%;
  height: 20px;
  background: radial-gradient(ellipse at center, rgba(7, 13, 31, 0.38) 0%, rgba(7, 13, 31, 0) 70%);
  filter: blur(5px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.8;
  transition: opacity 0.4s ease;
}

/* Double-Bezel Card Architecture (Outer Bezel) */
.card-shell {
  width: 100%;
  height: 100%;
  padding: 6px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(26, 35, 126, 0.08);
  border-radius: 16px; /* modern sleek box corner */
  box-shadow: 0 12px 36px rgba(7, 13, 31, 0.05), inset 0 1px 2px rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-sizing: border-box;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.33, 1), box-shadow 0.4s cubic-bezier(0.25, 1, 0.33, 1), background 0.4s ease, border-color 0.4s ease;
}

.carousel-card:hover .card-shell {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(244, 96, 12, 0.3);
  box-shadow: 0 20px 48px rgba(244, 96, 12, 0.12), inset 0 1px 2px rgba(255, 255, 255, 0.9);
  transform: translateY(-8px);
}

/* Inner Bezel / Card Core */
.card-core {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 12px; /* concentric padding compensation */
  overflow: hidden;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
  transform-style: preserve-3d;
}

/* Card Background Graphic */
.card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  background: #ffffff;
  object-position: center;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.33, 1);
}

.carousel-card:hover .card-img {
  transform: scale(1.08);
}

/* Card Content Overlay & Gradient Mesh */
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(7, 13, 31, 0.92) 0%,
    rgba(7, 13, 31, 0.45) 45%,
    rgba(7, 13, 31, 0.05) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.75rem;
  box-sizing: border-box;
  color: #ffffff;
  z-index: 2;
}

/* Card Typography */
.card-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0px;
  color: #ffffff;
  line-height: 1.2;
}

/* 3D Depth Card Attenuation (NO grayscale/blur filters) */
.carousel-card:not(.active) {
  opacity: 0.65; /* Slightly faded for depth, but NO filters */
  filter: none !important; /* Removed grayscale/blur filter */
  pointer-events: auto;
}

.carousel-card.hidden-card {
  opacity: 0 !important;
  pointer-events: none !important;
  filter: none !important; /* Removed filter */
}

/* Controls Wrapper */
.carousel-controls-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
  gap: 1.5rem;
}

/* Sleek Rounded Square Nav Buttons (Replaced circle/pills) */
.carousel-btn {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 8px; /* Replaced circle with sleek rounded square */
  background: #ffffff;
  border: 1.5px solid rgba(26, 35, 126, 0.08);
  color: #1A237E;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(26, 35, 126, 0.04);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.33, 1);
  outline: none;
}

.carousel-btn:hover {
  background: #ffffff;
  border-color: #f4600c;
  color: #f4600c;
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(244, 96, 12, 0.15);
}

.carousel-btn:active {
  transform: scale(0.94);
}

/* Counter Style */
#carousel-counter {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.1em;
}

#active-num {
  font-weight: 800;
  font-size: 1.15rem;
  color: #1A237E;
}

/* Dynamic Button-in-Button CTA - Sleek rounded corner, no pill-shape */
.dynamic-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  background: #f4600c;
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.65rem 0.65rem 0.65rem 1.6rem;
  border-radius: 12px; /* Sleek rounded corner, replaced 9999px pill */
  box-shadow: 0 8px 20px rgba(244, 96, 12, 0.2);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.33, 1);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.dynamic-cta-button:hover {
  background: #e05205;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(244, 96, 12, 0.3);
}

.dynamic-cta-button:active {
  transform: translateY(-1px) scale(0.97);
}

.cta-arrow-circle {
  width: 2.25rem;
  height: 2.25rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px; /* Replaced circle with sleek square inside */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.33, 1), background 0.4s ease;
  color: #ffffff;
  flex-shrink: 0;
}

.dynamic-cta-button:hover .cta-arrow-circle {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.35);
}

/* ═══════════════════════════════════════════════
   RESPONSIVE LAYOUT SYSTEM (Mobile Fallback)
   ═══════════════════════════════════════════════ */

@media (max-width: 767px) {
  #skills-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
  
  #carousel-perspective {
    perspective: none !important;
    perspective-origin: center !important;
    height: auto !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 1.5rem 3rem 1.5rem !important;
    justify-content: flex-start !important;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
  }
  
  #carousel-perspective::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Edge */
  }
  
  #carousel-track {
    display: flex !important;
    flex-direction: row !important;
    gap: 1.25rem !important;
    width: max-content !important;
    height: auto !important;
    transform: none !important;
    transform-style: flat !important;
    transition: none !important;
    padding: 0 !important;
  }
  
  .carousel-card {
    position: relative !important;
    width: 240px !important;
    height: 180px !important;
    transform: none !important;
    flex-shrink: 0 !important;
    opacity: 1 !important;
    filter: none !important;
    pointer-events: auto !important;
    scroll-snap-align: center;
  }
  
  .carousel-card:not(.active) {
    opacity: 1 !important;
    filter: none !important;
  }
  
  .carousel-card::after {
    bottom: -30px !important;
    opacity: 0.6 !important;
  }

  .carousel-card:hover .card-shell {
    transform: translateY(-4px) !important;
  }

  /* Control Adjustments */
  .carousel-controls-wrapper {
    margin-top: 0.5rem;
  }
  
  .carousel-btn-container {
    display: none !important; /* Hide arrows on touch device */
  }

  .dynamic-cta-button {
    font-size: 0.9rem;
    padding: 0.6rem 0.6rem 0.6rem 1.4rem;
  }
  
  .cta-arrow-circle {
    width: 2rem;
    height: 2rem;
  }
}
