* {
  box-sizing: border-box;
}

:root {
  --page: #f6f3ed;
  --ink: #171717;
  --muted: #706d68;
  --line: #d9d4cb;
  --card: #fffdfa;
  --max: 1180px;
  --reading: 760px;
}

html {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--ink);
}

body {
  margin: 0;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}

img,
video,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

.container,
.container-narrow {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.container-narrow {
  max-width: var(--reading);
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header-inner,
.site-footer-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.site-nav a,
.site-footer a {
  text-decoration: none;
}

.site-main {
  min-height: 70vh;
}

.hero,
.archive-header {
  padding-block: clamp(4rem, 9vw, 9rem) 3rem;
}

.hero h1,
.archive-header h1,
.article-header h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.035em;
  margin: 0;
}

.hero h1 {
  font-size: clamp(4rem, 12vw, 9rem);
}

.archive-header h1,
.article-header h1 {
  font-size: clamp(3rem, 8vw, 6rem);
}

.hero-copy,
.article-deck {
  max-width: 760px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  line-height: 1.35;
}

.eyebrow,
.article-card-meta {
  color: var(--muted);
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.section {
  padding-block: 2rem 6rem;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

.article-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-card {
  padding: 2rem 2rem 2.5rem 0;
  border-bottom: 1px solid var(--line);
}

.article-card:nth-child(even) {
  padding-left: 2rem;
  border-left: 1px solid var(--line);
}

.article-card h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 500;
  line-height: 1.08;
  margin: .6rem 0 1rem;
}

.article-card h2 a {
  text-decoration: none;
}

.article-card p {
  color: #3d3a36;
}

.read-more {
  display: inline-block;
  margin-top: .5rem;
}

.article {
  padding-block: clamp(4rem, 8vw, 8rem);
}

.article-header {
  margin-bottom: 3rem;
}

.article-featured {
  margin: 0 0 3rem;
}

.article-featured img {
  width: 100%;
}

.article-body {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.12rem, 1.8vw, 1.35rem);
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.2;
  margin-top: 2.5em;
}

.article-body img {
  display: block;
  margin: 2rem auto;
}

.article-body pre {
  overflow-x: auto;
  padding: 1rem;
  background: #ebe7df;
  font-size: .9rem;
}

.article-body blockquote {
  margin-inline: 0;
  padding-left: 1.5rem;
  border-left: 3px solid var(--ink);
  font-style: italic;
}

.legacy-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-block: 2rem;
}

.taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.5rem;
}

.taxonomy a {
  border: 1px solid var(--line);
  padding: .25rem .6rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: .85rem;
}

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-top: 2rem;
  margin-top: 2rem;
}

.pagination > :last-child {
  text-align: right;
}

.comments {
  margin-top: 6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.comments h2 {
  font-size: 1.4rem;
}

.comment {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: .9rem;
}

.comment-body {
  margin-top: .75rem;
}

.site-footer {
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .site-header-inner,
  .site-footer-inner,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 1rem;
  }

  .article-list {
    grid-template-columns: 1fr;
  }

  .article-card,
  .article-card:nth-child(even) {
    padding-inline: 0;
    border-left: 0;
  }

  .legacy-gallery {
    grid-template-columns: 1fr;
  }
}


/*--*/
.article-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;

  padding: 2rem;
  border-bottom: 1px solid var(--line);

  background: var(--page);

  transition:
    background .25s ease,
    color .25s ease;
}

.article-card:nth-child(even) {
  border-left: 1px solid var(--line);
}


/* Background photo layer */

.article-card::before {
  content: "";
  position: absolute;
  inset: -18px;

  background-image: var(--card-bg);
  background-size: cover;
  background-position: center;

  filter:
    blur(2px)
    saturate(.85)
    contrast(.9)
    brightness(1.02);

  transform: scale(1.06);

  opacity: 0;

  transition:
    filter .35s ease,
    opacity .35s ease,
    transform .35s ease;

  z-index: -2;
}


/* Only cards with images get the photo */

.article-card.has-background::before {
  opacity: .42;
}


/* Soft veil, but ONLY for cards with photos */

.article-card.has-background::after {
  content: "";
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      to bottom,
      rgba(246, 243, 237, .45),
      rgba(246, 243, 237, .68)
    );

  z-index: -1;
}


/* On hover: blur the image more */

.article-card.has-background:hover::before {
  filter:
    blur(18px)
    saturate(.7)
    contrast(.85)
    brightness(1.04);

  transform: scale(1.1);
}

.page-container {
  width: min(var(--max), calc(100% - 3rem));
  margin-inline: auto;
  padding-block: 2.5rem;
}

.edit-link {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;

  padding: .6rem 1rem;
  border-radius: .5rem;

  background: #000;
  color: #fff;
  text-decoration: none;
  font: 14px/1 sans-serif;
}

.similar-posts {
    margin-top: 5rem;
}

.similar-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.similar-post a {
    color: inherit;
    text-decoration: none;
}

.similar-post img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    margin-bottom: 1rem;
}

.similar-post h3 {
    margin: 0 0 .5rem;
}

.similar-post p {
    margin: 0;
}

@media (max-width: 800px) {
    .similar-posts-grid {
        grid-template-columns: 1fr;
    }
}

.tag-featured {
  color: #8f6c2f;
  border-color: #b58a3b;
  background: rgba(181, 138, 59, 0.10);
}

.article-outdated {
  margin: 2rem 0;
  padding: 1rem 1.25rem;

  background: #f1e7d8;
  border: 1px solid #dfc9a8;
  border-left: 4px solid #c97a28;

  border-radius: 10px;

  color: #5f4a32;
  font-size: 0.95rem;
  line-height: 1.5;
}

.article-outdated p {
  margin: 0;
}

.article-outdated strong {
  color: #8f541c;
}

/* footer */

.site-footer {
  margin-top: 5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer-copy {
  margin: 0;
}

.site-footer-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;

  color: inherit;
  text-decoration: none;

  transition:
    color 150ms ease,
    opacity 150ms ease;
}

.site-footer-link:hover {
  color: var(--ink);
}

.site-footer-icon {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

@media (max-width: 600px) {
  .site-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}