.project-carousel {
    display: flex;
    position: relative;
    width: 100%;
    max-width: 62rem;
    aspect-ratio: 16 / 10;
    perspective: 75rem;
    margin: 2.5rem auto;
    overflow: visible;
  
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .project-carousel-scroll::-webkit-scrollbar {
    display: none;
  }
  
  .project-card {
    position: absolute;
    top: 0; left: 0;
    width: 100%; 
    height: 100%;
    border-radius: 2rem;
    overflow: hidden;
    transition: transform 0.6s ease, opacity 0.6s ease, scale 0.2s ease;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;

    box-shadow: var(--shadow);
    scale: 1;

    text-decoration: none;
  }

  .project-card:hover {
    scale: 1.03;
  }
  
  .project-card-container {
    position: relative;
    width: 100%;
    height: 100%;
  }

  .project-card-background-wrapper {
    position: absolute;
    top:0
  }
  
  .project-card-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
  
    /* Prevent any pointer interaction on the image itself */
    pointer-events: none;
  
    /* Prevent long-press menus on iOS / Safari */
    -webkit-touch-callout: none;
  
    /* Prevent image dragging */
    -webkit-user-drag: none;
    user-drag: none;
  
    /* Prevent selection */
    user-select: none;
    -webkit-user-select: none;
  }

  .project-card-background-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    overflow: hidden;
  }
  
  /* Color gradient from solid to transparent */
  .project-card-background-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
      to bottom,
      var(--accent-color) 0%,            /* solid at top */
      color-mix(in srgb, var(--accent-color) 90%, transparent) 18%,
      color-mix(in srgb, var(--accent-color) 75%, transparent) 30%, 
      color-mix(in srgb, var(--accent-color) 25%, transparent) 43%, 
      transparent 100%
    );
  }
  
  /* Vignette around the image */
  .project-card-background-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0) 70%, rgba(0,0,0,0.5) 100%);
  }
  
  .project-card-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    gap: 0.5rem;
  }
  
  .project-card-logo-wrapper {
    position: relative;
    width: 6.25rem;
    height: 6.25rem;
    flex-shrink: 0;
  }
  
  .project-card-logo,
  .project-card-logo-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;

    /* Prevent any pointer interaction on the image itself */
    pointer-events: none;
  
    /* Prevent long-press menus on iOS / Safari */
    -webkit-touch-callout: none;
  
    /* Prevent image dragging */
    -webkit-user-drag: none;
    user-drag: none;
  
    /* Prevent selection */
    user-select: none;
    -webkit-user-select: none;
  }
  
  .project-card-logo-bg {
    width: 120%;
    height: 120%;
    filter: brightness(0) opacity(0.3) blur(10px);
    z-index: 0;
  }
  
  .project-card-logo {
    width: 100%;
    height: 100%;
    z-index: 1;
  }

  .project-card-title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    gap: 0.5rem;
    width: 100%;
  }

  .project-card-title-container {
    position: relative;
    width: 100%;
    top: -0.625rem;
  }

/* Background text layer (blurred shadow for depth) */
.project-card-text-bg {
  font-size: 2.1rem;
  position: absolute;
  color: color-mix(in srgb, var(--accent-color) 30%, #000000);
  filter: blur(4px);
  z-index: 2;
  pointer-events: none;
}

/* Foreground text layer (accent color + glow + stroke) */
.project-card-text {
  position: absolute;
  color: rgba(255, 255, 255, 0.8);
  font-weight: bold;
  font-size: 2rem;
  text-shadow:
    1px 1px 2px rgba(0,0,0,0.7),     /* darker outline for contrast */
    0 0 6px rgba(255,255,255,0.3);   /* soft glow for glassy effect */
  z-index: 3;
  pointer-events: none;
}

.skill-pills-container {
  position: relative;
  top: 50px;
  left: 0;
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 0.5rem;

  z-index: 3;
}

.skill-pill {
  display: inline-flex;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 30px;
  backdrop-filter: blur(10px);

  box-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.15),
    0 2px 4px rgba(0, 0, 0, 0.08);

  transition: transform 0.2s ease;
  mix-blend-mode: overlay;
}

.skill-pill:hover {
  transform: scale(1.1);
}

.skill-pill-red {
  background-color: rgba(255, 56, 60, 0.3);
}

.skill-pill-blue {
  background-color: rgba(0, 136, 255, 0.3);
}

.skill-pill-green {
  background-color: rgba(52, 199, 89, 0.3);
}

.skill-pill-yellow {
  background-color: rgba(255, 204, 0, 0.3);
}

.skill-pill > p {
  margin: 0;
}

.skill-text {
  font-weight: bold;
  font-size: 0.75rem;

  color: #ffffff;
}

.skill-icon {
  font-family: 'Material Symbols Outlined';
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;

  color: #ffffff;
}

.carousel-button {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);

  cursor: pointer;
  transition: all 0.2s ease;
  color: rgba(255, 255, 255, 0.85);
  mix-blend-mode: difference;

  text-shadow:
  0 1px 2px rgba(0, 0, 0, 0.4),
  0 -1px 1px rgba(255, 255, 255, 0.2);
}

.carousel-button:hover {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  transform: scale(1.1);
}

.carousel-button:active {
  transform: scale(0.95);
}

.carousel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 100;

  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.5rem;
  pointer-events: none;
}

.carousel-button {
  pointer-events: auto;
}

@media (max-width: 600px) {
  .project-card-header {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .project-card {
    max-width: 28.125rem;
    max-height: 37.5rem;

    aspect-ratio: 9 / 16;
  }

  .project-card-text, .project-card-text-bg {
    left: 0;
    right: 0;
  }

  .skill-pills-container {
    justify-content: center;
  }

  .project-carousel {
    height: 37.5rem;
  }
}