/* ============================================
   Shared styles for all project detail pages
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; transition: opacity 0.3s ease; }
a:hover { opacity: 0.7; }

img { max-width: 100%; height: auto; display: block; }

/* Navigation */
.navigation {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1.5rem 0;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.nav-logo { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.02em; }

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #666;
  transition: color 0.3s ease;
}
.nav-back:hover { opacity: 1; color: #000; }
.nav-back svg { transition: transform 0.3s ease; }
.nav-back:hover svg { transform: translateX(-4px); }

/* Hero */
.project-hero {
  padding: 10rem 2rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.project-meta {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.project-tag {
  padding: 0.5rem 1rem;
  background-color: #f5f5f5;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #666;
}

.project-tag--live {
  background-color: #dcfce7;
  color: #166534;
}

.project-tag--concept {
  background-color: #fef3c7;
  color: #92400e;
}

.project-title {
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.project-subtitle {
  font-size: clamp(1.0625rem, 2vw, 1.5rem);
  color: #666;
  max-width: 700px;
  line-height: 1.6;
}

/* Image */
.project-image-section {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.project-image-wrapper {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.project-image-wrapper--dark {
  background-color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
}

.project-image-wrapper--dark .project-image {
  max-width: 400px;
  width: 100%;
  height: auto;
}

.project-image {
  width: 100%;
  height: auto;
  display: block;
}

/* CTA row (Visit Site / GitHub / Report) */
.project-actions {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 2rem 0;
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* From Uiverse.io by arthur_6104 — kept for visual continuity */
.box-button {
  cursor: pointer;
  border: 4px solid black;
  background-color: gray;
  padding-bottom: 10px;
  transition: 0.1s ease-in-out;
  user-select: none;
  text-decoration: none;
  display: inline-block;
}

.button {
  background-color: #dddddd;
  border: 4px solid #fff;
  padding: 3px 8px;
}

.button span {
  font-size: 1.1em;
  letter-spacing: 1px;
}

.box-button:active {
  padding: 0;
  margin-bottom: 10px;
  transform: translateY(10px);
}

.box-button:hover { opacity: 1; }

/* Content */
.project-content {
  padding: 4rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.content-section { margin-bottom: 3rem; }

.content-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.content-text {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #333;
}

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

.content-list { list-style: none; padding: 0; }

.content-list li {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #333;
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.75rem;
}

.content-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: #999;
}

/* Stack pills */
.stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.stack-pill {
  padding: 0.4rem 0.9rem;
  background: #f5f5f5;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  font-size: 0.8125rem;
  color: #333;
  font-weight: 500;
}

/* Footer — buttons stick directly to the bottom of the viewport, no container */
.project-footer {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 900;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  pointer-events: none;
}
.project-footer > * { pointer-events: auto; }

.footer-nav { display: flex; gap: 1rem; flex-wrap: nowrap; }

/* Push content above so it isn't hidden under the buttons */
body { padding-bottom: 96px; }

/* Responsive */
@media (max-width: 768px) {
  .navigation { padding: 1rem 0; }
  .nav-container { padding: 0 1.25rem; }
  .nav-logo { font-size: 1rem; }
  .nav-back { font-size: 0.875rem; }

  .project-hero { padding: 7rem 1.25rem 2.5rem; }

  .project-image-section { padding: 1rem 1.25rem; }
  .project-image-wrapper--dark { padding: 2rem 1.5rem; }

  .project-actions { padding: 1rem 1.25rem 0; gap: 0.75rem; }
  .button { padding: 3px 6px; }
  .button span { font-size: 0.95em; letter-spacing: 0.5px; }

  .project-content { padding: 2.5rem 1.25rem; }
  .content-text, .content-list li { font-size: 1rem; }

  .project-footer {
    bottom: 12px;
    left: 12px;
    right: 12px;
    gap: 0.5rem;
  }
  .footer-nav { gap: 0.5rem; }
  body { padding-bottom: 84px; }
}

@media (max-width: 420px) {
  .project-hero { padding-top: 6rem; }
  .project-title { font-size: 2.25rem; }
  .project-tag { font-size: 0.8125rem; padding: 0.4rem 0.75rem; }
}

/* Live demo embed */
.project-demo-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 2rem 0;
}

.project-demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.project-demo-label {
  font-size: 0.75rem;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  font-weight: 600;
}

.project-demo-fullscreen {
  font-size: 0.8125rem;
  color: #999;
}
.project-demo-fullscreen:hover { color: #333; opacity: 1; }

.project-demo-iframe {
  width: 100%;
  height: 680px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  display: block;
  background: #f9fafb;
}

@media (max-width: 768px) {
  .project-demo-iframe { height: 480px; }
  .project-demo-section { padding: 1.5rem 1.25rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
