/* ==========================================================================
   PORTAFOLIO  ·  Estilos de portafolio.html
   Usa los colores de tokens.css. Todo va dentro de .pf para no chocar con
   los estilos de la página principal.
   ========================================================================== */

.pf { padding-bottom: 72px; }
.pf h1, .pf h2, .pf h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; letter-spacing: -.02em; line-height: 1.1; }
.pf p { margin: 0; }
.pf .r { font-weight: 300; color: var(--accent-soft); }
.pf .eyebrow { display: block; margin-bottom: 10px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-soft); }
.pf [hidden] { display: none !important; }

/* ---------- Encabezado ---------- */
.pf-hero { position: relative; padding-block: 64px 8px; }
.pf-hero::after { content: ""; position: absolute; right: 0; top: -40px; width: min(420px, 100%); height: 420px; background: radial-gradient(circle, var(--accent-glow), transparent 65%); pointer-events: none; z-index: -1; opacity: .6; }
.pf-hero h1 { font-size: clamp(2.2rem, 5.4vw, 4rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.04; }
.pf-hero p { max-width: 60ch; margin-top: 16px; color: var(--muted); font-size: 1.08rem; }
.pf-index { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.pf-index a { display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font-size: .93rem; font-weight: 600; color: var(--muted); transition: color .2s, border-color .2s; }
.pf-index a:hover { color: var(--fg); border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.pf-index i { width: 8px; height: 8px; border-radius: 50%; background: var(--dot); }

/* ---------- Proyecto ---------- */
.pf-project { padding-top: 80px; scroll-margin-top: 80px; }
.pf-project__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: end; margin-bottom: 28px; }
.pf-project__num { font-family: var(--font-mono); font-size: 12px; letter-spacing: .18em; color: var(--muted); }
.pf-project__head h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 700; letter-spacing: -.035em; margin-top: 8px; }
.pf-project__type { display: inline-block; margin-top: 12px; padding: 5px 12px; border-radius: 99px; font-size: .82rem; font-weight: 600; color: var(--fg); background: color-mix(in srgb, var(--dot) 18%, transparent); border: 1px solid color-mix(in srgb, var(--dot) 45%, transparent); }
.pf-project__desc { color: var(--muted); }
.pf-project__desc p + p { margin-top: 12px; }
.pf-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pf-tags span { font-family: var(--font-mono); font-size: 11.5px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); }

/* ---------- Galería de vistas ---------- */
.pf-gallery { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 16px; }
.pf-shot { position: relative; min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; cursor: zoom-in; transition: border-color .3s, transform .3s, box-shadow .3s; }
.pf-shot:hover { border-color: color-mix(in srgb, var(--dot) 60%, var(--line)); transform: translateY(-3px); box-shadow: 0 24px 50px -24px var(--accent-glow); }
.pf-shot:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; }
.pf-shot--main { grid-row: span 2; display: flex; flex-direction: column; }
.pf-gallery .pf-shot--main img { flex: 1; min-height: 0; aspect-ratio: auto; object-position: top left; }
.pf-shot:not(.pf-shot--main) img { aspect-ratio: 2 / 1; }
.pf-shot__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.pf-shot__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.pf-shot__bar i:first-child { background: var(--dot); }
.pf-shot__bar span { margin-left: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.pf-shot figcaption { padding: 12px 14px; font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); }
.pf-shot figcaption b { color: var(--fg); font-weight: 600; }

/* ---------- Visor (vista ampliada) ---------- */
.pf-viewer { width: min(1200px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--fg); overflow: hidden; }
.pf-viewer::backdrop { background: rgba(4, 6, 10, .82); backdrop-filter: blur(4px); }
.pf-viewer img { display: block; width: 100%; height: auto; max-height: calc(100vh - 110px); object-fit: contain; background: var(--bg); }
.pf-viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: .93rem; }
.pf-viewer__nav { display: flex; gap: 8px; }
.pf-viewer button { font: inherit; font-size: .9rem; font-weight: 600; color: var(--fg); background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 7px 12px; cursor: pointer; }
.pf-viewer button:hover { border-color: var(--accent); }

/* ---------- Contacto final ---------- */
.pf-cta { margin-top: 96px; padding: clamp(28px, 5vw, 56px); text-align: center; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.pf-cta h2 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: -.04em; margin-bottom: 14px; }
.pf-cta p { color: var(--muted); max-width: 52ch; margin: 0 auto 22px; }
.pf-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Copyright del pie (por si base.css aún no lo tiene) */
.site-footer__copy { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

@media (max-width: 900px) {
  .pf-project__head { grid-template-columns: 1fr; gap: 16px; }
  .pf-gallery { grid-template-columns: 1fr 1fr; }
  .pf-shot--main { grid-column: span 2; grid-row: auto; }
  .pf-gallery .pf-shot--main img, .pf-gallery .pf-shot:not(.pf-shot--main) img { flex: none; aspect-ratio: 16 / 10; }
}
@media (max-width: 560px) {
  .pf-gallery { grid-template-columns: 1fr; }
  .pf-shot--main { grid-column: auto; }
  .pf-hero { padding-top: 40px; }
  .pf-project { padding-top: 56px; }
}
