/* ==========================================================================
   Typography and layout overrides for essay reading
   ========================================================================== */

/* Content column width */
.md-grid {
  max-width: 58rem;
}

/* Body typography - generous line-height */
.md-typeset {
  font-size: 0.85rem;
  line-height: 1.7;
  letter-spacing: 0.005em;
}

/* Body text colour - softer than pure black */
[data-md-color-scheme="default"] .md-typeset {
  color: #2a2a2a;
}

[data-md-color-scheme="slate"] .md-typeset {
  color: #d4d4d4;
}

/* Background tweaks - warm off-white, not pure white */
[data-md-color-scheme="default"] {
  --md-default-bg-color: #fafaf7;
}

[data-md-color-scheme="slate"] {
  --md-default-bg-color: #1a1a1a;
}

/* Headings - serif, restrained sizing */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.md-typeset h1 {
  font-size: 2rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
  font-weight: 700;
}

.md-typeset h2 {
  font-size: 1.4rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.md-typeset h3 {
  font-size: 1.15rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

/* Paragraph spacing */
.md-typeset p {
  margin-bottom: 1.25rem;
}

/* Hide table of contents - keeps the page clean for essays */
.md-sidebar--secondary {
  display: none;
}

/* Hide left sidebar - the home page lists essays inline, sidebar nav is redundant */
.md-sidebar--primary {
  display: none;
}

/* With sidebar hidden, give the content a bit of left padding so it isn't flush */
.md-main__inner {
  margin-top: 1rem;
}

/* Header - smaller, less prominent */
.md-header {
  box-shadow: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-md-color-scheme="slate"] .md-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.md-header__title {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 1rem;
}

/* Footer - simplify */
.md-footer__inner {
  padding: 1rem 0;
}

.md-footer-meta {
  background-color: transparent;
  border-top: 1px solid rgba(128, 128, 128, 0.15);
}

/* Essay images - centered, with breathing room */
.md-typeset img.essay-image {
  display: block;
  margin: 2rem auto;
  border-radius: 4px;
  max-width: 100%;
  height: auto;
}

/* Horizontal rules - section breaks within essays */
.md-typeset hr {
  border: none;
  border-top: 1px solid rgba(128, 128, 128, 0.25);
  margin: 2.5rem auto;
  width: 6rem;
}

/* Blockquotes - restrained, italic, no heavy left border */
.md-typeset blockquote {
  border-left: 2px solid rgba(128, 128, 128, 0.3);
  font-style: italic;
  color: inherit;
  opacity: 0.85;
  padding-left: 1.25rem;
  margin-left: 0;
}

/* Links - subtle, accent colour */
.md-typeset a {
  color: var(--md-accent-fg-color);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 87, 34, 0.3);
}

.md-typeset a:hover {
  border-bottom-color: var(--md-accent-fg-color);
}

/* Strong/emphasis - just slightly heavier, not jarring */
.md-typeset strong {
  font-weight: 600;
}

/* Code - inline */
.md-typeset code {
  font-size: 0.9em;
  padding: 0.1em 0.3em;
  border-radius: 3px;
  background-color: rgba(128, 128, 128, 0.12);
}

/* Lists - tighter spacing */
.md-typeset ul li,
.md-typeset ol li {
  margin-bottom: 0.4rem;
}

/* Footnotes - subtle */
.md-typeset .footnote {
  font-size: 0.85em;
  border-top: 1px solid rgba(128, 128, 128, 0.15);
  margin-top: 3rem;
  padding-top: 1rem;
}

/* First paragraph after h1 - drop cap optional, currently disabled */
/* Uncomment if you want a drop cap on the opening paragraph of essays:
.md-typeset h1 + p::first-letter {
  float: left;
  font-size: 3.5rem;
  line-height: 0.85;
  margin: 0.1em 0.1em -0.1em 0;
  font-weight: 700;
  font-family: "Source Serif 4", Georgia, serif;
}
*/

/* Remove the search bar if you don't want it */
.md-search {
  display: none;
}

/* Hide the "Edit this page" pencil */
.md-content__button {
  display: none;
}
