/* VYNEX/public/portfolio.css — portfolio listing, project page, gallery and lightbox.
   Loaded after pro.css on portfolio.html and project-details.html. */

/* ---------- filters ---------- */
.filters { gap: 10px; margin-bottom: 40px; }
.filter-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; font-weight: 500; backdrop-filter: blur(8px); }
.filter-btn .count { font-size: .7rem; line-height: 1; padding: 3px 7px; border-radius: 999px; background: rgba(255,255,255,.08); color: inherit; opacity: .85; }
.filter-btn.active { box-shadow: 0 10px 26px -12px rgba(255,150,30,.7); }
.filter-btn.active .count { background: rgba(255,255,255,.22); opacity: 1; }

/* ---------- listing cards ---------- */
.pf-card { display: flex; flex-direction: column; border-radius: 20px; background: rgba(10,15,31,.55); }
.pf-card .project-thumb { aspect-ratio: 16 / 10; border-radius: 0; isolation: isolate; }
.pf-card .project-thumb img { transition: transform .8s cubic-bezier(.22,1,.36,1); }
.pf-card:hover .project-thumb img { transform: scale(1.07); }
.pf-card .project-thumb::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(5,7,15,.35) 0%, transparent 32%, transparent 55%, rgba(5,7,15,.82) 100%);
  opacity: .75; transition: opacity .4s;
}
.pf-card:hover .project-thumb::after { opacity: 1; }

.pf-cat {
  position: absolute; top: 14px; left: 14px; z-index: 3; margin: 0;
  background: rgba(5,7,15,.62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.16); color: #fff; font-size: .72rem; padding: 5px 12px; border-radius: 999px;
}
.pf-view {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 16px; border-radius: 12px; font-size: .86rem; font-weight: 600; color: #1a1200;
  background: var(--grad-warm, linear-gradient(135deg,#ffcd00,#ff8a00));
  transform: translateY(14px); opacity: 0; transition: transform .45s cubic-bezier(.22,1,.36,1), opacity .35s;
}
.pf-view svg { width: 18px; height: 18px; flex: none; }
.pf-card:hover .pf-view, .pf-card:focus-visible .pf-view { transform: none; opacity: 1; }

.pf-noimg { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.28); background:
  radial-gradient(circle at 30% 20%, rgba(47,107,255,.25), transparent 55%),
  radial-gradient(circle at 80% 90%, rgba(255,150,30,.2), transparent 50%), #0b1124; }
.pf-noimg svg { width: 44px; height: 44px; }

.pf-card .project-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 22px 24px 24px; }
.pf-card h3 { margin: 0; font-size: 1.18rem; line-height: 1.3; }
.pf-card .project-body p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.65; }
.pf-techs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.pf-techs span { font-family: var(--mono, ui-monospace, Menlo, Consolas, monospace); font-size: .7rem; padding: 4px 10px; border-radius: 8px; color: #c3cbe6; background: rgba(255,255,255,.05); border: 1px solid var(--line); }

/* touch devices have no hover — keep the call-to-action visible */
@media (hover: none) { .pf-view { transform: none; opacity: 1; } }

/* ---------- project page ---------- */
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; color: var(--muted); font-size: .92rem; transition: color .2s, gap .2s; }
.back-link:hover { color: var(--yellow, #ffcd00); gap: 12px; }

/* cover shown inside a browser window */
.detail-cover.browser { border-radius: 16px; background: #0b1124; border: 1px solid var(--line); box-shadow: 0 40px 80px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.02) inset; margin-bottom: 30px; }
.browser-bar { display: flex; align-items: center; gap: 14px; padding: 11px 16px; background: rgba(255,255,255,.04); border-bottom: 1px solid var(--line); }
.browser-bar .dots { display: flex; gap: 6px; flex: none; }
.browser-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.browser-bar .dots i:nth-child(2) { background: #febc2e; }
.browser-bar .dots i:nth-child(3) { background: #28c840; }
.browser-bar .url { flex: 1; min-width: 0; text-align: center; font-family: var(--mono, ui-monospace, Menlo, Consolas, monospace); font-size: .74rem; color: var(--muted); padding: 5px 12px; border-radius: 8px; background: rgba(0,0,0,.28); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-cover.browser .wm-wrap { aspect-ratio: 16 / 9; max-height: 480px; }

.detail-title { font-size: clamp(2rem, 4.5vw, 3.2rem); margin: 6px 0 22px; }
.detail-lead { font-size: 1.05rem; line-height: 1.85; }
.detail-h { display: flex; align-items: center; gap: 14px; margin: 2.4em 0 6px; font-size: 1.2rem; }
.detail-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.detail-h small { color: var(--muted); font-weight: 500; font-size: .8rem; font-family: var(--mono, ui-monospace, Menlo, Consolas, monospace); }

.side-box { background: rgba(10,15,31,.55); backdrop-filter: blur(12px); }
.side-box .btn { width: 100%; }
.side-box .btn svg { width: 17px; height: 17px; }
aside { position: sticky; top: 100px; }

/* ---------- gallery ---------- */
.gallery { grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 18px; }
.gallery .g-item { position: relative; grid-column: span 2; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #0b1124; cursor: zoom-in; padding: 0; font: inherit; color: inherit; text-align: left; transition: transform .4s cubic-bezier(.22,1,.36,1), border-color .3s, box-shadow .4s; }
.gallery .g-item.s3 { grid-column: span 3; }
.gallery .g-item.s6 { grid-column: span 6; }
.gallery .g-item .wm-wrap { aspect-ratio: 16 / 10; border: 0; border-radius: 0; cursor: inherit; }
.gallery .g-item.s6 .wm-wrap { aspect-ratio: 16 / 8; }
.gallery .g-item img { display: block; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; transition: transform .8s cubic-bezier(.22,1,.36,1); }
.gallery .g-item:hover { transform: translateY(-4px); border-color: rgba(255,190,40,.5); box-shadow: 0 24px 50px -24px rgba(0,0,0,.9); }
.gallery .g-item:hover img { transform: scale(1.05); }
.gallery .g-item:focus-visible { outline: 2px solid var(--yellow, #ffcd00); outline-offset: 3px; }
.g-zoom { position: absolute; right: 12px; bottom: 12px; z-index: 3; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: rgba(5,7,15,.7); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.2); opacity: 0; transform: scale(.85); transition: opacity .3s, transform .3s; }
.g-zoom svg { width: 18px; height: 18px; }
.gallery .g-item:hover .g-zoom, .gallery .g-item:focus-visible .g-zoom { opacity: 1; transform: none; }
@media (hover: none) { .g-zoom { opacity: 1; transform: none; } }

/* ---------- lightbox ---------- */
.lightbox { flex-direction: column; gap: 14px; padding: 64px 70px 40px; cursor: zoom-out; background: rgba(2,3,8,.94); backdrop-filter: blur(6px); }
.lightbox .lb-stage { display: grid; place-items: center; max-width: min(1200px, 100%); max-height: calc(100vh - 150px); cursor: default; animation: lbIn .35s cubic-bezier(.22,1,.36,1); }
.lightbox .lb-stage .wm-wrap { border-radius: 14px; box-shadow: 0 40px 100px -30px rgba(0,0,0,.9); max-width: 100%; max-height: calc(100vh - 150px); width: auto !important; }
.lightbox .lb-stage img { max-height: calc(100vh - 150px); max-width: 100%; width: auto; height: auto; margin: 0; display: block; }
.lb-btn { position: absolute; z-index: 5; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.07); color: #fff; cursor: pointer; transition: background .2s, transform .2s, border-color .2s; }
.lb-btn svg { width: 20px; height: 20px; }
.lb-btn:hover { background: var(--grad-warm, linear-gradient(135deg,#ffcd00,#ff8a00)); color: #1a1200; border-color: transparent; transform: scale(1.06); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; margin-top: -23px; }
.lb-next { right: 18px; top: 50%; margin-top: -23px; }
.lb-count { font-family: var(--mono, ui-monospace, Menlo, Consolas, monospace); font-size: .8rem; color: var(--muted); letter-spacing: .08em; cursor: default; }
.lb-caption { max-width: 700px; text-align: center; color: #c3cbe6; font-size: .92rem; cursor: default; }
@keyframes lbIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  aside { position: static; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 12px; }
  .gallery .g-item, .gallery .g-item.s3 { grid-column: span 1; }
  .gallery .g-item.s6 { grid-column: span 2; }
  .gallery .g-item.s6 .wm-wrap { aspect-ratio: 16 / 10; }
}
@media (max-width: 640px) {
  .lightbox { padding: 64px 14px 36px; }
  .lb-prev { left: 8px; top: auto; bottom: 20px; margin: 0; }
  .lb-next { right: 8px; top: auto; bottom: 20px; margin: 0; }
  .browser-bar .url { font-size: .68rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-card .project-thumb img, .gallery .g-item, .gallery .g-item img, .lightbox .lb-stage { transition: none; animation: none; }
}
