/* ═══════════════════════════════════════════════
   PROJECT PAGE · project.css
═══════════════════════════════════════════════ */

/* ── BACK BUTTON ──────────────────────────────── */
.back-wrap {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 88px 36px 0;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--f-mono);
  color: var(--t2);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--g-border);
  background: var(--g-bg);
  backdrop-filter: blur(12px);
  transition: color .2s, border-color .2s, transform .2s;
}
.back-btn:hover {
  color: var(--t1);
  border-color: var(--g-border2);
  transform: translateX(-3px);
}

/* ── HERO ─────────────────────────────────────── */
.proj-hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 36px 72px;
  position: relative;
  z-index: 1;
}
.proj-hero-inner { max-width: 780px; }

.proj-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.proj-category {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--violet);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.proj-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.badge-year, .badge-team, .badge-uni {
  font-family: var(--f-mono);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--g-border);
  color: var(--t3);
}

.proj-title {
  font-family: var(--f-display);
  font-size: clamp(56px, 10vw, 112px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: .9;
  margin-bottom: 24px;
  color: var(--t1);
}
.proj-title span {
  background: linear-gradient(120deg, var(--blue) 0%, var(--violet) 50%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.proj-tagline {
  font-size: 17px;
  color: var(--t2);
  line-height: 1.75;
  max-width: 600px;
  margin-bottom: 36px;
}

.proj-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* stats */
.proj-stats {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  padding: 24px 28px;
  background: var(--g-bg);
  border: 1px solid var(--g-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  width: fit-content;
  position: relative;
  overflow: hidden;
}
.proj-stats::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--g-shine), transparent);
}
.ps { text-align: center; padding: 0 28px; }
.ps-n {
  font-family: var(--f-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--t1);
  margin-bottom: 3px;
}
.ps-l {
  font-size: 11px;
  color: var(--t3);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.ps-sep {
  width: 1px;
  height: 32px;
  background: var(--g-border);
  flex-shrink: 0;
}

/* ── GALLERY ──────────────────────────────────── */
.gallery-section {
  position: relative;
  z-index: 1;
  padding: 0 0 80px;
}
.gallery-grid {
  max-width: 1120px;
  margin: 32px auto 0;
  padding: 0 36px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 12px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--g-border);
  aspect-ratio: 16/9;
  background: rgba(255,255,255,0.03);
  transition: border-color .25s, transform .25s, box-shadow .25s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.gallery-item:hover {
  border-color: rgba(79,142,247,0.4);
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.gallery-main {
  grid-column: span 1;
  aspect-ratio: 16/9;
}
.gallery-wide {
  grid-column: span 1;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s cubic-bezier(.4,0,.2,1);
  display: block;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6,9,20,.9) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 16px;
  opacity: 0;
  transition: opacity .3s;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay span {
  font-size: 13px;
  font-weight: 500;
  color: var(--t1);
}
.gallery-overlay svg { color: var(--t2); flex-shrink: 0; }

/* ── LIGHTBOX ─────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.lightbox.open {
  opacity: 1;
  pointer-events: all;
}
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  border: 1px solid var(--g-border);
  box-shadow: 0 32px 80px rgba(0,0,0,.6);
  object-fit: contain;
  transition: transform .3s ease;
}
.lightbox.open img {
  transform: scale(1);
}
.lb-close {
  position: absolute;
  top: 24px; right: 28px;
  background: var(--g-bg2);
  border: 1px solid var(--g-border);
  color: var(--t2);
  font-size: 18px;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  display: flex; align-items: center; justify-content: center;
}
.lb-close:hover { color: var(--t1); border-color: var(--g-border2); }
.lb-prev, .lb-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: var(--g-bg2);
  border: 1px solid var(--g-border);
  color: var(--t1);
  font-size: 28px;
  width: 48px; height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.lb-prev { left: 24px; }
.lb-next { right: 24px; }
.lb-prev:hover, .lb-next:hover {
  background: rgba(255,255,255,.1);
  border-color: var(--g-border2);
}
.lb-caption {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: var(--t2);
  font-family: var(--f-mono);
  background: var(--g-bg2);
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--g-border);
  white-space: nowrap;
}

/* ── SHARED SECTION STYLES ────────────────────── */
.section-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 36px;
  position: relative;
  z-index: 1;
}
.content-section { padding-top: 80px; padding-bottom: 40px; }

.section-label {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--violet);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}
.section-h2 {
  font-family: var(--f-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
  margin-bottom: 40px;
}
.grad {
  background: linear-gradient(120deg, var(--blue), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.body-text {
  font-size: 15.5px;
  color: var(--t2);
  line-height: 1.85;
  margin-bottom: 16px;
  max-width: 540px;
}
.body-text em { color: var(--t1); font-style: normal; }

/* ── TWO COL ──────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

/* ── FEATURE LIST ─────────────────────────────── */
.feature-list { display: flex; flex-direction: column; gap: 16px; }
.feat-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--g-bg);
  border: 1px solid var(--g-border);
  transition: border-color .2s;
}
.feat-item:hover { border-color: rgba(79,142,247,.3); }
.feat-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.feat-title { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.feat-desc { font-size: 13px; color: var(--t2); line-height: 1.5; }

/* ── TECH GRID ────────────────────────────────── */
.tech-section {
  position: relative; z-index: 1;
  padding: 80px 0 40px;
  background: linear-gradient(110deg,
    rgba(79,142,247,0.04) 0%,
    rgba(6,9,20,0) 50%,
    rgba(139,92,246,0.04) 100%);
  border-top: 1px solid var(--g-border);
  border-bottom: 1px solid var(--g-border);
  margin: 40px 0;
}
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.tech-card {
  padding: 22px 20px;
  background: var(--g-bg);
  border: 1px solid var(--g-border);
  border-radius: var(--radius-md);
  transition: border-color .25s, transform .25s;
  position: relative;
  overflow: hidden;
}
.tech-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--g-shine), transparent);
}
.tech-card:hover {
  border-color: rgba(79,142,247,.3);
  transform: translateY(-3px);
}
.tech-card-icon { font-size: 22px; margin-bottom: 10px; }
.tech-card-name {
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--t1);
  margin-bottom: 8px;
}
.tech-card-desc { font-size: 13px; color: var(--t2); line-height: 1.6; }

/* ── ARCHITECTURE CARDS ───────────────────────── */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.arch-card {
  padding: 24px;
  background: var(--g-bg);
  border: 1px solid var(--g-border);
  border-radius: var(--radius-md);
  transition: border-color .25s;
}
.arch-card:hover { border-color: rgba(79,142,247,.3); }
.arch-num {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--blue);
  letter-spacing: .1em;
  margin-bottom: 8px;
}
.arch-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--t1);
}
.arch-desc {
  font-size: 13.5px;
  color: var(--t2);
  line-height: 1.7;
  margin-bottom: 14px;
}

/* ── CODE BLOCK ───────────────────────────────── */
.code-block {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
}
.code-block pre {
  font-family: var(--f-mono);
  font-size: 12px;
  color: rgba(34,211,238,.85);
  line-height: 1.65;
  margin: 0;
  white-space: pre;
}
code {
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--cyan);
  background: rgba(34,211,238,.08);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ── CONTROLS ─────────────────────────────────── */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.ctrl {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--g-bg);
  border: 1px solid var(--g-border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--t2);
}
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.15);
  border-bottom: 2px solid rgba(255,255,255,.08);
  border-radius: 5px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--t1);
  white-space: nowrap;
  flex-shrink: 0;
}
.ctrl-arrow { grid-column: span 1; }
.arrows {
  display: grid;
  grid-template-columns: repeat(3, 28px);
  gap: 3px;
  flex-shrink: 0;
}
.arrows span { display: block; }

/* ── BUILD STEPS ──────────────────────────────── */
.build-steps {
  background: var(--g-bg);
  border: 1px solid var(--g-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.build-req {
  padding: 20px 24px;
  border-bottom: 1px solid var(--g-border);
}
.req-title {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--t3);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.req-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.req-pill {
  font-size: 12.5px;
  font-family: var(--f-mono);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(79,142,247,.08);
  border: 1px solid rgba(79,142,247,.2);
  color: var(--accent, var(--blue));
}
.step-list { padding: 8px 0; }
.step {
  display: flex;
  gap: 20px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--g-border);
}
.step:last-child { border-bottom: none; }
.step-n {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(79,142,247,.12);
  border: 1px solid rgba(79,142,247,.25);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--blue);
  flex-shrink: 0;
  margin-top: 2px;
}
.step-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--t1);
}
.step-content { flex: 1; }
.step .code-block { margin-top: 0; }

/* ── TEAM ─────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.team-card {
  padding: 28px 24px;
  background: var(--g-bg);
  border: 1px solid var(--g-border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: border-color .25s, transform .25s;
  position: relative;
  overflow: hidden;
}
.team-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--g-shine), transparent);
}
.team-card:hover {
  border-color: rgba(79,142,247,.3);
  transform: translateY(-3px);
}
.team-card.me { border-color: rgba(79,142,247,.25); }
.team-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display);
  font-size: 18px; font-weight: 800; color: #fff;
  margin: 0 auto 14px;
}
.team-card.me .team-avatar { box-shadow: 0 4px 20px rgba(79,142,247,.35); }
.team-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.team-role { font-size: 12.5px; color: var(--t3); margin-bottom: 12px; }
.team-gh {
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--blue);
  text-decoration: none;
}
.team-gh:hover { color: var(--cyan); }

/* ── PROJ NAV ROW ─────────────────────────────── */
.proj-nav-row {
  padding-top: 40px;
  padding-bottom: 80px;
  display: flex;
  justify-content: flex-start;
}
.proj-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--f-mono);
  color: var(--t2);
  text-decoration: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--g-border);
  background: var(--g-bg);
  backdrop-filter: blur(12px);
  transition: color .2s, border-color .2s;
}
.proj-nav-btn:hover { color: var(--t1); border-color: var(--g-border2); }

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 900px) {
  .back-wrap, .proj-hero { padding-left: 20px; padding-right: 20px; }
  .gallery-grid { padding: 0 20px; grid-template-columns: 1fr 1fr; gap: 16px; }
  .gallery-main, .gallery-wide { grid-column: span 1; }
  .gallery-item { aspect-ratio: 16/10; } /* Slightly taller for tablets */
  .two-col { grid-template-columns: 1fr; gap: 40px; }
  .proj-stats { flex-wrap: wrap; justify-content: center; }
  .section-wrap { padding-left: 20px; padding-right: 20px; }
  .arch-grid { grid-template-columns: 1fr; }
  .controls-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .gallery-grid { grid-template-columns: 1fr; gap: 12px; }
  .gallery-main, .gallery-wide { grid-column: span 1; }
  .gallery-item { aspect-ratio: 4/3; } /* More square for mobile */
  .controls-grid { grid-template-columns: 1fr; }
  .proj-title { font-size: 52px; }
}