/* ── Projects showcase — wow section ──────────────────────── */
.projects-section {
  padding: 0;
  margin: 0 -0.5rem;
}

.projects-stage {
  position: relative;
  padding: 3.5rem 1.5rem 4rem;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 15% 0%, rgba(102, 126, 234, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 100%, rgba(16, 185, 129, 0.12) 0%, transparent 50%),
    linear-gradient(165deg, #0f172a 0%, #1e1b4b 42%, #0f172a 100%);
  border: 1px solid rgba(102, 126, 234, 0.22);
  box-shadow:
    0 24px 80px rgba(15, 23, 42, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.projects-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.projects-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: orbFloat 14s ease-in-out infinite;
}

.projects-orb--1 {
  width: 320px;
  height: 320px;
  background: #667eea;
  top: -120px;
  left: -80px;
}

.projects-orb--2 {
  width: 280px;
  height: 280px;
  background: #10b981;
  bottom: -100px;
  right: -60px;
  animation-delay: -5s;
}

.projects-orb--3 {
  width: 200px;
  height: 200px;
  background: #a78bfa;
  top: 40%;
  left: 45%;
  animation-delay: -9s;
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(20px, -16px) scale(1.08);
  }
}

.projects-header {
  position: relative;
  z-index: 1;
  margin-bottom: 2.5rem;
}

.projects-header .section-label {
  color: rgba(199, 210, 254, 0.85);
  background: rgba(102, 126, 234, 0.15);
  border: 1px solid rgba(167, 139, 250, 0.25);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 1rem;
}

.projects-header h2.projects-title {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  color: #f8fafc;
  -webkit-text-fill-color: unset;
  background: none;
  background-clip: unset;
}

.projects-header h2.projects-title i {
  font-size: 0.85em;
  color: #a5b4fc;
  -webkit-text-fill-color: #a5b4fc;
}

.projects-header h2.projects-title em {
  font-style: normal;
  background: linear-gradient(90deg, #6ee7b7, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@keyframes titleShine {
  to {
    background-position: 200% center;
  }
}

.projects-title-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120%;
  height: 140%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(102, 126, 234, 0.35) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.projects-subtitle {
  color: rgba(226, 232, 240, 0.78) !important;
  font-size: 1.08rem !important;
  max-width: 520px;
  line-height: 1.7 !important;
}

.projects-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.projects-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.82rem;
  color: rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease;
}

.projects-stat:hover {
  transform: translateY(-2px);
  border-color: rgba(167, 139, 250, 0.4);
}

.projects-stat i {
  color: #a5b4fc;
  font-size: 0.9em;
}

.projects-stat strong {
  color: #f8fafc;
  font-weight: 800;
}

/* Grid inside dark stage */
.projects-grid {
  position: relative;
  z-index: 1;
  gap: 1.35rem !important;
}

.projects-grid .loading-projects {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(167, 139, 250, 0.3);
}

.projects-grid .loading-projects p {
  color: rgba(226, 232, 240, 0.7);
}

/* Hero / flagship card — horizontal spotlight */
.project-card--hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(102, 126, 234, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.project-card--hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(110, 231, 183, 0.6), rgba(167, 139, 250, 0.6), rgba(236, 72, 153, 0.4));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
}

.project-card--hero .project-image-wrapper {
  aspect-ratio: auto;
  min-height: 260px;
  border-radius: 20px 0 0 20px;
}

.project-card--hero .project-info {
  padding: 2rem 2rem 2rem 1.25rem;
  justify-content: center;
}

.project-card--hero .project-title {
  font-size: 1.55rem;
  color: #f8fafc;
}

.project-card--hero .project-description {
  color: rgba(203, 213, 225, 0.88);
  -webkit-line-clamp: 4;
  font-size: 0.95rem;
}

.project-card--hero:hover .project-title {
  color: #a5b4fc;
}

.project-card--hero .project-tags .tag {
  background: rgba(102, 126, 234, 0.2);
  color: #c7d2fe;
  border-color: rgba(167, 139, 250, 0.35);
}

/* Grid cards — dark glass (no white boxes) */
.projects-grid .project-card:not(.project-card--hero) {
  background: linear-gradient(
    165deg,
    rgba(30, 41, 59, 0.92) 0%,
    rgba(15, 23, 42, 0.96) 100%
  );
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.projects-grid .project-card:not(.project-card--hero):hover {
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow:
    0 16px 48px rgba(102, 126, 234, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.projects-grid .project-card--spotlight {
  border-color: rgba(110, 231, 183, 0.22);
}

.projects-grid .project-card--spotlight::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #6ee7b7, #a78bfa);
  border-radius: 18px 18px 0 0;
  z-index: 2;
  pointer-events: none;
}

.projects-grid .project-card:not(.project-card--hero) .project-title {
  color: #f1f5f9;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.projects-grid .project-card:not(.project-card--hero):hover .project-title {
  color: #c7d2fe;
}

.projects-grid .project-card:not(.project-card--hero) .project-description {
  color: #94a3b8;
  font-size: 0.86rem;
  -webkit-line-clamp: 2;
}

.projects-grid .project-card:not(.project-card--hero) .project-tags .tag {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

.projects-grid .project-card:not(.project-card--hero):hover .project-tags .tag {
  background: rgba(102, 126, 234, 0.15);
  color: #e0e7ff;
  border-color: rgba(167, 139, 250, 0.35);
}

.projects-grid .project-card:not(.project-card--hero) .project-info {
  padding: 1.15rem 1.25rem 1.35rem;
  gap: 0.5rem;
}

.projects-grid .project-card:not(.project-card--hero) .project-overlay {
  background: rgba(15, 23, 42, 0.55);
}

.projects-grid .project-card:not(.project-card--hero) .overlay-cta {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.82rem;
  padding: 0.55rem 1.1rem;
}

/* Badges */
.project-badge--flagship {
  background: rgba(15, 23, 42, 0.75);
  color: #6ee7b7;
  border: 1px solid rgba(110, 231, 183, 0.45);
  box-shadow: none;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
}

.projects-grid .project-badge.featured {
  display: none;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.15rem;
}

.project-meta-pill {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.project-meta-pill--status {
  color: #6ee7b7;
  border-color: rgba(110, 231, 183, 0.25);
  background: rgba(16, 185, 129, 0.08);
}

.project-card--hero .project-meta-pill {
  color: #c7d2fe;
  background: rgba(102, 126, 234, 0.15);
  border-color: rgba(167, 139, 250, 0.25);
}

.project-card--hero .project-meta-pill--status {
  color: #6ee7b7;
  border-color: rgba(110, 231, 183, 0.3);
  background: rgba(16, 185, 129, 0.12);
}

/* Legacy class alias */
.project-duration {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.projects-grid .project-card:not(.project-card--hero) .project-arrow {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #c7d2fe;
  font-size: 0.75rem;
  opacity: 0.85;
  transform: none;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
  z-index: 2;
}

.projects-grid .project-card:not(.project-card--hero):hover .project-arrow {
  opacity: 1;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-color: transparent;
  color: #fff;
  transform: none;
}

.project-card .project-arrow {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea, #a78bfa);
  color: #fff;
  font-size: 0.85rem;
  opacity: 0;
  transform: translate(6px, 6px);
  transition:
    opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}

.project-card:hover .project-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

.project-card--hero .project-arrow {
  bottom: 2rem;
  right: 2rem;
  width: 2.75rem;
  height: 2.75rem;
  opacity: 1;
  transform: none;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
}

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

  .project-card--hero .project-image-wrapper {
    border-radius: 20px 20px 0 0;
    min-height: 220px;
    aspect-ratio: 16 / 9;
  }

  .project-card--hero .project-info {
    padding: 1.5rem;
  }
}

@media (max-width: 600px) {
  .projects-stage {
    padding: 2.5rem 1rem 3rem;
    border-radius: 20px;
  }

  .projects-stats {
    gap: 0.5rem;
  }

  .projects-stat {
    font-size: 0.76rem;
    padding: 0.35rem 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .projects-orb,
  .projects-title em {
    animation: none;
  }
}
