/* Projects Page — Card Grid */

.projects-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
}

.proj-card-link {
  display: block;
  text-decoration: none;
}

.proj-card {
  position: relative;
  background-color: var(--bg-white);
  border-left: 4px solid var(--primary-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  min-height: 160px;
}

/* Full-card stretch link — covers the entire card, lowest z-index */
.proj-card-stretch {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
}

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

/* Content body — above stretch link; pointer-events off so clicks fall through */
.proj-card-body {
  position: relative;
  z-index: 1;
  pointer-events: none;
  padding: var(--space-4) var(--space-5) var(--space-10) var(--space-5);
}

.proj-card-name {
  display: block;
  color: var(--text-dark);
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  line-height: 1.3;
  word-break: break-word;
}

.proj-card-desc {
  display: -webkit-box;
  color: var(--text-light);
  font-size: var(--text-sm);
  line-height: 1.4;
  margin-top: 4px;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Moldure — bottom-right icon badge (snake animation via .snake-border + snake-border.css) */
.proj-card-moldure {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  background-color: var(--bg-white);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  text-decoration: none;
  --snake-radius: var(--radius-md); /* used by .snake-border::before */
}

a.proj-card-moldure {
  transition: border-color 0.35s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

a.proj-card-moldure:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Fade the static border out as the snake ring fades in */
a.proj-card-moldure.snake-active {
  border-color: transparent;
}

.proj-card-moldure img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.projects-empty {
  color: var(--text-light);
  font-size: var(--text-base);
  text-align: center;
  padding: var(--space-10) 0;
}

@media (max-width: 768px) {
  .projects-icon-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-4);
  }
}

