@import url("../palette.css");

* { box-sizing: border-box; }
html, body { background: var(--paper); color: var(--ink); }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .18em; overflow-wrap: anywhere; }
a:hover { background-color: var(--wash); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.wrap { max-width: 62rem; margin: auto; padding: 0 clamp(1.2rem, 5vw, 3rem); }
nav, footer, .byline, figcaption {
  font: .875rem/1.5 system-ui, sans-serif;
  color: var(--muted);
}
nav, footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .65rem 1rem; padding: 1rem 0; }
nav { border-top: 4px solid var(--ink); border-bottom: 1px solid var(--ink); font: 700 .8rem/1.4 ui-monospace, monospace; }
nav a, footer a { text-decoration: none; }
nav a:hover, footer a:hover { text-decoration: underline; }
.writing-link { font-weight: 650; }
footer { border-top: 2px solid var(--ink); margin: 3rem 0 2rem; }
article { font: clamp(1.125rem, 2.3vw, 1.25rem)/1.72 Georgia, serif; overflow-wrap: anywhere; }
article header, .article-body { max-width: 42rem; margin-inline: auto; }
article header { padding: clamp(2.1rem, 6vw, 4rem) 0 0; margin-bottom: 1.65rem; }
h1, h2, h3 { font-family: system-ui, sans-serif; font-weight: 800; line-height: 1.04; }
h1 { font-size: clamp(2.35rem, 6vw, 4.25rem); letter-spacing: -.065em; margin: 0; text-wrap: pretty; }
h2 { font-size: clamp(2rem, 5vw, 2.75rem); margin: 1.4em 0 .45em; text-wrap: pretty; }
h3 { font-size: clamp(1.55rem, 4vw, 2rem); margin: 1.35em 0 .4em; text-wrap: pretty; }
.dek { font-size: 1.09em; line-height: 1.45; color: var(--muted); margin: .8rem 0; }
.byline { margin: .95rem 0 0; }
.byline time { white-space: nowrap; }
.article-body p { margin: 0 0 1.15em; }
figure { margin: 2rem 0; }
figure img { display: block; width: auto; max-width: 100%; height: auto; margin-inline: auto; }
figcaption { margin: .65rem auto 0; max-width: 60ch; text-align: center; }
blockquote, .pullquote {
  border-left: 3px solid var(--accent);
  margin: 1.65rem 0;
  padding: .7rem 1rem;
  background: var(--wash);
}
blockquote > :last-child, .pullquote > :last-child { margin-bottom: 0; }
.pullquote { font-size: 1.1em; }
ul, ol { padding-left: 1.4em; margin-block: 0 1.15em; }
li + li { margin-top: .4em; }
pre { overflow: auto; padding: 1rem; background: var(--wash); font-size: .82em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.cover {
  margin: 0 auto clamp(1.6rem, 5vw, 3rem);
  max-width: 48rem;
}
.cover img {
  width: 100%;
  max-height: min(27rem, 64vh);
  padding: clamp(.5rem, 2vw, 1rem);
  object-fit: contain;
  background: var(--panel);
  outline: 1px solid var(--ink);
}
