/* nicholasharris.me — article stylesheet
   Extends the existing site design system from index.html.
   Drop into /css/articles.css and link from every article page. */

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

:root {
  --bg: #0A0A0A;
  --white: #FFFFFF;
  --gray-1: #888888;
  --gray-2: #444444;
  --gray-3: #222222;
  --gray-4: #666666;
  --gray-5: #1A1A1A;
  --gray-6: #111111;
  --body: #CCCCCC;
  --max-w: 720px;
  --pad-x: 24px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(255,255,255,0.15); }

a { color: var(--white); text-decoration: none; }
a:hover { opacity: 0.7; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ── NAV (matches index.html) ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-3);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-name { font-size: 14px; font-weight: 500; letter-spacing: 0.5px; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { font-size: 13px; color: var(--gray-1); letter-spacing: 0.3px; transition: color 0.2s; }
.nav-links a:hover { color: var(--white); opacity: 1; }

/* ── ARTICLE HEADER ── */
.article-header {
  padding: 140px 0 60px;
  border-bottom: 1px solid var(--gray-3);
}

.article-category {
  font-size: 12px;
  letter-spacing: 2.5px;
  color: var(--gray-4);
  text-transform: uppercase;
  margin-bottom: 28px;
}

.article-header h1 {
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  color: var(--white);
}

.article-dek {
  font-size: 18px;
  color: var(--gray-1);
  line-height: 1.6;
  margin-bottom: 32px;
  font-style: italic;
  border-left: 2px solid var(--gray-3);
  padding-left: 18px;
}

.article-meta {
  font-size: 13px;
  color: var(--gray-2);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.article-meta span { display: inline-flex; align-items: center; }
.article-meta .meta-dot { color: var(--gray-3); }

/* ── ARTICLE BODY ── */
article.article-body {
  padding: 60px 0;
  font-size: 17px;
  line-height: 1.75;
  color: var(--body);
}

article.article-body p { margin: 0 0 22px; }
article.article-body p:last-child { margin-bottom: 0; }

article.article-body strong { color: var(--white); font-weight: 500; }
article.article-body em { color: var(--white); }

article.article-body a {
  color: var(--white);
  border-bottom: 1px solid var(--gray-2);
  padding-bottom: 1px;
  transition: border-color 0.2s, opacity 0.2s;
}
article.article-body a:hover { border-color: var(--white); opacity: 1; }

article.article-body h2 {
  font-size: clamp(22px, 3.2vw, 28px);
  font-weight: 500;
  line-height: 1.3;
  color: var(--white);
  margin: 56px 0 20px;
  letter-spacing: -0.01em;
}

article.article-body h2:first-child { margin-top: 0; }

article.article-body h3 {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--white);
  margin: 40px 0 14px;
}

article.article-body h4 {
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
  margin: 28px 0 12px;
}

article.article-body ul,
article.article-body ol {
  margin: 0 0 22px 0;
  padding-left: 0;
  list-style: none;
}

article.article-body ul li,
article.article-body ol li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  color: var(--body);
}

article.article-body ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gray-2);
}

article.article-body ol { counter-reset: ordered-list; }
article.article-body ol li { counter-increment: ordered-list; }
article.article-body ol li::before {
  content: counter(ordered-list) ".";
  position: absolute;
  left: 0;
  color: var(--gray-2);
  font-variant-numeric: tabular-nums;
}

article.article-body code {
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 14px;
  background: var(--gray-6);
  border: 1px solid var(--gray-3);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--white);
}

article.article-body pre {
  background: var(--gray-6);
  border: 1px solid var(--gray-3);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  margin: 0 0 22px;
  font-size: 13px;
  line-height: 1.6;
}

article.article-body pre code {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 13px;
  color: var(--gray-1);
}

article.article-body hr {
  border: 0;
  border-top: 1px solid var(--gray-3);
  margin: 48px 0;
}

/* ── TL;DR BLOCK (snippet bait + speakable target) ── */
.tl-dr {
  background: var(--gray-6);
  border: 1px solid var(--gray-3);
  border-radius: 8px;
  padding: 28px;
  margin: 0 0 40px;
}

.tl-dr h2 {
  font-size: 12px !important;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gray-4) !important;
  margin: 0 0 16px !important;
  font-weight: 500;
}

.tl-dr p { font-size: 16px; color: var(--white); margin-bottom: 14px; }
.tl-dr p:last-child { margin-bottom: 0; }
.tl-dr ul li { color: var(--gray-1); }

/* ── TABLE OF CONTENTS ── */
.toc {
  background: transparent;
  border: 1px solid var(--gray-3);
  border-radius: 8px;
  padding: 24px 28px;
  margin: 0 0 48px;
}

.toc h2 {
  font-size: 12px !important;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gray-4) !important;
  margin: 0 0 16px !important;
  font-weight: 500;
}

.toc ul { margin: 0; }
.toc ul li {
  padding-left: 0;
  margin-bottom: 6px;
  font-size: 14px;
}
.toc ul li::before { display: none; }
.toc ul li a {
  color: var(--gray-1);
  border-bottom: 0;
  display: inline-block;
  padding: 2px 0;
}
.toc ul li a:hover { color: var(--white); opacity: 1; }

/* ── PULL QUOTES ── */
article.article-body blockquote {
  border-left: 2px solid var(--white);
  padding: 6px 0 6px 24px;
  margin: 36px 0;
  font-size: 22px;
  line-height: 1.4;
  color: var(--white);
  font-weight: 500;
  letter-spacing: -0.01em;
}

article.article-body blockquote p { margin: 0; }
article.article-body blockquote strong { font-weight: 500; }

/* ── FAQ ── */
.faq {
  margin-top: 24px;
}

.faq h2 { margin-bottom: 32px; }

.faq-item {
  padding: 24px 0;
  border-top: 1px solid var(--gray-3);
}

.faq-item:first-of-type { border-top: 1px solid var(--gray-3); }

.faq-question {
  font-size: 17px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 10px;
  line-height: 1.4;
}

.faq-answer {
  font-size: 15px;
  color: var(--body);
  line-height: 1.65;
}

.faq-answer a {
  color: var(--white);
  border-bottom: 1px solid var(--gray-2);
}
.faq-answer a:hover { border-color: var(--white); opacity: 1; }

/* ── AUTHOR BIO ── */
.author-bio {
  margin: 56px 0 0;
  padding: 32px;
  border: 1px solid var(--gray-3);
  border-radius: 8px;
  background: var(--gray-6);
}

.author-bio h2 {
  font-size: 12px !important;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gray-4) !important;
  margin: 0 0 16px !important;
  font-weight: 500;
}

.author-bio p { font-size: 15px; color: var(--gray-1); margin-bottom: 14px; line-height: 1.7; }
.author-bio p:last-child { margin-bottom: 0; }
.author-bio strong { color: var(--white); font-weight: 500; }
.author-bio a { color: var(--white); border-bottom: 1px solid var(--gray-2); }
.author-bio a:hover { border-color: var(--white); opacity: 1; }

.author-cta {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--bg) !important;
  background: var(--white);
  padding: 10px 24px;
  border-radius: 6px;
  border-bottom: 0 !important;
  transition: opacity 0.2s;
}
.author-cta:hover { opacity: 0.85; border-bottom: 0 !important; }

/* ── RELATED READING ── */
.related-reading {
  margin: 48px 0 0;
  padding-top: 40px;
  border-top: 1px solid var(--gray-3);
}

.related-reading h2 {
  font-size: 12px !important;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gray-4) !important;
  margin: 0 0 24px !important;
  font-weight: 500;
}

.related-reading ul li {
  padding-left: 0;
  margin-bottom: 12px;
}

.related-reading ul li::before { display: none; }

.related-reading ul li a {
  color: var(--white);
  border-bottom: 1px solid var(--gray-3);
  font-size: 15px;
  padding-bottom: 2px;
  display: inline-block;
}

.related-reading ul li a:hover { border-color: var(--white); opacity: 1; }

/* ── FOOTER ── */
footer {
  padding: 60px 0;
  border-top: 1px solid var(--gray-3);
  margin-top: 64px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-name { font-size: 14px; font-weight: 500; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 13px; color: var(--gray-2); transition: color 0.2s; }
.footer-links a:hover { color: var(--white); }

/* ── MOBILE ── */
@media (max-width: 600px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 12px; }
  .article-header { padding: 100px 0 40px; }
  article.article-body { padding: 40px 0; font-size: 16px; }
  article.article-body blockquote { font-size: 19px; padding-left: 18px; margin: 28px 0; }
  .tl-dr, .toc, .author-bio { padding: 20px; }
  .author-bio { padding: 24px; }
}
