/* ===========================================================
  Project Section 
  ============================================================ */
/* ---- Projects ---- */
.projects {
  --card-w: clamp(280px, 28vw, 380px);
  --card-h: 460px;
}

.gallery {
  position: relative;
  height: min(720px, 92vh);
  overflow: hidden;
}

.project__list {
  position: absolute;
  top: 46%;
  left: 50%;
  width: var(--card-w);
  height: var(--card-h);
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translate(-50%, -50%);
}

.project-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 20px;
  border-radius: 24px;
}
.js .project-card {
  opacity: 0;
} /* GSAP sets the real state */
/* .project-card.glass-card { background: rgba(255, 255, 255, 0.55); } */

.project__media {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(27, 16, 51, 0.08);
}
.project__media img,
.project__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card .card__title {
  margin: 16px 6px 6px;
}
.project__desc {
  margin: 0 6px;
  font-size: 1rem;
  line-height: 1.45;
}

.project__links {
  display: flex;
  gap: 10px;
  margin: auto 6px 0; /* pushes the icons to the bottom */
}
.project__links a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.9);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}
.project__links a:hover,
.project__links a:focus-visible {
  background: var(--navy);
  color: #fff;
  transform: translateY(-2px);
}

.actions {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
}
.actions button {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.6);
  color: var(--navy);
  font-size: 1.4rem;
  cursor: pointer;
}
.actions button:hover {
  background: var(--navy);
  color: #fff;
}

.drag-proxy {
  position: absolute;
  visibility: hidden;
}

/* ==========================================================================
   Projects — small screens
   ========================================================================== */
@media (max-width: 700px) {
  .projects {
    --card-w: min(300px, 82vw);
    --card-h: 430px;
  }

  .gallery {
    height: 560px;
  }

  .project-card .card__title {
    font-size: 1.6rem;
    margin-top: 12px;
  }

  .project__desc {
    font-size: 0.95rem;
  }
}

/* short screens (phones sideways): 460px cards were getting clipped */
@media (max-height: 560px) and (orientation: landscape) {
  .projects {
    --card-w: 260px;
    --card-h: 340px;
  }
  .gallery {
    height: 440px;
  }
  .project__media {
    aspect-ratio: 16 / 8;
  }
  .project__desc {
    font-size: 0.85rem;
  }
}
