/* ==========================================================================
   Portfolio — "desktop OS" theme (loads after os.css)
   ========================================================================== */

/* reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* backlink + hero */
.pf-backlink {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; padding: 9px 16px; border-radius: 999px; margin-bottom: 10px; transition: transform 0.15s ease;
  color: #1a1a1a; border: 1px solid #b6b6b6;
  background-image:
    linear-gradient(to bottom, rgba(255,255,255,0.95) 1%, rgba(255,255,255,0.45) 30%, rgba(255,255,255,0) 48%, rgba(255,255,255,0.08) 90%, rgba(255,255,255,0.3) 100%),
    linear-gradient(to bottom, #ffffff 0%, #ececec 46%, #cfcfcf 47%, #d9d9d9 82%, #f3f3f3 100%);
  box-shadow: inset 0 1px 1.5px rgba(255,255,255,0.95), 0 6px 14px -6px rgba(0,0,0,0.22), 0 2px 4px rgba(0,0,0,0.14);
  text-shadow: 0 0 3px rgba(255,255,255,0.9);
}
.pf-backlink svg { width: 15px; height: 15px; }
.pf-backlink:hover { transform: translateY(-2px); }
.pf-hero { text-align: center; padding: 40px 0 10px; }
.pf-hero h1 { font-size: clamp(46px, 9vw, 100px); font-weight: 800; letter-spacing: -0.04em; line-height: 0.95; margin: 12px 0 16px; }
.pf-hero h1 .fade { color: var(--muted-2); }
.pf-lead { font-size: clamp(16px, 2vw, 20px); color: var(--ink-2); max-width: 56ch; margin: 0 auto; }

/* generic section-head used inside panels */
.section-head { text-align: center; max-width: 660px; margin: 0 auto 34px; }
.section-head .eyebrow { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); background: #fff; border: 1px solid var(--line); padding: 8px 16px; border-radius: 999px; box-shadow: var(--shadow); }
.section-head h2 { font-size: clamp(30px, 4.6vw, 50px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin: 18px 0 12px; }
.section-head h2 .fade { color: var(--muted-2); }
.section-head p { font-size: 17px; color: var(--muted); }

/* tabs (pill buttons) */
.pf-subnav { position: sticky; top: 44px; z-index: 60; margin: 28px 0 0; }
.pf-subnav-inner { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 8px; }
.pf-tab {
  font: inherit; cursor: pointer; font-weight: 600; font-size: 14.5px; padding: 11px 20px; border-radius: 999px; transition: transform 0.15s ease;
  color: #1a1a1a; border: 1px solid #b6b6b6;
  background-image:
    linear-gradient(to bottom, rgba(255,255,255,0.95) 1%, rgba(255,255,255,0.45) 30%, rgba(255,255,255,0) 48%, rgba(255,255,255,0.08) 90%, rgba(255,255,255,0.3) 100%),
    linear-gradient(to bottom, #ffffff 0%, #ececec 46%, #cfcfcf 47%, #d9d9d9 82%, #f3f3f3 100%);
  box-shadow: inset 0 1px 1.5px rgba(255,255,255,0.95), 0 6px 14px -6px rgba(0,0,0,0.22), 0 2px 4px rgba(0,0,0,0.14);
  text-shadow: 0 0 3px rgba(255,255,255,0.9);
}
.pf-tab:hover { transform: translateY(-2px); }
.pf-tab[aria-selected="true"] {
  color: #0c1330; border: 1px solid #2833a3;
  background-image:
    linear-gradient(to bottom, rgba(255,255,255,0.92) 1%, rgba(255,255,255,0.42) 28%, rgba(255,255,255,0.06) 46%, rgba(255,255,255,0) 48%, rgba(255,255,255,0.12) 90%, rgba(255,255,255,0.34) 100%),
    linear-gradient(to bottom, #aed2ff 0%, #74b2ff 45%, #2c78ff 47%, #2c78ff 82%, #59a0ff 100%);
  box-shadow: inset 0 1px 1.5px rgba(255,255,255,0.95), inset 0 -6px 10px rgba(255,255,255,0.18), 0 8px 18px -6px rgba(44,120,255,0.55), 0 2px 5px rgba(10,20,60,0.28);
  text-shadow: 0 0 3px rgba(255,255,255,0.85);
}

/* panels */
.pf-section { padding: 40px 0 64px; scroll-margin-top: 120px; }
.pf-section[hidden] { display: none; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip { font-size: 14px; font-weight: 500; color: var(--ink-2); background: #fff; border: 1px solid var(--line); padding: 9px 16px; border-radius: 999px; box-shadow: var(--shadow); }

/* window chrome dots on media */
.pf-case-media, .pf-prod-thumb, .pf-reel-media, .pf-gallery .g { position: relative; }
.pf-case-media::before, .pf-prod-thumb::before, .pf-reel-media::before, .pf-gallery .g::before {
  content: ""; position: absolute; top: 8px; left: 8px; z-index: 3;
  width: 50px; height: 16px; border-radius: 8px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 2px 6px rgba(0,0,0,0.14);
}
.pf-case-media::after, .pf-prod-thumb::after, .pf-reel-media::after, .pf-gallery .g::after {
  content: ""; position: absolute; top: 13px; left: 14px; z-index: 4; width: 38px; height: 6px;
  background:
    radial-gradient(circle 3px at 3px 3px, #ff5f57 60%, transparent 64%),
    radial-gradient(circle 3px at 18px 3px, #febc2e 60%, transparent 64%),
    radial-gradient(circle 3px at 33px 3px, #35c759 60%, transparent 64%);
}

/* KPI widgets */
.pf-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }
.pf-kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 22px 20px; transition: transform 0.18s ease; }
.pf-kpi:hover { transform: translateY(-3px); }
.pf-kpi b { display: block; font-size: clamp(30px, 4.2vw, 42px); font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.pf-kpi .k-label { display: block; font-size: 15px; font-weight: 700; margin: 12px 0 3px; }
.pf-kpi .k-sub { display: block; font-size: 13px; color: var(--muted); }

/* case study */
.pf-case { display: grid; grid-template-columns: 1.05fr 1fr; gap: 34px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 22px; box-shadow: var(--shadow); }
.pf-case-media { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--bg); aspect-ratio: 4 / 3; }
.pf-case-media.is-portrait { aspect-ratio: 4 / 5; }
.pf-case-media img { width: 100%; height: 100%; object-fit: cover; }
.pf-case-body .case-tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.pf-case-body h3 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 10px; }
.pf-case-body p { font-size: 15.5px; color: var(--muted); margin-bottom: 8px; }
.pf-results { list-style: none; margin-top: 16px; display: grid; gap: 8px; }
.pf-results li { position: relative; padding-left: 22px; font-size: 15px; color: var(--ink-2); }
.pf-results li::before { content: ""; position: absolute; left: 0; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
.pf-postlink { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; font-size: 14px; font-weight: 600; color: var(--blue); }
.pf-postlink svg { width: 15px; height: 15px; }
.pf-postlink:hover { text-decoration: underline; }

/* series gallery */
.pf-series-head { margin: 44px 0 18px; text-align: center; }
.pf-series-head h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.pf-series-head p { font-size: 14.5px; color: var(--muted); margin-top: 4px; max-width: 60ch; margin-left: auto; margin-right: auto; }
.pf-series { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.pf-series a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); transition: transform 0.2s ease; }
.pf-series a:hover { transform: translateY(-3px); }
.pf-series img { width: 100%; height: auto; display: block; }

/* short-form reels */
.pf-reels-head { margin: 50px 0 20px; text-align: center; }
.pf-reels-head h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.pf-reels-head p { font-size: 14.5px; color: var(--muted); margin-top: 4px; max-width: 62ch; margin-left: auto; margin-right: auto; }
.pf-reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pf-reel-media { position: relative; aspect-ratio: 9 / 16; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.pf-reel-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.pf-reel-body { padding: 12px 2px 0; }
.pf-reel-body .r-src { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pf-reel-body .r-title { font-size: 14.5px; font-weight: 600; color: var(--ink); margin-top: 5px; line-height: 1.35; }

/* video facade play button */
.pf-video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: var(--bg); cursor: pointer; display: block; }
.pf-video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.pf-play i { width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,0.92); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); transition: transform 0.2s ease; }
.pf-video:hover .pf-play i { transform: scale(1.08); }
.pf-play svg { width: 24px; height: 24px; fill: var(--ink); margin-left: 3px; }

/* production show + episodes */
.pf-show { max-width: 760px; margin: 0 auto 30px; text-align: center; }
.pf-show .pf-show-tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.pf-show h3 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 12px; }
.pf-show p { font-size: 16px; color: var(--muted); margin-bottom: 16px; }
.pf-show .chips { justify-content: center; }
.pf-show.pf-show-sep { margin-top: 60px; border-top: 1px solid var(--line); padding-top: 52px; }
.pf-prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pf-prod { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s ease; }
.pf-prod:hover { transform: translateY(-4px); }
.pf-prod-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--bg); overflow: hidden; }
.pf-prod-thumb iframe { width: 100%; height: 100%; border: 0; display: block; }
.pf-prod-body { padding: 18px 20px 20px; }
.pf-prod-body .p-role { font-size: 12px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.pf-prod-body h3 { font-size: 18px; font-weight: 800; margin: 8px 0; letter-spacing: -0.01em; }
.pf-prod-body p { font-size: 14.5px; color: var(--muted); }

/* graphics masonry */
.pf-gallery { columns: 3; column-gap: 16px; }
.pf-gallery .g { break-inside: avoid; margin-bottom: 16px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); transition: transform 0.2s ease; }
.pf-gallery .g img { width: 100%; height: auto; display: block; }
.pf-gallery .g:hover { transform: translateY(-3px); }
.pf-gallery .g figcaption { padding: 11px 14px; font-size: 13px; font-weight: 700; color: var(--ink); border-top: 1px solid var(--line); }
.pf-gallery .g figcaption span { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* contact + socials */
.pf-contact { text-align: center; padding: 60px 0; }
.pf-socials { text-align: center; margin-top: 18px; font-size: 15px; }
.pf-socials a { font-weight: 600; color: var(--blue); }
.pf-socials a:hover { text-decoration: underline; }
.pf-socials span { color: var(--muted-2); margin: 0 12px; }

@media (max-width: 900px) {
  .pf-case { grid-template-columns: 1fr; gap: 22px; }
  .pf-case-media.is-portrait { aspect-ratio: 4 / 3; }
  .pf-series { grid-template-columns: repeat(3, 1fr); }
  .pf-prod-grid { grid-template-columns: 1fr 1fr; }
  .pf-gallery { columns: 2; }
}
@media (max-width: 620px) {
  .pf-reels { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pf-series { grid-template-columns: repeat(2, 1fr); }
  .pf-prod-grid { grid-template-columns: 1fr; }
  .pf-gallery { columns: 1; }
  .pf-subnav { top: 44px; }
}
