/* ==========================================================================
   PROJECT DETAIL PAGE — PREMIUM DARK THEME
   ========================================================================== */

:root {
  --bg:           #0a0a0f;
  --bg-soft:      #0f0f18;
  --bg-card:      #13131f;
  --bg-card-hover:#1a1a2e;
  --border:       rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.15);
  --text:         #e2e8f0;
  --text-muted:   #64748b;
  --text-sub:     #94a3b8;
  --accent:       #6366f1;
  --accent-glow:  rgba(99,102,241,0.18);
  --accent-2:     #06b6d4;
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --radius-xl:    28px;
  --ease:         cubic-bezier(0.2,0.8,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Outfit', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2d2d45; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Nav ── */
.pd-nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.pd-nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  color: #f1f5f9;
  font-weight: 700; font-size: 1rem;
}

.pd-nav-brand img { height: 32px; filter: brightness(0) invert(1); }

.pd-back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.825rem; font-weight: 600;
  color: var(--text-sub);
  text-decoration: none;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: all 0.25s var(--ease);
}
.pd-back-link i { font-size: 0.75rem; }
.pd-back-link:hover {
  color: var(--accent);
  border-color: rgba(99,102,241,0.35);
  background: rgba(99,102,241,0.08);
}

/* ── Hero ── */
.pd-hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

/* radial background glow */
.pd-hero::before {
  content: '';
  position: absolute;
  top: -250px; left: 50%;
  transform: translateX(-50%);
  width: 1000px; height: 900px;
  background: radial-gradient(circle, rgba(99,102,241,0.10) 0%, rgba(6,182,212,0.04) 45%, transparent 70%);
  pointer-events: none;
}

.pd-hero-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 5rem;
  align-items: center;
  position: relative; z-index: 1;
}

.pd-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.pd-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, #f1f5f9 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.25rem;
}

.pd-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 500px;
  margin-bottom: 2rem;
}

.pd-actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-bottom: 2.5rem;
}

.btn-accent {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.875rem;
  padding: 12px 22px;
  text-decoration: none;
  transition: background 0.25s var(--ease), transform 0.2s var(--ease), box-shadow 0.25s;
}
.btn-accent:hover {
  background: #5254cc;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
  color: #fff;
}

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 500; font-size: 0.875rem;
  padding: 12px 22px;
  text-decoration: none;
  transition: all 0.25s var(--ease);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.05);
}

.pd-meta-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
}

.pd-chip {
  font-size: 0.75rem; font-weight: 600;
  padding: 5px 14px;
  border-radius: 100px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-sub);
}

.pd-chip.accent { background: rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.3); color: #a5b4fc; }
.pd-chip.cyan   { background: rgba(6,182,212,0.10);  border-color: rgba(6,182,212,0.25); color: #67e8f9; }

/* ── Hero Phone Mockup ── */
.pd-phone-wrap {
  display: flex; justify-content: center; align-items: center;
}

.pd-phone {
  width: 230px;
  height: 460px;
  background: #14141f;
  border-radius: 44px;
  border: 3px solid rgba(255,255,255,0.12);
  position: relative;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 30px 80px rgba(0,0,0,0.8),
    inset 0 1px 0 rgba(255,255,255,0.07);
  overflow: hidden;
  animation: floatPhone 5s ease-in-out infinite;
}

@keyframes floatPhone {
  0%,100% { transform: translateY(0px) rotate(-1.5deg); }
  50%      { transform: translateY(-16px) rotate(1.5deg); }
}

.pd-phone-notch {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 30px;
  background: #0a0a14;
  border-radius: 0 0 20px 20px;
  z-index: 10;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.pd-phone-notch::before {
  content: ''; width: 9px; height: 9px;
  background: #0d0d1a; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.07);
}
.pd-phone-notch::after {
  content: ''; width: 7px; height: 7px;
  background: rgba(6,182,212,0.35); border-radius: 50%;
  border: 1px solid rgba(6,182,212,0.6);
  box-shadow: 0 0 8px rgba(6,182,212,0.5);
}

.pd-phone-screen {
  position: absolute; inset: 0;
  border-radius: 42px; overflow: hidden;
}
.pd-phone-screen img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
}

.pd-phone-side-btn {
  position: absolute;
  top: 24px; right: -4px;
  width: 3px; height: 56px;
  background: rgba(255,255,255,0.1);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 -30px 0 rgba(255,255,255,0.1), 0 30px 0 rgba(255,255,255,0.08);
}
.pd-phone-left-btn {
  position: absolute;
  top: 80px; left: -4px;
  width: 3px; height: 32px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px 0 0 2px;
  box-shadow: 0 40px 0 rgba(255,255,255,0.1);
}
.pd-phone-bar {
  position: absolute;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  width: 68px; height: 4px;
  background: rgba(255,255,255,0.22);
  border-radius: 2px;
  z-index: 10;
}

/* ── Sections ── */
.pd-section {
  padding: 80px 0;
  background: var(--bg-soft);
}

.pd-section:nth-child(even) { background: var(--bg); }

.pd-container {
  max-width: 1200px; margin: 0 auto; padding: 0 2rem;
}

/* ── Info Grid ── */
.pd-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.pd-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.pd-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.pd-card-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.pd-card h3 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.pd-detail-list { list-style: none; }
.pd-detail-list li {
  display: flex; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-sub);
}
.pd-detail-list li:last-child { border-bottom: none; }
.pd-detail-list li strong { color: var(--text); min-width: 80px; }

.pd-highlight-list { list-style: none; }
.pd-highlight-list li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0;
  font-size: 0.875rem;
  color: var(--text-sub);
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
}
.pd-highlight-list li:last-child { border-bottom: none; }
.pd-highlight-list li::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 7px;
}

/* ── Tech Stack ── */
.pd-tech-section { margin-top: 2.5rem; }
.pd-tech-label {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 1rem;
}
.pd-tech-pills {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.pd-tech-pill {
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-sub);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 16px;
  transition: all 0.25s var(--ease);
}
.pd-tech-pill:hover {
  color: #c7d2fe;
  border-color: rgba(99,102,241,0.3);
  background: rgba(99,102,241,0.08);
}

/* ── Screenshot Gallery ── */
.pd-gallery-section { padding: 80px 0; background: var(--bg); }
.pd-gallery-label {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.5rem;
}
.pd-gallery-heading {
  font-size: 1.8rem; font-weight: 800;
  color: #f1f5f9; margin-bottom: 2.5rem;
}

.pd-screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.pd-shot-frame {
  background: #14141f;
  border-radius: 36px;
  border: 3px solid rgba(255,255,255,0.1);
  box-shadow: 0 16px 40px rgba(0,0,0,.6);
  overflow: hidden;
  aspect-ratio: 9/19;
  position: relative;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  cursor: pointer;
}
.pd-shot-frame:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 24px 60px rgba(0,0,0,.7);
}
.pd-shot-frame img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  display: block;
}
/* notch on each shot */
.pd-shot-frame::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 80px; height: 22px;
  background: #0a0a14;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}

/* ── Lightbox ── */
.pd-lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(5,5,10,0.95);
  z-index: 9999;
  align-items: center; justify-content: center;
}
.pd-lightbox.active { display: flex; }
.pd-lightbox img {
  max-width: 90vw; max-height: 90vh;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 80px rgba(0,0,0,.9);
}
.pd-lightbox-close {
  position: absolute; top: 24px; right: 32px;
  background: none; border: none;
  color: var(--text-sub); font-size: 2rem;
  cursor: pointer; line-height: 1;
  transition: color 0.2s;
}
.pd-lightbox-close:hover { color: #fff; }

/* ── Footer strip ── */
.pd-footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.pd-footer a { color: var(--accent); text-decoration: none; }
.pd-footer a:hover { color: var(--accent-2); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .pd-hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .pd-phone-wrap { order: -1; }
  .pd-phone { width: 190px; height: 380px; border-radius: 38px; }
  .pd-phone-screen { border-radius: 36px; }
}

@media (max-width: 600px) {
  .pd-nav { padding: 0 1rem; }
  .pd-hero { padding: 100px 0 60px; }
  .pd-hero-inner { padding: 0 1.25rem; }
  .pd-title { font-size: 2rem; }
  .pd-phone { width: 160px; height: 320px; border-radius: 32px; }
  .pd-container { padding: 0 1.25rem; }
  .pd-screenshots { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}

/* ── Animation helpers ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal][data-delay="100"] { transition-delay: 0.1s; }
[data-reveal][data-delay="200"] { transition-delay: 0.2s; }
[data-reveal][data-delay="300"] { transition-delay: 0.3s; }
