/* ============================================================
   Shared styles for individual project pages
   (trad1, trad2, char1, char2, ...)
   Works on top of the p5.js background canvas (#p5-bg-canvas).
   ============================================================ */

body {
  font-family: Arial, Helvetica, sans-serif;
  color: #111;
  font-size: 16px;
  line-height: 1.6;
}

/* Fixed "Home / Back" nav in the top-left corner */
.project-nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 16px 24px;
  display: flex;
  gap: 18px;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-right-radius: 10px;
}

.project-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
}

.project-nav a:hover {
  color: #ddd;
}

.project {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 168px;
}

/* ---- Scroll reveal ---- */
/* Each .reveal starts hidden + shifted, then animates in when it
   scrolls into view (JS toggles .visible via IntersectionObserver). */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 1. Video hero — full viewport, looping video */
.project-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
  padding: 20px 0 0;
}

.project-hero h1 {
  font-size: 48px;
  letter-spacing: 1px;
}

.project-hero .hero-video {
  width: 100%;
  max-height: 86vh;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.25);
}


/* 2. Text section, anchored to the left */
.text-section {
  display: flex;
  justify-content: flex-start;
  padding: 0 0 3vh;
}

.text-section .text {
  max-width: 624px;
  text-align: left;
  color: #fff;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 41px 46px;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.text-section .text h2 {
  font-size: 31px;
  margin-bottom: 14px;
}

.text-section .text p + p {
  margin-top: 14px;
}

/* 3. Image sections stacked underneath */
.image-section {
  padding: 7.2vh 0;
}

.image-section img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}

.image-section figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: #444;
  text-align: center;
}

/* 4. Video sections stacked underneath */
.video-section {
  padding: 7.2vh 0;
}

.video-section video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}

@media (max-width: 700px) {
  .project-hero h1 { font-size: 34px; }
  .text-section .text { padding: 29px; }
}
