/* =======================================================
   PORTFOLIO — halaman Portfolio (gabungan arsip): search, filter client,
   filter kategori, grid kartu, dan modal detail project (.pd-*).
   Dirender oleh assets/js/portfolio.js.
   ============================================================ */

/* ---------- Search ---------- */
.pf-search {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 999px; padding: 0 22px; height: 52px;
  margin-bottom: 36px; color: var(--gray-400); background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.pf-search:focus-within { border-color: var(--purple-600); box-shadow: 0 0 0 4px rgba(124,58,237,.08); }
.pf-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 500 15px 'Inter', sans-serif; color: var(--ink); }

/* ---------- Layout ---------- */
.pf-body { display: grid; grid-template-columns: 230px 1fr; gap: 44px; align-items: start; }
.pf-filter { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 22px; }
.pf-client { display: flex; flex-direction: column; gap: 8px; }
.pf-client span, .pf-count { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--gray-400); }
.pf-client select {
  appearance: none; -webkit-appearance: none; width: 100%;
  padding: 11px 38px 11px 14px; border-radius: 12px; border: 1px solid var(--line);
  font: 500 14px 'Inter', sans-serif; color: var(--ink); cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%237b2fb5' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.pf-client select:focus { outline: none; border-color: var(--purple-600); }
.pf-cats { display: flex; flex-direction: column; gap: 2px; }
.pf-cat {
  text-align: left; padding: 10px 14px; border-radius: 10px;
  font-size: 14.5px; font-weight: 500; color: var(--gray-500);
  transition: background .15s ease, color .15s ease;
}
.pf-cat:hover { background: var(--lav-50); color: var(--ink); }
.pf-cat.active { background: var(--lav-100); color: var(--purple-700); font-weight: 600; }
.pf-count { margin-bottom: 16px; }

/* ---------- Grid ---------- */
.pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 22px; }
.pf-card { display: flex; flex-direction: column; gap: 14px; }
.pf-thumb { aspect-ratio: 16/10; border-radius: var(--radius-lg); overflow: hidden; background: var(--lav-100); }
.pf-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.pf-card:hover .pf-thumb img { transform: scale(1.04); }
.pf-meta h3 { font-size: 18px; font-weight: 600; letter-spacing: -.3px; line-height: 1.3; }
.pf-meta p { margin-top: 4px; font-size: 14px; color: var(--gray-400); }

/* ---------- Modal ---------- */
body.modal-open { overflow: hidden; }
.pd-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,15,18,.45); backdrop-filter: blur(6px);
  display: flex; justify-content: center; align-items: flex-start;
  padding: max(24px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px));
  overflow-y: auto;
}
.pd-modal {
  width: min(1080px, 100%); background: #fff; border-radius: var(--radius-xl);
  overflow: hidden; animation: pdIn .35s cubic-bezier(.2,.7,.2,1);
}
@keyframes pdIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.pd-bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px 14px 28px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14px;
}
.pd-close { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--lav-100); color: var(--ink); flex-shrink: 0; }
.pd-close:hover { background: var(--ink); color: #fff; }
.pd-body > * { padding-left: 48px; padding-right: 48px; }

/* ---------- Detail project ---------- */
.pd-overview { background: var(--lav-50); padding-top: 44px; padding-bottom: 48px; }
.pd-headline { margin: 14px 0 34px; font-size: 34px; font-weight: 800; letter-spacing: -1px; line-height: 1.18; max-width: 820px; text-wrap: balance; }
.pd-ov-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; }
.pd-stats { display: flex; flex-direction: column; gap: 10px; }
.pd-stat { background: #fff; border-radius: var(--radius-md); padding: 18px 22px; display: flex; flex-direction: column; gap: 2px; }
.pd-stat strong { font-family: 'Geist', sans-serif; font-size: 19px; font-weight: 600; }
.pd-stat span { font-size: 13px; color: var(--gray-400); }
.pd-quote { background: #fff; border-radius: var(--radius-md); padding: 26px; display: flex; flex-direction: column; gap: 22px; justify-content: space-between; }
.pd-logo { max-width: 120px; max-height: 48px; object-fit: contain; object-position: left; }
.pd-quote blockquote { font-family: 'Geist', sans-serif; font-style: italic; font-size: 16px; line-height: 1.5; color: var(--ink-soft); }
.pd-quote figcaption { display: flex; align-items: center; gap: 12px; }
.pd-quote figcaption b { display: block; font-size: 14px; }
.pd-quote figcaption small { display: block; font-size: 12.5px; color: var(--gray-400); }
.pd-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--purple-grad); color: #fff; font-size: 13px; font-weight: 700; flex-shrink: 0; }
img.pd-avatar { object-fit: cover; background: var(--lav-100); }
.pd-hero { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; padding: 0 !important; }
.pd-about, .pd-cs { display: grid; grid-template-columns: .7fr 1.3fr; gap: 40px; padding-top: 56px; padding-bottom: 56px; }
.pd-text { font-size: 16px; line-height: 1.7; color: var(--ink-soft); }
.pd-rows { margin-top: 24px; }
.pd-rows div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pd-rows dt { font-size: 14px; font-weight: 600; color: var(--gray-400); }
.pd-rows dd { font-size: 15px; }
.pd-gallery { display: flex; flex-direction: column; gap: 18px; padding-bottom: 24px; }
.pd-gallery .eyebrow { text-align: center; margin-bottom: 6px; }
.pd-gallery img { width: 100%; border-radius: var(--radius-md); }
.pd-cs { border-top: 1px solid var(--line); }
.pd-solutions { margin-top: 12px; }
.pd-solutions details { border-bottom: 1px solid var(--line); }
.pd-solutions details:first-child { border-top: 1px solid var(--line); }
.pd-solutions summary { display: flex; gap: 18px; align-items: center; padding: 20px 0; cursor: pointer; list-style: none; font-weight: 700; font-size: 16px; }
.pd-solutions summary::-webkit-details-marker { display: none; }
.pd-num { font-family: 'Geist', sans-serif; font-weight: 800; font-size: 18px; color: var(--gray-300); width: 30px; }
.pd-solutions details[open] .pd-num { color: var(--purple-600); }
.pd-solutions details p { padding: 0 0 22px 48px; font-size: 15.5px; line-height: 1.65; color: var(--gray-500); }

@media (max-width: 980px) {
  .pf-body { grid-template-columns: 1fr; gap: 24px; }
  .pf-filter { position: static; }
  .pf-cats { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .pf-cat { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 13.5px; }
  .pf-client { max-width: 320px; }
  .pd-body > * { padding-left: 28px; padding-right: 28px; }
  .pd-ov-grid, .pd-about, .pd-cs { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 640px) {
  .pf-grid { grid-template-columns: 1fr; gap: 28px; }
  .pf-client { max-width: none; }
  .pd-overlay { padding: max(10px, env(safe-area-inset-top, 0px)) 8px 10px; }
  .pd-modal { border-radius: 20px; }
  .pd-body > * { padding-left: 18px; padding-right: 18px; }
  .pd-headline { font-size: 24px; }
  .pd-rows div { grid-template-columns: 1fr; gap: 4px; }
  .pd-solutions details p { padding-left: 0; }
}
