/* ===== PROJECTS PAGE ===== */

.projects-page-section {
  padding: 120px 0 80px;
  min-height: 100vh;
  background: var(--bg-base);
  position: relative;
  overflow: hidden;
}

.projects-page-section::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.projects-page-header {
  text-align: center;
  margin-bottom: 34px;
  position: relative;
  z-index: 1;
}

.projects-page-title {
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0;
}

.projects-page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.project-item {
  display: grid;
  grid-template-columns: minmax(190px, 44%) minmax(0, 56%);
  gap: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-visible);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
  min-height: 420px;
  max-width: none;
  width: 100%;
  margin: 0;
  position: relative;
  padding: 14px;
}

.project-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--border-subtle);
}

.project-item:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 24px 34px rgba(3, 8, 18, 0.42);
}

.project-item-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 390px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 14px 24px rgba(3, 8, 18, 0.35);
}

.project-item-body {
  padding: 14px 12px 14px 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.project-item h2 {
  font-size: clamp(24px, 1.65vw, 34px);
  line-height: 1.2;
  margin-bottom: 0;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.project-item-description {
  font-size: clamp(16px, 1.05vw, 19px);
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

.project-item-skills {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.project-skills {
  margin-top: 12px;
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-skills .skill-pill {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.42);
  background: rgba(139, 92, 246, 0.14);
  color: #9f7cff;
  font-size: clamp(14px, 0.86vw, 16px);
  font-weight: 600;
  line-height: 1.2;
  box-shadow: none;
}

.project-item.will-reveal {
  opacity: 0;
  transform: translateY(16px);
}

.project-item.will-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

@media (max-width: 768px) {
  .projects-page-section {
    padding: 104px 0 64px;
  }

  .projects-page-title {
    font-size: 32px;
  }

  .projects-page-grid {
    grid-template-columns: 1fr;
  }

  .project-item {
    grid-template-columns: 1fr;
    min-height: 560px;
    max-width: 640px;
    margin: 0 auto;
  }

  .project-item-image {
    height: 300px;
    min-height: 300px;
  }

  .project-item-description {
    font-size: 17px;
  }
}

@media (max-width: 600px) {
  .projects-page-title {
    font-size: 28px;
  }

  .project-item {
    min-height: auto;
    padding: 12px;
  }

  .project-item-image {
    height: 260px;
    min-height: 260px;
  }
}

@media (min-width: 1440px) {
  .projects-page-grid {
    max-width: 1640px;
    gap: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-item,
  .project-item::before,
  .project-item.will-reveal,
  .project-item.will-reveal.is-visible {
    transition: none !important;
    transform: none !important;
  }
}
