/* dumpingiron.com — essay layout in the defensesindepth.bio mold.
   Cardo (display serif) + Inter (text). Rust accent = iron oxide, ties to the book cover.
   Light-only by design; explicit colors everywhere. */

:root {
  --ink: #16181d;
  --ink-soft: #3a3d44;
  --muted: #6b6f76;
  --rust: #8c2f1b;
  --rust-dark: #6e2413;
  --rule: #e8e6e3;
  --bg: #ffffff;
  --bg-warm: #faf8f6;
  --content: 700px;
  --rail: 250px;
}

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

html { scroll-behavior: smooth; }

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

::selection { background: #f3ded8; }

a { color: var(--rust); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--rust-dark); }

/* ---------- header ---------- */

.site-head {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}

.site-head .wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: 'Cardo', Georgia, serif;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover { color: var(--rust); }

.site-head nav { display: flex; align-items: center; gap: 22px; }

.site-head nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}

.site-head nav a:hover { color: var(--rust); }

.btn-pill {
  background: var(--rust);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600 !important;
  white-space: nowrap;
}

.btn-pill:hover { background: var(--rust-dark); }

/* ---------- layout ---------- */

.layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 24px 0;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, var(--content));
  column-gap: 64px;
  justify-content: center;
}

/* ---------- left rail ---------- */

.rail { font-size: 13.5px; }

.rail-inner { position: sticky; top: 40px; }

.rail .author {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}

.rail .pubinfo {
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.5;
}

.rail .pubinfo em { font-style: italic; }

.toc { margin-top: 28px; border-top: 1px solid var(--rule); padding-top: 20px; }

.toc ol { list-style: none; }

.toc li { margin: 0 0 10px; line-height: 1.45; }

.toc a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: #d8d5d1;
  display: block;
  padding-left: 10px;
  border-left: 2px solid transparent;
}

.toc a:hover { color: var(--ink); }

.toc a.active {
  color: var(--rust);
  border-left-color: var(--rust);
  text-decoration: none;
  font-weight: 500;
}

/* ---------- article ---------- */

article h1 {
  font-family: 'Cardo', Georgia, serif;
  font-weight: 700;
  font-size: clamp(34px, 4.5vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}

.mobile-byline { display: none; }

.abstract {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 26px 0;
  margin-bottom: 40px;
}

.ab-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.abstract p { font-size: 18px; line-height: 1.7; color: var(--ink-soft); }

.keywords {
  margin-top: 14px;
  font-size: 13.5px !important;
  color: var(--muted) !important;
}

article > p { margin-bottom: 1.45em; }

article h2 {
  font-family: 'Cardo', Georgia, serif;
  font-weight: 700;
  font-size: 27px;
  line-height: 1.25;
  margin: 2.1em 0 0.8em;
  scroll-margin-top: 32px;
}

a.cite { text-decoration: none; font-weight: 500; }
a.cite:hover { text-decoration: underline; }

/* ---------- references ---------- */

#references { margin-top: 56px; }

.refs {
  margin: 20px 0 0 0;
  padding-left: 34px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.refs li { margin-bottom: 11px; padding-left: 6px; }

.refs li:target, li:target {
  background: #fdf3ef;
  outline: 6px solid #fdf3ef;
  border-radius: 2px;
}

.ref-links { white-space: normal; }
.ref-links a { color: var(--rust); text-decoration: none; }
.ref-links a:hover { text-decoration: underline; }

/* ---------- author box + citation ---------- */

.author-box {
  margin-top: 64px;
  border: 1px solid var(--rule);
  background: var(--bg-warm);
  border-radius: 8px;
  padding: 26px 30px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.author-box h2 {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.cite-block {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- site footer ---------- */

.site-foot {
  margin-top: 96px;
  border-top: 1px solid var(--rule);
  padding: 28px 24px 40px;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, var(--content)); padding-top: 48px; }
  .rail { display: none; }
  .mobile-byline {
    display: block;
    margin-bottom: 22px;
    font-size: 14px;
    color: var(--muted);
  }
  .mobile-byline strong { color: var(--ink); font-weight: 600; }
}

@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .layout { padding: 36px 20px 0; }
  .site-head .wrap { padding: 0 16px; }
  .site-head nav { gap: 12px; }
  .brand { font-size: 17px; }
  .site-head nav a { font-size: 13px; }
  .btn-pill { padding: 6px 13px; }
  article h1 { font-size: 31px; }
  article h2 { font-size: 23px; }
  .abstract p { font-size: 17px; }
  .author-box { padding: 20px; }
}
