/* Article page shared styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

:root {
  --bg: #0D1117;
  --bg-offset: #111820;
  --text: #E8E4DC;
  --text-muted: #8A8880;
  --text-dim: #5A5855;
  --accent: #D4A843;
  --border: rgba(232,228,220,0.08);
  --border-med: rgba(232,228,220,0.14);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: -apple-system, 'Segoe UI', system-ui, sans-serif;
  --max-w: 720px;
}

[data-theme="light"] {
  --bg: #FAF8F4;
  --bg-offset: #F0EDE6;
  --text: #0D1117;
  --text-muted: #5A5855;
  --accent: #C9922E;
  --border: rgba(13,17,23,0.08);
  --border-med: rgba(13,17,23,0.14);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

/* NAV */
.article-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem clamp(1.5rem, 5vw, 3rem);
  background: rgba(13,17,23,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .article-nav { background: rgba(250,248,244,0.85); }

.nav-back {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.06em;
  transition: color 0.2s ease;
}
.nav-back:hover { color: var(--accent); }
.article-tag-nav {
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid rgba(212,168,67,0.3);
  padding: 0.25rem 0.75rem;
}

/* ARTICLE */
.article-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5rem) clamp(1.5rem, 5vw, 2rem);
}

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

.article-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 1rem 0;
}

.article-deck {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 2rem;
  font-weight: 400;
}

.article-byline {
  display: flex; align-items: center; gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.byline-photo {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover; object-position: center top;
}
.byline-name {
  display: block;
  font-weight: 600; font-size: 0.9rem;
}
.byline-role {
  display: block;
  font-size: 0.75rem; color: var(--text-muted);
}

/* BODY */
.article-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
}
.article-body p { margin-bottom: 1.5rem; }
.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 2.5rem 0 1rem;
  color: var(--text);
}
.article-body strong { font-weight: 600; color: var(--text); }
.article-body em { font-style: italic; }
.article-body hr {
  border: none; border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}
.article-closer {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--accent) !important;
  font-weight: 500;
  line-height: 1.5;
  border-left: 2px solid var(--accent);
  padding-left: 1.25rem;
  margin-top: 2rem !important;
}

/* FOOTER */
.article-footer {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}
.article-author-card {
  display: flex; gap: 1.5rem; align-items: flex-start;
  margin-bottom: 2rem;
}
.author-card-photo {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover; object-position: center top;
  flex-shrink: 0;
}
.author-card-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 600;
  margin-bottom: 0.35rem;
}
.author-card-bio {
  font-size: 0.85rem; color: var(--text-muted); line-height: 1.65;
  margin-bottom: 0.75rem;
}
.author-card-link {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); text-decoration: none;
}
.author-card-link:hover { text-decoration: underline; }

.btn-back-to-writing {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
  text-decoration: none; transition: color 0.2s ease;
}
.btn-back-to-writing:hover { color: var(--accent); }

@media (max-width: 600px) {
  .article-author-card { flex-direction: column; }
}
