/* =========================================================
   SINATICUS' LIBRARY — MAIN STYLE SHEET
   Change the colors here first. Everything else follows.
========================================================= */

:root {
  --bg: #11100d;
  --bg-soft: #1b1813;
  --panel: #231f18;
  --panel-light: #2e281f;

  --text: #f2eadc;
  --muted: #c2b59f;
  --faint: #8c806d;

  --accent: #c99a3d;
  --accent-light: #e3bd68;
  --accent-dark: #8a6422;

  --border: #3b3328;

  --max-width: 1050px;
  --article-width: 780px;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* =========================================================
   BASE PAGE
========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(201, 154, 61, 0.12), transparent 35%),
    var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.7;
  font-size: 18px;
}

/* This keeps pages from touching the edge of the screen */
body > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 22px;
  padding-right: 22px;
}

/* =========================================================
   TYPOGRAPHY
========================================================= */

h1, h2, h3 {
  line-height: 1.2;
  color: var(--text);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  margin-top: 48px;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-top: 46px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

h3 {
  font-size: 1.35rem;
  margin-top: 28px;
  color: var(--accent-light);
}

p {
  color: var(--muted);
  margin-bottom: 18px;
}

strong {
  color: var(--text);
}

em {
  color: var(--accent-light);
}

a {
  color: var(--accent-light);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

a:hover {
  color: var(--text);
  border-bottom-color: var(--accent-light);
}

/* =========================================================
   NAVIGATION
========================================================= */

nav {
  max-width: none;
  width: 100%;
  background: rgba(17, 16, 13, 0.92);
  border-bottom: 1px solid var(--border);
  padding: 14px 22px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  text-align: center;
}

nav a {
  display: inline-block;
  margin: 4px 8px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 0.95rem;
  border-radius: 999px;
  border-bottom: none;
}

nav a:hover {
  background: var(--panel-light);
  color: var(--accent-light);
}

/* =========================================================
   HEADER / HERO AREA
========================================================= */

h1 + p {
  font-size: 1.2rem;
  max-width: 760px;
  color: var(--muted);
}

/* Adds a subtle intro-card feel to the first paragraph after h1 */
body > h1,
body > h1 + p {
  text-align: center;
}

/* =========================================================
   SECTIONS, LISTS, AND CARDS
========================================================= */

ul {
  padding-left: 0;
  list-style: none;
}

li {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

li:hover {
  transform: translateY(-2px);
  transition: 0.2s ease;
  border-color: var(--accent-dark);
}

/* Useful if you make project or essay cards later */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin: 18px 0;
  box-shadow: var(--shadow);
}

.card h3 {
  margin-top: 0;
}

.card p {
  margin-bottom: 0;
}

/* Makes groups of cards into a clean grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

/* =========================================================
   ARTICLE STYLING
========================================================= */

article {
  max-width: var(--article-width);
  margin: 42px auto;
  background: rgba(35, 31, 24, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(22px, 5vw, 44px);
  box-shadow: var(--shadow);
}

article h1 {
  text-align: left;
  margin-top: 0;
}

article p {
  color: var(--text);
}

article blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  background: var(--bg-soft);
  border-left: 4px solid var(--accent);
  color: var(--muted);
  border-radius: 0 var(--radius) var(--radius) 0;
}

article img {
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 20px 0;
}

article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

/* =========================================================
   BUTTONS / READ MORE LINKS
========================================================= */

.button,
a.button {
  display: inline-block;
  background: var(--accent);
  color: #18130b;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: bold;
  border-bottom: none;
  margin-top: 10px;
}

.button:hover,
a.button:hover {
  background: var(--accent-light);
  color: #18130b;
  transform: translateY(-1px);
}

/* =========================================================
   VIDEO EMBEDS
========================================================= */

iframe {
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Makes YouTube embeds responsive if you wrap them in .video */
.video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 26px 0;
}

.video iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
}

/* =========================================================
   LARGE RESPONSIVE VIDEO EMBEDS
========================================================= */

.video-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.video-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* =========================================================
   FOOTER
========================================================= */

footer {
  margin-top: 70px;
  padding-top: 24px;
  padding-bottom: 36px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  text-align: center;
  font-size: 0.95rem;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {
  body {
    font-size: 16px;
  }

  nav {
    position: static;
  }

  nav a {
    display: inline-block;
    margin: 3px;
    font-size: 0.9rem;
  }

  h1 {
    margin-top: 32px;
  }

  li {
    padding: 12px 14px;
  }

  article {
    margin-top: 24px;
  }
}
/* =========================================================
   DIFFERENTIATE LINKS FROM NORMAL BULLET POINTS
========================================================= */

/* Normal unordered bullet-point lists */
ul > li:not(:has(a)) {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;

  position: relative;
  padding: 6px 0 6px 30px;
  margin-bottom: 8px;

  color: var(--text);
}

/* Custom bullet symbol — unordered lists only */
ul > li:not(:has(a))::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 6px;

  color: var(--accent);
  font-size: 0.9rem;
}

/* Ordered lists keep their normal numbers without an extra star */
ol > li:not(:has(a)) {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 6px 0;
  margin-bottom: 8px;
  color: var(--text);
}

ol > li:not(:has(a))::before {
  content: none;
}

/* Remove hover-card effect from normal list items */
ul > li:not(:has(a)):hover,
ol > li:not(:has(a)):hover {
  transform: none;
  border-color: transparent;
}

/* Link list items stay card-like */
li:has(a) {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

/* Make link cards feel more clickable */
li:has(a):hover {
  transform: translateY(-2px);
  transition: 0.2s ease;
  border-color: var(--accent-dark);
}

/* Make links inside link cards cleaner */
li:has(a) a {
  color: var(--accent-light);
  border-bottom: none;
  font-weight: bold;
}

/* =========================================================
   ARTICLE IMAGES, FIGURES, AND COMPARISONS
========================================================= */

/* Standard image block with a caption */
.article-figure {
  width: 100%;
  max-width: var(--article-width);
  margin: 30px auto;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Prevent the general article image rule from adding extra spacing */
.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
  object-fit: contain;
}

/* Captions remain readable without competing with the article text */
.article-figure figcaption {
  margin: 10px 4px 2px;
  color: var(--faint);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
  font-style: italic;
}

/* Attribution or source links inside captions */
.article-figure figcaption a {
  color: var(--accent-light);
  font-style: normal;
  border-bottom: 1px dotted var(--accent-dark);
}

.article-figure figcaption a:hover {
  color: var(--text);
  border-bottom-color: var(--accent-light);
}

/* Optional narrower figure for portraits, documents, or detail images */
.article-figure-small {
  max-width: 560px;
}

/* Optional wider figure for maps, charts, and full-width diagrams */
.article-figure-wide {
  max-width: var(--max-width);
}

/* Side-by-side images for comparisons */
.image-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  max-width: var(--max-width);
  margin: 30px auto;
}

.image-comparison .article-figure {
  max-width: none;
  margin: 0;
}

/* Optional label above an individual comparison image */
.image-label {
  margin: 0 0 10px;
  color: var(--accent-light);
  font-size: 0.95rem;
  font-weight: bold;
  text-align: center;
  letter-spacing: 0.02em;
}

/* Subtle visual feedback without making scholarly images feel flashy */
.article-figure img {
  transition: transform 0.2s ease, filter 0.2s ease;
}

.article-figure:hover img {
  transform: scale(1.005);
  filter: brightness(1.03);
}

/* Keep linked images from inheriting the normal text-link underline */
.article-figure > a,
.article-figure > a:hover {
  display: block;
  border-bottom: none;
}

/* =========================================================
   ARTICLE IMAGE MOBILE LAYOUT
========================================================= */

@media (max-width: 700px) {
  .article-figure {
    margin: 22px auto;
    padding: 8px;
  }

  .article-figure figcaption {
    margin-top: 8px;
    font-size: 0.84rem;
  }

  .image-comparison {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 22px auto;
  }

  .article-figure:hover img {
    transform: none;
    filter: none;
  }
}

/* =========================================================
   TABLES — STRONG GRID STRUCTURE
========================================================= */

.table-wrap {
  width: 100%;
  margin: 30px auto;
  overflow-x: auto;
  border: 2px solid var(--accent-dark);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 820px;
  margin: 30px auto;
  border-collapse: collapse;
  table-layout: fixed;
  background: var(--panel);
  border: 2px solid var(--accent-dark);
  box-shadow: var(--shadow);
}

/* Prevent a doubled outer border when using .table-wrap */
.table-wrap table {
  margin: 0;
  border: none;
  box-shadow: none;
}

/* Every cell gets a clearly visible grid line */
table th,
table td {
  border: 1px solid var(--accent-dark);
  text-align: center;
  vertical-align: middle;
}

/* Stronger header row */
table th {
  padding: 18px 14px;
  background:
    linear-gradient(
      180deg,
      var(--panel-light),
      var(--panel)
    );
  color: var(--text);
  font-size: 1rem;
  line-height: 1.35;
  border-bottom: 3px solid var(--accent);
}

/* Body cells */
table td {
  padding: 18px 15px;
  background: rgba(17, 16, 13, 0.35);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Alternating body-row shading for longer tables */
table tr:nth-child(even) td {
  background: rgba(46, 40, 31, 0.58);
}

/* Make hovered rows easy to track */
table tr:not(:first-child):hover td {
  background: var(--panel-light);
  color: var(--text);
}

/* Slightly distinguish each classification column */
table th:nth-child(1) {
  box-shadow: inset 0 4px 0 #7f9f73;
}

table th:nth-child(2) {
  box-shadow: inset 0 4px 0 #a4a66b;
}

table th:nth-child(3) {
  box-shadow: inset 0 4px 0 var(--accent-light);
}

table th:nth-child(4) {
  box-shadow: inset 0 4px 0 #bd7c49;
}

table th:nth-child(5) {
  box-shadow: inset 0 4px 0 #aa5d50;
}

/* =========================================================
   TABLES — MOBILE
========================================================= */

@media (max-width: 850px) {
  .table-wrap {
    border-width: 1px;
  }

  table:not(.table-wrap table) {
    display: block;
    width: 100%;
    overflow-x: auto;
  }

  table th,
  table td {
    min-width: 170px;
    padding: 15px 12px;
  }
}

/* =========================================================
   LONG-FORM EVIDENCE ARTICLES
========================================================= */

.evidence-article {
  max-width: 900px;
}

.breadcrumb {
  margin: 0 0 26px;
  color: var(--faint);
  font-size: 0.9rem;
}

.breadcrumb span {
  margin: 0 7px;
  color: var(--accent-dark);
}

.article-header {
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.article-kicker {
  margin: 0 0 10px;
  color: var(--accent-light) !important;
  font-size: 0.82rem;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.evidence-article .article-header h1 {
  max-width: 820px;
  margin-bottom: 18px;
}

.article-summary,
.article-lead {
  color: var(--muted) !important;
  font-size: 1.15rem;
  line-height: 1.75;
}

.article-meta {
  margin: 18px 0 0;
  color: var(--faint) !important;
  font-size: 0.9rem;
}

.article-note {
  margin: 26px 0 34px;
  padding: 18px 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
}

.article-toc {
  /* Keep the contents box in the article flow; never pin it to the viewport. */
  position: static !important;
  inset: auto !important;
  z-index: auto;
  width: auto;
  max-width: none;
  margin: 36px 0 44px;
  padding: 22px 24px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  backdrop-filter: none;
}

.article-toc h2 {
  margin: 0 0 16px;
  padding: 0 0 10px;
  font-size: 1.25rem;
}

.article-toc ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 28px;
  margin: 0;
  padding-left: 1.25rem;
}

.article-toc li,
.article-toc li:has(a) {
  display: list-item;
  margin: 0;
  padding: 3px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--muted);
}

.article-toc li:hover,
.article-toc li:has(a):hover {
  transform: none;
  border-color: transparent;
}

.article-toc a,
.article-toc li:has(a) a {
  padding: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: normal;
  border-bottom: 1px dotted var(--accent-dark);
  border-radius: 0;
}

.article-toc a:hover {
  background: transparent;
  color: var(--accent-light);
}

.evidence-article h2,
.evidence-article h3 {
  scroll-margin-top: 90px;
}

.evidence-article h2 {
  margin-top: 58px;
}

.evidence-article h3 {
  margin-top: 34px;
}

.evidence-article ol {
  padding-left: 1.6rem;
}

.evidence-article ol li {
  margin-bottom: 8px;
  padding-left: 6px;
  color: var(--text);
}

.evidence-overview {
  margin: 24px 0 28px;
  padding: 20px 24px 20px 48px !important;
  background: rgba(46, 40, 31, 0.58);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.evidence-overview li {
  margin-bottom: 7px !important;
}

.citation-line {
  margin: 20px 0 28px;
  padding: 12px 15px;
  background: rgba(17, 16, 13, 0.45);
  border-left: 3px solid var(--accent-dark);
  color: var(--faint) !important;
  font-size: 0.92rem;
}

.citation-line a {
  font-weight: bold;
}

.key-quotation {
  font-size: 1.08rem;
}

.evidence-article .table-wrap {
  margin: 26px 0 34px;
}

.evidence-article table {
  min-width: 590px;
  table-layout: auto;
}

.evidence-article table th:first-child,
.evidence-article table td:first-child {
  text-align: left;
}

.evidence-article table th {
  box-shadow: inset 0 4px 0 var(--accent-dark);
}

.source-list {
  counter-reset: source-number;
  padding-left: 0 !important;
}

.source-list li,
.source-list li:has(a) {
  counter-increment: source-number;
  position: relative;
  margin-bottom: 10px;
  padding: 13px 16px 13px 52px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: none;
  list-style: none;
}

.source-list li::before,
.source-list li:has(a)::before {
  content: counter(source-number);
  position: absolute;
  left: 16px;
  top: 13px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--accent-dark);
  border-radius: 50%;
  color: var(--accent-light);
  font-size: 0.78rem;
  font-weight: bold;
}

.source-list li:hover,
.source-list li:has(a):hover {
  transform: none;
  border-color: var(--accent-dark);
}

.source-list a,
.source-list li:has(a) a {
  font-weight: normal;
}

.article-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 58px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.article-footer p {
  margin: 0;
}

.link-description {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.resource-list li:has(a) a {
  font-size: 1.08rem;
}

@media (max-width: 700px) {
  .article-toc ol {
    grid-template-columns: 1fr;
  }

  .article-summary,
  .article-lead {
    font-size: 1.05rem;
  }

  .evidence-overview {
    padding: 16px 18px 16px 42px !important;
  }

  .article-footer {
    display: block;
  }

  .article-footer p + p {
    margin-top: 10px;
  }
}

@media print {
  nav,
  .article-toc,
  .article-footer,
  .breadcrumb {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  article,
  .evidence-article {
    max-width: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 0;
    box-shadow: none;
  }

  article p,
  article li,
  article h1,
  article h2,
  article h3,
  article strong,
  article em,
  article a {
    color: #000 !important;
  }

  .table-wrap {
    overflow: visible;
    border-color: #777;
    box-shadow: none;
  }

  table {
    min-width: 0 !important;
  }
}

/* =========================================================
   ORDERED-LIST MARKER RESET
   Never apply the decorative unordered-list star to numbered lists.
========================================================= */

ol > li::before,
.evidence-article ol > li::before,
.evidence-overview > li::before,
.article-toc ol > li::before {
  content: none !important;
  display: none !important;
}

ol > li,
.evidence-article ol > li,
.evidence-overview > li,
.article-toc ol > li {
  list-style-position: outside;
}

/* =========================================================
   EVIDENCE OVERVIEW — NO LIST-ITEM PSEUDO-ELEMENTS
========================================================= */
.evidence-overview {
  margin: 22px 0 28px;
}

.evidence-overview-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.25rem;
  margin: 0 0 12px;
  color: var(--text);
}

.evidence-overview-number {
  font-weight: bold;
  text-align: right;
}

@media (max-width: 650px) {
  .evidence-overview-row {
    grid-template-columns: 1.7rem minmax(0, 1fr);
  }
}
