/* ============================================================
   project.css — Shared styles for project detail pages
   ============================================================ */

/* ── Project Navigation ───────────────────────────────────── */
#navbar {
  position: fixed;
  top: 1rem;
  left: 0;
  right: 0;
  z-index: 7000;
  pointer-events: none;
}

#navbar .nav-container {
  pointer-events: auto;
}

.project-back-btn {
  overflow: hidden;
}

.project-back-btn i {
  flex: 0 0 auto;
}

/* ── Project Footer ───────────────────────────────────────── */
.back-top {
  position: relative;
  overflow: visible;
}

.back-top-tooltip {
  position: absolute;
  right: calc(100% + 0.7rem);
  top: 50%;
  transform: translateY(-50%);
  transform-origin: right center;
  z-index: 2;
  border: 1px solid rgba(215, 255, 55, 0.34);
  border-radius: var(--radius-pill);
  padding: 0.42rem 0.7rem;
  background: rgba(11, 11, 9, 0.9);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.back-top-tooltip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: rgba(11, 11, 9, 0.9);
}

.project-portfolio-particle-dot {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 6400;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px rgba(215, 255, 55, 0.22);
  pointer-events: none;
  will-change: transform, opacity;
}

/* ── Project Hero ─────────────────────────────────────────── */
.project-hero {
  position: relative;
  min-height: 42vh;
  display: flex;
  align-items: center;
  padding-bottom: clamp(2rem, 5vw, 4rem);
  overflow: hidden;
}

.project-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at 18% 20%, rgba(215, 255, 55, 0.1), transparent 30%), radial-gradient(circle at 84% 28%, rgba(255, 107, 53, 0.1), transparent 28%), var(--bg);
}

.project-hero-bg img {
  display: none;
}

.project-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(11, 11, 9, 0.12) 0%,
    rgba(11, 11, 9, 0.58) 72%,
    rgba(11, 11, 9, 1) 100%
  );
}

.project-hero-content {
  position: relative;
  z-index: 1;
  padding-top: 3.2rem;
  cursor: default;
}

.project-hero-diamond {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 6500;
  width: clamp(0.55rem, 1vw, 0.9rem);
  aspect-ratio: 1;
  border: 1px solid rgba(215, 255, 55, 0.58);
  border-radius: 0.18rem;
  background: linear-gradient(135deg, rgba(215, 255, 55, 0.92), rgba(255, 107, 53, 0.72));
  box-shadow: 0 0 22px rgba(215, 255, 55, 0.2), 0 10px 24px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
}

.project-hero-diamond--hollow {
  background: rgba(11, 11, 9, 0.28);
  border-color: rgba(243, 239, 225, 0.74);
}

.project-hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0.75rem 0 1rem;
}

.project-hero-sub {
  max-width: 620px;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 2rem;
}

.project-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.meta-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.meta-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Scrubbed Bento Gallery ───────────────────────────────── */
.project-bento-section {
  position: relative;
  padding-block: 0;
  overflow: hidden;
  background: var(--bg);
}


.project-bento-wrap {
  position: relative;
  width: 100%;
  height: min(100svh, 860px);
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-bento-gallery {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 30vw));
  grid-template-rows: repeat(4, 19vh);
  gap: clamp(0.45rem, 1vw, 0.85rem);
  justify-content: center;
  align-content: center;
}

.project-bento-gallery.is-final {
  grid-template-columns: repeat(3, 58vw);
  grid-template-rows: repeat(4, 34vh);
}

.project-bento-item {
  position: relative;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transform-origin: center;
  will-change: transform;
}

.project-bento-item img,
.project-bento-item video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.project-bento-item--video::after {
  content: 'PLAY';
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  border-radius: var(--radius-pill);
  padding: 0.28rem 0.55rem;
  background: rgba(215, 255, 55, 0.86);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.project-bento-gallery .project-bento-item:nth-child(1) { grid-area: 1 / 1 / 3 / 2; }
.project-bento-gallery .project-bento-item:nth-child(2) { grid-area: 1 / 2 / 2 / 3; }
.project-bento-gallery .project-bento-item:nth-child(3) { grid-area: 2 / 2 / 4 / 3; }
.project-bento-gallery .project-bento-item:nth-child(4) { grid-area: 1 / 3 / 3 / 4; }
.project-bento-gallery .project-bento-item:nth-child(5) { grid-area: 3 / 1 / 4 / 2; }
.project-bento-gallery .project-bento-item:nth-child(6) { grid-area: 3 / 3 / 5 / 4; }
.project-bento-gallery .project-bento-item:nth-child(7) { grid-area: 4 / 1 / 5 / 2; }
.project-bento-gallery .project-bento-item:nth-child(8) { grid-area: 4 / 2 / 5 / 3; }

.project-bento-gallery--portrait {
  grid-template-columns: repeat(4, minmax(0, 18vw));
  grid-template-rows: repeat(3, 26vh);
}

.project-bento-gallery--portrait.is-final {
  grid-template-columns: repeat(4, 34vw);
  grid-template-rows: repeat(3, 42vh);
}

.project-bento-gallery--portrait .project-bento-item:nth-child(1) { grid-area: 1 / 1 / 3 / 2; }
.project-bento-gallery--portrait .project-bento-item:nth-child(2) { grid-area: 1 / 2 / 2 / 3; }
.project-bento-gallery--portrait .project-bento-item:nth-child(3) { grid-area: 2 / 2 / 4 / 3; }
.project-bento-gallery--portrait .project-bento-item:nth-child(4) { grid-area: 1 / 3 / 3 / 4; }
.project-bento-gallery--portrait .project-bento-item:nth-child(5) { grid-area: 3 / 1 / 4 / 2; }
.project-bento-gallery--portrait .project-bento-item:nth-child(6) { grid-area: 3 / 3 / 4 / 4; }
.project-bento-gallery--portrait .project-bento-item:nth-child(7) { grid-area: 1 / 4 / 2 / 5; }
.project-bento-gallery--portrait .project-bento-item:nth-child(8) { grid-area: 2 / 4 / 4 / 5; }
.project-bento-gallery--portrait .project-bento-item img { object-fit: contain; padding: 0.75rem; background: radial-gradient(circle at 50% 20%, rgba(215, 255, 55, 0.1), transparent 44%), var(--card); }

@media (max-width: 900px) {
  .project-bento-wrap {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .project-bento-gallery,
  .project-bento-gallery.is-final,
  .project-bento-gallery--portrait,
  .project-bento-gallery--portrait.is-final {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    height: auto;
    padding-inline: 1rem;
  }

  .project-bento-gallery .project-bento-item,
  .project-bento-gallery--portrait .project-bento-item {
    grid-area: auto !important;
    min-height: 220px;
  }
}

/* ── Project Section ──────────────────────────────────────── */
.project-section {
  padding-block: var(--space-3xl);
}

.project-body-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3.5rem;
  align-items: start;
}

/* ── Main Content ─────────────────────────────────────────── */
.project-main {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: clamp(1.25rem, 3vw, 2rem);
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.project-main::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(215, 255, 55, 0.16), transparent 34%);
  transition: opacity 180ms var(--ease);
}

.project-main.is-glowing::before {
  opacity: 1;
}

.project-main > * {
  position: relative;
  z-index: 1;
}

.ps-heading {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 2.25rem 0 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.ps-heading:first-child {
  margin-top: 0;
}

.project-main p {
  color: var(--text-secondary);
  font-size: 0.97rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.challenge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.challenge-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: border-color var(--t-base);
}

.challenge-card:hover {
  border-color: var(--border-teal);
}

.challenge-card i {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  display: block;
}

.challenge-card h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.challenge-card p {
  font-size: 0.82rem !important;
  color: var(--text-secondary);
  margin: 0 !important;
  line-height: 1.6 !important;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.feature-list i {
  font-size: 0.85rem;
  margin-top: 0.25rem;
  flex-shrink: 0;
  transform-origin: center;
}

.feature-mask {
  display: inline-block;
  flex: 1;
  overflow: hidden;
  vertical-align: top;
}

.feature-mask-text {
  display: inline-block;
  will-change: transform, opacity;
}

/* Event types grid (e-invitation page) */
.event-types-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.event-type-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  color: var(--text-secondary);
  transition: border-color var(--t-base), transform var(--t-fast);
}

.event-type-card:hover {
  border-color: var(--border-teal);
  transform: translateY(-2px);
}

.event-type-card i {
  font-size: 1.5rem;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.project-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 80px;
}

.sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.sidebar-card h3 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
}

.tech-stack-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  overflow: visible;
  padding: 0.2rem 0;
}

.stack-item {
  min-height: 2.65rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.58rem 0.78rem;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  font-size: 0.82rem;
  color: var(--text-secondary);
  transform-origin: 0% 50%;
  will-change: transform;
}

.stack-dot {
  width: 7px;
  height: 7px;
  background: var(--teal-primary);
  border-radius: 50%;
  flex-shrink: 0;
}

.result-stat {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  cursor: default;
}

.result-stat:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.result-number {
  display: block;
  width: max-content;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.2rem;
  transform-origin: center;
  will-change: transform;
}

.result-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.services-provided {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  overflow: visible;
  padding: 0.2rem 0;
}

.services-provided li {
  min-height: 2.55rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.58rem 0.78rem;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  font-size: 0.82rem;
  color: var(--text-secondary);
  transform-origin: 0% 50%;
  will-change: transform;
}

.services-provided i {
  font-size: 0.8rem;
  flex: 0 0 auto;
}

.sidebar-cta-card {
  text-align: center;
}

.sidebar-cta-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── CTA Section ──────────────────────────────────────────── */
.project-cta {
  position: relative;
  padding-block: var(--space-3xl);
  text-align: center;
  overflow: hidden;
}

.project-cta-bounce {
  min-height: clamp(196px, 24vw, 289px);
  padding-block: clamp(1.5rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  background: radial-gradient(circle at 50% 0%, rgba(215, 255, 55, 0.12), transparent 36%), var(--bg);
}

.project-cta-bounce::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, transparent, #000 28%, #000 82%, transparent);
}

.project-cta-wave {
  position: absolute;
  inset: auto 0 0;
  z-index: 0;
  width: 100%;
  height: 82%;
  display: block;
  overflow: visible;
  filter: saturate(1.08) brightness(0.92);
}

.project-cta-wave-path {
  transform-origin: center bottom;
  will-change: d, transform;
}

.project-cta .container {
  position: relative;
  z-index: 2;
}

.project-cta-bounce {
  justify-content: center;
}

.project-cta-bounce .container {
  max-width: 680px;
  margin-inline: auto;
  text-align: center;
}

.project-cta h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.project-cta-bounce h2 {
  color: var(--ink);
  text-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
}

.project-cta p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 480px;
  margin-inline: auto;
  margin-bottom: 2rem;
}

.project-cta-bounce p {
  color: rgba(243, 239, 225, 0.76);
  margin-bottom: 1rem;
}

.project-cta .btn-primary,
.project-cta .btn-outline {
  margin: 0 0.5rem;
}

.project-cta-bounce .btn-outline {
  color: var(--ink);
  border-color: rgba(243, 239, 225, 0.3);
  background: rgba(11, 11, 9, 0.48);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .project-body-grid {
    grid-template-columns: 1fr;
  }

  .project-sidebar {
    position: static;
  }

  .challenge-grid {
    grid-template-columns: 1fr;
  }

  .event-types-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .project-meta-row {
    gap: 1rem 2rem;
  }

  .event-types-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-cta .btn-primary,
  .project-cta .btn-outline {
    display: block;
    margin: 0.5rem auto;
    max-width: 240px;
    text-align: center;
    justify-content: center;
  }
}
