/* Project Detail Page Styles
   Extends main styles.css with project-specific components
   ========================================================= */

/* Breadcrumb Navigation */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms ease;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb-separator {
  color: var(--border);
}

.breadcrumb-current {
  color: var(--text);
}

/* Project Hero Section */
.project-hero {
  padding: 48px 0 56px;
  border-bottom: 1px solid rgba(122, 162, 255, 0.12);
}

.project-hero h1 {
  font-size: clamp(28px, 5vw, 42px);
  margin: 0 0 12px;
  line-height: 1.2;
}

.project-tagline {
  font-size: 20px;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 640px;
}

/* Project Metadata */
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 20px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.meta-value {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.stat-card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-strong) 100%);
  border: 1px solid rgba(122, 162, 255, 0.2);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition:
    transform 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--muted);
}

/* Code Block Styling */
.code-block {
  background: var(--panel-strong);
  border: 1px solid rgba(122, 162, 255, 0.15);
  border-radius: 12px;
  overflow: hidden;
  margin: 24px 0;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(122, 162, 255, 0.06);
  border-bottom: 1px solid rgba(122, 162, 255, 0.1);
}

.code-filename {
  font-size: 13px;
  color: var(--muted);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

.code-lang {
  font-size: 12px;
  padding: 4px 8px;
  background: rgba(122, 162, 255, 0.15);
  border-radius: 4px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-content {
  padding: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.code-content pre {
  margin: 0;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre;
}

/* Syntax Highlighting (Dark Theme) */
.code-keyword {
  color: #c792ea;
}

.code-string {
  color: #c3e88d;
}

.code-function {
  color: #82aaff;
}

.code-comment {
  color: #546e7a;
  font-style: italic;
}

.code-number {
  color: #f78c6c;
}

.code-property {
  color: #ffcb6b;
}

.code-type {
  color: #ffcb6b;
}

/* Tech Stack Grid */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-strong) 100%);
  border: 1px solid rgba(122, 162, 255, 0.2);
  border-radius: 12px;
  text-align: center;
  transition:
    transform 200ms ease,
    border-color 200ms ease;
}

.tech-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.tech-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(122, 162, 255, 0.1);
  border-radius: 12px;
  font-size: 24px;
}

.tech-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.tech-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* Impact/Results Section */
.impact-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.impact-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 16px;
  line-height: 1.6;
  color: var(--text);
}

.impact-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* CTA Section */
.cta-section {
  padding: 48px 0;
  text-align: center;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.button-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition:
    transform 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.button-primary:hover {
  transform: translateY(-2px);
  background: var(--accent-strong);
  box-shadow: 0 8px 24px rgba(122, 162, 255, 0.3);
  color: var(--bg);
}

.button-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.button-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(122, 162, 255, 0.08);
  color: var(--text);
}

/* Section Titles */
.section-title {
  font-size: 28px;
  margin: 0 0 16px;
  color: var(--text);
}

.section-subtitle {
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 640px;
}

/* Challenge/Problem Section */
.challenge-content {
  max-width: 720px;
}

.challenge-content p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 16px;
}

/* Project Navigation (prev/next) */
.project-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 0;
  border-top: 1px solid rgba(122, 162, 255, 0.1);
}

.project-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(122, 162, 255, 0.15);
  background: rgba(122, 162, 255, 0.04);
  transition:
    border-color 150ms ease,
    background 150ms ease;
  max-width: 45%;
}

.project-nav-link:hover {
  border-color: var(--accent);
  background: rgba(122, 162, 255, 0.08);
}

.project-nav-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.project-nav-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.project-nav-link.next {
  text-align: right;
  margin-left: auto;
}

/* Arrow Icon */
.arrow {
  display: inline-block;
  transition: transform 150ms ease;
}

.button-primary:hover .arrow,
.button-secondary:hover .arrow {
  transform: translateX(4px);
}

/* Mobile Responsiveness */
@media (max-width: 720px) {
  .project-hero {
    padding: 32px 0 40px;
  }

  .project-hero h1 {
    font-size: 28px;
  }

  .project-tagline {
    font-size: 17px;
  }

  .project-meta {
    gap: 16px;
  }

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

  .stat-value {
    font-size: 26px;
  }

  .code-content {
    padding: 16px;
  }

  .code-content pre {
    font-size: 13px;
  }

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

  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .button-primary,
  .button-secondary {
    justify-content: center;
  }

  .project-nav {
    flex-direction: column;
  }

  .project-nav-link {
    max-width: 100%;
  }

  .project-nav-link.next {
    text-align: left;
  }

  .section-title {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

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

  .breadcrumb {
    font-size: 13px;
  }
}
