:root {
  color-scheme: light dark;
  --bg: #f5f3ef;
  --text: #1a1815;
  --muted: #5a534c;
  --link: #1a1815;
  --focus: #1a1815;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141210;
    --text: #f2ede6;
    --muted: #c7bfb5;
    --link: #f2ede6;
    --focus: #f2ede6;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  padding: 2rem 1rem;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

.site-header,
.content,
.site-footer {
  max-width: 65ch;
  margin: 0 auto;
}

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

.site-title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 700;
  text-transform: lowercase;
}

.tagline {
  margin: 1rem 0 0;
  color: var(--muted);
}

.site-nav {
  margin-top: 1rem;
  text-transform: lowercase;
}

.site-nav-footer {
  margin: 0;
  text-align: right;
}

.content {
  min-height: 50vh;
}

.content section {
  margin-bottom: 3rem;
}

.content h1 {
  margin: 0 0 1.5rem;
  font-size: 1.3rem;
  line-height: 1.3;
  font-weight: 700;
}

.content h2 {
  margin: 0 0 1rem;
  font-size: 1.12rem;
  line-height: 1.35;
  font-weight: 600;
}

.content h3 {
  font-size: 1.05rem;
  line-height: 1.4;
  font-weight: 600;
}

.content h4 {
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 600;
}

.entry {
  margin-bottom: 3rem;
}

.entry h2 {
  margin-bottom: 0.5rem;
}

.entry-with-meta > h1,
.entry-with-meta > h2 {
  margin-bottom: 0.5rem;
}

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

.entry-list li {
  margin-bottom: 1.5rem;
}

.entry-meta {
  margin: 0 0 1rem;
  color: var(--muted);
  text-transform: lowercase;
  font-style: italic;
}

.entry-meta a,
.hierarchy-back a,
.pagination a,
.site-footer a {
  color: inherit;
}

.hierarchy-back a,
.pagination a,
.site-nav-footer a {
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.18em;
}

.entry-with-meta > .entry-meta {
  margin-bottom: 2rem;
}

.entry-with-meta.compact-entry-row {
  margin: 0 0 2rem;
  padding: 0;
}

.entry-with-meta.compact-entry-row > h1 {
  margin-bottom: 0;
}

.entry-with-meta.compact-entry-row > .entry-meta {
  margin: 0;
  font-style: normal;
  text-align: right;
}

.post-signature {
  margin-top: 3rem;
  text-align: right;
  color: var(--muted);
  font-weight: 600;
  font-size: 1.1em;
  letter-spacing: 0.02em;
}

.year-group {
  margin: 0 0 0.5rem;
  color: var(--muted);
  text-align: right;
  font-weight: 600;
}

.content-type-group {
  margin: 0 0 0.5rem;
  color: var(--muted);
  text-align: right;
  text-transform: lowercase;
  font-weight: 600;
}

.content-type-group a {
  color: inherit;
  text-decoration: none;
}

.content-type-group a:hover,
.content-type-group a:focus-visible {
  text-decoration: underline;
}

.compact-entry-list {
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.compact-entry-row {
  margin: 0;
  padding: 0.5rem 0;
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 1rem;
  align-items: baseline;
}

.compact-entry-date {
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
}

.hierarchy-back {
  margin: 0 0 3rem;
  color: var(--muted);
  text-transform: lowercase;
}

.ui-label {
  text-transform: lowercase;
}

.pagination {
  margin: 2rem 0 0;
  color: var(--muted);
  text-transform: lowercase;
  text-align: right;
}

.site-footer {
  margin-top: 4rem;
  color: var(--muted);
  text-transform: lowercase;
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 1rem;
  align-items: baseline;
}

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

.entry-meta a:hover,
.entry-meta a:focus-visible,
.hierarchy-back a:hover,
.hierarchy-back a:focus-visible,
.pagination a:hover,
.pagination a:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--text);
}

.hierarchy-back a:hover,
.hierarchy-back a:focus-visible,
.pagination a:hover,
.pagination a:focus-visible,
.site-nav-footer a:hover,
.site-nav-footer a:focus-visible {
  text-decoration-thickness: 0.08em;
}

a {
  color: var(--link);
  text-decoration: underline;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--muted);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--bg);
}

@media (max-width: 42rem) {
  .site-footer {
    grid-template-columns: 1fr;
    row-gap: 1rem;
  }

  .site-nav-footer {
    text-align: right;
  }
}
