/* ============================================
   Projects Section — Minimal & Premium
   ============================================ */

.projects {
  position: relative;
  z-index: 2;
  padding: 96px 0 112px;
  background: #000000;
}

.projects__inner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.projects__header {
  text-align: center;
  margin-bottom: 56px;
}

.projects__title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary, #fff);
  margin-bottom: 12px;
}

.projects__title::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent-orange, #d96d48);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
}

.projects__subtitle {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted, #a1a1aa);
  max-width: 520px;
  margin: 0 auto;
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

/* Center the last card when count is odd (5 cards → balanced 2+2+1) */
.project-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: calc(50% - 12px);
  justify-self: center;
  width: 100%;
}

/* --- Project Card --- */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card, #141414);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  transition:
    transform 0.35s ease,
    border-color 0.35s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Thumbnail */
.project-card__thumb-wrap {
  position: relative;
  overflow: hidden;
  margin: 12px 12px 0;
  border-radius: 12px;
  background: #000000;
  line-height: 0;
}

.project-card__thumb {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.project-card:hover .project-card__thumb {
  transform: scale(1.02);
}

.project-card__thumb-placeholder {
  width: 100%;
  min-height: 200px;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  transition: transform 0.4s ease;
}

.project-card__placeholder-label {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.02em;
}

.project-card:hover .project-card__thumb-placeholder {
  transform: scale(1.01);
}

/* Body */
.project-card__body {
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.project-card__title {
  font-family: 'Manrope', sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary, #fff);
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.project-card__desc {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-muted, #a1a1aa);
}

.project-card__divider {
  border: none;
  height: 1px;
  margin: 8px 0 12px;
  background: rgba(255, 255, 255, 0.08);
}

/* View Project button */
.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: auto;
  padding: 10px 18px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: rgba(217, 109, 72, 0.35);
  border: 1px solid rgba(217, 109, 72, 0.6);
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}

.project-card__link-arrow {
  display: inline-flex;
  transition: transform 0.25s ease;
}

.project-card__link:hover {
  color: #fff;
  background: rgba(217, 109, 72, 0.5);
  border-color: rgba(244, 162, 97, 0.75);
}

.project-card__link:hover .project-card__link-arrow {
  transform: translateX(3px);
}

.project-card.is-revealed {
  opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .projects {
    padding: 72px 0 88px;
  }

  .projects__header {
    margin-bottom: 40px;
  }

  .projects__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .project-card:last-child:nth-child(odd) {
    grid-column: auto;
    max-width: none;
    justify-self: stretch;
  }

  .project-card:hover {
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-card__thumb,
  .project-card__thumb-placeholder,
  .project-card__link,
  .project-card__link-arrow {
    transition: none;
  }

  .project-card {
    opacity: 1;
    transform: none;
  }
}
