/* Portfolio-only additions on top of house.css.
   The client demo pages end in "what I need from you" and an Upwork reply button.
   A portfolio page ends in evidence, so these cover the few things house.css has
   no class for: the index grid, the verdict strip, and the neutral footer note. */

/* ---- The index grid at /work/ ---- */
.pf-grid {
  display: grid;
  gap: clamp(18px, 2vw, 26px);
  /* 380px keeps it to three columns at 1400px. At four, each card was too narrow
     for a 4:3 cover and the headline shrank to nothing. min() stops that floor from
     overflowing a phone, where the track must never exceed the available width. */
  grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr));
}
.pf-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s;
}
.pf-card:hover, .pf-card:focus-visible { border-color: var(--accent); transform: translateY(-2px); }
/* The cover is 1600x1200 and its whole point is the headline, so it must never be
   cropped: `cover` cut the middle out of every title. `contain` on the image's own
   4:3 box shows all of it at any card width. The dark cover art sets its own
   background, so letterboxing matches it rather than the card. */
/* `height: auto` is load-bearing: the markup carries width/height attributes for
   layout stability, and without it the 1200px height attribute wins over
   aspect-ratio and the image box becomes 1200px tall. */
.pf-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: #0f1115; }
.pf-card-body { display: grid; gap: 6px; align-content: start; padding: 16px 18px 20px; }
.pf-card h3 { font-size: 17px; }
.pf-card p { font-size: 15px; color: var(--muted); }
.pf-card .pf-proof { font-size: 14px; color: var(--accent); font-weight: 600; }

/* ---- The verdict strip: the run's real numbers, in the hero ---- */
.pf-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.pf-stats > div { padding: 14px 16px; border-right: 1px solid var(--line); }
.pf-stats > div:last-child { border-right: 0; }
.pf-stats b { display: block; font-size: 25px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pf-stats span { font-size: 14px; color: var(--muted); }
/* Below 600px the strip wraps to two columns, so a per-cell border leaves stubs
   wherever a row ends. A grid gap over the strip's own background draws the lines
   instead, and they can only ever fall between cells. */
@media (max-width: 600px) {
  .pf-stats { gap: 1px; background: var(--line); }
  .pf-stats > div { border-right: 0; background: var(--surface); }
}

/* ---- "How it's built": the design decisions, two columns on desktop ---- */
.pf-points { display: grid; gap: clamp(20px, 2.5vw, 32px); grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.pf-point { display: grid; gap: 8px; align-content: start; }
.pf-point h3 { color: var(--ink); }
.pf-point p { font-size: 16px; color: var(--muted); }

/* ---- The walkthrough picture on a portfolio page ----
   A portfolio page shows the real n8n canvas, which is far wider than the 16/10 the
   stepper assumes - up to 4.85:1. Side by side it can never grow tall enough to match
   the step text beside it, so the picture column gets more of the width and the frame
   grows with it. Each page sets --st-ratio from its own image.
   Some empty canvas is left under the widest flows; that band is the stepper's own
   no-layout-shift reserve, which the client demo pages have too, and closing it would
   mean changing the shared component for every page in the repo. */
@media (min-width: 1100px) {
  .st { grid-template-columns: minmax(0, 5fr) minmax(0, 3fr); }
}

/* ---- A quoted line of real output ---- */
.pf-quote {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  font-size: 16px;
  max-width: 70ch;
}

/* ---- Back link on a project page ---- */
.pf-back { font-size: 15px; color: var(--muted); text-decoration: none; }
.pf-back:hover, .pf-back:focus-visible { color: var(--accent); }

/* The brand bar carries the back link on the right, on project pages only.
   house.css sets .brand { line-height: 0 } for the bare logo, so the text
   beside it needs its own line-height back. */
.brand.pf-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; line-height: 1.6; }
.brand.pf-bar picture { line-height: 0; }
