/* ════════════════════════════════════════════════
   project-detail.css — shared styles for all
   portfolio project detail pages
════════════════════════════════════════════════ */

/* ── Layout & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--body); background: var(--linen); color: var(--ink); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 40px; }
::-webkit-scrollbar { width: 2px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: var(--arc); }

/* ── Custom cursor ── */
#cd { width: 5px; height: 5px; background: var(--arc); border-radius: 50%; position: fixed; pointer-events: none; z-index: 9999; transform: translate(-50%,-50%); box-shadow: 0 0 6px var(--arc); }
#cr { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0,229,255,0.4); position: fixed; pointer-events: none; z-index: 9998; transform: translate(-50%,-50%); transition: width .28s var(--ease), height .28s var(--ease); }
#cr.big { width: 44px; height: 44px; border-color: rgba(0,229,255,0.7); }
@media (hover: none), (pointer: coarse) { #cd, #cr { display: none !important; } }

/* ── Textures ── */
.techgrid { position: absolute; inset: 0; pointer-events: none; z-index: 0; background-image: linear-gradient(rgba(0,229,255,0.04) 1px,transparent 1px), linear-gradient(90deg,rgba(0,229,255,0.04) 1px,transparent 1px); background-size: 48px 48px; }
.scanlines::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1; background: repeating-linear-gradient(0deg,transparent,transparent 2px,rgba(0,0,0,.07) 2px,rgba(0,0,0,.07) 4px); }
.dotgrid { position: absolute; inset: 0; pointer-events: none; z-index: 0; background-image: radial-gradient(circle,rgba(0,229,255,0.055) 1px,transparent 1px); background-size: 28px 28px; }
.coord { font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.09em; color: var(--arc-txt); opacity: 0.38; position: absolute; pointer-events: none; user-select: none; z-index: 3; }

/* ── Reveal ── */
.rv  { opacity: 0; transform: translateY(16px);  transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rvl { opacity: 0; transform: translateX(-16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rvr { opacity: 0; transform: translateX(16px);  transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rv.in, .rvl.in, .rvr.in { opacity: 1; transform: none; }

/* ── Page Hero ── */
.page-hero { background: var(--void); padding: calc(var(--nav-h) + 52px) 0 56px; position: relative; overflow: hidden; }
.ph-breadcrumb { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,.28); display: flex; align-items: center; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.ph-breadcrumb a { transition: color .2s; }
.ph-breadcrumb a:hover { color: var(--arc-txt); }
.ph-breadcrumb .sep { color: rgba(255,255,255,.15); }
.ph-breadcrumb .cur { color: var(--arc-txt); }
.ph-eye { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--arc-txt); display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ph-eye .dash { width: 22px; height: 1px; background: var(--arc); box-shadow: 0 0 5px var(--arc); }
.ph-title { font-family: var(--display); font-size: clamp(2.2rem,5vw,3.8rem); font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; color: rgba(255,255,255,.9); }
.ph-title i { font-style: italic; }
.ph-rule { display: block; height: 1.5px; margin-top: 18px; background: linear-gradient(to right, var(--arc) 0%, rgba(0,229,255,.1) 45%, transparent 100%); box-shadow: 0 0 10px rgba(0,229,255,.22); }

/* ── Project Content ── */
.proj-content { background: var(--paper); padding: 80px 0; position: relative; overflow: hidden; border-top: 1px solid var(--rule); }
.proj-layout { display: grid; grid-template-columns: 1fr 340px; gap: 64px; align-items: start; position: relative; z-index: 1; }

/* ── Gallery ── */
.gallery { display: grid; grid-template-columns: 1fr 88px; gap: 6px; }
.gallery-main { overflow: hidden; border: 1px solid var(--rule); position: relative; cursor: zoom-in; }
.gallery-main img { width: 100%; height: 300px; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.gallery-main:hover img { transform: scale(1.02); }
.gallery-main::before { content: ''; position: absolute; top: 0; left: 0; width: 12px; height: 12px; border-top: 1.5px solid rgba(0,229,255,0); border-left: 1.5px solid rgba(0,229,255,0); z-index: 2; transition: border-color .28s; }
.gallery-main:hover::before { border-color: var(--arc); }
.gallery-zoom-hint { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.55); color: var(--arc); font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.1em; padding: 3px 7px; border: 1px solid rgba(0,229,255,.25); border-radius: 2px; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 3; }
.gallery-main:hover .gallery-zoom-hint { opacity: 1; }
.gallery-thumbs { display: flex; flex-direction: column; gap: 6px; }
.gallery-thumbs img { width: 88px; height: 60px; object-fit: cover; border: 1px solid var(--rule); cursor: pointer; opacity: .55; transition: opacity .2s, border-color .2s; filter: grayscale(30%); }
.gallery-thumbs img.active,
.gallery-thumbs img:hover { opacity: 1; border-color: var(--arc); filter: grayscale(0%); }

/* ── Lightbox ── */
#lightbox { display: none; position: fixed; inset: 0; z-index: 9000; background: rgba(7,7,14,.92); backdrop-filter: blur(6px); align-items: center; justify-content: center; cursor: zoom-out; }
#lightbox.open { display: flex; }
#lightbox img { max-width: 90vw; max-height: 88vh; object-fit: contain; border: 1px solid var(--wire-2); box-shadow: 0 0 60px rgba(0,0,0,.6); }
#lb-close { position: fixed; top: 20px; right: 24px; background: none; border: 1px solid var(--wire-2); color: rgba(255,255,255,.5); width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: .8rem; border-radius: 2px; transition: all .2s; z-index: 9001; }
#lb-close:hover { border-color: var(--arc); color: var(--arc); }

/* ── Sidebar ── */
.proj-sidebar { display: flex; flex-direction: column; gap: 20px; }
.info-block { border: 1px solid var(--rule); overflow: hidden; }
.info-head { padding: 10px 16px; background: var(--linen); border-bottom: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; }
.info-head-title { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.info-head-dots { display: flex; gap: 4px; }
.info-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--rule); }
.info-dot:last-child { background: var(--arc); box-shadow: 0 0 4px var(--arc); }
.info-row { display: flex; border-bottom: 1px solid var(--rule); transition: background .2s; }
.info-row:last-child { border-bottom: none; }
.info-row:hover { background: var(--linen); }
.info-k { font-family: var(--mono); font-size: 0.54rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-4); padding: 11px 14px; border-right: 1px solid var(--rule); min-width: 100px; display: flex; align-items: center; }
.info-v { font-size: 0.84rem; color: var(--ink-2); font-weight: 500; padding: 11px 14px; display: flex; align-items: center; }
.info-v a { color: var(--arc-txt); transition: color .2s; }
.info-v a:hover { color: var(--arc); }

/* ── Stack chips ── */
.stack-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px; }
.chip { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.04em; padding: 5px 11px; border: 1px solid var(--rule); border-radius: 2px; color: var(--ink-2); background: var(--linen); transition: all .2s var(--ease); cursor: default; }
.chip i, .chip .ic { color: var(--arc); margin-right: 5px; }
.chip:hover { border-color: var(--arc); color: var(--ink); box-shadow: 0 2px 10px var(--arc-dim); transform: translateY(-1px); }

/* ── Private note (used on closed-source projects) ── */
.private-note { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 13px; background: var(--void-2); color: rgba(255,255,255,.35); font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; border: 1px solid var(--wire); width: 100%; }

/* ── Live button ── */
.live-btn { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 13px; background: var(--ink); color: var(--linen); font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; border: none; cursor: pointer; transition: all .24s var(--ease); width: 100%; }
.live-btn:hover { background: var(--arc); color: var(--void); box-shadow: 0 0 22px var(--arc-glo); }

/* ── Description ── */
.desc-eye { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--arc-txt); display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.desc-eye .dash { width: 18px; height: 1px; background: var(--arc); box-shadow: 0 0 4px var(--arc); }
.desc-title { font-family: var(--display); font-size: 1.6rem; font-weight: 400; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 16px; line-height: 1.1; }
.desc-title i { font-style: italic; }
.desc-p { font-size: 0.92rem; color: var(--ink-3); line-height: 1.82; font-weight: 300; margin-bottom: 24px; }

/* ── Feature list ── */
.feat-label { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.feat-label::after { content: ''; flex: 1; height: 1px; background: var(--rule); }
.feat-list { display: flex; flex-direction: column; gap: 2px; }
.feat-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--rule); background: var(--paper); transition: all .22s var(--ease); position: relative; overflow: hidden; }
.feat-item::before { content: ''; position: absolute; left: 0; top: 0; width: 2px; height: 0; background: var(--arc); transition: height .28s var(--ease); }
.feat-item:hover { background: var(--linen); border-color: rgba(0,229,255,.2); }
.feat-item:hover::before { height: 100%; }
.feat-icon { width: 26px; height: 26px; background: var(--arc-dim); border: 1px solid rgba(0,229,255,.15); border-radius: 2px; display: flex; align-items: center; justify-content: center; color: var(--arc); font-size: 0.7rem; flex-shrink: 0; }
.feat-text { font-size: 0.84rem; color: var(--ink-2); line-height: 1.55; font-weight: 400; padding-top: 2px; }

/* ── Project nav bar ── */
.proj-nav-bar { background: var(--void); border-top: 1px solid var(--wire); padding: 28px 0; position: relative; overflow: hidden; }
.proj-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; position: relative; z-index: 2; }
.pnav-btn { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,.35); transition: color .2s; }
.pnav-btn:hover { color: var(--arc-txt); }
.pnav-btn .arrow { width: 28px; height: 28px; border: 1px solid var(--wire-2); border-radius: 2px; display: flex; align-items: center; justify-content: center; color: var(--arc); font-size: 0.7rem; transition: all .22s; flex-shrink: 0; }
.pnav-btn:hover .arrow { border-color: var(--arc); box-shadow: 0 0 10px var(--arc-dim); }
.pnav-home { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,.35); padding: 8px 14px; border: 1px solid var(--wire); border-radius: 2px; transition: all .22s; }
.pnav-home:hover { color: var(--arc-txt); border-color: rgba(0,229,255,.3); }

/* ── Footer ── */
footer { background: var(--void); border-top: 1px solid var(--wire); padding: 20px 0; }
.ft-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.ft-brand { font-family: var(--display); font-size: .95rem; font-weight: 400; color: rgba(255,255,255,.78); }
.ft-copy { font-family: var(--mono); font-size: .56rem; letter-spacing: .08em; color: rgba(255,255,255,.62); }
.ft-links { display: flex; gap: 16px; }
.ft-links a { font-family: var(--mono); font-size: .56rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.7); transition: color .2s; }
.ft-links a:hover { color: var(--arc); }

/* ── Scroll to top ── */
#stb { position: fixed; bottom: 20px; right: 20px; width: 34px; height: 34px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink-3); font-size: .74rem; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 2px; opacity: 0; transform: translateY(8px); transition: all .28s var(--ease); z-index: 400; }
#stb.on { opacity: 1; transform: none; }
#stb:hover { border-color: var(--arc); color: var(--arc); box-shadow: 0 0 10px var(--arc-dim); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .proj-layout { grid-template-columns: 1fr; }
  .proj-sidebar { order: -1; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 22px; }
  .nav-links { display: none; }
  .burger { display: flex; }
  .proj-nav-inner { flex-direction: column; text-align: center; }
  .coord { display: none; }
  .gallery { grid-template-columns: 1fr; }
  .gallery-thumbs { flex-direction: row; }
  .gallery-thumbs img { width: auto; flex: 1; height: 52px; }
  .gallery-main img { height: 200px; }
}
