/* Vignettes: a small, warm, text-first stylesheet.
   No webfonts, no JS, no external requests. */

:root {
  --paper: #f6f0e4;
  --ink: #2b2622;
  --muted: #7a6f63;
  --accent: #b4471f;      /* rust */
  --accent-soft: #ecd9c4;
  --rule: #d9cdb8;
  --measure: 42rem;

  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1e1a17;
    --ink: #e8dfd0;
    --muted: #a09383;
    --accent: #e08a4f;
    --accent-soft: #3a2b20;
    --rule: #3a332c;
  }
}

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

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

body {
  margin: 0;
  padding: 0 1.25rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

/* --- accessibility ------------------------------------------------ */

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--accent);
  color: var(--paper);
  padding: .25rem .6rem;
}

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

/* --- links -------------------------------------------------------- */

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
a:hover { text-decoration-thickness: 2px; }

/* --- masthead ----------------------------------------------------- */

.masthead { margin-bottom: 3rem; }

.masthead h1 {
  margin: 0;
  font-family: var(--display, var(--serif));   /* fonts.css sets --display */
  font-size: 2rem;
  font-weight: normal;
  font-style: italic;
  letter-spacing: -.01em;
  line-height: 1.1;
}
.masthead h1 a {
  color: inherit;
  text-decoration: none;
}
.masthead h1 a::after {           /* a little full stop, because why not */
  content: ".";
  color: var(--accent);
}

.masthead .tagline {
  margin: .35rem 0 0;
  color: var(--muted);
  font-size: .95rem;
}

.masthead nav {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: .8rem;
  text-transform: lowercase;
}
.masthead nav a { margin-right: 1rem; }

/* --- entries ------------------------------------------------------ */

.entry { margin-bottom: 1rem; }

.entry h2 {
  margin: 0 0 .25rem;
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1.25;
}
.entry h2 a { color: inherit; text-decoration: none; }
.entry h2 a:hover { color: var(--accent); }

.entry .when {
  display: block;
  margin-bottom: 1rem;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--muted);
  letter-spacing: .02em;
}
.entry .when a { color: inherit; }

.entry p { margin: 0 0 1.1em; }

/* first line in small caps: a soft nod to old print */
.entry .body > p:first-child::first-line {
  font-variant: small-caps;
  letter-spacing: .04em;
}

.entry blockquote {
  margin: 1.4em 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: var(--muted);
}

.entry hr {
  border: 0;
  text-align: center;
  margin: 1.8em 0;
}
.entry hr::after {
  content: "~";
  color: var(--muted);
}

.entry code {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--accent-soft);
  padding: .05em .3em;
  border-radius: 3px;
}

.entry pre {
  font-family: var(--mono);
  font-size: .85rem;
  background: var(--accent-soft);
  padding: .8rem 1rem;
  overflow-x: auto;
  border-radius: 3px;
}
.entry pre code { background: none; padding: 0; }

/* LiveJournal-style status fields: mood, listening, etc. */

.fields {
  margin: 1.5rem 0 0;
  padding: .6rem .9rem;
  border: 1px dashed var(--rule);
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--muted);
}
.fields div { display: inline-block; margin-right: 1.2rem; }
.fields dt { display: inline; }
.fields dt::after { content: ": "; }
.fields dd { display: inline; margin: 0; color: var(--ink); }

.tags {
  margin: .9rem 0 0;
  font-family: var(--mono);
  font-size: .78rem;
}
.tags a { margin-right: .7rem; }
.tags a::before { content: "#"; color: var(--muted); }

/* separator between entries: an asterism */

.sep {
  margin: 3rem 0;
  text-align: center;
  color: var(--accent);
  letter-spacing: .5em;
  font-size: 1.2rem;
  user-select: none;
}

/* prev / next */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  font-size: .95rem;
}

/* archive list */

.archive {
  list-style: none;
  margin: 0;
  padding: 0;
}
.archive li {
  display: flex;
  gap: 1rem;
  margin: .5rem 0;
}
.archive time {
  flex: none;
  width: 6.5rem;
  padding-top: .25em;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--muted);
}

.archive-count {
  margin: -.6rem 0 1.2rem;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--muted);
}

.archive-more {
  margin-top: 2rem;
  font-size: .95rem;
}

/* tag index */

.taglist {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: .9rem;
}
.taglist li { margin: .4rem 0; }
.taglist .count {
  margin-left: .6rem;
  font-size: .78rem;
  color: var(--muted);
}

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

.foot {
  margin-top: 4rem;
  color: var(--muted);
  font-size: .85rem;
  text-align: center;
}
/* an asterism in place of a rule; the second declaration gives it empty alt text */
.foot::before {
  content: "\2042";
  content: "\2042" / "";
  display: block;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
  user-select: none;
}
.foot p { margin: 0 0 .3rem; }

/* --- small screens & print --------------------------------------- */

@media (max-width: 30rem) {
  body { font-size: 1.05rem; }
  .wrap { padding-top: 1.5rem; }
}

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  a { color: inherit; }
  .masthead nav, .pager, .skip { display: none; }
}