/*
 * Project Detail Page Styles
 * Consistent with main portfolio design system
 */

/* =============================================
   Back Navigation
   ============================================= */
.back-nav {
  background: var(--light-bg);
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(248, 250, 252, 0.95);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.back-link:hover {
  color: var(--secondary-color);
  transform: translateX(-5px);
}

.back-link i {
  font-size: 1rem;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.theme-toggle {
  background: transparent;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.theme-toggle:hover {
  background: var(--primary-color);
  transform: rotate(20deg) scale(1.1);
}

.theme-toggle .icon {
  transition: transform 0.3s ease;
}

/* =============================================
   Main Content
   ============================================= */
.project-detail-main {
  min-height: 100vh;
  background: white;
}

/* =============================================
   Project Header
   ============================================= */
.project-header-section {
  text-align: center;
  padding: 4rem 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  width: 100%;
}

.project-title {
  font-size: clamp(2rem, 5vw, 3rem);
  color: white;
  margin-bottom: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.project-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  font-weight: 500;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.95);
}

.meta-item i {
  color: rgba(255, 255, 255, 0.8);
}

.meta-item a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.meta-item a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.tech-stack-detail {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.tech-badge {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* =============================================
   Content Sections
   ============================================= */
.content-section {
  padding: 4rem 0;
  width: 100%;
}

.methodology-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.contributions-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.section-heading {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-weight: 700;
  border-bottom: 3px solid var(--accent-color);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.content-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-color);
}

.content-text p {
  margin-bottom: 1.5rem;
}

.content-text h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  font-weight: 700;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.feature-list li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  line-height: 1.6;
}

.feature-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-size: 1.2rem;
  font-weight: bold;
}

.feature-list strong {
  color: var(--primary-color);
}

/* =============================================
   Video Section
   ============================================= */
.video-section {
  padding: 4rem 0;
  width: 100%;
  background: white;
}

.video-container {
  max-width: 900px;
  margin: 0 auto;
}

/* Vertical video container for portrait/vertical videos */
.video-container-vertical {
  max-width: 500px;
  margin: 0 auto;
}

.video-container video {
  width: 100%;
  height: auto;
  max-height: 70vh;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  background: #000;
  object-fit: contain;
}

.video-caption {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.video-placeholder {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 2px dashed var(--accent-color);
  border-radius: 15px;
  padding: 4rem 2rem;
  text-align: center;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.video-placeholder i {
  font-size: 4rem;
  color: var(--accent-color);
  opacity: 0.5;
}

.video-placeholder p {
  font-size: 1.25rem;
  color: var(--text-light);
  font-weight: 600;
  margin: 0;
}

.video-note {
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: italic;
}

/* =============================================
   Figures
   ============================================= */
.figure-container {
  display: grid;
  gap: 3rem;
  margin: 2rem 0;
}

.figure {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.figure:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

.figure img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  border-radius: 10px;
  margin-bottom: 1rem;
  object-fit: contain;
}

.figure-caption {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
}

.figure-caption strong {
  color: var(--primary-color);
  font-weight: 700;
}

/* =============================================
   Image Placeholders
   ============================================= */
.image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  margin-bottom: 1rem;
}

.image-placeholder i {
  font-size: 3rem;
  color: #94a3b8;
}

.image-placeholder p {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
}

.placeholder-note {
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
}

.trajectory-graph {
  aspect-ratio: 16 / 10;
}

/* Obstacle avoidance images side-by-side */
.obstacle-avoidance-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .obstacle-avoidance-row {
    grid-template-columns: 1fr;
  }
}

/* Wrapped image in text */
.wrapped-image {
  float: right;
  max-width: 400px;
  margin: 0 0 1.5rem 2rem;
  background: white;
  border-radius: 15px;
  padding: 1rem;
  box-shadow: var(--card-shadow);
}

.wrapped-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 0.75rem;
}

.wrapped-image .figure-caption {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 768px) {
  .wrapped-image {
    float: none;
    max-width: 100%;
    margin: 1.5rem 0;
  }
}

/* =============================================
   Contribution Grid
   ============================================= */
.contribution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.contribution-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
}

.contribution-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--accent-color);
}

.contribution-card i {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.contribution-card h3 {
  color: var(--primary-color);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.contribution-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* =============================================
   Publication Section
   ============================================= */
.publication-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 4rem 0;
  width: 100%;
  margin-bottom: 3rem;
}

.publication-card {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.publication-icon {
  flex-shrink: 0;
}

.publication-icon i {
  font-size: 3rem;
  color: var(--accent-color);
}

.publication-info h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.publication-info p {
  margin: 0.5rem 0;
  color: var(--text-color);
}

.authors {
  font-weight: 600;
  color: var(--text-color);
}

.venue {
  font-style: italic;
  color: var(--text-light);
}

.subjects {
  font-size: 0.9rem;
  color: var(--text-light);
}

.publication-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.pub-link:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* =============================================
   Back to Projects Button
   ============================================= */
.back-to-projects-section {
  padding: 4rem 0;
  width: 100%;
  background: white;
}

.back-to-projects {
  text-align: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* =============================================
   Responsive Design
   ============================================= */
@media (max-width: 768px) {
  .project-meta {
    flex-direction: column;
    gap: 1rem;
  }

  .publication-card {
    flex-direction: column;
    text-align: center;
  }

  .publication-icon {
    margin: 0 auto;
  }

  .publication-links {
    justify-content: center;
  }

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

  .video-placeholder {
    padding: 3rem 1.5rem;
    min-height: 300px;
  }

  .video-container-vertical {
    max-width: 100%;
    padding: 0 1rem;
  }

  .video-container video {
    max-height: 60vh;
  }

  .figure img {
    max-height: 60vh;
  }

  .video-caption {
    font-size: 0.9rem;
    padding: 0 1rem;
  }

  .back-nav {
    padding: 0.75rem 0;
  }
}

@media (max-width: 480px) {
  .tech-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .section-heading {
    font-size: 1.5rem;
  }

  .content-text {
    font-size: 1rem;
  }
}

/* =============================================
   Dark Mode Support
   ============================================= */
:root[data-theme='dark'] .back-nav {
  background: rgba(15, 23, 42, 0.95);
  border-bottom-color: #1e293b;
}

:root[data-theme='dark'] .back-link {
  color: #93c5fd;
}

:root[data-theme='dark'] .back-link:hover {
  color: #60a5fa;
}

:root[data-theme='dark'] .project-detail-main {
  background: #0b1220;
}

:root[data-theme='dark'] .project-header-section {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

:root[data-theme='dark'] .project-title {
  color: white;
}

:root[data-theme='dark'] .project-subtitle {
  color: rgba(255, 255, 255, 0.9);
}

:root[data-theme='dark'] .meta-item {
  color: rgba(255, 255, 255, 0.95);
}

:root[data-theme='dark'] .meta-item i {
  color: rgba(255, 255, 255, 0.8);
}

:root[data-theme='dark'] .meta-item a {
  color: white;
}

:root[data-theme='dark'] .meta-item a:hover {
  color: rgba(255, 255, 255, 0.8);
}

:root[data-theme='dark'] .tech-badge {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

:root[data-theme='dark'] .methodology-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

:root[data-theme='dark'] .contributions-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

:root[data-theme='dark'] .video-section {
  background: #0b1220;
}

:root[data-theme='dark'] .back-to-projects-section {
  background: #0b1220;
}

:root[data-theme='dark'] .section-heading {
  color: #93c5fd;
  border-bottom-color: #06b6d4;
}

:root[data-theme='dark'] .content-text {
  color: #cbd5e1;
}

:root[data-theme='dark'] .content-text h3 {
  color: #93c5fd;
}

:root[data-theme='dark'] .feature-list strong {
  color: #93c5fd;
}

:root[data-theme='dark'] .video-placeholder {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-color: #06b6d4;
}

:root[data-theme='dark'] .video-placeholder p {
  color: #94a3b8;
}

:root[data-theme='dark'] .video-note {
  color: #64748b;
}

:root[data-theme='dark'] .video-caption {
  color: #94a3b8;
}

:root[data-theme='dark'] .video-container video {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

:root[data-theme='dark'] .figure {
  background: #0f172a;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

:root[data-theme='dark'] .figure-caption {
  color: #94a3b8;
}

:root[data-theme='dark'] .figure-caption strong {
  color: #93c5fd;
}

:root[data-theme='dark'] .image-placeholder {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-color: #334155;
}

:root[data-theme='dark'] .image-placeholder i {
  color: #475569;
}

:root[data-theme='dark'] .image-placeholder p {
  color: #cbd5e1;
}

:root[data-theme='dark'] .placeholder-note {
  color: #64748b;
}

:root[data-theme='dark'] .wrapped-image {
  background: #0f172a;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

:root[data-theme='dark'] .wrapped-image .figure-caption {
  color: #94a3b8;
}

:root[data-theme='dark'] .contribution-card {
  background: #0f172a;
  border-color: #1e293b;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

:root[data-theme='dark'] .contribution-card:hover {
  border-color: #06b6d4;
}

:root[data-theme='dark'] .contribution-card h3 {
  color: #93c5fd;
}

:root[data-theme='dark'] .contribution-card p {
  color: #94a3b8;
}

:root[data-theme='dark'] .publication-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

:root[data-theme='dark'] .publication-info h3 {
  color: #93c5fd;
}

:root[data-theme='dark'] .publication-info p {
  color: #cbd5e1;
}

:root[data-theme='dark'] .authors {
  color: #cbd5e1;
}

:root[data-theme='dark'] .venue {
  color: #94a3b8;
}

:root[data-theme='dark'] .subjects {
  color: #64748b;
}

:root[data-theme='dark'] .theme-toggle {
  border-color: #93c5fd;
}

:root[data-theme='dark'] .theme-toggle:hover {
  background: #93c5fd;
}

