/* Projects page specific styles. Shares base theme & typography with landingpg.css. */

/* Add breathing room below the fixed glass header */
.projects-page main {
  padding-top: 140px;
}

.projects-hero {
  padding: 90px 0 44px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}

.page-title {
  margin: 0;
  font-size: clamp(3.4rem, 7vw, 5rem);
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero-subscript {
  margin: 0;
  color: var(--color-muted);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 500;
}

.page-subtitle {
  margin: 0;
  max-width: 680px;
  color: var(--color-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

/* Project lists */
.project-list-section {
  padding: 56px 0 72px;
}

.section-header {
  margin-bottom: 16px;
}

.section-header h2 {
  margin: 0 0 6px;
}

.section-header p {
  margin: 0;
  color: var(--color-muted);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  overflow: visible;
}

/* Card container: clickable link card */
.project-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(24, 34, 52, 0.96);
  border: 1px solid var(--color-border-subtle);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  overflow: visible;
  transition: transform 320ms cubic-bezier(0.22, 0.8, 0.48, 1), border-color 360ms ease,
    box-shadow 380ms ease, background 200ms ease, opacity 240ms ease;
  isolation: isolate;
  transform-origin: center center;
  z-index: 1;
  will-change: transform, box-shadow;
  --glow: rgba(140, 210, 255, 0.32);
  --glow-strong: rgba(140, 210, 255, 0.82);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.project-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 6px;
}

/* Outer glow spill kept outside the card */
.project-card::before {
  content: "";
  position: absolute;
  inset: -70px;
  border-radius: 52px;
  background: radial-gradient(
    circle at center,
    rgba(140, 210, 255, 0.18) 0%,
    rgba(140, 210, 255, 0.14) 38%,
    rgba(140, 210, 255, 0.09) 55%,
    rgba(140, 210, 255, 0.04) 72%,
    rgba(140, 210, 255, 0.01) 88%,
    rgba(140, 210, 255, 0) 100%
  );
  filter: blur(32px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms ease-out;
  z-index: 0;
}

.project-card:hover {
  transform: scale(1.12);
  z-index: 20;
  border-color: var(--glow-strong);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.38),
    0 0 0 1px var(--glow),
    0 0 18px rgba(140, 210, 255, 0.4),
    0 0 40px rgba(140, 210, 255, 0.32);
}

.project-card:hover::before {
  opacity: 1;
}

.project-avatar {
  position: relative;
  z-index: 1;
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.3);
}

.project-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: screen;
  filter: saturate(1.05);
}

.project-avatar.fallback {
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.4rem;
  background: rgba(15, 23, 42, 0.95);
}

.project-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.project-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.project-desc {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.projects-status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid var(--color-border-subtle);
  background: rgba(24, 34, 52, 0.96);
  box-shadow: var(--shadow-soft);
  color: var(--color-muted);
}

.projects-status.error {
  color: var(--color-text);
  border-color: rgba(255, 120, 120, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-card::before {
    transition: none;
    animation: none;
  }

  .project-card:hover {
    transform: none;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  }
}

/* Responsive tweaks */
@media (max-width: 860px) {
  .projects-page main {
    padding-top: 120px;
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card {
    padding: 16px;
  }

  .project-avatar {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
  }
}

@media (max-width: 640px) {
  .projects-hero {
    padding: 74px 0 36px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}
