:root {
  --color-bg: white;
  --color-text: #000000;
  --color-primary: #000000;
  --color-gray: #707070;
  --color-light-gray: #f1f1f1;
  --color-note: #646464;
  --color-link: #869eff;
}

body {
  background-color: var(--color-bg);
  font-family: Georgia, "Times New Roman", Times, serif;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  padding: 0 20px;
  color: var(--color-text);
}

footer {
  display: flex;
  flex-direction: column;
  margin: 30px auto 60px auto;
  justify-content: center;
  align-items: center;
  gap: 25px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrapper {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

.site-logo {
  font-variant: small-caps;
  font-weight: 400;
  font-size: 32px;
  margin: 0;
}

nav {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px 0;
  padding-bottom: 30px;
  border-bottom: dashed black 1.5px;
}

.newsletter-inline {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-top: dashed black 1.5px;
  border-bottom: dashed black 1.5px;
  padding: 30px 0 30px 0;
  margin: 30px auto 0 auto;
}

h2.newsletter-cta {
  margin: 0 0 6px 0;
  padding: 0;
  border-bottom: none;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
}
form.newsletter-form {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
}
.newsletter-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  position: relative;
  padding-bottom: 0;
}
.newsletter-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  height: 40px;
}

.newsletter-input {
  width: 220px;
  min-height: 40px;
  box-sizing: border-box;
  padding: 0 8px;
  font-size: 14px;
  border: 1.5px solid black;
  border-radius: 6px;
}

.newsletter-go {
  width: 40px;
  height: 100%;
  border-radius: 6px;
  border: none;
  background: black;
  color: white;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: default;
}

.newsletter-go:not([disabled]) {
  cursor: pointer;
}

.newsletter-input:focus,
.newsletter-go:focus {
  outline: none;
  box-shadow: none;
}

.newsletter-message {
  font-size: 9px;
  margin: 0;
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 2px;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.article-share {
  display: flex;
  justify-content: center;
  width: 100%;
  border-bottom: dashed black 1.5px;
  padding: 30px 0;
  margin: 0 auto;
}

.article-share-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.article-share-label {
  font-size: 14px;
  line-height: 1.2;
  color: var(--color-gray);
}

.article-share-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.article-share-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  box-sizing: border-box;
}

.article-share-icon {
  width: 24px;
  height: 24px;
  opacity: 0.9;
}

.footer-social {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-social-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.footer-social-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
}

.footer-social-icon {
  width: 24px;
  height: 24px;
  opacity: 0.9;
}

a {
  appearance: none;
  -webkit-appearance: none;
  text-decoration: none;
  cursor: pointer;
  color: var(--color-text);
}

.url-link {
  color: var(--color-link);
  font-weight: 600;
}

.landing-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 0;
  margin: 0;
  width: 100%;
}

.landing-item {
  list-style: none;
}

.landing-item:first-of-type,
.landing-item:nth-of-type(3n + 4):not(:last-child) {
  padding-bottom: 30px;
  border-bottom: dashed black 1.5px;
}

.landing-link {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  padding: 0;
  margin: 0;
  font-size: 16px;
  text-decoration: none;
  height: 100%;
  width: 100%;
}

.landing-thumb {
  width: 130px;
  height: auto;
  border-radius: 10px;
}

.landing-title {
  margin: 0;
  width: 100%;
  font-weight: 400;
  font-size: 20px;
}

.landing-item-text {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.landing-item-meta {
  display: flex;
  gap: 15px;
  align-items: center;
}
.landing-description,
.internal-linking-description {
  font-size: 13px;
}
p {
  margin: 0;
}

.date {
  border-bottom: var(--color-primary) 1px dashed;
  color: black;
  padding: 3px 5px;
  margin: 0;
  font-size: 12px;
}

.article-sub .date {
  margin-top: 0px;
}

.gray {
  color: var(--color-gray);
}

a.gray {
  display: inline;
}

h1.article-title {
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 15px;
}

.article-description {
  font-weight: 400;
  margin-bottom: 15px;
}

h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 20px 0 0 0;
  padding-bottom: 10px;
  border-bottom: dashed black 1.5px;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 10px 0 0 0;
}

.article-author,
.article-author a {
  font-size: 14px;
  color: var(--color-gray);
}

.article-reading-time {
  font-size: 12px;
}

.article-sub {
  display: flex;
  gap: 15px;
  align-items: baseline;
  margin-bottom: 20px;
}

.article-sub .date,
.article-sub .article-author,
.article-sub .article-reading-time {
  line-height: 1;
}

article {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 15px;
}
article ul,
article ol {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  margin: 0;
}

article ul li {
  list-style: disc;
  margin-left: 20px;
  font-size: 16px;
  line-height: 1.3;
}

article ol li {
  margin-left: 20px;
  font-size: 16px;
  line-height: 1.3;
}

article p {
  font-size: 16px;
  line-height: 1.3;
}

.article-image {
  width: 100%;
  height: auto;
  border-radius: 15px;
  margin-bottom: 20px;
}

.inline-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 15px;
  margin: 10px auto;
}

.fade-inline-img {
  --inline-img-fade: 12px;
  -webkit-mask-image:
    linear-gradient(
      to bottom,
      transparent 0,
      #000 var(--inline-img-fade),
      #000 calc(100% - var(--inline-img-fade)),
      transparent 100%
    ),
    linear-gradient(
      to right,
      transparent 0,
      #000 var(--inline-img-fade),
      #000 calc(100% - var(--inline-img-fade)),
      transparent 100%
    );
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(
      to bottom,
      transparent 0,
      #000 var(--inline-img-fade),
      #000 calc(100% - var(--inline-img-fade)),
      transparent 100%
    ),
    linear-gradient(
      to right,
      transparent 0,
      #000 var(--inline-img-fade),
      #000 calc(100% - var(--inline-img-fade)),
      transparent 100%
    );
  mask-composite: intersect;
}
.footer-inline-img {
  margin-bottom: 0px;
}

.img-footer {
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--color-gray);
}

.footer-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.author-link-icon {
  padding-left: 5px;
}

p.notes {
  background-color: var(--color-light-gray);
  border-radius: 10px;
  padding: 8px;
  margin: 0;
  font-size: 14px;
  font-style: italic;
}
ul.notes {
  background-color: var(--color-light-gray);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}
.notes li {
  width: 100%;
  font-size: 12px;
  color: var(--color-note);
  list-style: none;
  padding: 0;
  margin: 0;
  font-style: italic;
}

.note {
  color: var(--color-gray);
}

.quote {
  background-color: var(--color-light-gray);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  color: black;
  font-style: italic;
}

.load-more {
  width: 100%;
  margin: 30px auto 0;
  border-top: dashed black 1.5px;
  padding-top: 30px;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
}

.load-more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 70px;
  padding: 0 16px;
  border-radius: 6px;
  background: black;
  color: white;
  text-decoration: none;
}

.load-more-link.loading {
  color: transparent;
  pointer-events: none;
}

.error-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin: 0 auto;
  width: 100%;
}

.error {
  font-size: clamp(100px, 20vw, 280px);
  margin: 0 0 60px 0;
  padding: 0;
  line-height: 1;
  white-space: nowrap;
}

#newsletter-turnstile {
  position: absolute;
  left: 0;
  top: calc(100% + 14px);
  z-index: 3;
}

.horizontal-footer-section {
  display: flex;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.internal-linking {
  margin: 30px 0;
  padding-bottom: 30px;
  border-bottom: dashed black 1.5px;
}

.internal-linking-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0;
  margin: 0;
  width: 100%;
}

.internal-linking-item {
  list-style: none;
}

.internal-linking-link {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  padding: 0;
  margin: 0;
  font-size: 16px;
  text-decoration: none;
  height: 100%;
  width: 100%;
}

.internal-linking-thumb {
  width: 130px;
  height: auto;
  border-radius: 10px;
}

.internal-linking-title {
  margin: 0;
  width: 100%;
  font-weight: 400;
  font-size: 19px;
}

.internal-linking-item-text {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.internal-linking-item-meta {
  display: flex;
  gap: 15px;
  align-items: center;
}

h2.internal-linking-title {
  color: var(--color-gray);
  font-size: 16px;
  margin: 0;
  padding: 0 0 20px 0;
  border-bottom: none;
}

.to-be-continued {
  color: var(--color-gray);
  font-size: 16px;
  margin-top: 20px;
}

li ul {
  margin-top: 10px;
}

.frontmatter-sources {
  border-bottom: dashed black 1.5px;
  padding-bottom: 30px;
}
.frontmatter-sources h2 {
  padding-bottom: 10px;
  font-size: 17px;
  font-weight: 600;
  border-bottom: none;
  margin: 0;
}
.frontmatter-sources ul {
  gap: 10px;
  margin: 10px 0;
  padding-left: 20px;
}
.frontmatter-sources ul li {
  margin-top: 10px;
  list-style: circle;
}
.frontmatter-sources a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
p.notes a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

#newsletter-turnstile {
  display: none;
}

#newsletter-turnstile.is-visible {
  display: block;
}

.formula {
  margin: 6px 0;
  font-family: monospace;
  font-weight: 600;
}

.footer-projects {
  border-bottom: dashed black 1.5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-bottom: 30px;
}

.footer-projects p {
  color: var(--color-gray);
  font-size: 12px;
  margin: 0;
  padding: 0;
  margin-bottom: 15px;
  text-align: center;
}

.footer-projects li {
  list-style: none;
}

.footer-projects ul {
  margin: 0;
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  gap: 20px;
  row-gap: 8px;
  justify-content: center;
  padding: 0;
}

@media (max-width: 600px) {
  body {
    padding: 0 15px;
  }

  .landing-item {
    padding-bottom: 0px;
  }

  .wrapper {
    max-width: 400px;
  }

  .article-title {
    font-size: 22px;
  }

  .author-link-icon {
    padding-left: 5px;
  }

  .internal-linking-item {
    padding-bottom: 0px;
  }

  /* stack links vertically and left-align */
  .internal-linking-link,
  .landing-link {
    display: flex;
    flex-direction: column; /* vertical stack */
    gap: 10px;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    text-align: left;
  }

  /* text blocks stack their children vertically */
  .internal-linking-item-text,
  .internal-linking-item-meta,
  .landing-item-text,
  .landing-item-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
    width: 100%;
    text-align: left;
  }

  /* images full-width on mobile */
  .internal-linking-thumb,
  .landing-thumb {
    width: 100%;
  }

  /* title -> date -> img */

  /* items: move text block before image */
  .internal-linking-link .internal-linking-item-text,
  .landing-link .landing-item-text {
    order: 1;
  }
  .internal-linking-link .internal-linking-thumb,
  .landing-link .landing-thumb {
    order: 3;
  }

  /* text block ordering: title -> description -> meta */
  .internal-linking-link .internal-linking-item-text .internal-linking-title,
  .landing-link .landing-item-text .landing-title {
    order: 1;
  }

  .internal-linking-link
    .internal-linking-item-text
    .internal-linking-description,
  .landing-link .landing-item-text .landing-description {
    order: 2;
  }

  .internal-linking-link
    .internal-linking-item-text
    .internal-linking-item-meta,
  .landing-link .landing-item-text .landing-item-meta {
    order: 3;
  }

  /* meta: date -> author */
  .internal-linking-link .internal-linking-item-meta .date,
  .landing-link .landing-item-meta .date {
    order: 1;
  }
  .internal-linking-link .internal-linking-item-meta .article-author,
  .landing-link .landing-item-meta .article-author {
    order: 2;
  }
}


