/* ─────────────────────────────────────────────────────────────
   article.css — Post / Note details page
   Layers on top of styles.css, reuses the same tokens.
   ───────────────────────────────────────────────────────────── */

/* Push content below the fixed nav */
.article-page { padding-top: 84px; }

/* ───── ARTICLE HERO ───── */
.article-hero {
  padding: clamp(48px, 7vw, 96px) 0 0;
  position: relative;
  overflow: hidden;
}
.article-hero .wrap { max-width: 920px; }

.breadcrumb {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 40px;
}
.breadcrumb a { color: var(--muted); transition: color .25s var(--ease); }
.breadcrumb a:hover { color: var(--accent-deep); }
.breadcrumb .sep { opacity: .5; }
.breadcrumb .here { color: var(--ink); }

.article-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--paper-card);
  background: var(--accent);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
}
.article-kicker::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--yellow);
}

.article-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 6.5vw, 88px);
  line-height: 1.02;
  letter-spacing: -.015em;
  max-width: 18ch;
}
.article-title em { font-style: italic; color: var(--accent-deep); }

.article-standfirst {
  margin-top: 28px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 27px);
  line-height: 1.4;
  color: var(--ink-2);
  max-width: 60ch;
}

/* Byline row */
.article-byline {
  margin-top: 44px;
  padding: 22px 0;
  border-top: .5px solid var(--rule);
  border-bottom: .5px solid var(--rule);
  display: flex; align-items: center; gap: 18px;
  flex-wrap: wrap;
}
.byline-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  border: 1px solid var(--rule);
  background: var(--paper-2);
}
.byline-avatar image-slot,
.byline-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.byline-who { display: flex; flex-direction: column; gap: 2px; margin-right: auto; }
.byline-who strong { font-weight: 600; font-size: 15px; }
.byline-who span { font-size: 13px; color: var(--muted); }
.byline-facts {
  display: flex; align-items: center; gap: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted);
}
.byline-facts .bf { display: flex; flex-direction: column; gap: 3px; }
.byline-facts .bf b { color: var(--ink); font-weight: 500; }
.byline-share { display: flex; gap: 8px; }
.byline-share a {
  width: 38px; height: 38px; border-radius: 50%;
  border: .5px solid var(--rule);
  display: grid; place-items: center;
  color: var(--ink-2);
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}
.byline-share a:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); border-color: var(--ink); }
.byline-share svg { width: 16px; height: 16px; }

/* Cover image */
.article-cover {
  margin: clamp(40px, 5vw, 64px) 0 0;
  position: relative;
}
.article-cover .cover-frame {
  position: relative;
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  border: .5px solid var(--rule);
  aspect-ratio: 16 / 9;
  background: var(--paper-2);
}
.article-cover image-slot,
.article-cover .cover-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-caption {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  display: flex; align-items: center; gap: 10px;
}
.cover-caption::before { content: ""; width: 18px; height: 1px; background: var(--accent); }

/* ───── ARTICLE BODY ───── */
.article-body { padding: clamp(48px, 6vw, 80px) 0 0; }
.article-body .wrap { max-width: 720px; }

.prose { font-size: 18px; line-height: 1.75; color: var(--ink); }
.prose > * + * { margin-top: 1.45em; }
.prose p { max-width: none; }
.prose a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: color-mix(in oklch, var(--accent) 45%, transparent); transition: text-decoration-color .25s var(--ease); }
.prose a:hover { text-decoration-color: var(--accent); }

/* Drop cap on first paragraph */
.prose > p.lead::first-letter {
  font-family: var(--font-display);
  font-size: 4.6em;
  line-height: .82;
  float: left;
  margin: .04em .12em -.06em 0;
  color: var(--accent-deep);
}
.prose .lead { font-size: 1.06em; }

.prose h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -.01em;
  margin-top: 1.9em;
}
.prose h2 em { font-style: italic; color: var(--accent-deep); }
.prose h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: .01em;
  margin-top: 1.7em;
}

.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-top: .5em; }
.prose li::marker { color: var(--accent); }

/* Pull quote */
.pullquote {
  margin: clamp(40px, 5vw, 60px) 0;
  padding: 4px 0 4px 28px;
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.3;
  color: var(--accent-deep);
}
.pullquote footer {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Inline figure */
.prose figure { margin: clamp(36px, 4vw, 52px) 0; }
.prose figure .fig-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: .5px solid var(--rule);
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
}
.prose figure image-slot,
.prose figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prose figcaption {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* Highlighted callout box */
.callout {
  margin: clamp(36px, 4vw, 52px) 0;
  padding: 28px 30px;
  background: var(--paper-card);
  border: .5px solid var(--rule);
  border-radius: var(--radius);
  position: relative;
}
.callout::before {
  content: "";
  position: absolute; left: 0; top: 22px; bottom: 22px;
  width: 3px; border-radius: 3px;
  background: var(--yellow);
}
.callout .callout-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 10px;
  display: block;
}
.callout p { margin: 0; font-size: 16px; }

/* Section rule with mark */
.prose hr {
  border: none;
  margin: clamp(44px, 5vw, 64px) auto;
  display: flex; align-items: center; justify-content: center;
  height: auto;
}
.prose hr::before {
  content: "· · ·";
  letter-spacing: .6em;
  color: var(--accent);
  font-size: 20px;
}

/* ───── TAGS + END ───── */
.article-tags {
  max-width: 720px; margin: clamp(40px, 5vw, 56px) auto 0;
  padding: 0 var(--gutter);
  display: flex; flex-wrap: wrap; gap: 10px;
}
.article-tags .chip {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-2);
  background: var(--paper-card);
  border: .5px solid var(--rule);
  border-radius: 999px;
  padding: 7px 14px;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.article-tags .chip:hover { color: var(--accent-deep); border-color: var(--accent); }

/* ───── AUTHOR CARD ───── */
.author-card {
  max-width: 720px; margin: clamp(56px, 6vw, 80px) auto 0;
  padding: 0 var(--gutter);
}
.author-card-inner {
  display: flex; gap: 24px; align-items: flex-start;
  padding: 32px;
  background: var(--accent);
  color: var(--paper-card);
  border-radius: calc(var(--radius) + 4px);
  position: relative;
  overflow: hidden;
}
.author-card-inner .ac-blob {
  position: absolute; width: 200px; height: 200px;
  border-radius: 50%; background: var(--yellow);
  right: -60px; bottom: -80px; opacity: .85;
  pointer-events: none;
}
.author-card .ac-avatar {
  width: 84px; height: 84px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0; position: relative; z-index: 1;
  border: 2px solid color-mix(in oklch, var(--paper-card) 40%, transparent);
}
.author-card .ac-avatar image-slot,
.author-card .ac-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-card .ac-body { position: relative; z-index: 1; }
.author-card .ac-label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: color-mix(in oklch, var(--paper-card) 75%, transparent);
}
.author-card .ac-name {
  font-family: var(--font-display);
  font-size: 28px; line-height: 1.1; margin-top: 6px;
}
.author-card .ac-bio {
  margin-top: 12px; font-size: 15px; line-height: 1.6;
  color: color-mix(in oklch, var(--paper-card) 88%, transparent);
  max-width: 46ch;
}
.author-card .ac-cta {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase;
  border-bottom: 1px solid color-mix(in oklch, var(--paper-card) 50%, transparent);
  padding-bottom: 3px;
}
.author-card .ac-cta:hover { border-color: var(--paper-card); }

/* ───── PREV / NEXT ───── */
.article-nav {
  max-width: 920px; margin: clamp(56px, 6vw, 80px) auto 0;
  padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.article-nav a {
  padding: 24px 26px;
  border: .5px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-card);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.article-nav a:hover { transform: translateY(-3px); border-color: var(--accent); }
.article-nav .an-dir {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.article-nav .an-title {
  font-family: var(--font-display); font-size: 21px; line-height: 1.2;
  margin-top: 10px; color: var(--ink);
}
.article-nav a:hover .an-title { color: var(--accent-deep); }
.article-nav .next { text-align: right; }

/* ───── MORE NOTES ───── */
.more-notes { margin-top: clamp(80px, 9vw, 130px); }
.more-notes .mn-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; margin-bottom: 44px;
}
.more-notes h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(30px, 4vw, 52px); line-height: 1.04;
}
.more-notes h2 em { font-style: italic; color: var(--accent-deep); }
.more-notes .mn-head a {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em;
  color: var(--ink-2); border-bottom: 1px solid var(--rule); padding-bottom: 3px;
}
.more-notes .mn-head a:hover { color: var(--accent-deep); border-color: var(--accent); }

/* Reading progress bar */
.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--pink));
  z-index: 60;
  transition: width .1s linear;
}

/* ───── Responsive ───── */
@media (max-width: 720px) {
  .byline-facts { width: 100%; order: 3; gap: 18px; }
  .byline-share { order: 2; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav .next { text-align: left; }
  .author-card-inner { flex-direction: column; }
  .prose { font-size: 17px; }
}

/* RTL tweaks (loaded when dir=rtl) */
[dir="rtl"] .prose > p.lead::first-letter { float: right; margin: .04em 0 -.06em .12em; }
[dir="rtl"] .pullquote { border-left: none; border-right: 3px solid var(--accent); padding: 4px 28px 4px 0; }
[dir="rtl"] .callout::before { left: auto; right: 0; }
[dir="rtl"] .article-nav .next { text-align: left; }
[dir="rtl"] .read-progress { left: auto; right: 0; }
