/* Match the existing gallery cards without changing the original React UI. */
a[data-sp-course] {
  display: block;
  color: inherit;
  text-decoration: none;
}

a[data-sp-course]:focus-visible {
  outline: 3px solid #bb8aff;
  outline-offset: 4px;
  z-index: 20;
}

/* Second badge used only on the six linked training prototypes. */
.sp-live-demo-badge {
  position: absolute;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(193, 143, 255, 0.62);
  background: rgba(24, 18, 38, 0.84);
  color: #f0dbff;
  border-radius: 999px;
  padding: 6px 11px;
  font: 700 10px/1.2 'Fira Code', monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

a[data-sp-gallery="home"] > .sp-live-demo-badge {
  top: 16px;
  left: 16px;
}

a[data-sp-course]:hover .bg-cover,
a[data-sp-course]:focus-visible .bg-cover {
  transform: scale(1.10);
}

a[data-sp-gallery="home"]:hover p,
a[data-sp-gallery="home"]:focus-visible p {
  max-height: 5rem;
  opacity: 1;
}

a[data-sp-gallery="home"]:hover > .bg-gradient-to-t,
a[data-sp-gallery="home"]:focus-visible > .bg-gradient-to-t {
  opacity: 0.9;
}

a[data-sp-gallery="archive"]:hover h3,
a[data-sp-gallery="archive"]:focus-visible h3 {
  color: hsl(var(--primary));
}

/* Simplify the homepage gallery's case-study overlay. These three selectors
   correspond to the unique markup in the supplied compiled site. */
button[class*="hidden sm:flex absolute right-2 md:right-4"][class*="top-1/2"],
button[class*="group w-full sm:w-auto"][style*="--gradient-primary"],
div[class*="hidden sm:flex absolute bottom-4 md:bottom-6"] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  a[data-sp-course],
  a[data-sp-course] * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Portfolio clarity: distinguish functioning demos from proposed concepts. */
.sp-portfolio-explainer {
  max-width: 46rem;
  margin: -1.75rem auto 2.2rem;
  padding: 0 1rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.92rem;
  line-height: 1.75;
  text-align: center;
}
.sp-concept-badge {
  position: absolute;
  z-index: 30;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid rgba(215,215,230,.35);
  border-radius: 999px;
  background: rgba(18,19,30,.8);
  color: #e3e3ed;
  font: 700 10px/1.2 'Fira Code', monospace;
  letter-spacing: .07em;
  text-transform: uppercase;
  pointer-events: none;
}
