/* Portfolio: systems built inside Cadrix. Index grid of cases + one page per case, on the landing's palette. */
.pf-nav-actions { display: flex; align-items: center; gap: 8px; }
.pf-hero { padding: 64px 0 28px; display: grid; gap: 16px; max-width: 820px; }
.pf-hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
.pf-count { color: var(--muted-2); font-size: 14px; font-weight: 600; }

.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 22px; padding-bottom: 96px; }
.pf-card { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-xl); background: linear-gradient(180deg, rgba(18, 20, 27, .85), rgba(9, 9, 11, .7)); transition: border-color .2s ease, transform .2s ease; }
.pf-card:hover { border-color: rgba(96, 165, 250, .45); transform: translateY(-2px); }
.pf-card-shot { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--line); background: #070a12; }
.pf-card-shot .pf-shot { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .4s ease; }
.pf-card:hover .pf-card-shot .pf-shot { transform: scale(1.025); }
.pf-card-body { display: grid; align-content: start; gap: 10px; padding: 20px 22px 22px; }
.pf-card h2 { font-size: 1.6rem; }
.pf-card h2 a:hover { color: #bfdbfe; }
.pf-tagline { color: #d4d4d8; font-size: 1.02rem; }
.pf-facts { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

.pf-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pf-type { padding: 3px 9px; border: 1px solid rgba(96, 165, 250, .4); border-radius: 999px; color: #bfdbfe; background: rgba(30, 58, 95, .35); }
.pf-live { display: inline-flex; align-items: center; gap: 6px; color: #bbf7d0; }
.pf-dot { width: 7px; height: 7px; border-radius: 999px; background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .2); }
.pf-year { color: var(--muted-2); }
.pf-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.pf-case { display: grid; gap: 40px; padding: 36px 0 96px; }
/* Back to all projects: an arrow in a round button, inside a pill that lights up on hover and focus. */
.pf-back { margin-bottom: -16px; }
.pf-back-btn { display: inline-flex; align-items: center; gap: 10px; padding: 5px 16px 5px 5px; border: 1px solid rgba(148, 163, 184, .2); border-radius: 999px; background: rgba(17, 17, 19, .7); color: #d4d4d8; font-size: 14px; font-weight: 650; backdrop-filter: blur(8px); transition: border-color .18s ease, background .18s ease, color .18s ease; }
.pf-back-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: rgba(96, 165, 250, .14); color: #93c5fd; transition: background .18s ease, color .18s ease, transform .18s ease; }
.pf-back-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pf-back-btn:hover { border-color: rgba(96, 165, 250, .5); background: rgba(30, 41, 59, .7); color: #fff; }
.pf-back-btn:hover .pf-back-icon { background: linear-gradient(135deg, #2563eb, #0ea5e9); color: #fff; transform: translateX(-2px); }
.pf-back-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .pf-back-btn, .pf-back-icon { transition: none; } .pf-back-btn:hover .pf-back-icon { transform: none; } }
.pf-case-head { display: grid; gap: 14px; max-width: 820px; }
.pf-case-head h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.pf-case-tagline { color: #e4e4e7; font-size: clamp(1.15rem, 2.2vw, 1.4rem); font-weight: 600; letter-spacing: -.01em; }
.pf-note { color: var(--muted-2); font-size: 13.5px; }
.pf-hero-shot { margin: 0; overflow: hidden; border: 1px solid rgba(148, 163, 184, .22); border-radius: var(--r-xl); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); background: #070a12; }
.pf-hero-shot .pf-shot { display: block; width: 100%; height: auto; }

.pf-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0; }
.pf-stats div { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: rgba(17, 17, 19, .7); }
.pf-stats dt { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pf-stats dd { margin: 6px 0 0; font-size: 1.45rem; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pf-builtby { margin-top: -22px; color: var(--muted); font-size: 14px; max-width: 820px; }

.pf-case section { display: grid; gap: 16px; }
.pf-case section h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
.pf-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.pf-list, .pf-fixes { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.pf-list li, .pf-fixes li { position: relative; padding-left: 26px; color: #c7cad1; font-size: 15.5px; line-height: 1.6; }
.pf-list li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 999px; background: var(--btn-grad); }
.pf-fixes li { padding: 14px 16px 14px 44px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(17, 17, 19, .6); }
.pf-fixes li::before { content: "✓"; position: absolute; left: 16px; top: 14px; color: #4ade80; font-weight: 800; }
.pf-timeline { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; border-left: 2px solid rgba(96, 165, 250, .35); }
.pf-timeline li { position: relative; display: grid; gap: 2px; padding: 0 0 18px 20px; color: #c7cad1; font-size: 15px; line-height: 1.55; }
.pf-timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 999px; border: 2px solid #60a5fa; background: var(--bg); }
.pf-when { color: #93c5fd; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.pf-stack { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-stack span { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(24, 24, 27, .7); color: #e4e4e7; font-size: 14px; font-weight: 600; }
.pf-gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
.pf-gallery figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: #070a12; }
.pf-gallery .pf-shot { display: block; width: 100%; height: auto; }
.pf-final { justify-items: center; text-align: center; padding: 48px 24px; border: 1px solid var(--line); border-radius: var(--r-xl); background: radial-gradient(120% 140% at 50% 0%, rgba(37, 99, 235, .18), rgba(9, 9, 11, .6) 60%); }
.pf-final .pf-actions { justify-content: center; }
.pf-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 24px 0; color: var(--muted-2); font-size: 13px; }
.pf-footer a { color: var(--muted); }

@media (max-width: 900px) {
  .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-stats div:last-child { grid-column: 1 / -1; }
  .pf-cols { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 560px) {
  .pf-hero { padding-top: 40px; }
  .pf-nav-actions .btn-ghost { display: none; }
  .pf-gallery { grid-template-columns: minmax(0, 1fr); }
  .pf-actions .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-card, .pf-card-shot .pf-shot { transition: none; }
  .pf-card:hover, .pf-card:hover .pf-card-shot .pf-shot { transform: none; }
}
/* The landing pads every <section> for its long-scroll layout; the portfolio spaces its own blocks. */
.portfolio-page section { padding: 0; }
.portfolio-page .pf-final { padding: 48px 24px; }
.portfolio-page .pf-hero { padding: 64px 0 36px; }
.portfolio-page .pf-grid { padding-bottom: 96px; }
@media (max-width: 560px) { .portfolio-page .pf-hero { padding-top: 40px; } }
/* Squad cases: badge and the canvas time-lapse. */
.pf-squad { padding: 3px 9px; border: 1px solid rgba(167, 139, 250, .45); border-radius: 999px; color: #ddd6fe; background: rgba(76, 29, 149, .3); }
.pf-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 1px solid rgba(148, 163, 184, .22); border-radius: var(--r-xl); background: #070a12; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
/* Cases with several screens: desktop shots two by two, phones side by side below them. */
.pf-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pf-phones { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 300px)); justify-content: center; gap: 16px; margin-top: 16px; }
.pf-phones figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: #070a12; }
.pf-phones .pf-shot { display: block; width: 100%; height: auto; }
@media (max-width: 560px) {
  .pf-gallery-grid { grid-template-columns: minmax(0, 1fr); }
  .pf-phones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
