:root {
  color-scheme: light dark;
  --page: #f7f3ee;
  --ink: #171514;
  --muted: #6e6760;
  --line: rgba(23, 21, 20, 0.16);
  --placeholder: #e2ded8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #18191b;
    --ink: #f0ede6;
    --muted: #9c958a;
    --line: rgba(240, 237, 230, 0.16);
    --placeholder: #2a2b2d;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--ink);
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
}

.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.site-header {
  margin-bottom: 14px;
  text-align: center;
}

.site-heading {
  margin: 0;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 6px 16px;
  margin: 0 0 34px;
}

.tag-cloud-tag {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.tag-cloud-tag:hover,
.tag-cloud-tag:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

.tag-weight-1 { font-size: 0.85rem; }
.tag-weight-2 { font-size: 1.05rem; }
.tag-weight-3 { font-size: 1.3rem; }
.tag-weight-4 { font-size: 1.55rem; }
.tag-weight-5 { font-size: 1.8rem; }

.site-title {
  display: inline-block;
  font-family: "Open Sans", Arial, sans-serif;
  font-stretch: 87.5%;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: 0;
  text-decoration: none;
}

.featured-piece {
  display: grid;
  gap: 24px;
  margin-bottom: 44px;
}

.hero-image-frame {
  display: block;
  overflow: hidden;
  border-radius: 6px;
  background: var(--placeholder);
}

.hero-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

.featured-copy {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.65;
  text-align: center;
}

.featured-copy p {
  margin: 0;
}

.featured-title {
  margin: 0 0 6px;
  color: var(--ink);
  font-family: "Caveat", cursive;
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
}

.featured-title a {
  text-decoration: none;
}

.featured-title a:hover,
.featured-title a:focus-visible {
  text-decoration: underline;
}

.featured-date {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.post-grid {
  display: grid;
  justify-content: center;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.post-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-decoration: none;
}

.post-card-image {
  display: block;
  width: min(240px, 100%);
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--placeholder);
}

.post-card-body {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.post-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.post-card:hover .post-card-title,
.post-card:focus-visible .post-card-title {
  text-decoration: underline;
}

.post-card-date,
.post-card-tags {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.post-separator {
  display: block;
  margin: 6px 0;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  text-align: center;
}

@media (max-width: 820px) {
  .site-shell {
    width: min(100% - 24px, 620px);
    padding-top: 28px;
  }

  .site-header {
    margin-bottom: 10px;
  }

  .tag-cloud {
    margin-bottom: 24px;
  }

  .hero-image {
    aspect-ratio: 4 / 3;
  }

  .post-card-image {
    width: min(220px, 100%);
    height: 138px;
  }
}

.back-link {
  margin-bottom: 24px;
  font-size: 0.95rem;
}

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

.back-link a:hover,
.back-link a:focus-visible {
  text-decoration: underline;
}

.back-link-bottom {
  margin: 28px 0 0;
  text-align: center;
}

.list-title {
  margin: 0 0 28px;
  font-family: "Caveat", cursive;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 800;
  text-align: center;
}

.post-header {
  margin-bottom: 28px;
  text-align: center;
}

.post-hero-image {
  margin: 0 0 32px;
}

.post-title {
  margin: 0 0 8px;
  font-family: "Caveat", cursive;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.05;
}

.post-date {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 0;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.post-tags li:not(:first-child)::before {
  content: "\00b7";
  margin: 0 8px;
  color: var(--muted);
}

.post-tags a {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.post-tags a:hover,
.post-tags a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

.post-body {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.7;
}

.post-body img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 24px;
  border-radius: 6px;
  background: var(--placeholder);
}

.post-body p {
  margin: 0 0 1em;
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px 24px;
  max-width: 720px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.post-nav-prev {
  grid-column: 1;
  justify-self: start;
}

.post-nav-home {
  grid-column: 2;
  justify-self: center;
}

.post-nav-next {
  grid-column: 3;
  justify-self: end;
}

.post-nav-home .icon,
.back-link-bottom .icon {
  width: 22px;
  height: 22px;
  color: var(--ink);
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 100%;
  text-decoration: none;
  color: inherit;
}

.post-nav-next {
  text-align: right;
}

.post-nav-label {
  color: var(--muted);
  font-size: 0.85rem;
}

.post-nav-title {
  font-weight: 700;
}

.post-nav-link:hover .post-nav-title,
.post-nav-link:focus-visible .post-nav-title {
  text-decoration: underline;
}

.site-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.empty-note {
  color: var(--muted);
  text-align: center;
}

.not-found {
  padding: 60px 0;
  text-align: center;
}

.not-found .empty-note a {
  text-decoration: none;
}

.not-found .empty-note a:hover,
.not-found .empty-note a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 460px) {
  .site-title {
    font-size: 2rem;
  }
}
