@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&display=swap");

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

:root {
  /* Typography */
  --font-serif: "Cormorant Garamond", "Times New Roman", serif;
  --font-mono: "SFMono-Regular", Menlo, monospace;
  --font-size-base: 20px;
  --font-size-sm: 0.9rem;
  --font-size-xs: 0.85rem;
  --font-size-h1: 3rem;
  --font-size-h2: 1.75rem;
  --font-size-h3: 1.35rem;
  --line-height-body: 1.75;
  --line-height-heading: 1.3;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;

  /* Colors */
  --color-bg: #EAE6DD;
  --color-text: #2c2c2c;
  --color-text-muted: #6b6b6b;
  --color-accent: #8b5e3c;
  --color-border: rgba(0, 0, 0, 0.12);
  --color-surface: rgba(0, 0, 0, 0.03);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3.5rem;
  --space-3xl: 4rem;

  /* Layout */
  --content-width: 700px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-serif);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background-color: var(--color-bg);
}

/* Layout */
.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg) 6rem;
}

/* Header */
.article-header {
  margin-bottom: var(--space-3xl);
}

.article-header h1 {
  font-weight: var(--font-weight-light);
  font-style: italic;
  font-size: var(--font-size-h1);
  line-height: 1.2;
  margin-bottom: var(--space-md);
  letter-spacing: -0.01em;
}

.article-header .subtitle {
  font-weight: var(--font-weight-regular);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--color-text-muted);
}

.article-meta {
  margin-top: var(--space-xl);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-md);
  display: flex;
  gap: var(--space-lg);
}

/* Sections */
section {
  margin-bottom: var(--space-2xl);
}

h2 {
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-h2);
  margin-bottom: 1.25rem;
  line-height: var(--line-height-heading);
}

h3 {
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-h3);
  margin-bottom: var(--space-md);
  margin-top: var(--space-xl);
  line-height: var(--line-height-heading);
}

p {
  margin-bottom: 1.25rem;
}

/* Blockquotes */
blockquote {
  border-left: 2px solid var(--color-accent);
  padding-left: var(--space-lg);
  margin: 1.75rem 0;
  font-style: italic;
  color: var(--color-text-muted);
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--color-border);
  transition: color 0.2s, border-color 0.2s;
}

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

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: var(--space-xl) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

th, td {
  text-align: left;
  padding: 0.75rem var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

th {
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tr:nth-child(even) {
  background: var(--color-surface);
}

/* Horizontal rules / section breaks */
.section-break {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-2xl) 0;
}

/* Lists */
ul, ol {
  padding-left: var(--space-lg);
  margin-bottom: 1.25rem;
}

li {
  margin-bottom: var(--space-sm);
}

/* Strong / emphasis */
strong {
  font-weight: var(--font-weight-semibold);
}

/* Code (for any inline references) */
code {
  font-family: var(--font-mono);
  font-size: 0.8em;
  background: var(--color-surface);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

/* Footer */
.article-footer {
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
  font-style: italic;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 600px) {
  :root {
    --font-size-base: 18px;
    --font-size-h1: 2.25rem;
  }

  .container {
    padding: var(--space-xl) 1.25rem var(--space-3xl);
  }

  .article-meta {
    flex-direction: column;
    gap: var(--space-xs);
  }

  table {
    font-size: 0.8rem;
  }

  th, td {
    padding: var(--space-sm) 0.65rem;
  }
}
