/* ── Section ─────────────────────────────────────────── */
.section {
  padding: 40px 0;
  position: relative;
}

.section-compact {
  padding: 32px 0;
}

.section + .section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, oklch(74% 0.2 45 / 20%), transparent);
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  position: relative;
  padding-left: 18px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1px;
  bottom: 1px;
  width: 4px;
  border-radius: 2px;
  background: var(--gradient-primary);
  box-shadow: 0 0 12px oklch(74% 0.2 45 / 40%);
}

.section-subtitle {
  font-size: 14px;
  color: var(--muted);
}

.section-action {
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.section-action:hover {
  text-decoration: underline;
}

/* ── Card grid ───────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card-grid-sm {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card-grid > .empty-state {
  grid-column: 1 / -1;
}

/* ── Project card ────────────────────────────────────── */
.project-card-link,
.project-card-link:hover {
  text-decoration: none;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  background: oklch(15% 0.025 270 / 50%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-aurora);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover {
  border-color: oklch(74% 0.2 45 / 25%);
  box-shadow:
    var(--shadow-glow),
    0 8px 32px oklch(0% 0 0 / 20%);
  transform: translateY(-6px);
}

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

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

.project-card:active {
  transform: translateY(-2px) scale(0.99);
}

:root.light .project-card {
  background: oklch(100% 0 0 / 70%);
}

:root.light .project-card:hover {
  box-shadow:
    var(--shadow-glow),
    0 8px 32px oklch(13% 0.02 270 / 6%);
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.project-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  border: 1px solid oklch(74% 0.2 45 / 12%);
  background: oklch(74% 0.2 45 / 8%);
  color: var(--accent);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.project-card:hover .project-icon {
  border-color: oklch(74% 0.2 45 / 30%);
  background: oklch(74% 0.2 45 / 15%);
  box-shadow: 0 0 24px oklch(74% 0.2 45 / 20%);
  transform: scale(1.08);
}

.project-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
}

.project-card-info {
  flex: 1;
  min-width: 0;
}

.project-name {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-name a {
  color: var(--fg);
  transition: color var(--transition);
}

.project-name a:hover {
  color: var(--accent);
  text-decoration: none;
}

.project-slogan {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.project-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* ── Badges ──────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  border: 1px solid var(--border);
  background: oklch(15% 0.025 270 / 60%);
  color: var(--muted);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

:root.light .badge {
  background: oklch(97% 0.005 270);
}

.badge-accent {
  background: oklch(74% 0.2 45 / 8%);
  border-color: oklch(74% 0.2 45 / 20%);
  color: var(--blue);
}

.badge-status {
  border: none;
  color: var(--fg);
  font-weight: 600;
  padding: 3px 10px 3px 8px;
}

.badge-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--status-color, currentColor);
  margin-inline-end: 3px;
  box-shadow: 0 0 8px var(--status-color, currentColor);
  animation: glowDot 2s ease-in-out infinite;
}

/* ── Category cards ──────────────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.category-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  background: oklch(15% 0.025 270 / 40%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-align: center;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%, oklch(74% 0.2 45 / 6%) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.category-card:hover {
  border-color: oklch(74% 0.2 45 / 30%);
  box-shadow: var(--shadow-glow);
  transform: translateY(-6px);
  text-decoration: none;
  color: inherit;
}

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

.category-card:active {
  transform: translateY(-2px) scale(0.98);
}

:root.light .category-card {
  background: oklch(100% 0 0 / 60%);
}

:root.light .category-card:hover {
  box-shadow:
    var(--shadow-glow),
    0 8px 24px oklch(13% 0.02 270 / 5%);
}

.category-icon {
  font-size: 28px;
  margin-bottom: 10px;
  color: var(--accent);
  transition:
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    color var(--transition);
  position: relative;
  z-index: 1;
}

.category-card:hover .category-icon {
  transform: scale(1.2);
  filter: drop-shadow(0 0 8px oklch(74% 0.2 45 / 30%));
}

.category-label {
  font-size: 14px;
  font-weight: 600;
}
