.projects-panel {
  padding: 2.4rem;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.section-head h2 {
  margin: 0;
  font-size: 2.6rem;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 1.45rem;
  font-weight: 700;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.filter-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
}

.filter-button:hover,
.filter-button.active {
  border-color: rgba(15, 118, 110, 0.24);
  color: #ffffff;
  background: var(--accent);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(26rem, 1fr));
  gap: 1.6rem;
}

.project-card {
  min-height: 38rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2.4rem;
  background: var(--surface-strong);
  box-shadow: 0 18px 42px rgba(16, 32, 51, 0.1);
}

.project-media {
  position: relative;
  height: 21rem;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.36), transparent 30%),
    linear-gradient(135deg, #12324a, #0f766e);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-media.fallback {
  display: grid;
  place-items: center;
}

.fallback-mark {
  display: grid;
  width: 8rem;
  height: 8rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font-family: "Sora", sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
}

.category-chip {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  border-radius: 999px;
  padding: 0.6rem 0.9rem;
  color: #ffffff;
  background: rgba(9, 17, 31, 0.72);
  font-size: 1.05rem;
  font-weight: 800;
}

.project-body {
  display: grid;
  gap: 1rem;
  padding: 1.8rem;
}

.project-body h3 {
  margin: 0;
  color: var(--ink);
  font-size: 2rem;
  line-height: 1.25;
}

.project-body p {
  min-height: 6.6rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1.65;
  font-weight: 650;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: auto;
}

.project-actions .ghost-button,
.project-actions .pill-button {
  padding: 0.9rem 1.2rem;
}

.project-actions .is-muted {
  color: rgba(93, 108, 127, 0.7);
  pointer-events: none;
}

@media (max-width: 700px) {
  .projects-panel {
    padding: 1.5rem;
  }

  .section-head {
    flex-direction: column;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }
}
