/**
 * Portfolio Website - Enhanced Project Detail Pages
 * Comprehensive styles for engaging project showcases
 * Author: Munevver Aslan
 */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family-primary);
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-background);
  overflow-x: hidden;
  font-weight: 300;
  transition: all 0.3s ease;
}

body:hover {
  background: var(--color-background-secondary);
}

body:hover .challenge-card,
body:hover .solution-card,
body:hover .feature-card,
body:hover .testimonial,
body:hover .next-project-link {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(217, 221, 220, 0.9);
}

body:hover .challenge-card:hover,
body:hover .solution-card:hover,
body:hover .feature-card:hover,
body:hover .testimonial:hover,
body:hover .next-project-link:hover {
  transform: translateY(-7px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(217, 221, 220, 1);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700 !important;
  /* Black font weight */
}

.project-title,
.project-section h2,
.project-details h3,
.gallery-caption h4,
.challenge-card h3,
.solution-card h3,
.feature-card h3,
.process-step h3,
.metric-value,
.next-project-link h3 {
  font-weight: 700 !important;
  /* Black font weight */
}

p,
span,
dd,
dt,
li,
blockquote,
cite {
  font-weight: 300;
}

/* Layout Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Enhanced Project Hero Section */
.project-hero {
  padding: 6rem 0 4rem;
  position: relative;
  text-align: center;
}

.project-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--color-border) 50%, transparent 100%);
}

.project-header {
  text-align: center;
  margin-bottom: 4rem;
}

.project-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-wrap: wrap;
}

.project-meta span {
  position: relative;
  white-space: nowrap;
}

.project-meta span:not(:last-child)::after {
  content: '•';
  position: absolute;
  right: -1rem;
  color: var(--color-text-muted);
}

.project-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  line-height: 1.1;
}

.project-subtitle {
  max-width: 800px;
  margin: 0 auto 2rem;
  font-size: 1.2rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  font-weight: 300;
}

/* Hero Image with Enhanced Presentation */
.project-image-hero {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px hsl(var(--pure-black-hsl), 0.8);
  background: var(--color-surface);
  position: relative;
}

.project-image-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, hsl(var(--color-pure-white-hsl), 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: var(--z-docked);
}

.project-image-hero img {
  width: 100%;
  height: auto;
  min-height: 400px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.project-image-hero:hover img {
  transform: scale(1.02);
}

/* Enhanced Section Layouts */
.project-section {
  padding: 5rem 0;
  position: relative;
}

.project-section:not(:last-child) {
  border-bottom: 0.5px solid var(--color-surface);
}

.project-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  text-align: center;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

/* Section Grid Layout */
.section-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.content-column h2 {
  font-size: 2rem;
  text-align: left;
  margin-bottom: 2rem;
}

.content-column p {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-weight: 300;
}

/* Project Details Card */
.project-details {
  background: var(--color-surface);
  border: 0.5px solid var(--color-border);
  border-radius: 8px;
  padding: 2rem;
  position: sticky;
  top: 2rem;
}

.project-details h3 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--color-text-primary);
  font-weight: 700;
}

.project-details dl {
  display: grid;
  gap: 1rem;
}

.project-details dt {
  font-weight: 300;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-details dd {
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
  font-weight: 300;
}

/* Enhanced Image Gallery */
.image-gallery {
  margin: 4rem 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.gallery-item {
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-surface);
  transition: all 0.3s ease;
}

.gallery-item:hover {
  border: 1px solid transparent;
  transform: translateY(-8px);
  box-shadow: 0 16px 40px hsl(var(--pure-black-hsl), 0.7);
  background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box, var(--border-gradient-hover) border-box;
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-caption {
  padding: 1.5rem;
}

.gallery-caption h4 {
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.gallery-caption p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  font-weight: 300;
}

/* Challenge & Solution Grid */
.challenge-solution-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
}

.challenge-card,
.solution-card {
  background-color: var(--color-background-secondary);
  border-radius: 8px;
  padding: 1.5rem;
  position: relative;
  border: 1px solid rgba(217, 221, 220, 0.7);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-width 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text-primary);
}

.challenge-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-secondary);
  border-radius: 12px 12px 0 0;
}

.solution-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-primary);
  border-radius: 12px 12px 0 0;
}

.challenge-card h3,
.solution-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
}

.challenge-card ul,
.solution-card ul {
  list-style: none;
}

.challenge-card li,
.solution-card li {
  padding: 0.5rem 0;
  color: var(--color-text-secondary);
  border-bottom: 0.5px solid var(--color-border);
  position: relative;
  padding-left: 1.5rem;
  font-weight: 300;
  font-size: 0.9rem;
}

.challenge-card li::before {
  content: '⚠';
  position: absolute;
  left: 0;
  color: var(--color-text-primary);
}

.solution-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-text-primary);
}

.challenge-card li:last-child,
.solution-card li:last-child {
  border-bottom: none;
}

.challenge-card:hover,
.solution-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(217, 221, 220, 0.7);
}

.challenge-card:focus,
.solution-card:focus {
  outline: 2px solid rgba(217, 221, 220, 0.7);
  outline-offset: var(--border-width-thick);
  border: 2px solid rgba(217, 221, 220, 0.7);
}

.challenge-card:focus-visible,
.solution-card:focus-visible {
  outline: 2px solid rgba(217, 221, 220, 0.7);
  outline-offset: var(--border-width-thick);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  background-color: var(--color-background-secondary);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-width 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(217, 221, 220, 0.7);
  text-decoration: none;
  color: var(--color-text-primary);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-gradient) 50%, transparent 100%);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(217, 221, 220, 0.7);
}

.feature-card:focus {
  outline: 2px solid rgba(217, 221, 220, 0.7);
  outline-offset: var(--border-width-thick);
  border: 2px solid rgba(217, 221, 220, 0.7);
}

.feature-card:focus-visible {
  outline: 2px solid rgba(217, 221, 220, 0.7);
  outline-offset: var(--border-width-thick);
}

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

.feature-card p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  font-weight: 300;
}

/* Process Timeline */
.process-timeline {
  margin-top: 3rem;
}

.process-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  position: relative;
}

.process-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 40px;
  top: 80px;
  bottom: -48px;
  width: 2px;
  background: linear-gradient(180deg, var(--color-border) 0%, transparent 100%);
}

.step-number {
  width: 80px;
  height: 80px;
  border: 1px solid transparent;
  background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box, var(--border-gradient) border-box;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-text-primary);
  box-shadow: 0 8px 24px hsl(var(--pure-black-hsl), 0.3);
  transition: all 0.3s ease;
}

.step-number:hover {
  background: var(--gradient-orange-green-hover);
  border: 1px solid transparent;
}

.process-step h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-text-primary);
  font-weight: 700;
}

.process-step p {
  color: var(--color-text-secondary);
  line-height: 1.6;
  font-size: 1rem;
  font-weight: 300;
}

/* Results Section */
.results-section {
  background: var(--background-subtle);
  border-radius: 16px;
  padding: 4rem;
  margin: 4rem 0;
  position: relative;
}

.results-section::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, hsl(var(--color-pure-white-hsl), 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.result-metric {
  text-align: center;
}

.metric-value {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 300;
}

/* Testimonial */
.testimonial {
  border-left: 2px solid transparent;
  border-image: var(--border-gradient) 1;
  padding-left: 2rem;
  margin-top: 3rem;
  background: var(--color-surface);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid rgba(217, 221, 220, 0.7);
  transition: border-width 0.3s ease, border-color 0.3s ease;
}

.testimonial blockquote {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--color-text-primary);
  line-height: 1.6;
  margin-bottom: 1rem;
  font-weight: 300;
}

.testimonial cite {
  color: var(--color-text-secondary);
  font-style: normal;
  font-size: 0.9rem;
  font-weight: 300;
}

/* Next Project Navigation */
.next-project {
  margin-top: 6rem;
  padding-top: 4rem;
  border-top: 0.5px solid var(--color-border);
}

.next-project-link {
  display: block;
  background: var(--background-subtle);
  border-radius: 12px;
  padding: 3rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(217, 221, 220, 0.7);
  transition: border-width 0.3s ease, border-color 0.3s ease;
}

.next-project-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: hsl(var(--amber-accent-hsl), 0.05);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.next-project-link:hover {
  border: 2px solid rgba(217, 221, 220, 0.7);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px hsl(var(--pure-black-hsl), 0.7);
}

.next-project-link:hover::before {
  opacity: 1;
}

.next-label {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 1rem;
  font-weight: 300;
}

.next-project-link h3 {
  font-size: 1.8rem;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.next-project-link p {
  color: var(--color-text-secondary);
  font-size: 1rem;
  font-weight: 300;
}

/* Enhanced Back Link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 3rem;
  color: var(--color-text-primary);
  text-decoration: none;
  font-weight: 300;
  transition: all 0.3s ease;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  border: 1px solid transparent;
  background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box, var(--border-gradient) border-box;
}

.back-link:hover {
  color: var(--color-text-primary);
  background: var(--gradient-orange-green-hover);
  transform: translateY(-2px);
  border: 1px solid transparent;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
  margin-bottom: 1rem;
}

.breadcrumb {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.breadcrumb li:not(:last-child)::after {
  content: '•';
  margin-left: 0.5rem;
  color: var(--color-text-muted);
}

.breadcrumb a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.breadcrumb li[aria-current="page"] {
  color: var(--color-text-primary);
  font-weight: 500;
}

/* Features List */
.features-list {
  list-style: none;
  margin-top: 1rem;
}

.features-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border-secondary);
  font-weight: 300;
  line-height: 1.6;
}

.features-list li:last-child {
  border-bottom: none;
}

.features-list strong {
  font-weight: 600;
  color: var(--color-text-primary);
}

/* Site Footer */
.site-footer {
  margin-top: 6rem;
  padding: 3rem 0;
  border-top: 0.5px solid var(--color-border-primary);
  background: var(--color-background-secondary);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.built-by {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  font-weight: 300;
}

.built-by a {
  color: var(--color-accent-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.built-by a:hover {
  color: var(--color-text-primary);
}

.copyright {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 300;
}

/* Responsive Design */
@media (max-width: 768px)
/* Tablet and below */
  {
  .container {
    padding: 0 20px;
  }

  .project-hero {
    padding: 4rem 0 3rem;
  }

  .project-title {
    font-size: 2.5rem;
  }

  .project-subtitle {
    font-size: 1.1rem;
  }

  .project-meta {
    gap: 1rem;
    justify-content: center;
    text-align: center;
  }

  .project-meta span {
    white-space: normal;
  }

  .project-meta span:not(:last-child)::after {
    display: none;
  }

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

  .project-details {
    position: static;
  }

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

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

  .process-step {
    grid-template-columns: 60px 1fr;
    gap: 1rem;
  }

  .step-number {
    width: 60px;
    height: 60px;
    font-size: 1.2rem;
  }

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

  .metric-value {
    font-size: 2.5rem;
  }

  .next-project-link {
    padding: 2rem;
  }

  .testimonial {
    padding-left: 1rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .breadcrumb {
    font-size: 0.8rem;
  }
}

/* Small Mobile Responsive Design */
@media (max-width: 480px) {
  .project-meta {
    gap: 0.75rem;
    font-size: 0.8rem;
  }

  .project-meta span {
    padding: 0.25rem 0.5rem;
    background: var(--color-background-tertiary);
    border-radius: 4px;
    margin: 0.125rem;
  }
}