/* =====================================================================
 * design/projects.css — p4 (show-don't-tell) enhancements for #projects
 *
 * Loaded AFTER style.css so it overrides base .card / .proj rules.
 * Every color = var(--*); every animated property = --dur-*. No literals.
 *
 * Structure per card:
 *   .card.proj > .proj-preview (edge-to-edge decorative SVG + "placeholder" tag)
 *                .proj-body   (title, description, optional metrics, chips)
 *
 * Why the "placeholder" tag: the SVGs are stylized diagrams of what each
 * project does, NOT screenshots of the real UI. Labeling them "placeholder"
 * keeps the site honest per packet rule #4 (no fabricated proof) — a
 * reader can tell at a glance this is decoration, not a captured artifact.
 * ===================================================================== */

/* ── card override: keep default padding on projects (preview removed) ── */
.card.proj {
  display: flex;
  flex-direction: column;
}
/* Content wrapper. Padding restored here since .card.proj no longer needs
   to host an edge-to-edge preview. .proj-body carries the chip row at the
   bottom, so its flex-column layout keeps card contents anchored top +
   chip row bottom regardless of description length. */
.card.proj .proj-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}
.card.proj .proj-body .chips { margin-top: auto; }

/* ── mini-preview strip ─────────────────────────────────────────────── */
.proj-preview {
  position: relative;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.proj-preview-svg {
  width: 100%;
  height: 64px;
  display: block;
  overflow: visible;
}

/* Accent-border variant: warmer preview tint so the "flagship" card reads
   as promoted without a second border color. */
.card.proj.accent-border .proj-preview {
  background: linear-gradient(180deg, var(--accent-dim) 0%, var(--panel-2) 100%);
}

/* SVG stroke / fill helpers — namespaced under .proj-preview-svg so they
   can't collide with any global classes.
   NOTE: SVG presentation attributes (fill="…", stroke="…") don't reliably
   resolve `var()` across all browsers — those custom-property lookups
   only expand when the property is applied via CSS. So every color inside
   the SVGs is applied through one of these classes, never as an attribute. */
.proj-preview-svg .s-a { stroke: var(--accent);   fill: none; stroke-width: 1.5;  stroke-linecap: round; stroke-linejoin: round; }
.proj-preview-svg .s-m { stroke: var(--dim);      fill: none; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.proj-preview-svg .f-a       { fill: var(--accent);           stroke: none; }
.proj-preview-svg .f-m       { fill: var(--dim);              stroke: none; }
.proj-preview-svg .f-muted   { fill: var(--muted);            stroke: none; }
.proj-preview-svg .f-on-a    { fill: var(--color-on-accent);  stroke: none; }
.proj-preview-svg .s-oa{ stroke: var(--color-on-accent); fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.proj-preview-svg .s-dash { stroke-dasharray: 3 3; }

/* Placeholder tag — the honesty label. Subtle mono chip in the top-right
   corner of the preview strip. */
.proj-preview-tag {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  background: var(--panel-3);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1.4;
  pointer-events: none;
}

/* ── card body ──────────────────────────────────────────────────────── */
.proj-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.proj-body h3 {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  color: var(--text);
}
.proj-body > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}
.proj-body > p em { color: var(--accent); font-style: normal; }
.proj-body > p strong { color: var(--text); }

/* Metrics row — quantified outcomes. Present only when the number is
   verifiable from the public repo. Rendered as a subtle top-bordered
   strip of "N label" pairs. Distinct from the .chips row below (which
   remains pill-shaped tech tags). */
.proj-metrics {
  list-style: none;
  margin: 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.78rem;
  color: var(--muted);
}
.proj-metrics li {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}
.proj-metrics strong {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}

/* Chips (tech stack) always pin to the bottom of the card, so cards with
   longer descriptions still line up their chip rows across the grid. */
.proj-body > .chips { margin-top: auto; }

/* ── reduced motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .card.proj { transition: none; }
}

/* ── print: hide the decorative preview, keep the substantive body ──── */
@media print {
  .proj-preview { display: none; }
  .proj-body { padding: 8px 0; }
  .proj-metrics { border-top-color: var(--color-text-print); color: var(--color-text-print); }
  .proj-metrics strong { color: var(--color-text-print); }
}
