/* pjoe.net — quiet, readable, no decoration
   One typeface, generous measure, restrained colour. */

:root {
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --faint: #999;
  --rule: #e0ded8;
  --paper: #fdfcfa;
  --accent: #4a3f35;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8e5e0;
    --muted: #9a958d;
    --faint: #6e6a63;
    --rule: #2e2b27;
    --paper: #16150f;
    --accent: #d8cfc2;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 3.5rem 1.5rem 6rem;
  background: var(--paper);
  color: var(--ink);
  font-family: Charter, "Bitstream Charter", "Iowan Old Style", "Palatino Linotype",
               Palatino, Georgia, serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------- structure */

.site-head,
main,
.site-foot {
  max-width: var(--measure);
  margin-inline: auto;
}

.site-head {
  margin-bottom: 3.5rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
}

.nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--rule);
}

.nav a:first-child {
  color: var(--ink);
  font-weight: 600;
}

/* ---------------------------------------------------------- typography */

h1 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 0.75rem;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 3rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

p {
  margin: 0 0 1.15rem;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--faint);
}

a:hover {
  text-decoration-color: var(--ink);
}

.lede {
  font-size: 1.0625rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.when,
.meta {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}

.when {
  display: block;
  margin: -0.4rem 0 2rem;
}

.credit {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.8125rem;
  color: var(--muted);
  margin: -1.4rem 0 2rem;
}

.item-head {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 2.6rem 0 0.7rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
}

.item-head:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 1.6rem;
}

.note {
  font-size: 0.9375rem;
  color: var(--muted);
  border-left: 2px solid var(--rule);
  padding-left: 0.9rem;
  margin-bottom: 2rem;
}

/* ---------------------------------------------------------- listings */

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

.listing li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}

.listing li:first-child {
  border-top: 1px solid var(--rule);
}

.listing a {
  text-decoration: none;
}

.listing a:hover {
  text-decoration: underline;
  text-decoration-color: var(--faint);
}

.listing .meta {
  flex: none;
  white-space: nowrap;
}

/* ---------------------------------------------------------- article */

article p {
  hyphens: auto;
}

article h1 {
  margin-bottom: 1.4rem;
}

.back {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
}

/* ---------------------------------------------------------- footer */

.site-foot {
  margin-top: 5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--muted);
}

.site-foot p {
  margin-bottom: 0.5rem;
}

/* ---------------------------------------------------------- misc */

::selection {
  background: var(--accent);
  color: var(--paper);
}

@media (max-width: 34rem) {
  body {
    padding: 2.25rem 1.25rem 4rem;
  }
  h1 {
    font-size: 1.5rem;
  }
  .listing li {
    flex-direction: column;
    gap: 0.15rem;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
    padding: 0;
  }
  .nav,
  .site-foot,
  .back {
    display: none;
  }
}
