/* ============================================================
   Projects List Page — carousel backdrop & page layout
   Shared carousel/header/footer/CTA components live in style.css
   ============================================================ */

/* ============ DYNAMIC BACKGROUND ============ */
.carousel-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.carousel-bg-layer {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  background-color: #dbeeff;
  filter: blur(28px) saturate(1.2) brightness(1.05);
  opacity: 0;
  transition: opacity 0.9s ease;
  will-change: opacity;
}

.carousel-bg-layer--visible { opacity: 1; }

.carousel-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(244, 249, 255, 0.78) 0%,
    rgba(244, 249, 255, 0.6) 40%,
    rgba(244, 249, 255, 0.76) 100%
  );
  pointer-events: none;
}

.site-header,
.projects-page,
.site-footer {
  position: relative;
  z-index: 1;
}

/* ============ PAGE LAYOUT ============ */
.projects-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 72px 56px 60px;
}
.projects-page .section-header {
  text-align: center;
  margin-bottom: 48px;
}
.projects-page .section-title {
  margin-bottom: 0;
}

/* ============ CARD GRID ============ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 1080px;
}

.project-tile {
  position: relative;
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(74, 159, 229, 0.14);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base), border-color var(--dur-base);
}
.project-tile:hover {
  transform: translateY(-6px);
  border-color: var(--blue-light);
  box-shadow: var(--shadow-lg);
}
.project-tile img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.project-tile-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--blue-pale) 0%, var(--blue-light) 100%);
  color: var(--blue-deep);
}
.project-tile .card-title { font-size: 15px; }
.project-tile .card-cta { font-size: 12px; }

/* noscript fallback list */
.projects-fallback {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  max-width: 720px;
}
.projects-fallback a {
  display: inline-block;
  padding: 10px 20px;
  background: var(--white);
  border: 1.5px solid var(--blue-light);
  border-radius: 100px;
  color: var(--accent-text);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 1024px) {
  .projects-page { padding: 56px 32px 40px; }
}

@media (max-width: 640px) {
  .projects-page { padding: 40px 20px 32px; }
}
