/* ============================================================
   PORTFOLIO — Adi Setyawan
   Project case study pages · project.css
   Loaded by: projects/promis.html · hayyu.html · nexhealth.html
   Depends on: style.css (must load first)
   ============================================================ */

/* ---- BACK BAR ---- */
.back-bar {
  border-bottom: 2px solid var(--line);
  padding: 12px 0;
}

.back-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .1s;
}

.back-link::before {
  content: "←";
  font-size: 14px;
}

.back-link:hover {
  color: var(--accent);
}

/* ---- PROJECT HERO ---- */
.proj-hero {
  padding: 64px 0 56px;
  border-bottom: 2px solid var(--line);
}

.proj-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mono-dim);
  letter-spacing: .1em;
  margin-bottom: 14px;
}

.proj-hero h1 {
  font-size: clamp(48px, 7vw, 90px);
  margin-bottom: 16px;
}

.proj-subtitle {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 56ch;
  margin-bottom: 28px;
}

/* ---- BADGES ---- */
.proj-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  color: var(--text-mono-dim);
}

.badge-internal {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.badge-live {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- SCREENSHOTS (legacy grid — fallback) ---- */
.screenshots-section {
  padding: 52px 0;
  border-bottom: 2px solid var(--line);
}

.ss-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mono-dim);
}

.ss-hint-global {
  font-size: 11px;
  opacity: .6;
}

/* ---- BENTO GRID ---- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 200px;
  gap: 3px;
  background: var(--line);
  border: 2px solid var(--line);
}

/* Bento slot positions */
.bg1  { grid-column: 1 / 3; grid-row: 1 / 3; }
.bg2  { grid-column: 3;     grid-row: 1;     }
.bg3  { grid-column: 3;     grid-row: 2;     }
.bg4  { grid-column: 1;     grid-row: 3;     }
.bg5  { grid-column: 2;     grid-row: 3 / 5; }
.bg6  { grid-column: 3;     grid-row: 3;     }
.bg7  { grid-column: 1;     grid-row: 4;     }
.bg8  { grid-column: 3;     grid-row: 4 / 6; }
.bg9  { grid-column: 1;     grid-row: 5;     }
.bg10 { grid-column: 2;     grid-row: 5;     }

/* Bento slot base */
.b-slot {
  position: relative;
  overflow: hidden;
  background: var(--bg-panel);
  cursor: pointer;
}

.b-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  display: block;
  transition: transform .4s ease;
}

.b-slot:hover img {
  transform: scale(1.04);
}

/* Placeholder (shown when no img) */
.b-slot:has(img) .b-ph {
  display: none;
}

.b-ph {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-panel);
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(236, 238, 240, .018) 0,
      rgba(236, 238, 240, .018) 1px,
      transparent 1px,
      transparent 32px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(236, 238, 240, .018) 0,
      rgba(236, 238, 240, .018) 1px,
      transparent 1px,
      transparent 32px
    );
}

.b-ph-icon {
  color: var(--line-strong);
  opacity: .1;
}

.b-ph-name {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-mono-dim);
  letter-spacing: .06em;
}

/* Hover overlay */
.b-hover {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: linear-gradient(to top, rgba(10, 11, 14, .85) 0%, transparent 55%);
  opacity: 0;
  transition: opacity .2s ease;
  display: flex;
  align-items: flex-end;
}

.b-slot:hover .b-hover {
  opacity: 1;
}

.b-hover-inner {
  padding: 12px 14px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.b-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
}

.b-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text);
}

/* Corner number tag */
.b-corner {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-mono-dim);
  background: rgba(10, 11, 14, .7);
  padding: 3px 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  opacity: .6;
  transition: opacity .2s;
}

.b-slot:hover .b-corner {
  opacity: 0;
}

/* Accent border on hover */
.b-slot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  border: 2px solid var(--accent);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}

.b-slot:hover::after {
  opacity: 1;
}

/* ---- LIGHTBOX ---- */
.proj-lb {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 11, 14, .97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.proj-lb.open {
  opacity: 1;
  pointer-events: all;
}

.lb2-wrap {
  max-width: min(900px, 90vw);
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb2-wrap img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.lb2-ph {
  width: min(580px, 80vw);
  height: min(380px, 55vh);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.lb2-ph svg {
  opacity: .08;
}

.lb2-ph-fname {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mono-dim);
}

.lb2-ph-note {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-mono-dim);
  opacity: .5;
  text-align: center;
  max-width: 38ch;
}

.lb2-meta {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 20px;
  white-space: nowrap;
}

.lb2-cnt { color: var(--accent); }
.lb2-ttl { color: var(--text-dim); }

.lb2-close {
  position: fixed;
  top: 22px;
  right: 24px;
  font-family: var(--font-mono);
  font-size: 22px;
  background: none;
  border: 2px solid var(--line);
  color: var(--text-dim);
  width: 42px;
  height: 42px;
  cursor: pointer;
  transition: border-color .1s, color .1s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.lb2-close:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.lb2-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 18px;
  background: none;
  border: 2px solid var(--line);
  color: var(--text-dim);
  width: 48px;
  height: 48px;
  cursor: pointer;
  transition: border-color .1s, color .1s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb2-nav:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lb2-nav:disabled {
  opacity: .2;
  cursor: not-allowed;
  border-color: var(--line);
}

.lb2-prev { left: 20px; }
.lb2-next { right: 20px; }

/* ---- DETAIL BODY ---- */
.proj-detail {
  padding: 60px 0;
  border-bottom: 2px solid var(--line);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 64px;
  align-items: start;
}

.detail-main h2 {
  font-size: 22px;
  margin-bottom: 14px;
  margin-top: 36px;
}

.detail-main h2:first-child {
  margin-top: 0;
}

.detail-main p {
  color: var(--text-dim);
  font-size: 15px;
  max-width: 58ch;
  margin-bottom: 12px;
}

.detail-main ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-main ul li {
  color: var(--text-dim);
  font-size: 15px;
  padding-left: 18px;
  position: relative;
}

.detail-main ul li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
  top: 3px;
}

/* ---- SIDEBAR ---- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 2px solid var(--line);
}

.sb-block {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.sb-block:last-child {
  border-bottom: none;
}

.sb-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--text-mono-dim);
  margin-bottom: 10px;
}

.sb-val {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
}

.sb-val-dim {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}

.sb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

/* ---- TECH CHIPS ---- */
.s-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid var(--line);
  padding: 6px 12px;
  color: var(--text);
  background: var(--bg-panel);
}

/* ---- LIVE DOT ---- */
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 6px;
  animation: blink 2s ease infinite;
}

/* ---- PROJECT NAV BAR ---- */
.proj-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.proj-nav-link {
  color: var(--text-dim);
  border: 2px solid var(--line);
  padding: 12px 18px;
  transition: border-color .1s, color .1s;
}

.proj-nav-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.proj-nav-link.right {
  text-align: right;
}

/* ---- FOOTER (project pages) ---- */
.footer-simple {
  border-top: 2px solid var(--line);
  padding: 20px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mono-dim);
  flex-wrap: wrap;
  gap: 8px;
}

/* ---- RESPONSIVE — PROJECT PAGES ---- */
@media (max-width: 900px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
  }

  .bg1, .bg2, .bg3, .bg4, .bg5,
  .bg6, .bg7, .bg8, .bg9, .bg10 {
    grid-column: auto;
    grid-row: auto;
  }

  .bg1 {
    grid-column: 1 / 3;
  }
}

@media (max-width: 640px) {
  .proj-nav-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 540px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 180px;
  }

  .bg1 {
    grid-column: 1;
  }

  .lb2-nav {
    display: none;
  }
}
