/* ==========================================
   PROJECT PAGE STYLES
   ========================================== */

@keyframes heroGradientMoveAlt {
  0% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.project-page {
  margin-left: 60px;
  min-height: 100vh;
  padding: 2rem 4rem;
  background: transparent;
}

/* Back Link */
.back-link {
  display: inline-block;
  color: var(--accent-cyan);
  font-family: var(--font-display);
  font-size: 0.875rem;
  text-decoration: none;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
}

.back-link:hover {
  color: var(--accent-magenta);
  text-shadow: 0 0 10px var(--accent-magenta);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.project-hero {
  padding: 4rem 0 2rem;
  text-align: center;
  padding-right: 8%;
}

.project-title {
  font-family: "strelka", sans-serif;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, #ff006e, #8338ec, #07429f);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroGradientMoveAlt 8s linear infinite;
  -webkit-mask-image: linear-gradient(to bottom, black 60%, rgba(0,0,0,0.3) 100%);
  mask-image: linear-gradient(to bottom, black 60%, rgba(0,0,0,0.3) 100%);
}

.project-tagline {
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 2vw, 1.125rem);
  color: rgba(255, 255, 255, 0.5);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* Project Links / Buttons */
.project-links {
  justify-content: center;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.project-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 36px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  
  /* Organic blob shape */
  border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%;
  
  /* Multi-layered dark holographic background */
  background:
    linear-gradient(145deg, #221d27, #000000),
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.5), transparent 50%),
    linear-gradient(45deg, rgba(138, 43, 226, 0.05), rgba(0, 212, 255, 0.05), rgba(138, 43, 226, 0.05));
  background-size: 100% 100%, 150% 150%, 150% 150%, 200% 200%;
  background-blend-mode: overlay, multiply, overlay;
  
  border: 2px solid rgba(0, 212, 255, 0.4);
  
  /* Glowing text shadow */
  text-shadow:
    0 0 5px rgba(138, 43, 226, 0.5),
    0 0 10px rgba(0, 212, 255, 0.3),
    0 0 15px rgba(138, 43, 226, 0.2);
  
  /* Subtle glow shadow */
  box-shadow:
    0 2px 8px rgba(138, 43, 226, 0.3),
    0 1px 6px rgba(0, 212, 255, 0.2);
  
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  
  /* Bouncy animation easing */
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  position: relative;
  overflow: hidden;
}

.project-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(
    circle,
    rgba(0, 212, 255, 0.25),
    rgba(138, 43, 226, 0.2)
  );
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: -1;
}

.project-btn:hover::before {
  width: 200px;
  height: 200px;
}

.project-btn:hover {
  color: rgba(255, 255, 255, 1);
  border-color: rgba(0, 212, 255, 0.8);
  transform: translateY(-3px) scale(1.03);
  box-shadow:
    0 4px 12px rgba(0, 212, 255, 0.35),
    0 6px 16px rgba(138, 43, 226, 0.25);
}

.project-btn:active {
  transform: translateY(3px) scale(0.97);
  box-shadow:
    0 2px 6px rgba(0, 212, 255, 0.25),
    0 3px 8px rgba(138, 43, 226, 0.15);
  transition: all 0.1s ease;
}

.project-btn.primary,
.project-btn.secondary {
  /* Inherits all base styles */
}

.project-btn.large {
  padding: 1.125rem 2.5rem;
  font-size: 1rem;
}

/* Project Note / Warning */
.project-note {
  margin-top: 1.5rem;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  background:
    linear-gradient(145deg, #2a1d1d, #0a0000),
    radial-gradient(circle at 30% 30%, rgba(255, 100, 100, 0.08), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.5), transparent 50%),
    linear-gradient(45deg, rgba(200, 50, 50, 0.08), rgba(0, 212, 255, 0.03), rgba(200, 50, 50, 0.08));
  border: 1px solid rgba(255, 100, 100, 0.25);
  border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%;
  text-align: center;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.8),
    0 0 12px rgba(255, 50, 50, 0.1),
    inset 0 1px 3px rgba(255, 255, 255, 0.1),
    inset 0 -1px 3px rgba(0, 0, 0, 0.5);
}

.project-note strong {
  color: rgba(255, 120, 120, 1);
}

/* ==========================================
   GALLERY SECTION
   ========================================== */
.project-gallery {
  padding: 2rem 0 4rem;
  max-width: 1200px;
  margin: 0 auto;
  transform: translateX(-3%);
}

.gallery-main {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 212, 255, 0.3);
  background:
    linear-gradient(145deg, #221d27, #000000),
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.05), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.5), transparent 50%),
    linear-gradient(45deg, rgba(138, 43, 226, 0.05), rgba(0, 212, 255, 0.05), rgba(138, 43, 226, 0.05));
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.8),
    inset 0 1px 3px rgba(255, 255, 255, 0.1),
    inset 0 -1px 3px rgba(0, 0, 0, 0.5);
}

.gallery-hero-img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-thumbs {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.gallery-thumbs .thumb {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.5;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.gallery-thumbs .thumb:hover {
  opacity: 0.8;
}

.gallery-thumbs .thumb.active {
  opacity: 1;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(79, 255, 255, 0.4);
}

/* ==========================================
   ABOUT SECTION
   ========================================== */
.project-about {
  padding: 4rem 0;
}

.project-about h2,
.project-features h2,
.project-diagram h2,
.project-design h2,
.project-cta h2 {
  font-family: "strelka", sans-serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  background: linear-gradient(90deg, #ff006e, #8338ec, #07429f);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroGradientMoveAlt 8s linear infinite;
  margin-bottom: 2rem;
  letter-spacing: 0.1em;
  -webkit-mask-image: linear-gradient(to bottom, black 60%, rgba(0,0,0,0.3) 100%);
  mask-image: linear-gradient(to bottom, black 60%, rgba(0,0,0,0.3) 100%);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
}

.about-description p {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.5rem;
}

.about-description strong {
  color: var(--accent-cyan);
}

.about-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.detail-card {
  background:
    linear-gradient(145deg, #221d27, #000000),
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.05), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.5), transparent 50%),
    linear-gradient(45deg, rgba(138, 43, 226, 0.05), rgba(0, 212, 255, 0.05), rgba(138, 43, 226, 0.05));
  background-size: 100% 100%, 150% 150%, 150% 150%, 200% 200%;
  background-blend-mode: overlay, multiply, overlay;
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.8),
    inset 0 1px 3px rgba(255, 255, 255, 0.1),
    inset 0 -1px 3px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.detail-card:hover {
  border-color: rgba(0, 212, 255, 0.6);
  box-shadow:
    0 0 20px rgba(0, 212, 255, 0.3),
    0 4px 8px rgba(0, 0, 0, 0.8),
    inset 0 1px 3px rgba(255, 255, 255, 0.2),
    inset 0 -1px 3px rgba(0, 0, 0, 0.5);
}

.detail-card h3 {
  font-family: "strelka";
  font-size: 0.875rem;
  background: linear-gradient(90deg, #ff006e, #8338ec, #07429f);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroGradientMoveAlt 8s linear infinite;
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  -webkit-mask-image: linear-gradient(to bottom, black 60%, rgba(0,0,0,0.3) 100%);
  mask-image: linear-gradient(to bottom, black 60%, rgba(0,0,0,0.3) 100%);
}

.detail-card p {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

/* Tech Tags */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  background:
    linear-gradient(145deg, #221d27, #000000);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 4px;
  letter-spacing: 0.05em;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.6),
    inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

/* ==========================================
   FEATURES SECTION
   ========================================== */
.project-features {
  padding: 4rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background:
    linear-gradient(145deg, #221d27, #000000),
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.05), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.5), transparent 50%),
    linear-gradient(45deg, rgba(138, 43, 226, 0.05), rgba(0, 212, 255, 0.05), rgba(138, 43, 226, 0.05));
  background-size: 100% 100%, 150% 150%, 150% 150%, 200% 200%;
  background-blend-mode: overlay, multiply, overlay;
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 12px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.8),
    inset 0 1px 3px rgba(255, 255, 255, 0.1),
    inset 0 -1px 3px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 255, 0.6);
  box-shadow:
    0 0 20px rgba(0, 212, 255, 0.3),
    0 4px 8px rgba(0, 0, 0, 0.8),
    inset 0 1px 3px rgba(255, 255, 255, 0.2),
    inset 0 -1px 3px rgba(0, 0, 0, 0.5);
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 100%;
  height: 100%;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-icon.cyan {
  color: var(--accent-cyan);
  filter: drop-shadow(0 0 8px rgba(79, 255, 255, 0.5));
}

.feature-icon.purple {
  color: var(--accent-magenta);
  filter: drop-shadow(0 0 8px rgba(233, 78, 200, 0.5));
}

.feature-card h3 {
  font-family: "strelka";
  font-size: 1.125rem;
  background: linear-gradient(90deg, #ff006e, #8338ec, #07429f);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroGradientMoveAlt 8s linear infinite;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
  -webkit-mask-image: linear-gradient(to bottom, black 60%, rgba(0,0,0,0.3) 100%);
  mask-image: linear-gradient(to bottom, black 60%, rgba(0,0,0,0.3) 100%);
}

.feature-card p {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

/* ==========================================
   DIAGRAM SECTION
   ========================================== */
.project-diagram {
  padding: 4rem 0;
}

.diagram-container {
  background:
    linear-gradient(145deg, #221d27, #000000),
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.05), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.5), transparent 50%),
    linear-gradient(45deg, rgba(138, 43, 226, 0.05), rgba(0, 212, 255, 0.05), rgba(138, 43, 226, 0.05));
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 12px;
  padding: 2rem;
  overflow-x: auto;
  display: flex;
  justify-content: center;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.8),
    inset 0 1px 3px rgba(255, 255, 255, 0.1),
    inset 0 -1px 3px rgba(0, 0, 0, 0.5);
}

.ascii-diagram {
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  color: var(--accent-cyan);
  white-space: pre;
  line-height: 1.4;
  margin: 0;
  text-align: center;
}

.diagram-caption {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  margin-top: 1.5rem;
  font-style: italic;
}

/* ==========================================
   DESIGN SYSTEM SECTION
   ========================================== */
.project-design {
  padding: 4rem 0;
}

.design-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.color-palette h3,
.design-effects h3 {
  font-family: "strelka";
  font-size: 1rem;
  background: linear-gradient(90deg, #ff006e, #8338ec, #07429f);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroGradientMoveAlt 8s linear infinite;
  margin-bottom: 1.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  -webkit-mask-image: linear-gradient(to bottom, black 60%, rgba(0,0,0,0.3) 100%);
  mask-image: linear-gradient(to bottom, black 60%, rgba(0,0,0,0.3) 100%);
}

.colors {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.color-swatch {
  aspect-ratio: 1.5;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.75rem;
  position: relative;
}

.color-swatch span {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: #0a0a0f;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.color-swatch code {
  font-family: monospace;
  font-size: 0.6875rem;
  color: rgba(10, 10, 15, 0.7);
}

.design-effects ul {
  list-style: none;
  padding: 0;
}

.design-effects li {
  font-family: var(--font-body);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(79, 255, 255, 0.1);
  padding-left: 1.5rem;
  position: relative;
}

.design-effects li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-size: 0.625rem;
}

/* ==========================================
   CTA SECTION
   ========================================== */
.project-cta {
  padding: 4rem 0;
  text-align: center;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* ==========================================
   MOBILE RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
  /* Fix iOS scroll issues */
  html, body {
    height: auto;
    min-height: 100%;
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background-attachment: scroll; /* Fixed backgrounds break iOS scroll */
  }
  
  /* Hide fixed elements on mobile to prevent scroll lock */
  #waves {
    display: none !important;
  }
  
  .parallax-bg-overlay {
    display: none !important;
  }
  
  .project-page {
    margin-left: 0;
    margin-bottom: 80px;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
  }

  .project-hero {
    padding: 2rem 0;
    padding-right: 0;
    text-align: center;
  }

  .project-title {
    text-align: center;
  }

  .project-tagline {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .project-gallery {
    transform: none;
    margin: 0 auto;
    padding: 1rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .colors {
    grid-template-columns: repeat(4, 1fr);
  }

  .color-swatch {
    aspect-ratio: 1;
  }

  .project-links {
    flex-direction: column;
    align-items: center;
  }

  .project-btn {
    width: auto;
    max-width: 180px;
    padding: 12px 24px;
    justify-content: center;
  }

  .gallery-thumbs .thumb {
    width: 80px;
    height: 54px;
  }

  .ascii-diagram {
    font-size: 0.625rem;
  }
}

@media (max-width: 480px) {
  .project-page {
    padding: 1rem;
  }

  .project-title {
    font-size: clamp(1.25rem, 6vw, 1.75rem);
  }

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

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