/**
 * reader.css — Article reader page styles (extracted from inline <style>).
 * Mobile-first with min-width breakpoints.
 */

/* ========== Article accent custom property ========== */

:root {
  --article-accent: #a855f7;
}

/* ========== Container ========== */

.article-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 5rem 1rem 4rem;
  min-height: 100vh; /* fallback */
  min-height: 100dvh;
}

/* ========== Article header ========== */

.article-header {
  margin-bottom: 2rem;
}

.article-header .headline {
  font-family: 'Press Start 2P', 'VT323', monospace;
  font-size: clamp(0.65rem, 2.5vw, 1.2rem);
  text-transform: uppercase;
  color: var(--article-accent);
  -webkit-text-stroke: 0;
  text-shadow: none;
  margin-bottom: 1rem;
  line-height: 1.8;
}

.article-header .meta {
  font-family: 'Space Mono', 'Courier New', monospace;
  color: var(--text-muted);
  font-size: 1rem;
  letter-spacing: 0.1em;
}

/* ========== Article content ========== */

.article-content {
  font-family: 'Space Mono', 'Courier New', monospace;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.8;
}

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

.article-content h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  color: var(--article-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 2.5rem 0 1.25rem;
}

.article-content strong {
  color: var(--article-accent);
}

.article-content blockquote {
  border-left: 2px solid var(--article-accent);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
  font-family: 'Space Mono', 'Courier New', monospace;
}

.article-content ul,
.article-content ol {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  font-family: 'Space Mono', 'Courier New', monospace;
}

.article-content li {
  margin-bottom: 0.75rem;
  position: relative;
  font-family: 'Space Mono', 'Courier New', monospace;
}

.article-content li::marker {
  color: var(--article-accent);
}

.article-content code {
  background: rgba(34, 197, 94, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 2px;
  color: var(--article-accent);
}

/* ========== Article images (figures) ========== */

.article-figure {
  width: 100%;
  margin: 1.5rem 0;
}

.article-figure img {
  width: 100%;
  border: 3px solid var(--article-accent);
  transition: border-color 0.3s ease;
  cursor: none;
  display: block;
}

.article-figure img:hover {
  border-color: #ffffff;
}

.article-figure figcaption {
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-align: center;
  letter-spacing: 0.05em;
}

/* ========== Lightbox ========== */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border: 3px solid var(--article-accent);
}

/* ========== Back link ========== */

.back-link {
  display: inline-block;
  margin-top: 2rem;
  color: var(--article-accent);
  text-decoration: none;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.back-link .back-arrow {
  font-size: 1.2em;
  vertical-align: middle;
  margin-right: 0.3em;
}

.back-link:hover {
  text-decoration: underline;
}

/* ========== Responsive: sm (640px+) ========== */

@media (min-width: 640px) {
  .article-container {
    padding: 6rem 1.5rem 5rem;
  }

  .article-header {
    margin-bottom: 2.5rem;
  }

  .article-header .meta {
    font-size: 1.05rem;
  }

  .article-content {
    font-size: 1rem;
  }

  .article-content h2 {
    font-size: 0.65rem;
    margin: 2.75rem 0 1.35rem;
  }

  .article-figure img {
    border-width: 4px;
  }

  .article-figure figcaption {
    font-size: 0.9rem;
  }

  .back-link {
    font-size: 0.7rem;
  }
}

/* ========== Responsive: md (768px+) ========== */

@media (min-width: 768px) {
  .article-container {
    padding: 8rem 2rem 6rem;
  }

  .article-header {
    margin-bottom: 3rem;
  }

  .article-header .meta {
    font-size: 1.1rem;
  }

  .article-content {
    font-size: 1.1rem;
  }

  .article-content h2 {
    font-size: 0.7rem;
    margin: 3rem 0 1.5rem;
  }

  .article-content blockquote {
    padding-left: 1.5rem;
    margin: 2rem 0;
  }

  .article-content ul,
  .article-content ol {
    padding-left: 1.5rem;
  }

  .article-figure {
    margin: 2rem 0;
  }

  .article-figure img {
    border-width: 5px;
  }

  .article-figure figcaption {
    font-size: 1rem;
  }

  .lightbox-overlay img {
    border-width: 4px;
  }

  .back-link {
    margin-top: 3rem;
  }
}
