/* Article-page styles. Pair with css/site-base.css (which provides root vars,
   reset, body, scanline, scrollbar, nav, footer, fade-in, nav-toggle, mobile,
   page-header chrome, and breadcrumb). */

/* POST HEADER */
.post-header {
  padding: 80px 0 64px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}

.post-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cyan);
  border: 1px solid rgba(0,210,210,0.25);
  padding: 4px 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 20px;
}

.post-header h1 {
  font-family: var(--mono);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 700;
  color: #e8f0f8;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 20px;
  max-width: 760px;
}

.section-divider {
  width: 48px;
  height: 2px;
  background: var(--cyan);
  margin-bottom: 20px;
  position: relative;
}
.section-divider::after {
  content: '';
  position: absolute;
  right: -8px; top: -3px;
  width: 8px; height: 8px;
  background: var(--cyan);
  clip-path: polygon(0 50%, 50% 0, 100% 50%, 50% 100%);
}

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}

.post-meta a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.post-meta a:hover { color: var(--cyan); }

/* POST BODY */
.post-body {
  padding: 60px 0 120px;
}

.post-content {
  max-width: 700px;
}

.post-content p {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.9;
  margin-bottom: 1.4rem;
  font-weight: 300;
}

.post-content h2 {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  color: #e8f0f8;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.post-content h3 {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin: 2rem 0 0.75rem;
  letter-spacing: 0.02em;
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.4rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-content ul {
  list-style: none;
}

.post-content ul li,
.post-content ol li {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.8;
  font-weight: 300;
  padding-left: 1.5rem;
  position: relative;
}

.post-content ul li::before {
  content: '\25B8';
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-size: 0.7rem;
  top: 0.32rem;
}

.post-content ol {
  list-style: decimal;
  margin-left: 1.5rem;
}

.post-content a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(0,210,210,0.3);
  transition: border-color 0.2s;
}
.post-content a:hover { border-color: var(--cyan); }

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

.post-content code {
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.85em;
  padding: 0.1em 0.45em;
  color: var(--cyan);
}

.post-content pre {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.7;
}

.cmd-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 2px solid var(--cyan);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.cmd-block code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.7;
}

.cmd-prompt { color: var(--cyan); }
.cmd-comment { color: var(--text-faint); }

blockquote {
  border-left: 2px solid var(--cyan);
  padding: 0.25rem 0 0.25rem 1.5rem;
  margin: 2rem 0;
  color: var(--text-dim);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.8;
}

/* POST IMAGES */
.post-img {
  width: 100%;
  border: 1px solid var(--border);
  margin: 2rem 0;
  display: block;
}

.post-img-sm {
  border: 1px solid var(--border);
  margin: 2rem 0;
  display: block;
}

.post-img-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 2rem 0;
}

.post-img-grid img {
  width: 100%;
  border: 1px solid var(--border);
  display: block;
}

.post-img-caption {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  text-align: center;
  margin-top: -1.5rem;
  margin-bottom: 2rem;
  letter-spacing: 0.06em;
}

/* POST FOOTER ELEMENTS */
.post-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0 1.5rem;
}

.post-origin {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  font-style: italic;
}

.post-back {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.post-back a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.post-back a:hover { color: var(--cyan); }

/* LEVEL NAV (knowledge article pages, e.g. Bandit) */
.level-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.level-nav a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
  border: none;
}
.level-nav a:hover { color: var(--cyan); border: none; }
.level-nav .next { text-align: right; }

/* ARTICLE NAV (sequential knowledge articles) */
.article-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.article-nav a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
  border: none;
}
.article-nav a:hover { color: var(--cyan); border: none; }
.article-nav .next { text-align: right; }

/* MOBILE (article-specific) */
@media (max-width: 700px) {
  .post-header { padding: 48px 0 36px; }
  .post-header h1 { font-size: clamp(20px, 6vw, 28px); }
  .post-body { padding: 40px 0 80px; }
  .post-content p,
  .post-content li { font-size: 15px; }
  .post-content h2 { font-size: 17px; }
  .post-content pre { padding: 1rem; font-size: 13px; }
  .post-img-grid { grid-template-columns: 1fr; }
}
