/* ─── PROJECT CARDS ──────────────────────────────────── */
/* Single page scroll. Each card is a compact snap target.
   scroll-snap-align: center means the browser centers the
   snapped card in the viewport — neighbors peek above/below. */
#projects-stack {
  display: flex;
  flex-direction: column;
}

.card-viewport {
  scroll-snap-align: center;
  scroll-snap-stop: always;
  flex-shrink: 0;
  width: 100%;
  padding: 0;
  position: relative;
  z-index: 1;
}

.project-card {
  width: 100%;
  height: clamp(340px, 50vh, 600px);
  background: var(--bg-card);
  border: none;
  border-radius: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  overflow: hidden;
  transition: box-shadow 0.3s;
  position: relative;
}
/* Thin gradient line — the visible seam, fades at edges */
.project-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: radial-gradient(ellipse 55% 100% at 50% 50%, rgba(255,77,61,0.6) 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}
/* Bloom — same center axis as the line, radiates symmetrically above & below */
.project-card::before {
  content: '';
  position: absolute;
  bottom: -10px; left: 15%; right: 15%;
  height: 20px;
  background: radial-gradient(ellipse 80% 100% at 50% 50%, rgba(255,77,61,0.35) 0%, transparent 100%);
  filter: blur(7px);
  pointer-events: none;
  z-index: 2;
}
.project-card:hover {
  box-shadow: inset 0 0 80px rgba(255,77,61,0.04);
}

/* ─── CARD IMAGES ────────────────────────────────────── */
/* Images panel — sized by its content, fills full card height */
.card-images {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.25rem 1.25rem 3.25rem;
  gap: 1.25rem;
  background: var(--bg);
  overflow: hidden;
  height: 100%;
  box-sizing: border-box;
}
.card-images-row {
  display: contents; /* slots become direct flex children of .card-images */
}
.card-img-slot {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg-elevated);
  height: calc(clamp(340px, 44vh, 500px) - 2.5rem);
  flex-shrink: 0;
  width: auto;
}
/* Mobile — portrait 9:19 */
.card-img-slot:first-child {
  aspect-ratio: 9 / 19;
}
/* Laptop — landscape 18:10 */
.card-img-slot:last-child {
  aspect-ratio: 18 / 10;
}
.card-img-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease, filter 0.4s ease;
  filter: brightness(0.8) saturate(0.82);
}
.card-img-slot:hover img {
  transform: scale(1.06);
  filter: brightness(1) saturate(1.05);
}
.card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* ─── CARD INFO ──────────────────────────────────────── */
.card-info {
  padding: 2.5rem 2.75rem;
  display: flex;
  flex-direction: column;
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}
.card-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--red);
  letter-spacing: 0.12em;
}
.card-badge {
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

/* ─── STATUS BADGES ──────────────────────────────────── */
.status-live     { background: rgba(62,207,142,0.1);   color: #3ecf8e;     border: 1px solid rgba(62,207,142,0.3);  }
.status-wip      { background: rgba(61,152,180,0.1);   color: var(--blue); border: 1px solid rgba(61,152,180,0.3);  }
.status-archived { background: rgba(165,170,179,0.07); color: var(--silver); border: 1px solid rgba(165,170,179,0.2); }

.card-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  font-style: italic;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 1.1rem;
}
.card-desc {
  font-size: 13.5px;
  color: var(--text-soft);
  line-height: 1.85;
  font-weight: 300;
  flex: 1;
  margin-bottom: 1.75rem;
}

/* ─── STACK TAGS ─────────────────────────────────────── */
.stack-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}
.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 2rem;
}
.stack-tag {
  font-family: var(--mono);
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.tag-blue   { background: rgba(61,152,180,0.1);   color: var(--blue);   border: 1px solid rgba(61,152,180,0.28); }
.tag-violet { background: rgba(97,87,225,0.1);    color: var(--violet); border: 1px solid rgba(97,87,225,0.28);  }
.tag-silver { background: rgba(165,170,179,0.07); color: var(--silver); border: 1px solid rgba(165,170,179,0.2); }
.tag-red    { background: rgba(255,77,61,0.07);   color: var(--red);    border: 1px solid rgba(255,77,61,0.25);  }

/* ─── CARD LINKS ─────────────────────────────────────── */
.card-links { display: flex; gap: 1rem; }
.card-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.card-link:hover { color: var(--blue); }

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 860px) {
  .card-viewport { padding: 0; }
  .project-card { grid-template-columns: 1fr; height: auto; }
  .card-images { padding: 1.25rem; border-right: none; border-bottom: 1px solid var(--border-red); height: 200px; }
}
