/* Portfolio archive + case study — same tokens as style.css (green theme) */
.pf-hero { padding-bottom: 2rem; }

/* Shared device frames */
.pf-browser { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 1rem; overflow: hidden; }
.pf-browser-bar { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0.8rem; border-bottom: 1.5px solid var(--ink); background: var(--bg); direction: ltr; }
.pf-dots { display: inline-flex; gap: 0.3rem; }
.pf-dots i { width: 0.55rem; height: 0.55rem; border-radius: 50%; border: 1.3px solid var(--ink); display: block; }
.pf-dots i:first-child { background: var(--gold); }
.pf-url { font-size: 0.75rem; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 0.05rem 0.7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-browser img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.pf-phone { position: absolute; width: 22%; aspect-ratio: 390 / 844; border: 1.5px solid var(--ink); border-radius: 1.1rem; background: var(--ink); padding: 0.28rem; box-shadow: 4px 4px 0 var(--tint); }
.pf-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 0.85rem; display: block; }

/* Archive */
.pf-archive { max-width: var(--max); margin-inline: auto; padding: 0.5rem 1.5rem 5rem; }
.pf-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-bottom: 2.2rem; }
.pf-chip { padding: 0.4rem 1.05rem; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); font-weight: 600; font-size: 0.92rem; transition: background 0.2s, color 0.2s, box-shadow 0.2s; }
.pf-chip:hover { box-shadow: 3px 3px 0 var(--gold); }
.pf-chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 3px 3px 0 var(--gold); }
.pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.8rem; }
.pf-card { min-width: 0; }
.pf-card[hidden] { display: none; }
.pf-card-link { display: flex; flex-direction: column; height: 100%; color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--radius); overflow: hidden;
  box-shadow: 7px 7px 0 var(--tint); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.pf-card-link:hover { transform: translate(-3px, -3px); box-shadow: 10px 10px 0 var(--accent); }
.pf-card-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.pf-card-media { position: relative; padding: 1.4rem 1.4rem 1.6rem 3.6rem; background: var(--accent-soft); border-bottom: 1.5px solid var(--ink); }
.pf-card-media .pf-browser { box-shadow: 4px 4px 0 var(--tint); }
.pf-card-media .pf-phone { left: 1rem; bottom: 0.9rem; width: 19%; transition: transform 0.4s var(--ease); }
.pf-card-link:hover .pf-phone { transform: translateY(-6px) rotate(-2deg); }
.pf-card-body { padding: 1.3rem 1.4rem 1.4rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.pf-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.pf-card-top .sticker-mini { margin: 0; }
.pf-client { color: var(--muted); font-size: 0.85rem; }
.pf-card-body h2 { font-size: 1.45rem; letter-spacing: -0.02em; }
.pf-card-body p { color: var(--muted); }
.pf-tags { list-style: none; margin: 0.2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pf-tags li { font-size: 0.78rem; padding: 0.1rem 0.65rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.pf-tags--solid li { background: var(--paper); border-color: var(--ink); font-weight: 600; }
.pf-more { margin-top: auto; padding-top: 0.5rem; font-weight: 700; color: var(--accent); }
.pf-card-link:hover .pf-more span { display: inline-block; transform: translateX(-4px); transition: transform 0.3s var(--ease); }

.pf-cta { margin: 4rem auto 0; max-width: 46rem; text-align: center; padding: 2.4rem 1.6rem; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--accent); color: #fff; box-shadow: 7px 7px 0 var(--gold); }
.pf-cta h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); }
.pf-cta p { margin: 0.6rem auto 1.4rem; opacity: 0.9; max-width: 30rem; }
.pf-cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; }
.pf-cta .btn-primary { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.pf-cta .btn-primary:hover { background: var(--sand); }
.pf-cta .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.7); background: transparent; }
.pf-cta .btn-ghost:hover { border-color: var(--gold); color: var(--sand); }

/* Case study */
.cs-hero { position: relative; overflow: hidden; padding: 3.2rem 1.5rem 2.2rem; text-align: center; }
.cs-hero-inner { position: relative; z-index: 1; max-width: 48rem; margin-inline: auto; }
.cs-stickers { margin: 1.4rem 0 1rem; }
.cs-lede { margin: 1rem auto 0; max-width: 38rem; }
.cs-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem 2rem; margin: 1.6rem 0 0; }
.cs-facts div { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.cs-facts dt { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.cs-facts dd { margin: 0; font-weight: 700; }
.cs-facts-wide { flex-basis: 100%; }
.cs-facts-wide .pf-tags { justify-content: center; }
.cs-actions { justify-content: center; margin-top: 1.8rem; }

.cs-cover { position: relative; max-width: 66rem; margin: 0.5rem auto 0; padding: 0 1.5rem 0 6rem; }
.pf-browser--lg { border-radius: 1.3rem; box-shadow: 10px 10px 0 var(--tint); }
.pf-phone--lg { left: 1.5rem; bottom: -2rem; width: 19%; max-width: 13rem; border-radius: 1.6rem; padding: 0.4rem; box-shadow: 6px 6px 0 var(--gold); }
.pf-phone--lg img { border-radius: 1.25rem; }

.cs-content { max-width: 66rem; margin: 5rem auto 0; padding: 0 1.5rem; display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 2.5rem; align-items: start; }
.cs-body { max-width: 42rem; }
.cs-body > :first-child { margin-top: 0; }
.cs-features { position: sticky; top: calc(var(--nav-h) + 1.5rem); background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 1.3rem 1.3rem 1.1rem; box-shadow: 6px 6px 0 var(--tint); }
.cs-features h2 { font-size: 1.05rem; margin-bottom: 0.7rem; }
.cs-features ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.cs-features li { position: relative; padding-inline-start: 1.3rem; font-size: 0.95rem; }
.cs-features li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.65em; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--gold); }

.cs-sections { max-width: 66rem; margin: 3rem auto 0; padding: 0 1.5rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.2rem; }
.cs-section { background: var(--accent-soft); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.cs-section h2 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.cs-section .prose { font-size: 1rem; line-height: 2; }

.cs-gallery { max-width: 72rem; margin: 5rem auto 0; padding: 0 1.5rem; }
.cs-gallery .section-head { margin-bottom: 2rem; }
.cs-shots { display: grid; gap: 1.4rem; }
.cs-shots--desktop { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-shots--mobile { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); margin-top: 1.8rem; max-width: 52rem; margin-inline: auto; }
.cs-shot { display: block; padding: 0; border: 1.5px solid var(--ink); border-radius: 1rem; background: var(--paper); overflow: hidden; cursor: zoom-in; box-shadow: 6px 6px 0 var(--tint); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.cs-shot:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--accent); }
.cs-shot:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.cs-shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.cs-shot--mobile { border-radius: 1.4rem; padding: 0.3rem; background: var(--ink); }
.cs-shot--mobile img { aspect-ratio: 390 / 844; border-radius: 1.15rem; }

.cs-pager { max-width: 66rem; margin: 5rem auto 0; padding: 0 1.5rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.cs-pager-link { display: grid; grid-template-columns: 1fr 9rem; grid-template-rows: auto 1fr; gap: 0.2rem 1rem; align-items: center; padding: 1rem; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--paper); color: var(--ink); box-shadow: 5px 5px 0 var(--tint); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.cs-pager-link:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--accent); text-decoration: none; }
.cs-pager-label { grid-column: 1; align-self: end; font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.cs-pager-link strong { font-size: 1.15rem; grid-column: 1; align-self: start; }
.cs-pager-link img { grid-column: 2; grid-row: 1 / span 2; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 0.6rem; border: 1px solid var(--line); }
.cs-pager-link--next { text-align: left; }
.cs .pf-cta { margin-inline: 1.5rem; }
@media (min-width: 49.5rem) { .cs .pf-cta { margin-inline: auto; } }
.cs { padding-bottom: 5rem; }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 400; background: rgba(13, 20, 18, 0.94); display: grid; grid-template-columns: 4rem minmax(0, 1fr) 4rem; align-items: center; padding: 1.2rem; }
.lb[hidden] { display: none; }
.lb-figure { margin: 0; grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: 0.7rem; max-height: calc(100dvh - 2.4rem); }
.lb-figure img { max-width: 100%; max-height: calc(100dvh - 6rem); width: auto; height: auto; border-radius: 0.8rem; border: 1.5px solid rgba(255, 255, 255, 0.25); background: #fff; }
.lb.is-mobile .lb-figure img { border-radius: 1.4rem; border: 0.35rem solid #0b0f0e; }
.lb-figure figcaption { color: #F6F1E4; font-size: 0.9rem; text-align: center; }
.lb-nav, .lb-close { width: 3rem; height: 3rem; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.06); color: #fff; font-size: 1.2rem; cursor: pointer; display: grid; place-items: center; }
.lb-nav:hover, .lb-close:hover { background: var(--accent); border-color: var(--gold); }
.lb-prev { grid-column: 3; grid-row: 1; justify-self: center; }
.lb-next { grid-column: 1; grid-row: 1; justify-self: center; }
.lb-close { position: absolute; top: 1rem; left: 1rem; }
.lb-count { position: absolute; top: 1.6rem; right: 1.4rem; margin: 0; color: rgba(255, 255, 255, 0.8); font-size: 0.85rem; }
html.lb-lock, html.lb-lock body { overflow: hidden; }
html.lb-lock .chw, html.lb-lock .theme-chip { display: none; }

@media (max-width: 1000px) {
  .cs-content { grid-template-columns: 1fr; }
  .cs-features { position: static; }
}
@media (max-width: 800px) {
  .pf-archive { padding-inline: 1.25rem; }
  .pf-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .pf-card-link { box-shadow: 5px 5px 0 var(--tint); }
  .pf-card-media { padding: 1rem 1rem 1.2rem 2.8rem; }
  .pf-card-media .pf-phone { left: 0.7rem; width: 21%; border-radius: 0.8rem; padding: 0.2rem; }
  .pf-card-media .pf-phone img { border-radius: 0.6rem; }
  .pf-card-body h2 { font-size: 1.3rem; }
  .pf-filter { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.4rem; margin-inline: -1.25rem; padding-inline: 1.25rem; scrollbar-width: none; }
  .pf-filter::-webkit-scrollbar { display: none; }
  .pf-chip { flex: none; }
  .cs-hero { padding: 2.4rem 1.25rem 1.6rem; }
  .cs-facts { gap: 0.8rem 1.4rem; }
  .cs-cover { padding: 0 1.25rem 0 3.2rem; }
  .pf-browser--lg { box-shadow: 6px 6px 0 var(--tint); border-radius: 0.9rem; }
  .pf-phone--lg { left: 0.8rem; bottom: -1.4rem; width: 26%; border-radius: 1rem; padding: 0.25rem; box-shadow: 4px 4px 0 var(--gold); }
  .pf-phone--lg img { border-radius: 0.8rem; }
  .cs-content, .cs-sections, .cs-gallery, .cs-pager { padding-inline: 1.25rem; }
  .cs-content { margin-top: 3.6rem; gap: 1.6rem; }
  .cs-gallery { margin-top: 3.4rem; }
  .cs-shots--desktop { grid-template-columns: 1fr; gap: 1rem; }
  .cs-shots--mobile { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .cs-pager { grid-template-columns: 1fr; margin-top: 3.4rem; }
  .cs-pager-link { grid-template-columns: 1fr 7rem; }
  .cs-pager-link--next { text-align: right; }
  .cs .pf-cta { margin: 3.4rem 1.25rem 0; padding: 2rem 1.2rem; }
  .pf-cta { box-shadow: 5px 5px 0 var(--gold); }
  .lb { grid-template-columns: 1fr; grid-template-rows: 1fr auto; padding: 3.8rem 0.8rem 1rem; }
  .lb-figure { grid-column: 1; grid-row: 1; }
  .lb-figure img { max-height: calc(100dvh - 9.5rem); }
  .lb-prev, .lb-next { grid-row: 2; grid-column: 1; }
  .lb-prev { justify-self: start; margin-inline-start: 1rem; }
  .lb-next { justify-self: end; margin-inline-end: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .pf-card-link, .cs-shot, .cs-pager-link, .pf-phone { transition: none; } }
