/* === CONTENT.CSS — Blog posts, case studies, blog index === */

/* --- CONTENT PAGE LAYOUT --- */
.content-page {
  padding-top: 5rem;
}

/* --- POST HEADER --- */
.post-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(232, 100, 58, 0.08);
}

.post-header h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--text);
}

.post-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.post-meta span::before {
  content: '> ';
  color: var(--text-dim);
}

/* --- POST CONTENT (reading typography) --- */
.post-content {
  max-width: var(--content-width);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.post-content h2 {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--text);
  margin: 3rem 0 1rem;
  line-height: 1.2;
}

.post-content h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text);
  margin: 2.5rem 0 0.8rem;
  line-height: 1.3;
}

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

.post-content a {
  color: var(--phosphor);
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 100, 58, 0.3);
  transition: border-color 0.3s;
}

.post-content a:hover {
  border-color: var(--phosphor);
}

.post-content strong {
  color: var(--text);
  font-weight: 500;
}

.post-content em {
  font-style: italic;
}

.post-content code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg-elevated);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  border: 1px solid rgba(232, 100, 58, 0.08);
  color: var(--phosphor);
}

.post-content pre {
  background: var(--bg-elevated);
  border: 1px solid rgba(232, 100, 58, 0.1);
  border-radius: 6px;
  padding: 1.5rem;
  margin: 2rem 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.post-content pre code {
  background: none;
  padding: 0;
  border: none;
  border-radius: 0;
  color: inherit;
  font-size: inherit;
}

.post-content blockquote {
  border-left: 3px solid var(--phosphor);
  padding-left: 1.5rem;
  margin: 2rem 0;
  color: var(--text-muted);
  font-style: italic;
}

.post-content ul,
.post-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content hr {
  border: none;
  border-top: 1px solid rgba(232, 100, 58, 0.08);
  margin: 3rem 0;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
  border: 1px solid rgba(232, 100, 58, 0.1);
}

/* --- SCREENSHOT GRID --- */
.screenshot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

.screenshot-grid figure {
  margin: 0;
  text-align: center;
}

.screenshot-grid img {
  width: 100%;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity 0.2s;
  border: 1px solid rgba(232, 100, 58, 0.1);
}

.screenshot-grid img:hover {
  opacity: 0.8;
}

.screenshot-grid figcaption {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

/* --- LIGHTBOX --- */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
}

.lightbox-overlay.active {
  opacity: 1;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
}

/* --- CASE STUDY HEADER --- */
.cs-tagline {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--phosphor);
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.cs-tagline::before {
  content: '> ';
  color: var(--text-dim);
}

.cs-description {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: var(--content-width);
}

.cs-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.cs-stack .stack-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 0.3rem 0.7rem;
  background: var(--phosphor-faint);
  border: 1px solid rgba(232, 100, 58, 0.12);
  border-radius: 3px;
  color: var(--text-muted);
}

.cs-metrics {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(232, 100, 58, 0.08);
}

.cs-metrics .metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.cs-metrics .metric-value {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--green);
  text-shadow: 0 0 20px var(--green-glow);
}

.cs-metrics .metric-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* --- BLOG INDEX --- */
.post-list {
  list-style: none;
  max-width: var(--terminal-width);
}

.post-list-item {
  border-bottom: 1px solid rgba(232, 100, 58, 0.06);
}

.post-list-item:last-child {
  border-bottom: none;
}

.post-list-item a {
  display: block;
  padding: 1.5rem 0;
  text-decoration: none;
  transition: all 0.3s;
}

.post-list-item a:hover {
  padding-left: 0.5rem;
}

.post-list-date {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}

.post-list-title {
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.4rem;
  transition: color 0.3s;
}

.post-list-item a:hover .post-list-title {
  color: var(--phosphor);
}

.post-list-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --- POST NAVIGATION --- */
.post-nav {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(232, 100, 58, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.post-nav a {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.post-nav a:hover {
  color: var(--phosphor);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.3s;
}

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

.back-link::before {
  content: '\2190';
}

/* --- RESPONSIVE (content) --- */
@media (max-width: 600px) {
  .post-header h1 {
    font-size: 1.8rem;
  }

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

  .cs-metrics {
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .post-nav {
    flex-direction: column;
  }
}
