/* White on black, the HSO orange for the navigation bar and headings, green
   links; every text color passes WCAG AA (4.5:1) on its background.
   Mobile first: one reading column, wider screens only add margin. */
:root {
  --orange: #ef6425;
  --green: #169e00;
  --muted: #b3b3b3;
  --rule: #333;
  --serif: "Times New Roman", Times, serif;
  --sans: Tahoma, Verdana, sans-serif;
  --column: 42rem;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: black;
  color: white;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  margin: 1.5em 0 0.5em;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 1.5rem + 2.5vw, 2.75rem); }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.5vw, 2rem); }
h3 { font-size: 1.4rem; }

p, ul, ol, blockquote {
  margin: 0 0 1em;
}

a {
  color: var(--green);
}

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

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

img {
  max-width: 100%;
  height: auto;
}

blockquote {
  padding-left: 1rem;
  border-left: 3px solid var(--orange);
  color: var(--muted);
}

.container {
  width: 100%;
  max-width: var(--column);
  margin: 0 auto;
  padding: 0 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 20;
  padding: 0.5rem 1rem;
  background: white;
  color: black;
}

.skip-link:focus {
  top: 0.5rem;
}

/* header and navigation: the title scrolls away, the bar stays */

.site-header .container {
  padding-top: 1.25rem;
  padding-bottom: 1rem;
}

.logo, .logo:hover {
  color: white;
  font-family: var(--serif);
  font-size: clamp(2rem, 1.6rem + 2vw, 2.75rem);
  line-height: 1.1;
  text-decoration: none;
}

.tagline {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--orange);
}

.navbar ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.9rem;
  font-size: 0.95rem;
  margin: 0 auto;
  list-style: none;
}

.navbar a {
  display: block;
  padding: 0.6rem 0;
  color: black;
  font-weight: bold;
  text-decoration: none;
}

.navbar a:hover, .navbar a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.navbar a:focus-visible {
  outline-color: black;
}

/* posts */

main.container {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

main.container > :first-child {
  margin-top: 0;
}

.post + .post {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.post-title {
  margin: 0;
}

.post-title a {
  color: white;
  text-decoration: none;
}

.post-title a:hover {
  color: var(--orange);
}

.post-meta {
  margin: 0.4rem 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.tag-list::before {
  content: " · ";
}

.tag-list a + a::before {
  content: ", ";
  color: var(--muted);
}

.content h1, .content h2, .content h3,
.content h4, .content h5, .content h6 {
  color: var(--orange);
}

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

.pager {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.pager a {
  display: block;
  text-decoration: none;
}

.pager-label {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.more {
  margin-top: 3rem;
  font-weight: bold;
}

/* lists of posts and topics */

.post-list, .topics {
  padding: 0;
  list-style: none;
}

.post-list li {
  display: grid;
  gap: 0 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.post-list time, .count {
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.topics li {
  padding: 0.25rem 0;
}

.count::before { content: " ("; }
.count::after { content: ")"; }

/* footer */

.site-footer {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.site-footer p {
  margin: 0 0 0.5rem;
}

/* wider screens: the date beside the title, older and newer side by side */

@media (min-width: 36rem) {
  .navbar ul {
    gap: 0 1.25rem;
    font-size: 1rem;
  }

  .post-list li {
    grid-template-columns: 7.5rem 1fr;
  }

  .pager {
    grid-template-columns: 1fr 1fr;
  }

  .pager-newer {
    grid-column: 2;
    text-align: right;
  }
}
