/* =========================================================
   CAROUSEL + PROJECT CARDS
   ========================================================= */
.carousel{
  position:relative;
}

.carousel-viewport{
  overflow:hidden;
}

.carousel-track{
  display:flex;
  gap:22px;
  transition:transform .45s cubic-bezier(.65,0,.35,1);
  will-change:transform;
}

.card{
  background:var(--surface);
  border:3px solid var(--border);
  border-radius:var(--radius);
  display:flex;
  flex-direction:column;
  flex:0 0 auto;

  width:calc((100% - 44px) / 3);

  color:inherit;
  text-decoration:none;
  cursor:pointer;

  transition:
    border-color .25s ease,
    box-shadow .25s ease;
}

.card:hover{
  border-color:var(--accent);
}

.card-media{
  position:relative;
  display:block;
  aspect-ratio:16/10;
  background:var(--bg-soft);
  overflow:hidden;
  /* outer radius minus the card's border width, so the image's
     curve nests flush against the border instead of leaving a
     gap or overlapping it at the corner */
  border-radius:calc(var(--radius) - 3px) calc(var(--radius) - 3px) 0 0;
}

.card-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .6s ease;
}

.card:hover .card-media img{
  transform:scale(1.1);
}

.card-tags{
  position:absolute;
  left:12px;
  bottom:12px;
  display:flex;
  gap:6px;
  z-index:2;
  flex-wrap:wrap;
}

.card-tags span{
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:.04em;
  padding:5px 9px;
  border-radius:6px;
  background:rgba(16,19,26,.78);
  border:1px solid var(--border);
  color:var(--text);
  backdrop-filter:blur(4px);
}

.card-body{
  padding:16px 18px 18px;
  display:flex;
  flex-direction:column;
  gap:6px;
  flex:1;
}

.card-body h3{
  margin:0;
  font-size:18px;
  line-height:1.2;
}

.card-body p{
  margin:0;
  color:var(--text-muted);
  font-size:13.5px;
  line-height:1.45;

  display:-webkit-box;
  -webkit-box-orient:vertical;
  overflow:hidden;

  flex:none;
}

.card-link{
  margin-top:6px;
  font-family:var(--font-mono);
  font-size:12.5px;
  color:var(--text-faint);
  transition:color .2s ease;
  align-self:flex-start;
}

.card:hover .card-link{
  color:var(--accent);
}

.carousel-controls{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:20px;
  margin-top:32px;
}

.carousel-btn{
  width:40px;
  height:40px;
  border-radius:50%;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
  font-size:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:
    border-color .2s ease,
    color .2s ease,
    background .2s ease;
}

.carousel-btn:hover:not(:disabled){
  border-color:var(--accent);
  color:var(--accent);
  background:rgba(244,97,87,.06);
}

.carousel-btn:disabled{
  opacity:.35;
  cursor:not-allowed;
}

.carousel-dots{
  display:flex;
  gap:8px;
}

.carousel-dots button{
  width:8px;
  height:8px;
  border-radius:50%;
  border:none;
  background:var(--border);
  padding:0;
  transition:
    background .2s ease,
    transform .2s ease;
}

.carousel-dots button.active{
  background:var(--accent);
  transform:scale(1.2);
}