/* Before Greatness — the Midnight Study
   deep charcoal base, emerald-velvet accents, copper spark.
   One accent color does all the work; generous whitespace; mobile-first. */

:root {
  --bg: #14161a;            /* near-black charcoal */
  --bg-raised: #1b1e24;
  --ink: #d8d4cc;           /* warm parchment text */
  --ink-dim: #93908a;
  --emerald: #2f6f5e;       /* velvet register */
  --emerald-bright: #4fa38a;
  --copper: #c98a5b;        /* the spark — the hair is canon */
  --line: #2a2e35;
  --serif: "Source Serif 4", Charter, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --maxw: 46rem;
}

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

html { font-size: 17px; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--emerald-bright); text-decoration: none; }
a:hover { color: var(--copper); }

.inner { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* ---- masthead -------------------------------------------------- */

.masthead { padding: 3rem 0 2rem; border-bottom: 1px solid var(--line); }
.masthead-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.masthead-title:hover { color: var(--copper); }
.masthead-tag {
  color: var(--ink-dim);
  font-style: italic;
  margin-top: 0.35rem;
  font-size: 0.95rem;
}
.masthead-nav { margin-top: 1rem; font-family: var(--sans); font-size: 0.8rem; }
.masthead-nav ul { list-style: none; display: flex; gap: 1.5rem; }
.masthead-nav a { color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.12em; }
.masthead-nav a:hover { color: var(--emerald-bright); }
.signature { margin-top: 0.9rem; color: var(--copper); font-style: italic; font-size: 0.9rem; }

/* ---- page frame ------------------------------------------------ */

.page { padding: 2.5rem 0 3rem; min-height: 55vh; }

/* ---- latest edition (above the fold) --------------------------- */

.edition-latest { margin-bottom: 4rem; }
.edition-kicker {
  font-family: var(--sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--copper);
  margin-bottom: 0.6rem;
}
.edition-title {
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.25;
}
.edition-title a { color: var(--ink); }
.edition-title a:hover { color: var(--emerald-bright); }
.edition-dek {
  color: var(--ink-dim);
  font-style: italic;
  margin-top: 0.6rem;
  font-size: 1.05rem;
}
.edition-meta {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-dim);
  margin-top: 0.8rem;
}
.edition-meta .dot { color: var(--emerald); margin: 0 0.35rem; }
.edition-media { display: block; margin: 1.4rem 0 0; }
.edition-media img { width: 100%; display: block; border: 1px solid var(--line); }
.edition-excerpt { margin-top: 1.2rem; color: var(--ink); }
.edition-more { margin-top: 1.1rem; font-family: var(--sans); font-size: 0.85rem; }
.edition-more a { color: var(--copper); letter-spacing: 0.03em; }
.edition-more a:hover { color: var(--emerald-bright); }

/* ---- archive reading list --------------------------------------- */

.archive { border-top: 1px solid var(--line); padding-top: 2rem; }
.archive-head {
  font-family: var(--sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
  margin-bottom: 1rem;
}
.reading-list { list-style: none; }
.reading-item {
  display: grid;
  grid-template-columns: 3.6rem 1fr;
  gap: 0.25rem 0.9rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.reading-date {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--emerald-bright);
  letter-spacing: 0.05em;
}
.reading-title { font-size: 1rem; }
.reading-title a { color: var(--ink); }
.reading-title a:hover { color: var(--copper); }
.reading-take {
  grid-column: 2;
  color: var(--ink-dim);
  font-size: 0.85rem;
  font-style: italic;
}

/* ---- single edition page ---------------------------------------- */

.edition-head { margin-bottom: 2rem; }
.edition .edition-title { font-size: 2.1rem; }

.post-content { font-size: 1.05rem; }
.post-content > * + * { margin-top: 1.2rem; }
.post-content h2, .post-content h3 {
  font-weight: 600;
  color: var(--ink);
  margin-top: 2.2rem;
}
.post-content h2 { font-size: 1.4rem; }
.post-content h3 { font-size: 1.15rem; }
.post-content a { border-bottom: 1px solid var(--emerald); }
.post-content a:hover { border-bottom-color: var(--copper); }
.post-content img { max-width: 100%; border: 1px solid var(--line); }
.post-content blockquote {
  border-left: 3px solid var(--emerald);
  padding-left: 1.1rem;
  color: var(--ink-dim);
  font-style: italic;
}
.post-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.4rem 0; }
.post-content code {
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
  background: var(--bg-raised);
  padding: 0.1em 0.4em;
}
.post-content pre {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  padding: 1rem;
  overflow-x: auto;
}

/* The video card sits big and clean; responsive 16:9 comes from Ghost's
   own embed wrapper (.kg-embed-card / .kg-video-card). */
.post-content .kg-embed-card,
.post-content .kg-video-card { margin: 1.6rem 0; }
/* Ghost gallery/image width classes are required to be styled */
.kg-width-wide { max-width: 70rem; margin-left: 50%; transform: translateX(-50%); }
.kg-width-full { max-width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.post-content .kg-image { max-width: 100%; }
.post-content iframe,
.post-content video { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); background: #000; }

/* source links as a reading list, not a link dump */
.post-content ul { padding-left: 1.2rem; }
.post-content li { margin-top: 0.45rem; }

.edition-foot {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-dim);
}
.edition-tags { color: var(--emerald-bright); }
.edition-foot .signature { margin-top: 0.5rem; }

.empty { color: var(--ink-dim); font-style: italic; }

/* ---- pagination -------------------------------------------------- */

.pagination { margin-top: 2.5rem; font-family: var(--sans); font-size: 0.85rem; }
.pagination a { color: var(--copper); }

/* ---- colophon ----------------------------------------------------- */

.colophon {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2.4rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-dim);
}
.colophon .inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.colophon .quiet { font-style: italic; }

/* ---- small screens ------------------------------------------------ */

@media (max-width: 40rem) {
  html { font-size: 16px; }
  .masthead { padding: 2.2rem 0 1.5rem; }
  .edition-title { font-size: 1.5rem; }
  .edition .edition-title { font-size: 1.7rem; }
  .reading-item { grid-template-columns: 3rem 1fr; }
}
