:root {
  --color-bg: #1a1918;
  --color-paper: #252322;
  --color-text: #e5e2df;
  --color-text-muted: #9a9590;
  --color-accent: #8b7d6b;
  --color-border: #3d3a37;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Source Sans 3', system-ui, sans-serif;
  --max-width: 720px;
  --line-height: 1.7;
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header {
  padding: 4rem 0;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(180deg, rgba(26, 25, 24, 0.85) 0%, rgba(37, 35, 34, 0.95) 100%),
    url('https://picsum.photos/id/11/1400/800') center/cover no-repeat;
}

.title {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--color-text);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin: 0;
  font-style: italic;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.toc {
  padding: 2rem 0;
  background: var(--color-paper);
  border-bottom: 1px solid var(--color-border);
}

.toc h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.toc ol {
  margin: 0;
  padding-left: 1.5rem;
}

.toc li {
  margin-bottom: 0.5rem;
}

.toc a {
  color: var(--color-accent);
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

.content {
  padding: 3rem 0 4rem;
}

.content h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  padding-top: 0.5rem;
  color: var(--color-accent);
}

.content .figure {
  margin: 2rem 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.content .figure img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(30%) contrast(1.05);
}

.content .figure figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  background: #2a2826;
}

.content .figure figcaption a {
  color: var(--color-accent);
}

.content h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
}

.content h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--color-text);
}

.content p {
  margin: 0 0 1rem;
  text-align: justify;
}

.content p:last-of-type {
  margin-bottom: 0;
}

.content em {
  font-style: italic;
}

.content strong {
  font-weight: 600;
}

.content sup {
  font-size: 0.75em;
}

blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: #2a2826;
  border-left: 4px solid var(--color-accent);
  font-style: italic;
}

blockquote.warning {
  background: #2d2520;
  border-left-color: #8b5a3c;
}

blockquote p {
  margin: 0;
}

.references {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.references h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.content .sources {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.content .sources a {
  color: var(--color-accent);
}

.content .sources a:hover {
  text-decoration: underline;
}

.references ol {
  margin: 0;
  padding-left: 1.5rem;
}

.references li {
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-paper);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  .site-header {
    padding: 2rem 0;
  }

  .title {
    font-size: 1.75rem;
  }
}
