/* Project Detail Specific Styles */

/* Ensure the hidden attribute wins over display rules on action buttons */
[hidden] {
  display: none !important;
}

.project-detail-main {
  min-height: 100vh;
  padding-top: 80px;
  position: relative;
  z-index: 2;
}

/* Back Button — sits in the page flow, aligned with the content column */
.back-button-row {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.5rem 2rem 0 2rem;
  display: flex;
  justify-content: flex-start;
}

.back-button {
  background: rgba(30, 34, 60, 0.95);
  color: #e0e6f7;
  border: 1px solid #6bc9ff33;
  border-radius: 0.8rem;
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.back-button:hover {
  background: linear-gradient(135deg, #6bc9ff 0%, #b3c6e0 100%);
  color: #181a2a;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(107, 201, 255, 0.4);
}

.back-button svg {
  transition: transform 0.3s ease;
}

.back-button:hover svg {
  transform: translateX(-3px);
}

/* Project Hero Section */
.project-hero {
  width: 100%;
  padding: 3rem 1rem 4rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.project-hero-content {
  max-width: 1000px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.project-hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: #e0e6f7;
  margin: 0;
  background: linear-gradient(135deg, #6bc9ff 0%, #b3c6e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(107, 201, 255, 0.5);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.project-hero-subtitle {
  font-size: 1.3rem;
  color: #b3c6e0;
  margin: 0;
  font-weight: 400;
  opacity: 0.9;
  line-height: 1.5;
  max-width: 600px;
}

.project-hero-image {
  width: 100%;
  max-width: 500px;
  height: 300px;
  background: linear-gradient(135deg, rgba(30, 34, 60, 0.85) 0%, rgba(20, 24, 50, 0.85) 100%);
  border-radius: 1.5rem;
  border: 2px solid rgba(107, 201, 255, 0.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6bc9ff;
  font-size: 1.2rem;
  font-weight: 500;
}

.project-hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.5rem;
  display: block;
}

/* Multi-image gallery (Dentado) */
.project-hero-gallery {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  flex-wrap: nowrap;
}

.project-hero-main-image {
  width: 45%;
  height: 300px;
  background-size: cover;
  background-position: center;
  border-radius: 1.5rem;
  border: 2px solid rgba(107, 201, 255, 0.25);
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
  flex-shrink: 0;
}

.project-hero-side-image {
  width: 45%;
  height: 300px;
  background-size: cover;
  background-position: center;
  border-radius: 1.2rem;
  border: 2px solid rgba(107, 201, 255, 0.2);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  flex-shrink: 0;
  position: relative;
}

.project-hero-side-image::after,
.project-hero-main-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0) 40%, rgba(107,201,255,0.08) 100%);
  pointer-events: none;
}

@media (max-width: 1000px) {
  .project-hero-gallery { flex-wrap: wrap; }
  .project-hero-main-image { order: 1; width: 100%; max-width: 500px; }
  .project-hero-side-image { order: 2; width: calc(50% - 0.75rem); height: 200px; }
}

@media (max-width: 600px) {
  .project-hero-gallery { gap: 1rem; }
  .project-hero-main-image { height: 240px; }
  .project-hero-side-image { height: 160px; }
}

/* shimmer overlay removed for performance */

/* Project Content — editorial two-column case-study layout */
.project-content {
  width: 100%;
  padding: 3rem 2rem 5rem 2rem;
  display: flex;
  justify-content: center;
}

.project-content-container {
  max-width: 1240px;
  width: 100%;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 5rem;
  align-items: start;
  text-align: left;
}

/* Small uppercase section labels with an accent rule */
.project-section-label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: #6bc9ff;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0 0 1.4rem 0;
}

.project-section-label::before {
  content: '';
  width: 26px;
  height: 1px;
  background: #6bc9ff;
  opacity: 0.6;
  flex-shrink: 0;
}

/* Sticky sidebar */
.project-sidebar {
  position: sticky;
  top: 110px;
}

.project-main {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  min-width: 0;
}

.project-description p {
  color: #c3d2e8;
  font-size: 1.2rem;
  line-height: 1.85;
  margin: 0;
  max-width: 68ch;
}

.project-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.project-tech-item {
  background: transparent;
  color: #b3c6e0;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid rgba(179, 198, 224, 0.22);
  transition: border-color 0.25s ease, color 0.25s ease;
}

.project-tech-item:hover {
  border-color: rgba(107, 201, 255, 0.55);
  color: #e0e6f7;
}

.project-features {
  border-top: 1px solid rgba(107, 201, 255, 0.1);
  padding-top: 3rem;
}

.project-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-features li {
  color: #b3c6e0;
  font-size: 1.08rem;
  line-height: 1.65;
  padding: 0.85rem 0 0.85rem 1.8rem;
  position: relative;
  max-width: 68ch;
}

.project-features li + li {
  border-top: 1px solid rgba(179, 198, 224, 0.08);
}

.project-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.65em;
  width: 14px;
  height: 1px;
  background: #6bc9ff;
  opacity: 0.7;
}

/* Action Buttons */
.project-hero-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  margin-top: 2.5rem;
  padding-bottom: 1rem;
}

.demo-button,
.code-button,
.taikai-button {
  padding: 1rem 2.5rem;
  border-radius: 0.8rem;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  min-width: 160px;
  justify-content: center;
}

.demo-button {
  background: linear-gradient(135deg, #6bc9ff 0%, #4a9eff 100%);
  color: #181a2a;
  box-shadow: 0 4px 20px rgba(107, 201, 255, 0.4);
}

.demo-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(107, 201, 255, 0.6);
  background: linear-gradient(135deg, #4a9eff 0%, #6bc9ff 100%);
}

.code-button {
  background: rgba(30, 34, 60, 0.8);
  color: #e0e6f7;
  border: 1px solid rgba(107, 201, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.code-button:hover {
  transform: translateY(-3px);
  background: rgba(40, 44, 70, 0.9);
  border-color: rgba(107, 201, 255, 0.6);
  box-shadow: 0 8px 30px rgba(107, 201, 255, 0.3);
}

.taikai-button {
  background: rgba(30, 34, 60, 0.8);
  color: #e0e6f7;
  border: 1px solid rgba(255, 165, 100, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.taikai-button:hover {
  transform: translateY(-3px);
  background: rgba(40, 44, 70, 0.9);
  border-color: rgba(255, 165, 100, 0.7);
  box-shadow: 0 8px 30px rgba(255, 165, 100, 0.3);
}

/* Old action buttons - kept for backwards compatibility but can be removed */
.project-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.try-button,
.github-button {
  padding: 1rem 2rem;
  border-radius: 0.8rem;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  min-width: 150px;
  justify-content: center;
}

.try-button {
  background: linear-gradient(135deg, #6bc9ff 0%, #4a9eff 100%);
  color: #181a2a;
  box-shadow: 0 4px 20px rgba(107, 201, 255, 0.4);
}

.try-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(107, 201, 255, 0.6);
  background: linear-gradient(135deg, #4a9eff 0%, #6bc9ff 100%);
}

.github-button {
  background: rgba(30, 34, 60, 0.8);
  color: #e0e6f7;
  border: 1px solid rgba(107, 201, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.github-button:hover {
  background: rgba(107, 201, 255, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(107, 201, 255, 0.3);
  border-color: rgba(107, 201, 255, 0.5);
}

/* Responsive Design */
@media (max-width: 900px) {
  .project-content-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  /* Single column: prose first, tech stack after */
  .project-sidebar {
    position: static;
    order: 2;
    border-top: 1px solid rgba(107, 201, 255, 0.1);
    padding-top: 3rem;
  }

  .project-main {
    order: 1;
  }

  .project-hero-title {
    font-size: 3rem;
  }

  .project-hero-subtitle {
    font-size: 1.2rem;
  }
}

@media (max-width: 700px) {
  .back-button-row {
    padding: 1rem 1rem 0 1rem;
  }

  .back-button {
    font-size: 0.9rem;
  }

  .project-hero {
    padding: 2rem 1rem 3rem 1rem;
    min-height: 50vh;
  }
  
  .project-hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
  }
  
  .project-hero-subtitle {
    font-size: 1.1rem;
  }
  
  .project-hero-image {
    height: 250px;
    margin-top: 1rem;
  }
  
  .project-hero-actions {
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem;
    margin-top: 1.5rem;
  }
  
  .demo-button,
  .code-button,
  .taikai-button {
    width: 100%;
    max-width: 300px;
  }
  
  .project-content {
    padding: 2rem 1.2rem 4rem 1.2rem;
  }

  .project-description p {
    font-size: 1.1rem;
  }

  .project-features li {
    font-size: 1rem;
    padding-left: 1.5rem;
  }

  .project-actions {
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem;
  }
  
  .try-button,
  .github-button {
    width: 100%;
    max-width: 300px;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
  }
  
  /* Mobile touch improvements */
  .project-card {
    transition: transform 0.2s ease;
  }
  
  .project-card:active {
    transform: scale(0.98);
  }
  
  /* Better mobile navigation */
  .project-detail-main {
    padding-top: 100px;
  }
}

@media (max-width: 500px) {
  .back-button {
    font-size: 0.85rem;
  }

  .project-hero {
    padding: 1.5rem 0.5rem 2.5rem 0.5rem;
  }
  
  .project-hero-title {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .project-hero-subtitle {
    font-size: 1rem;
    padding: 0 0.5rem;
  }
  
  .project-hero-image {
    height: 200px;
    margin: 1.5rem 0.5rem 0 0.5rem;
    max-width: calc(100% - 1rem);
  }
  
  .project-content {
    padding: 1.5rem 1rem 3rem 1rem;
  }

  .project-description p {
    font-size: 1rem;
    line-height: 1.7;
  }

  .project-tech-item {
    font-size: 0.82rem;
  }

  .project-features li {
    font-size: 0.95rem;
  }

  .try-button,
  .github-button {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
  
  /* Ensure mobile viewport compatibility */
  .project-detail-main {
    min-height: 100vh;
    min-height: 100dvh; /* For newer browsers with dynamic viewport */
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .project-card:hover {
    transform: none;
  }
  
  .project-card:active {
    transform: translateY(-4px) scale(1.02);
  }
  
  .try-button:hover,
  .github-button:hover {
    transform: none;
  }
  
  .try-button:active,
  .github-button:active {
    transform: scale(0.98);
  }
  
  .back-button:hover {
    transform: none;
  }
  
  .back-button:active {
    transform: scale(0.95);
  }
}