body[data-page="projects"] .project-card {
  gap: 0.85rem;
}

body[data-page="projects"] .project-card .project-summary,
body[data-page="projects"] .project-card p:not(.eyebrow):not(.project-category) {
  margin-bottom: 0;
}

body[data-page="projects"] .project-card-actions-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin: 0.15rem 0 0.35rem !important;
}

body[data-page="projects"] .project-card-actions-top .button,
body[data-page="projects"] .project-card-actions-top a,
body[data-page="projects"] .project-card-actions-top button {
  width: auto !important;
  min-height: 2.65rem;
  white-space: nowrap;
}

body[data-page="projects"] .project-category-overview,
body[data-page="projects"] .project-selected-section {
  display: grid;
  gap: 1rem;
}

body[data-page="projects"] .project-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

body[data-page="projects"] .project-category-card {
  min-height: 100%;
}

body[data-page="projects"] .project-category-button {
  display: grid;
  gap: 0.65rem;
  width: 100%;
  height: 100%;
  min-height: 12rem;
  padding: 1.15rem;
  text-align: left;
  color: inherit;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  background: rgba(148, 163, 184, 0.06);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

body[data-page="projects"] .project-category-button:hover,
body[data-page="projects"] .project-category-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(96, 165, 250, 0.08);
  outline: none;
}

body[data-page="projects"] .project-category-button strong {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.15;
}

body[data-page="projects"] .project-category-button span,
body[data-page="projects"] .project-category-button small {
  color: var(--text-secondary, #64748b);
  line-height: 1.45;
}

body[data-page="projects"] .project-category-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  color: var(--text-primary, #0f172a) !important;
  background: rgba(148, 163, 184, 0.14);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

body[data-page="projects"] .project-category-intro,
body[data-page="projects"] .project-selected-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 0.25rem;
}

body[data-page="projects"] .project-selected-heading {
  align-items: center;
}

body[data-page="projects"] .project-toggle,
body[data-page="projects"] .project-problem[hidden],
body[data-page="projects"] .project-details[hidden],
body[data-page="projects"] .project-expanded[hidden],
body[data-page="projects"] .project-more[hidden],
body[data-page="projects"] .project-extra[hidden] {
  display: none !important;
}

body[data-page="projects"] .project-github-link[href=""],
body[data-page="projects"] .project-github-link:not([href]) {
  display: none !important;
}

@media (max-width: 760px) {
  body[data-page="projects"] .project-card-actions-top {
    display: grid;
    grid-template-columns: 1fr;
  }

  body[data-page="projects"] .project-card-actions-top .button,
  body[data-page="projects"] .project-card-actions-top a,
  body[data-page="projects"] .project-card-actions-top button {
    width: 100% !important;
  }

  body[data-page="projects"] .project-category-intro,
  body[data-page="projects"] .project-selected-heading {
    display: grid;
    align-items: start;
  }
}
