/* Teroka Portfolio — laman awam */
:root {
  --red: #ED1C24;
  --red-dark: #C5141B;
  --ink: #0f0f0f;
  --ink-2: #3a3a3a;
  --muted: #707070;
  --line: #ececec;
  --soft: #f6f6f5;
  --bg: #ffffff;
  --radius: 16px;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 500;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.bolt { display: inline-block; width: 16px; height: 26px; background: var(--red);
  clip-path: polygon(60% 0, 0 58%, 42% 58%, 30% 100%, 100% 40%, 58% 40%, 80% 0); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 14px; text-decoration: none; border: 0; cursor: pointer;
  transition: transform .15s ease, background .15s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2a2a2a; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-lg { padding: 15px 26px; font-size: 15px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.88);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.head-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.logo img { height: 40px; width: auto; display: block; }

/* Hero */
.hero { padding: 88px 24px 56px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-2); margin: 0 0 22px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.hero h1 { font-size: clamp(34px, 5.6vw, 66px); max-width: 17ch; }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-2); max-width: 58ch; margin: 22px 0 0; }

/* Filters */
.work { padding-bottom: 96px; scroll-margin-top: 80px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; text-decoration: none; font-size: 14px; color: var(--ink-2);
  transition: border-color .15s, background .15s, color .15s; }
.chip span { font-size: 12px; color: var(--muted); }
.chip:hover { border-color: #cfcfcf; color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.on span { color: rgba(255,255,255,.6); }

/* Grid & cards */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; grid-auto-flow: dense; }
.card { position: relative; display: flex; flex-direction: column; }
.card[hidden] { display: none !important; }
.card.featured { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.card.featured .card-body { padding: 0; }
.card.featured .summary { -webkit-line-clamp: 4; font-size: 15.5px; }
.card.featured .card-foot { margin-top: 22px; }
.card-media { aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--soft);
  border: 1px solid var(--line); }
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block;
  transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.card:hover .card-media img { transform: scale(1.035); }
.no-img { height: 100%; display: flex; align-items: center; justify-content: center; }
.no-img .bolt { width: 30px; height: 48px; opacity: .25; }
.card-body { padding: 16px 2px 0; display: flex; flex-direction: column; flex: 1; }
.card-top { display: flex; gap: 10px; align-items: center; font-size: 12.5px; margin-bottom: 8px; }
.cat { color: var(--red); text-decoration: none; font-weight: 700; }
.date { color: var(--muted); }
.card-top > * + *::before { content: '·'; margin-right: 10px; color: #c4c4c4; }
.card h2 { font-size: 20px; }
.card.featured h2 { font-size: 26px; }
.stretched { text-decoration: none; }
.stretched::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.card:hover h2 { color: var(--red); }
.client { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.summary { margin: 10px 0 0; color: var(--ink-2); font-size: 14.5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; font-size: 13.5px; }
.more { font-weight: 700; }
.more span { display: inline-block; transition: transform .2s; }
.card:hover .more span { transform: translateX(4px); }
.ext { position: relative; z-index: 2; text-decoration: none; color: var(--ink-2); padding: 5px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; max-width: 60%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ext:hover { border-color: var(--red); color: var(--red); }
.empty-state, .no-match { padding: 60px 20px; text-align: center; color: var(--muted); background: var(--soft); border-radius: var(--radius); }

/* CTA */
.cta { background: var(--ink); color: #fff; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 72px 24px; }
.cta h2 { font-size: clamp(26px, 3.4vw, 40px); max-width: 20ch; }
.cta p { color: #bdbdbd; margin: 12px 0 0; max-width: 52ch; }

/* Footer */
.site-foot { border-top: 1px solid #1f1f1f; background: var(--ink); color: #8a8a8a; font-size: 13px; }
.foot-inner { display: flex; justify-content: space-between; padding: 22px 24px; }
.foot-admin { color: #555; text-decoration: none; }
.foot-admin:hover { color: #aaa; }

/* Project page */
.project .container { padding-top: 32px; }
.back { display: inline-block; font-size: 14px; color: var(--muted); text-decoration: none; margin-bottom: 28px; }
.back:hover { color: var(--ink); }
.p-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.p-head h1 { font-size: clamp(30px, 4.6vw, 54px); max-width: 20ch; }
.p-head .client { font-size: 15px; margin-top: 12px; }
.p-head .client strong { color: var(--ink); }
.p-head .lead { margin-top: 16px; }
.p-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.host { font-size: 13px; color: var(--muted); }

.gallery { display: grid; gap: 28px; margin: 40px 0; }
.shot { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--soft); }
.shot img { display: block; width: 100%; height: auto; }
.shot a { display: block; cursor: zoom-in; }
.shot.tall { max-height: min(82vh, 900px); overflow-y: auto; overscroll-behavior: contain; }
.scroll-hint { position: sticky; bottom: 12px; left: 0; display: block; width: max-content; margin: -44px auto 12px;
  background: rgba(15,15,15,.82); color: #fff; font-size: 12px; padding: 6px 12px; border-radius: 999px; pointer-events: none; }

.p-desc { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; padding: 40px 0; border-top: 1px solid var(--line); }
.p-desc h2 { font-size: 20px; }
.prose { color: var(--ink-2); font-size: 16.5px; max-width: 68ch; }

.p-nav { display: flex; justify-content: space-between; gap: 16px; padding: 32px 0 80px; border-top: 1px solid var(--line); }
.p-nav a { text-decoration: none; font-weight: 700; font-size: 17px; max-width: 45%; }
.p-nav a:hover { color: var(--red); }
.p-nav small { display: block; font-weight: 500; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.p-nav .next { text-align: right; margin-left: auto; }
.notfound { padding: 120px 24px; }
.notfound .btn { margin-top: 28px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10,10,10,.94); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lb-stage { width: 100%; height: 100%; overflow: auto; display: flex; justify-content: center; align-items: flex-start; padding: 60px 70px; }
.lb-stage img { max-width: min(1400px, 100%); height: auto; margin: auto; border-radius: 6px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; cursor: pointer;
  width: 46px; height: 46px; border-radius: 50%; font-size: 28px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.lightbox button:hover { background: rgba(255,255,255,.22); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }

@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-desc { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .head-inner { height: 60px; }
  .logo img { height: 32px; }
  .site-head .btn span { display: none; }
  .site-head .btn { padding: 10px; }
  .hero { padding: 52px 16px 36px; }
  .grid { grid-template-columns: 1fr; gap: 32px; }
  .card.featured { grid-column: auto; display: flex; gap: 0; }
  .card.featured .card-body { padding: 16px 2px 0; }
  .card.featured h2 { font-size: 22px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 22px; padding: 0 16px 4px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; }
  .cta-inner { flex-direction: column; align-items: flex-start; padding: 56px 16px; }
  .foot-inner { padding: 20px 16px; }
  .p-head { grid-template-columns: 1fr; gap: 20px; }
  .p-actions { align-items: flex-start; }
  .gallery { gap: 16px; margin: 28px 0; }
  .shot, .card-media { border-radius: 12px; }
  .lb-stage { padding: 60px 8px; }
  .lb-prev, .lb-next { top: auto !important; bottom: 14px; transform: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
