/* Project Detail Page Styles - Matching Main Portfolio Design */

.project-detail {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.project-header {
  margin-bottom: 40px;
  border: 2px solid var(--primary);
  padding: 40px;
  position: relative;
  background: var(--background);
  overflow: hidden;
}

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

.back-link {
  position: sticky;
  bottom: 20px;
  left: calc(50% + 155px);
  transform: translateX(-50%);
  color: var(--primary);
  text-decoration: none;
  font-weight: bold;
  padding: 12px 24px;
  font-family: "Special Gothic Condensed One", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 2px;
  border: 2px solid var(--primary);
  background: var(--background);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 1000;
}

.back-link svg {
  vertical-align: middle;
}

.back-link:hover {
  background: var(--primary);
  color: var(--background);
}

.title-block h1 {
  font-size: clamp(1.75rem, 6vw, 4rem);
  margin: 40px 0 15px;
  color: var(--primary);
  font-family: "Special Gothic Expanded One", sans-serif;
  letter-spacing: 2px;
  text-align: center;
  word-break: break-word;
  overflow-wrap: break-word;
}

.project-subtitle {
  font-size: 1.1rem;
  color: var(--primary);
  opacity: 0.7;
  margin-bottom: 25px;
  font-family: "Special Gothic Condensed One", sans-serif;
  text-align: center;
  word-spacing: 1px;
}

.project-last-updated {
  font-size: 0.85rem;
  color: var(--primary);
  opacity: 0.4;
  margin: 30px 0 15px;
  font-family: "Special Gothic Condensed One", sans-serif;
  text-align: center;
}

.project-meta {
  display: flex;
  justify-content: center;
  gap: 15px;
  font-size: 0.85rem;
}

.project-meta span {
  background: transparent;
  color: var(--primary);
  padding: 6px 18px;
  font-weight: bold;
  font-family: "Special Gothic Condensed One", sans-serif;
  border: 2px solid var(--primary);
  letter-spacing: 1px;
}

.project-detail-stack {
  justify-content: center;
  margin: 18px 0;
}

.project-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.project-navigation .back-link {
  position: static;
  transform: none;
  margin: 0;
}

.project-navigation-link {
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 10px 14px;
  text-decoration: none;
  font-family: "Special Gothic Condensed One", sans-serif;
  text-align: center;
}

.project-navigation-link:hover,
.project-navigation-link:focus-visible {
  background: var(--primary);
  color: var(--background);
}

.project-navigation-link:last-child {
  justify-self: end;
}

.project-links {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
}

.project-links a {
  color: var(--background);
  text-decoration: none;
  padding: 12px 20px;
  border: 2px solid var(--primary);
  background: var(--primary);
  font-family: "Special Gothic Condensed One", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 1px;
  font-weight: bold;
}

.project-links a:hover {
  background: var(--background);
  color: var(--primary);
}

.project-status {
  color: #0bbb98;
  font-weight: bold;
  font-family: "Special Gothic Condensed One", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 1px;
  padding: 8px 16px;
  border: 1px solid #0bbb98;
  background: rgba(11, 187, 152, 0.1);
  display: inline-block;
  width: fit-content;
}

.project-status.in-progress {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255, 171, 7, 0.08);
}

/* Manual gallery strip — replaces the old autoplay hero carousel */

.gallery-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}

.gallery-strip-item,
.gallery-strip-more {
  border: 2px solid var(--primary);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: block;
  position: relative;
  text-decoration: none;
  cursor: url('../cursors/handpointing.svg') 10 5, pointer;
}

.gallery-strip-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.1s ease, transform 0.3s ease;
  display: block;
}

.gallery-strip-item:hover img {
  filter: none;
  /*transform: scale(1.01);*/
}

.gallery-strip-more {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-family: "Special Gothic Expanded One", sans-serif;
  font-size: 1.3rem;
  background: var(--background);
}

.gallery-strip-more:hover {
  background: var(--primary);
  color: var(--background);
}

/* Slim right-edge "tick marks" section nav.
   .side-toc is itself a full-height strip hugging the right edge, so hovering
   anywhere near the edge of the screen — not just the thin tick line — reveals
   every section name at once. */

.side-toc {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 90px;
  box-sizing: border-box;
  padding-right: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  z-index: 50;
  pointer-events: none;
}

.side-toc-tick {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 2px;
  height: 2px;
  background: var(--primary);
  opacity: 0.4;
  text-decoration: none;
  transition: all 0.2s ease;
  pointer-events: auto;
}

.side-toc-tick:focus-visible,
.side-toc-tick.is-active {
  opacity: 1;
  width: 2px;
  background: var(--accent);
}

.side-toc-label {
  position: absolute;
  right: 16px;
  white-space: nowrap;
  background: var(--background);
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 4px 10px;
  font-family: "Special Gothic Condensed One", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 1px;
  opacity: 0;
  transform: translateX(6px);
  pointer-events: none;
  transition: all 0.2s ease;
}

.side-toc.edge-hover .side-toc-tick.is-active .side-toc-label,
.side-toc-tick:focus-visible .side-toc-label {
  opacity: 1;
  transform: translateX(0);
}

.side-toc-tick.is-active {
  color: var(--accent);
  border-color: var(--accent);
}

.side-toc-label {
  color: var(--primary);
  border-color: var(--primary);
}

@media (max-width: 900px) {
  .side-toc {
    display: none;
  }
}

.project-hero img {
  height: auto;
  border: 2px solid var(--primary);
}

.project-content {
  display: grid;
  gap: 40px;
}

/* Grid Groups */
.features-grid, .philosophy-grid, .roadmap, .specializations-grid, .quality-grid, .builds-showcase, .benefits-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.specs-grid, .tech-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.ux-features, .links-grid, .process-timeline, .expertise-areas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-top: 30px;
}

.challenges-list {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.project-section {
  background: var(--background);
  padding: 30px;
  border: 2px solid var(--primary);
}

.project-section h2 {
  margin-bottom: 20px;
  font-size: 2rem;
}

.project-section p {
  font-family: "Special Gothic Condensed One", sans-serif;
  line-height: 1.6;
  text-align: justify;
  font-size: 1.1rem;
  word-spacing: 1px;
}

/* Highlight Box for special content */
.highlight-box {
  background: var(--background);
  border: 2px solid var(--primary);
  border-left: 4px solid var(--primary);
  padding: 20px;
  margin: 20px 0;
  position: relative;
}

.highlight-box p {
  margin: 0;
  font-weight: bold;
  color: var(--primary);
}

.highlight-box p strong {
  color: var(--primary);
}

/* Card Groups */
.feature-card, .philosophy-card, .spec-group, .tech-category, .roadmap-phase, .ux-item, .link-card, .specialization-card, .process-step, .quality-item, .build-card, .expertise-category, .benefit {
  background: var(--background);
  padding: 20px;
  border: 2px solid var(--primary);
  transition: transform 0.3s ease;
}

.feature-card:hover, .philosophy-card:hover, .spec-group:hover, .tech-category:hover, .roadmap-phase:hover, .ux-item:hover, .link-card:hover, .specialization-card:hover, .process-step:hover, .quality-item:hover, .build-card:hover, .expertise-category:hover, .benefit:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  opacity: 0.8;
}

.link-card {
  text-decoration: none;
  color: var(--primary);
  transition: all 0.3s ease;
  display: block;
}

.challenge {
  background: var(--background);
  padding: 20px;
  border: 2px solid var(--primary);
  border-left: 4px solid var(--primary);
  transition: transform 0.3s ease;
}

.challenge:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  opacity: 0.8;
}

/* Heading Groups */
.project-section h2, .feature-card h3, .philosophy-card h3, .spec-group h3, .tech-category h3, .timeline-content h4, .roadmap-phase h4, .ux-item h4, .challenge h4, .link-card h3, .specialization-card h3, .process-step h4, .quality-item h3, .build-card h4, .expertise-category h3, .benefit h3, .service-details h4 {
  color: var(--primary);
  font-family: "Special Gothic Expanded One", sans-serif;
}

/* List Groups */
.spec-group ul, .tech-category ul, .specialization-card ul, .expertise-category ul, .service-details ul {
  list-style: none;
  padding: 0;
}

.spec-group li, .tech-category li, .specialization-card li, .expertise-category li, .service-details li {
  margin-bottom: 8px;
  font-family: "Special Gothic Condensed One", sans-serif;
}

.spec-group li, .specialization-card li, .service-details li {
  padding-left: 15px;
  position: relative;
}

.spec-group li::before, .specialization-card li::before, .service-details li::before {
  content: "✓";
  color: var(--primary);
  position: absolute;
  left: 0;
}

.feature-card h3, .philosophy-card h3 {
  margin-bottom: 10px;
}

.spec-group h3 {
  margin-bottom: 15px;
}

/* Timeline */
.timeline {
  position: relative;
  margin-top: 30px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary);
}

.timeline-item {
  display: flex;
  margin-bottom: 30px;
  position: relative;
}

.timeline-date {
  background: var(--background);
  color: var(--primary);
  padding: 8px 15px;
  font-weight: bold;
  margin-right: 20px;
  min-width: 120px;
  text-align: center;
  font-family: "Special Gothic Condensed One", sans-serif;
  border: 2px solid var(--primary);
}

.timeline-content h4 {
  margin-bottom: 10px;
}

.timeline-content p {
  font-family: "Special Gothic Condensed One", sans-serif;
}

/* Tech Stack */
.tech-category h3 {
  margin-bottom: 15px;
}

/* Roadmap */
.phase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.phase-number {
  background: var(--background);
  color: var(--primary);
  padding: 5px 10px;
  font-weight: bold;
  font-family: "Special Gothic Condensed One", sans-serif;
  border: 2px solid var(--primary);
}

.phase-status {
  font-size: 0.9rem;
  opacity: 0.8;
  font-family: "Special Gothic Condensed One", sans-serif;
}

.roadmap-phase.completed .phase-status {
  color: #4CAF50;
}

.roadmap-phase.in-progress .phase-status {
  color: var(--primary);
}

.roadmap-phase.planned .phase-status {
  color: var(--primary);
}

.roadmap-phase h4 {
  color: var(--primary);
  font-family: "Special Gothic Expanded One", sans-serif;
}

.ux-item h4 {
  margin-bottom: 10px;
}

.challenge h4 {
  margin-bottom: 10px;
}

.challenge p {
  font-family: "Special Gothic Condensed One", sans-serif;
}

.gallery-item {
  background: var(--background);
  border: 2px solid var(--primary);
  overflow: hidden;
  transition: all 0.4s ease;
  position: relative;
  aspect-ratio: 16/10;
  cursor: url('../cursors/handpointing.svg') 10 5, pointer;
}

.gallery-item:hover {
  border-color: var(--primary);
  transform: scale(1.02);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item p {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  margin: 0;
  font-size: 0.9rem;
  color: var(--primary);
  background: linear-gradient(transparent, rgba(7, 7, 7, 0.95));
  font-family: "Special Gothic Condensed One", sans-serif;
  word-spacing: 1px;
}

.link-card h3 {
  margin-bottom: 10px;
}

.link-card p {
  font-family: "Special Gothic Condensed One", sans-serif;
}

.specialization-card h3 {
  margin-bottom: 15px;
}

/* Process Timeline */
.process-step {
  position: relative;
}

.step-number {
  background: var(--background);
  color: var(--primary);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-bottom: 15px;
  font-family: "Special Gothic Condensed One", sans-serif;
  border: 2px solid var(--primary);
}

.process-step h4 {
  margin-bottom: 10px;
}

.process-step p {
  font-family: "Special Gothic Condensed One", sans-serif;
}

.quality-item h3 {
  margin-bottom: 10px;
}

.quality-item p {
  font-family: "Special Gothic Condensed One", sans-serif;
}

.build-card h4 {
  margin-bottom: 15px;
}

.build-specs {
  margin-bottom: 15px;
}

.build-specs p {
  margin: 5px 0;
  font-size: 0.9rem;
  font-family: "Special Gothic Condensed One", sans-serif;
}

.build-description {
  opacity: 0.9;
  font-style: italic;
  font-family: "Special Gothic Condensed One", sans-serif;
}

.expertise-category h3 {
  margin-bottom: 15px;
}

.benefit h3 {
  margin-bottom: 10px;
}

.benefit p {
  font-family: "Special Gothic Condensed One", sans-serif;
}

/* Contact Options */
.contact-options {
  display: flex;
  gap: 20px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.cta-button {
  padding: 15px 30px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  font-family: "Special Gothic Condensed One", sans-serif;
  border: 2px solid var(--primary);
}

.cta-button.primary {
  background: var(--background);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.cta-button.primary:hover {
  background: var(--primary);
  color: var(--background);
}

.cta-button.secondary {
  background: var(--background);
  color: var(--primary);
}

.cta-button.secondary:hover {
  background: var(--primary);
  color: var(--background);
}

.service-details {
  margin-top: 30px;
  padding: 20px;
  background: var(--background);
  border: 2px solid var(--primary);
}

.service-details h4 {
  margin-bottom: 15px;
}

/* Mobile Responsiveness */
@media (max-width: 885px) {
  .project-header {
    padding: 30px 20px;
  }

  .back-link {
    left: 50%;
    transform: translateX(-50%);
    display: inline-block;
    text-align: center;
    max-width: 90%;
    white-space: nowrap;
    height: auto;
    min-height: auto;
    padding: 8px 16px;
    z-index: 1000;
    writing-mode: horizontal-tb;
    text-orientation: upright;
  }

  .project-header h1 {
    font-size: 2rem;
    word-break: break-word;
    hyphens: auto;
  }

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

  .project-meta {
    flex-direction: column;
    gap: 10px;
  }

  .project-navigation {
    grid-template-columns: 1fr 1fr;
  }

  .project-navigation .back-link {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
  }

  .project-navigation-link {
    grid-row: 2;
  }

  .project-navigation-link:last-child {
    justify-self: stretch;
  }

  .gallery-strip {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

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

  .features-grid, .philosophy-grid, .specs-grid, .tech-stack, .roadmap, .ux-features, .links-grid, .specializations-grid, .process-timeline, .quality-grid, .builds-showcase, .expertise-areas, .benefits-list {
    grid-template-columns: 1fr;
  }

  .project-section {
    padding: 20px;
  }

  .contact-options {
    flex-direction: column;
  }

  .cta-button {
    text-align: center;
  }

  .timeline-item {
    flex-direction: column;
    text-align: center;
  }

  .timeline-date {
    margin-bottom: 10px;
    margin-right: 0;
  }
}

/* Feature List for dynamically rendered content */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.feature-list li {
  padding: 10px 0;
  padding-left: 25px;
  position: relative;
  font-family: "Special Gothic Condensed One", sans-serif;
  line-height: 1.6;
  font-size: 1.1rem;
  word-spacing: 1px;
}

.feature-list li::before {
  content: "✓";
  color: var(--primary);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Main content styling for project sections */
.project-section ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.project-section li {
  padding: 10px 0;
  padding-left: 25px;
  position: relative;
  font-family: "Special Gothic Condensed One", sans-serif;
  line-height: 1.6;
  word-spacing: 1px;
}

.project-section li::before {
  content: "•";
  color: var(--primary);
  position: absolute;
  left: 0;
}

.project-logo-main {
  display: block;
  max-width: 100px;
  height: auto;
  margin: 15px auto;
}

@keyframes wave {
  0%, 100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(5deg);
  }
}