/* © 2025 Johann Naudé. All rights reserved. */

:root {
  /* Color System */
  --background-color: #F5F5EF;
  --text-color: #000000;
  --text-color-muted: #666666;

  /* Tiered Hover/Focus Scale System */
  --hover-scale-large: 1.05;   /* Large elements: buttons, cards */
  --hover-scale-medium: 1.05;  /* Medium elements: text links */
  --hover-scale-small: 1.1;    /* Small elements: icons */

  /* Active/Pressed State */
  --active-scale: 0.98;

  /* Transitions */
  --transition-transform: transform 0.1s ease-in-out;
}

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

html {
  font-size: 18px;
  background-color: var(--background-color);
  height: 100%;
}

body {
  height: 100%;
  min-height: 100vh;
  font-family: "adobe-garamond-pro", Baskerville, serif;
  font-weight: 400;
  font-style: normal;
  line-height: 1.3;
  background-color: inherit;
  display: flex;
  justify-content: center;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-transform);
  display: inline-block;
  transform-origin: center;
}

a:hover {
  transform: scale(var(--hover-scale-medium));
}

a:focus-visible {
  transform: scale(var(--hover-scale-medium));
  outline: none;
}

.container {
  width: 100%;
  max-width: 800px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.content {
  margin: 0 auto;
  font-size: 1.1rem;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 57ch;
  height: 100%;
}

.content-wrapper {
  flex: 1;
  padding-top: clamp(6rem, 20vh, 10rem);
  padding-bottom: 6rem;
}

/* Site Icon Header Styles */
body > header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 1rem;
  background-color: var(--background-color);
  z-index: 1000;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-transform);
  color: var(--text-color);
}

.site-logo:hover {
  transform: scale(var(--hover-scale-small));
}

.site-logo:focus-visible {
  transform: scale(var(--hover-scale-small));
  outline: none;
}

.site-logo svg {
  display: block;
  width: 32px;
  height: 32px;
}

/* Article Header Styles */
.content-wrapper > header {
  margin-bottom: clamp(2rem, 10vh, 6rem);
}


/* Story List Styles */
.stories-list {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vh, 3rem);
}

.story-preview a {
  display: inline-block;
}

/* Typography and Content Styles */
h1 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.external-icon {
  font-size: 1rem;
  vertical-align: middle;
}

h2 {
  font-size: 1.1rem;
  margin-block: 1.1rem 0.8rem;
}

h2.centered {
  text-align: center;
}

[role="doc-subtitle"] {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 1.1rem;
  color: var(--text-color-muted);
}

.author {
  display: block;
  margin-bottom: clamp(3rem, 10vh, 6rem);
  font-style: italic;
}

p {
  text-indent: 1.5em;
  font-size: 1.1rem;
}

p:first-of-type,
p.break + p,
h2 + p,
.no-indent {
  text-indent: 0;
}

.break {
  margin: 1.5rem 0;
  text-indent: 0;
  text-align: center;
}

/* Article Footer Styles */
.article-footer {
  margin-top: 3rem;
}

.article-footer p {
  text-indent: 0;
  font-size: 0.95rem;
  color: var(--text-color-muted);
  text-align: center;
}

/* Footnotes Styles */
[role="doc-endnotes"] {
  margin-top: 2rem;
  margin-bottom: 3rem;
  line-height: 1.4;
}

[role="doc-endnotes"] p {
  text-indent: 0;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

[role="doc-endnotes"] p:last-child {
  margin-bottom: 0;
}

.footnote-separator {
  margin: 2rem 0;
  width: 15%;
  border: 0;
  border-top: 1px solid var(--text-color-muted);
}

/* Responsive Styles */
@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  .content-wrapper {
    padding-top: clamp(4rem, 15vh, 8rem);
    padding-bottom: 4rem;
  }

  .footnote-separator {
    width: 20%;
  }

  body > header {
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  .site-logo svg {
    width: 26px;
    height: 26px;
  }
}

/* Print Styles */
@media print {
  html {
    font-size: 12pt;
  }

  .container {
    padding: 0;
  }
}
