/* ===== Projects ===== */
.projects {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 90px 24px;
}

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

.projects__subtitle {
  color: var(--muted);
  max-width: 540px;
  margin: 14px auto 0;
  font-size: 16px;
  line-height: 1.6;
}

/* ---- Project card ---- */
.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  margin-bottom: 34px;
}

.project-card:last-child {
  margin-bottom: 0;
}

.project-card--reversed .project-card__image {
  order: -1;
}

.project-card__info {
  padding: 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-card__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  margin-bottom: 14px;
}

.project-card__title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.project-card__desc {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 20px;
  font-size: 15px;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  list-style: none;
  padding: 0;
}

.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 999px;
}

.tag--vue    { background: rgba(65, 184, 131, 0.12); color: #6ee7b7; border: 1px solid rgba(65, 184, 131, 0.25); }
.tag--chart  { background: rgba(248, 113, 113, 0.12); color: #fca5a5; border: 1px solid rgba(248, 113, 113, 0.25); }
.tag--pinia  { background: rgba(251, 191, 36, 0.12); color: #fcd34d; border: 1px solid rgba(251, 191, 36, 0.25); }
.tag--js     { background: rgba(251, 191, 36, 0.12); color: #fcd34d; border: 1px solid rgba(251, 191, 36, 0.25); }
.tag--mate   { background: rgba(45, 212, 191, 0.12); color: #5eead4; border: 1px solid rgba(45, 212, 191, 0.25); }

.project-card__links {
  display: flex;
  gap: 12px;
}

.project-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 9px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  border: none;
}

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

.project-card__btn--primary {
  color: #04121c;
  background: var(--accent);
  box-shadow: 0 4px 14px rgba(44, 212, 197, 0.2);
}

.project-card__btn--ghost {
  color: var(--ink);
  border: 1px solid var(--border);
  background: transparent;
}

.project-card__btn--ghost:hover {
  border-color: var(--accent);
}

.project-card__image {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  background: #0a1226;
  display: block;
}

.project-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: transform 0.6s ease;
}

.project-card__image:hover img {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .project-card {
    grid-template-columns: 1fr;
  }

  .project-card--reversed .project-card__image {
    order: 0;
  }

  .project-card__image {
    min-height: 220px;
  }
}
