/**
 * Project Detail — Miller Digital Construction
 * Scrollable gallery with title and description per image.
 * Mobile-first, breakpoints: 0-639px, 640-1023px, 1024px+
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--color-bg);
  color: var(--color-fg);
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image: var(--gradient-bg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

a {
  color: var(--color-link);
  text-decoration: none;
  border-bottom: 1px dotted var(--color-link-border);
  transition: border-color 0.2s ease, color 0.2s ease;
}

a:hover {
  border-bottom-color: var(--color-link);
  color: var(--color-link-hover);
}

/* Site Header */
.site-header {
  padding: 1rem 1.5rem;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border-bg);
}

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

.back-link {
  font-size: 0.9rem;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
}

/* Main */
#main {
  flex: 1;
}

/* Project Title */
.project-title {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
}

.project-title h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  color: var(--color-fg);
}

@media (min-width: 640px) {
  .project-title h1 {
    font-size: 1.75rem;
  }
}

@media (min-width: 1024px) {
  .project-title h1 {
    font-size: 2rem;
  }
}

.project-title .project-subtitle {
  margin: 0.5rem 0 0 0;
  font-size: 1rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.1rem;
  color: var(--color-fg-muted);
}

/* Project Info (metadata) */
.project-info {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}

.project-meta {
  margin: 0;
  padding: 1.5rem;
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border-muted);
  border-radius: 4px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 2rem;
}

.project-meta dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  color: var(--color-link);
}

.project-meta dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-fg-muted);
}

@media (min-width: 640px) {
  .project-meta {
    grid-template-columns: repeat(2, auto 1fr);
  }
}

/* Project Copy (description, services) */
.project-copy {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}

.project-copy h2 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  color: var(--color-link);
  border-bottom: 1px solid var(--color-border-muted-alt);
  padding-bottom: 0.5rem;
  width: max-content;
}

.project-copy p {
  margin: 0 0 1rem 0;
  color: var(--color-fg-muted);
  line-height: 1.75;
}

.project-copy p:last-child {
  margin-bottom: 0;
}

/* Template Instructions (project-template.html only) */
.template-instructions {
  max-width: 1200px;
  margin: 1rem auto 2rem;
  padding: 1.5rem 1.5rem 2rem;
  background: var(--color-accent-box-bg);
  border: 1px solid var(--color-accent-box-border);
  border-radius: 4px;
}

.template-instructions h2 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15rem;
  color: var(--color-link);
}

.template-instructions ol {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--color-fg-muted);
}

.template-instructions li {
  margin-bottom: 0.75rem;
}

.template-instructions ul {
  margin: 0.5rem 0 0 1rem;
  padding-left: 1rem;
}

.template-instructions code {
  background: var(--color-card-overlay);
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
  font-size: 0.85em;
}

/* Gallery Scroll — vertical stack of images with title + description */
.gallery-scroll {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.gallery-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.gallery-figure picture,
.gallery-figure img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.gallery-figure figcaption {
  padding: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gallery-figure figcaption strong {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  color: var(--color-fg);
}

.gallery-figure figcaption span {
  font-size: 0.9rem;
  color: var(--color-fg-muted-alt);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  padding: 1.5rem 1.5rem 2rem;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border-bg);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-fg-muted-alt);
}
