/* ============================================================
   cv.joelduss.xyz — PORTFOLIO (GitHub-Primer light)
   Reuses the tokens from assets/css/styles.css (same --bg, --fg,
   --accent, --border, radii, fonts). No new fonts, no CDNs.
   One column on mobile, two columns from 920px up — mirroring the
   repo-card grid of the main page.
   ============================================================ */

/* ───────────────────────── page shell ───────────────────── */
.pf-page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 28px var(--gutter) 56px;
  display: grid;
  gap: 24px;
  min-width: 0;
}

/* ───────────────────────── intro / header ───────────────── */
.pf-head {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  padding: clamp(20px, 3vw, 32px);
  display: grid;
  gap: 12px;
}
.pf-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  width: fit-content;
}
.pf-back:hover { text-decoration: underline; }
.pf-back .glyph { color: var(--accent); }
.pf-head h1 {
  font-size: clamp(24px, 1.4rem + 1vw, 32px);
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.2;
  color: var(--fg);
}
.pf-head p {
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 70ch;
}
.pf-head__count {
  font-size: var(--fs-meta);
  color: var(--fg-subtle);
}

/* ───────────────────────── card grid ────────────────────── */
.pf-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 920px) {
  .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ───────────────────────── project card ─────────────────── */
.pf-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg);
  scroll-margin-top: 24px;
  transition: border-color 120ms, box-shadow 120ms;
}
.pf-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-medium);
}
.pf-card:target {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

/* ───────────────────────── screenshot tile ──────────────── */
/* Feste 16:10-Kachel oben in jeder Karte. aspect-ratio + overflow:hidden →
   CLS-fest und formatstabil unabhängig von der echten Bildgrösse. Landing-Page-
   Shots werden oben angeschnitten (object-position:top) statt verzerrt. */
.pf-shot {
  display: block;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-subtle);
  margin: -4px -4px 4px;        /* leicht aus dem 20px-Padding herausragend */
}
.pf-shot--link {
  cursor: pointer;
  transition: border-color 120ms, box-shadow 120ms;
}
.pf-shot--link:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-medium);
}
.pf-shot__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;        /* Landing-Pages oben anschneiden, nicht verzerren */
}
/* Gradient-Platzhalter (kein Screenshot vorhanden). Cluster-Farbe via
   data-cluster — alle Regeln im Stylesheet, kein Inline-style (CSP-konform). */
.pf-shot__ph {
  display: block;
  width: 100%; height: 100%;
  /* neutraler Default-Gradient; pro Cluster überschrieben (siehe unten) */
  background:
    radial-gradient(120% 140% at 12% 0%,
      color-mix(in srgb, var(--pf-cluster, #94a3b8) 28%, transparent) 0%,
      transparent 55%),
    linear-gradient(135deg, var(--bg-subtle) 0%, var(--bg) 100%);
}
.pf-shot__ph[data-cluster="ai-llm"]  { --pf-cluster: #bd00ff; }
.pf-shot__ph[data-cluster="web"]     { --pf-cluster: #00e5ff; }
.pf-shot__ph[data-cluster="agents"]  { --pf-cluster: #ff2ec4; }
.pf-shot__ph[data-cluster="devops"]  { --pf-cluster: #ff7a00; }
.pf-shot__ph[data-cluster="data-rag"]{ --pf-cluster: #00ffb2; }
.pf-shot__ph[data-cluster="games"]   { --pf-cluster: #ffe600; }
.pf-shot__ph[data-cluster="tools"]   { --pf-cluster: #94a3b8; }

.pf-card__head { display: grid; gap: 4px; }
.pf-card__title {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  word-break: break-word;
}
.pf-card__title .glyph { color: var(--fg-muted); }
.pf-card__tagline {
  font-size: var(--fs-body);
  color: var(--fg-muted);
  line-height: 1.45;
}

/* meta row: Zeitraum · N Sessions · Cluster */
.pf-meta {
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  font-size: var(--fs-meta);
  color: var(--fg-muted);
}
.pf-meta span { display: inline-flex; align-items: center; gap: 4px; }
.pf-meta .glyph { color: var(--fg-subtle); }
.pf-meta__cluster {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 8px;
  line-height: 18px;
  font-weight: 500;
}

/* ───────────────────────── tech chips ───────────────────── */
.pf-tech {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.pf-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  font-size: var(--fs-meta);
  font-weight: 500;
  background: var(--bg-subtle);
  color: var(--fg-muted);
  border: 1px solid var(--border-muted);
  border-radius: 999px;
}
.pf-chip__logo {
  width: 14px; height: 14px;
  display: inline-block;
  flex-shrink: 0;
}

/* ───────────────────────── description ──────────────────── */
.pf-desc { display: grid; gap: 10px; }
.pf-desc p {
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--fg);
}

/* ───────────────────────── learnings ───────────────────── */
.pf-learnings { display: grid; gap: 6px; }
.pf-learnings__caption {
  font-size: var(--fs-meta);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  font-weight: 600;
}
.pf-learnings ul { display: grid; gap: 6px; }
.pf-learnings li {
  position: relative;
  padding-left: 20px;
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--fg);
}
.pf-learnings li::before {
  content: "";
  position: absolute;
  left: 4px; top: 9px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ───────────────────────── highlight aside ─────────────── */
.pf-highlight {
  border-left: 4px solid var(--done);
  background: var(--done-bg);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 12px 14px;
  display: flex; align-items: flex-start; gap: 8px;
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--fg);
}
.pf-highlight .glyph { color: var(--done); margin-top: 2px; }

/* ───────────────────────── footer links ─────────────────── */
.pf-card__foot {
  margin-top: auto;
  padding-top: 4px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.pf-card__foot .btn { min-height: 32px; }
/* Ghost-Variante für Sekundär-Links (Skills im CV, Projekt ansehen). */
.btn--ghost {
  background: transparent;
  border-color: var(--border-muted);
  color: var(--fg-muted);
}
.btn--ghost:hover {
  background: var(--bg-subtle);
  border-color: var(--accent);
  color: var(--accent);
}
.btn--ghost:hover .glyph { color: var(--accent); }

/* ───────────────────────── page footer ──────────────────── */
.pf-footer {
  max-width: var(--page-max);
  margin: 16px auto 0;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 12px 24px;
  font-size: var(--fs-meta);
  color: var(--fg-muted);
  justify-content: space-between;
  align-items: center;
}
.pf-footer__col { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.pf-footer .glyph { color: var(--fg-muted); }
.pf-footer a.link { color: var(--accent); text-decoration: none; }
.pf-footer a.link:hover { text-decoration: underline; }

/* ───────────────────────── focus ring (mirror main) ─────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
