/* Shared composition and explicit page-width modes. */
body.layout-prose main > .container,
body.layout-prose main > .resume-container {
  max-width: calc(var(--content-prose) + 3rem);
}

body.layout-wide main > *,
body.layout-viewport-app main > .container {
  max-width: calc(var(--content-wide) + 3rem);
}

body.layout-wide .blog-article > :is(.post-header, h1, h2, h3, p, ul, ol, blockquote) {
  width: 100%;
  max-width: var(--content-prose);
  margin-right: auto;
  margin-left: auto;
}

body.layout-viewport-app main {
  min-height: 0;
  padding: 0;
}

body.layout-viewport-app .page-footer {
  margin-top: 0;
}

.site-header {
  min-height: var(--site-header-height);
  background: rgb(20 20 19 / 94%);
  color: #f5f1e8;
  border-bottom-color: #4a4840;
  font-family: var(--site-font-body);
  font-size: 16px;
  line-height: 1.6;
}

.site-header .nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-header a,
.site-header ul li a {
  color: #f5f1e8;
}

.theme-toggle {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid #77736a;
  border-radius: 999px;
  background: #25241f;
  color: #f5f1e8;
  font: 700 0.7rem/1 var(--site-font-label);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.theme-toggle__indicator {
  width: 1.1rem;
  height: 1.1rem;
  display: inline-grid;
  place-items: center;
  color: #f09a79;
  font-size: 1rem;
  line-height: 1;
}

.theme-toggle__indicator::before { content: "\2600"; }

:root[data-theme="light"] .theme-toggle__indicator::before { content: "\263E"; }

.theme-toggle:hover { border-color: #f09a79; }

@media (max-width: 640px) {
  .site-header .nav-wrapper { padding-inline: 0.75rem; }
  .site-header ul { gap: 0.15rem; }
  .site-header ul li a { padding: 0.4rem; font-size: 0.82rem; }
  .theme-toggle { width: 44px; padding: 0; }
  .theme-toggle [data-theme-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

.site-header .nav-wrapper,
.site-footer .footer-content {
  max-width: var(--content-wide);
}

.blog-post-card {
  border-color: var(--site-color-border);
  background: linear-gradient(145deg, var(--site-color-surface-raised), var(--site-color-surface));
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 3px;
}

.site-header :is(a, button):focus-visible {
  outline-color: #f0a07f;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .blog-post:hover,
  .blog-post-card:hover,
  .keyboard-container .key:hover {
    transform: none;
  }

  .motion-allowed {
    display: none;
  }

  .motion-reduced-only {
    display: block;
  }
}

/* Post title block. */
.post-header {
  margin-bottom: 2rem;
}

.post-header h1 {
  margin: 0 0 0.5rem;
  text-wrap: balance;
}

.post-header .post-date {
  margin: 0;
  color: var(--text-muted);
}

body.layout-viewport-app .post-header {
  padding-top: 1.5rem;
}
