/* ============================================================
   projects.css — styles specific to projects.html
   ============================================================ */

/* --- Card grid layout ---
   CSS Grid: automatically arranges cards in columns.
   repeat(auto-fill, minmax(260px, 1fr)) means:
     "make as many columns as fit, each at least 260px wide,
      stretching to fill available space equally."
   This is how the grid becomes responsive without any JS.
*/
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

/* --- Individual project card ---
   position: relative lets the overlay (position: absolute) 
   be positioned relative to this card, not the whole page.
   aspect-ratio keeps cards square-ish regardless of content.
   overflow: hidden clips the image and overlay to the card's rounded corners.
*/
.project-card {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: var(--bg-surface);  /* fallback if image missing */
  background-size: cover;
  background-position: center;
  text-decoration: none;
  display: block;
  transition: border-color 200ms ease, transform 200ms ease;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);    /* subtle lift on hover */
  text-decoration: none;
}

/* --- Card overlay ---
   position: absolute + inset: 0 stretches it to fill the entire card.
   The gradient goes from nearly transparent at the top to
   semi-opaque dark at the bottom — keeps the image visible
   while making text readable.
   This is a common pattern called a "scrim."
*/
.card-overlay {
  position: absolute;
  inset: 0;                       /* shorthand for top/right/bottom/left: 0 */
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.25) 40%,
    rgba(0, 0, 0, 0.80) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;      /* push text to bottom of card */
  padding: 1rem 1.1rem;
  gap: 0.3rem;
}

/* Small category tag above the title */
.card-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

/* Card title — overrides the global h3 margin since layout handles spacing */
.card-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
}

/* --- Mention / side quest list ---
   Each item shows a bold title and a muted description inline.
   Uses the same bordered-row feel as project-list in style.css.
*/
.mention-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.25rem 0 1.5rem;
}

.mention-list li {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1.5;
  transition: border-color 150ms ease, background 150ms ease;
}

.mention-list li:hover {
  border-color: var(--accent);
  background: var(--bg-surface);
}

.mention-title {
  font-family: var(--font-mono);
  color: var(--text);
  font-weight: 500;
}

.mention-desc {
  font-family: var(--font-body);
  color: var(--text-muted);
}