:root {
  --color-page-background: #111318;
  --color-navigation-background: #1a1a1a;
  --color-feature-background: #191c22;
  --color-text-primary: #f2f1ed;
  --color-text-secondary: #cdcdd5;
  --color-link: #b9c3d5;
  --color-link-inline: #7388a8;
  --color-rule: #383b42;
  --site-max-width: 72rem;
  --site-gutter: 1.5rem;
  --hero-height: 225px;
  --hero-height-narrow: 158px;
  --hero-background-position: 50% 50%;
  --photographic-background-depth: 58rem;
  --photographic-background-hold: 28rem;
  --wordmark-width: 28rem;
  --wordmark-width-narrow: min(24rem, calc(100% - 3rem));
  --identity-line-spacing: 0.75rem;
  --home-writing-column: 1.85fr;
  --home-feature-column: 1fr;
  --home-column-gap: 4rem;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  color-scheme: dark;
}

body {
  position: relative;
  margin: 0;
  background: var(--color-page-background);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
}

body::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0 0 auto;
  height: var(--photographic-background-depth);
  background-image:
    linear-gradient(
      to bottom,
      rgb(17 19 24 / 0) 0,
      rgb(17 19 24 / 0) var(--photographic-background-hold),
      var(--color-page-background) 100%
    ),
    url("../images/site/hero-background.jpg");
  background-position: 0 0, var(--hero-background-position);
  background-size: 100% 100%, cover;
  background-repeat: no-repeat;
  pointer-events: none;
}

a {
  color: var(--color-link);
  text-decoration: none;
}

.post__content > :where(p, ul, ol, blockquote, dl) a,
.page__content > :where(p, ul, ol, blockquote, dl):not(.rss-link):not(.newsletter-link) a {
  color: var(--color-link-inline);
}

a:hover {
  text-decoration-line: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 0.2rem;
}

.site-shell {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: calc(100% - 4rem);
  max-width: var(--site-max-width);
  margin-inline: auto;
  background: var(--color-page-background);
}

main,
.site-footer {
  box-sizing: border-box;
  padding: var(--site-gutter);
}

main {
  padding-top: 0;
}

.site-header {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

.site-header__hero {
  min-height: var(--hero-height);
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: var(--site-gutter);
}

.site-header__inner {
  width: min(100%, var(--site-max-width));
  margin: 0 auto;
  text-align: center;
}

.site-wordmark {
  display: inline-block;
  max-width: 100%;
}

.site-wordmark__image {
  display: block;
  width: min(var(--wordmark-width), calc(100% - 4rem));
  max-width: 100%;
  margin-inline: auto;
  height: auto;
}

.site-identity {
  margin: var(--identity-line-spacing) 0 0;
  color: var(--color-text-secondary);
  font-size: 1rem;
  font-weight: 400;
}

.site-navigation {
  background: var(--color-navigation-background);
}

.site-navigation__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  box-sizing: border-box;
  margin: 0;
  padding: 0.75rem var(--site-gutter);
  list-style: none;
}

.site-navigation__link,
.site-navigation__link:hover,
.site-navigation__link:focus-visible {
  text-decoration: none;
}

.site-navigation__link[aria-current="page"] {
  text-decoration-line: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.25em;
}

.post {
  max-width: 40rem;
}

.post__header {
  margin-bottom: 2rem;
}

.post__title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.post__date {
  display: block;
}

.post__featured-image {
  margin: 0 0 2rem;
}

.post__featured-image img {
  display: block;
  max-width: 100%;
  height: auto;
}

.post__content {
  font-size: 1.125rem;
  line-height: 1.65;
}

.post__content iframe,
.post__content video,
.post__content audio {
  display: block;
  max-width: 100%;
  margin: 1.5rem 0;
}

.post__content iframe {
  width: 100%;
  border: 0;
}

.post__content iframe[src*="youtube.com"],
.post__content iframe[src*="youtu.be"],
.post__content iframe[src*="youtube-nocookie.com"] {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
}

.post__content audio {
  width: 100%;
}

.rss-link {
  margin-top: 2rem;
}

.newsletter-link {
  margin: 2rem 0 0;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.icon-link__icon {
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
  color: #8f9299;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.newsletter-icon {
  width: 0.75em;
  height: 0.75em;
}

.post-navigation {
  margin-top: 2rem;
}

.post-navigation__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-navigation__item + .post-navigation__item {
  margin-top: 0.25rem;
}

.post-newsletter-link {
  margin-top: 1.5rem;
}

.newsletter-form {
  max-width: 40rem;
  margin-top: 1.5rem;
}

.newsletter-form__label {
  display: block;
  margin-bottom: 0.5rem;
}

.newsletter-form__controls {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.newsletter-form__input,
.newsletter-form__button {
  box-sizing: border-box;
  min-height: 2.75rem;
  border: 1px solid var(--color-rule);
  border-radius: 0;
  font: inherit;
}

.newsletter-form__input {
  flex: 1 1 16rem;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  background: var(--color-page-background);
  color: var(--color-text-primary);
}

.newsletter-form__button {
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  background: var(--color-link);
  color: var(--color-page-background);
  cursor: pointer;
}

.newsletter-form__input:focus-visible,
.newsletter-form__button:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 0.2rem;
}

.newsletter-form__consent,
.newsletter-form__note {
  margin: 0.75rem 0 0;
}

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

.home-layout {
  display: grid;
  grid-template-columns: var(--home-writing-column) var(--home-feature-column);
  grid-template-areas: "writing featured";
  gap: var(--home-column-gap);
  align-items: flex-start;
}

.home-section--writing {
  grid-area: writing;
  min-width: 0;
}

.home-section--featured {
  grid-area: featured;
  min-width: 0;
}

.home-section--writing .post-list {
  margin-top: 0;
}

.home-section--writing .post-list__item:first-child {
  padding-top: 0;
}

.home-section--writing .post-list__item {
  gap: 1.5rem;
}

.home-section--writing .post-list__thumbnail-frame {
  flex: 0 0 11rem;
  width: 11rem;
  margin-top: 0.5rem;
}

.home-writing-archive-link {
  margin: 1rem 0 0;
  font-size: 0.95rem;
}

.page .rss-link {
  margin-top: 0;
}

.page .newsletter-link {
  margin-top: 0;
}

.page__content > .newsletter-link + .rss-link {
  margin-top: 0.5rem;
}

.page:has(.post-list) .page__title {
  margin: 0 0 0.75rem;
}

.page__content > .rss-link + .post-list {
  margin-top: 1rem;
}

.site-footer__links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer {
  padding-top: 2rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--color-rule);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.site-footer__copyright {
  margin: 1rem 0 0;
  font-size: 0.9rem;
}

.post-list {
  margin-top: 2rem;
}

.post-list__item {
  display: flex;
  gap: 2rem;
  min-width: 0;
  padding: 1.5rem 0;
}

.post-list__item--divided {
  border-bottom: 1px solid var(--color-rule);
}

.post-list__thumbnail-frame {
  flex: 0 0 16rem;
  width: 16rem;
  max-width: 100%;
  margin-top: 0.625rem;
}

.post-list__thumbnail {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: var(--post-thumbnail-position, 50% 50%);
}

.post-list__body {
  flex: 1 1 auto;
  min-width: 0;
}

.post-list__title {
  margin: 0 0 0.35rem;
}

.post-list__date {
  display: block;
  margin-bottom: 1rem;
}

.post-list__excerpt > :first-child {
  margin-top: 0;
}

.post-list__excerpt--continues > p:last-child::after {
  content: "…";
}

.featured-panel {
  background: var(--color-feature-background);
  border: 1px solid var(--color-rule);
}

.featured-panel__art-link,
.featured-panel__art {
  display: block;
}

.featured-panel__art {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.featured-panel__body {
  padding: 1rem;
}

.featured-panel__title {
  margin: 0 0 0.75rem;
}

.featured-panel__description {
  margin: 0 0 1rem;
}

.featured-panel__link {
  display: inline-block;
}

@media (max-width: 40rem) {
  .site-shell {
    width: auto;
  }

  .site-header__hero {
    min-height: var(--hero-height-narrow);
  }

  .site-wordmark__image {
    width: var(--wordmark-width-narrow);
  }

  .post__title {
    font-size: 1.5rem;
  }

  .home-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "featured"
      "writing";
    gap: 2rem;
  }

  .post-list__item {
    display: block;
  }

  .post-list__thumbnail-frame {
    display: block;
    flex: none;
    width: 100%;
    margin-top: 0;
    margin-bottom: 1rem;
  }

  .newsletter-form__controls {
    display: block;
  }

  .newsletter-form__button {
    width: 100%;
    margin-top: 0.75rem;
  }

  .newsletter-form__input {
    width: 100%;
  }
}
