/* ---------- PROJECTS SECTION ---------- */
.projects-section {
  background: var(--bg-secondary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

/* A single project shouldn't stretch the width of the container, so hold it
   to a card-sized column and centre it. */
.projects-grid:has(> .project-card:only-child) {
  grid-template-columns: minmax(300px, 470px);
  justify-content: center;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: 6px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
  position: relative;
}

.project-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

/* ---------- Featured (screenshot above the write-up) ---------- */
.project-card.featured {
  padding: 12px;
  border-radius: 10px;
  gap: 0;
}

.project-thumb {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  line-height: 0;
}

/* The screenshot is a wide dashboard: show all of it rather than cropping
   the interface to fill a box. */
.project-thumb img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-slow);
}

.project-card.featured:hover .project-thumb img {
  transform: scale(1.02);
}

.project-body {
  display: flex;
  flex-direction: column;
  padding: 18px 12px 6px;
}

.project-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.project-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.project-card.featured .project-title {
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  margin-bottom: 0;
}

.project-card.featured .project-description {
  margin-top: 16px;
  margin-bottom: 6px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ---------- Shared card internals ---------- */
.project-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--bull-green);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.project-description {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 4px 10px;
  border: 1px solid var(--border-accent);
  border-radius: 4px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin-top: auto;
}

.project-icon-link {
  display: inline-flex;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.project-icon-link:hover {
  color: var(--bull-green);
}

.project-icon-link:focus-visible {
  outline: 2px solid var(--bull-green);
  outline-offset: 4px;
  border-radius: 4px;
}

.project-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--bull-green);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.project-link:hover {
  color: var(--bull-green-light);
}

.project-icon {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}
