/* Glass morphism — project gallery & cards */

.projects-glass-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(26, 60, 110, 0.12), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, rgba(201, 168, 76, 0.14), transparent 50%),
    linear-gradient(160deg, #e8eef8 0%, #faf7f2 42%, #dde8f5 100%);
}

.projects-glass-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.5;
}

.projects-glass-section > .inner,
.projects-glass-section > .counter-grid {
  position: relative;
  z-index: 1;
}

/* Index gallery */
#gallery.projects-glass-section .gallery-grid {
  gap: 14px;
}

#gallery .gallery-item {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 32px rgba(15, 27, 45, 0.1);
  background: #eef4fc;
  overflow: hidden;
  isolation: isolate;
}

#gallery .gallery-item picture,
#gallery .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: none !important;
  transform: translateZ(0);
  backface-visibility: hidden;
}

#gallery .gallery-overlay {
  background: linear-gradient(
    to top,
    rgba(15, 27, 45, 0.82) 0%,
    rgba(15, 27, 45, 0.25) 55%,
    transparent 100%
  );
  border-radius: 0 0 18px 18px;
}

#gallery .gallery-overlay span {
  background: rgba(15, 27, 45, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 8px 14px;
  border-radius: 999px;
  font-style: normal;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: #fff;
}

/* Project cards — listing & projects.html */
.project-card {
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.62) !important;
  box-shadow: 0 10px 40px rgba(15, 27, 45, 0.1) !important;
  overflow: hidden;
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 20px 56px rgba(15, 27, 45, 0.14) !important;
}

.project-img {
  background: #eef4fc !important;
  border-bottom: 1px solid rgba(15, 27, 45, 0.06);
  isolation: isolate;
  z-index: 1;
}

.project-img picture,
.project-img img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center;
  display: block;
  filter: none !important;
  transform: translateZ(0);
}

.project-content {
  background: rgba(255, 255, 255, 0.95);
}

.project-badge {
  background: rgba(201, 168, 76, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(15, 27, 45, 0.12);
}

.project-meta span {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 27, 45, 0.08);
  border-radius: 999px;
  padding: 6px 12px;
}

@media (max-width: 640px) {
  #gallery .gallery-item {
    border-radius: 14px;
  }

  .project-card {
    border-radius: 16px !important;
  }

  .projects-glass-section {
    overflow-x: clip;
  }
}

@media (max-width: 480px) {
  .project-meta span {
    width: 100%;
  }
}
