/* Commonplace: plain, readable styles. System serif stack, no webfonts, no frameworks. */

:root {
  color-scheme: light dark;
  --bg: #fffdf9;
  --fg: #1c1c1c;
  --muted: #6e6a62;
  --rule: #d8d2c4;
  --link: #22527f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17171a;
    --fg: #e6e3dc;
    --muted: #9b978e;
    --rule: #3b3b42;
    --link: #8fb6e8;
  }
}

html {
  font-family: Charter, "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  font-size: 112.5%;
  line-height: 1.55;
  background: var(--bg);
  color: var(--fg);
  -webkit-text-size-adjust: 100%;
}

body {
  max-width: 38rem;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-offset: 0.12em;
}

/* Header and footer */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 1.5rem 0 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.site-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: inherit;
  text-decoration: none;
}

.site-nav a {
  margin-left: 1rem;
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:first-child { margin-left: 0; }
.site-nav a:hover { color: var(--link); text-decoration: underline; }

.site-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.8rem;
  color: var(--muted);
}

/* Day headings and entries */

.day {
  margin: 2.5rem 0 1rem;
  font-size: 0.75rem;
  font-weight: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.day:first-child { margin-top: 0; }

.entry {
  margin-bottom: 2.5rem;
}

.entry-time {
  display: block;
  font-family: ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  color: var(--muted);
}

.entry-time a {
  color: inherit;
  text-decoration: none;
}

.entry-time a:hover { text-decoration: underline; }

.entry-title {
  margin: 0.15rem 0 0.75rem;
  font-size: 1.15rem;
  font-weight: normal;
  line-height: 1.3;
}

.entry-title a {
  color: inherit;
  text-decoration: none;
}

.entry-title a:hover { text-decoration: underline; }

.rubric {
  font-weight: bold;
}

/* Entry bodies and pages */

h1 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0 0 1rem;
}

p {
  margin: 0 0 1rem;
}

blockquote {
  margin: 1.25rem 0;
  padding: 0 0 0 1rem;
  border-left: 2px solid var(--rule);
}

blockquote p:last-child { margin-bottom: 0; }

.attrib {
  margin-top: -0.5rem;
  text-align: right;
  color: var(--muted);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
}

.caption {
  margin-top: -1rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}

code, pre {
  font-family: ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

pre {
  overflow-x: auto;
  padding: 0.75rem 1rem;
  border-left: 2px solid var(--rule);
}

/* Older / newer links under an entry */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
}

.pager .newer {
  margin-left: auto;
  text-align: right;
}

.more {
  margin-top: 2rem;
}

/* Archive */

.archive-year h2 {
  margin: 2rem 0 0.5rem;
  font-size: 1.25rem;
}

.archive-year h3 {
  margin: 1rem 0 0.25rem;
  font-size: 1rem;
  font-weight: normal;
  color: var(--muted);
}

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

.archive-list li {
  margin: 0.2rem 0;
}

.archive-list time {
  display: inline-block;
  min-width: 4.5em;
  font-family: ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  color: var(--muted);
}
