/* readmehere.com — the whole stylesheet. No framework, no webfonts, no JS.
   Everything the site looks like is in this file; the layouts add no styles. */

:root {
  --measure: 38rem;          /* the text column: about 70 characters */
  --gutter: 1.5rem;
  --bg: #fbfaf7;
  --fg: #1d1b17;
  --muted: #6f6a60;
  --rule: #e4ded1;
  --accent: #9a4a1c;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans",
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151412;
    --fg: #e9e4d9;
    --muted: #9b948a;
    --rule: #2e2a24;
    --accent: #e0915c;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1.0625rem/1.65 var(--sans);
  text-rendering: optimizeLegibility;
}

.masthead, main, .colophon {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.masthead { padding-block: 3rem 2rem; }

.wordmark {
  font: 600 0.8125rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.35rem;
}

.tagline { margin: 1.75rem 0 0; color: var(--muted); }

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

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

/* --- the post list ------------------------------------------------------ */

.postlist { list-style: none; margin: 0; padding: 0; }
.postlist > li { border-top: 1px solid var(--rule); }

.entry {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 0;
  color: inherit;
  text-decoration: none;
}
.entry:hover .entry-title { color: var(--accent); }

.thumb {
  flex: none;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 2px;
  background: var(--rule);
}

.entry-text { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.entry time { font: 0.75rem/1 var(--mono); color: var(--muted); letter-spacing: 0.04em; }
.entry-title { font-size: 1.125rem; font-weight: 600; }
.entry-summary { color: var(--muted); font-size: 0.9375rem; }

/* --- a single post ------------------------------------------------------ */

.post h1 { font-size: 1.75rem; line-height: 1.25; margin: 0 0 0.5rem; }
.post-meta { margin: 0 0 2.5rem; font: 0.75rem/1 var(--mono); color: var(--muted); }
.post-meta .tags::before, .post-meta .updated::before { content: " · "; }
/* "обновлено" is a footnote on the date, not a second headline: it inherits the
   meta line's size and muted colour and adds nothing of its own. */

.post p, .post ul, .post ol, .post blockquote { margin: 0 0 1.4em; }
.post h2 { font-size: 1.25rem; margin: 2.5rem 0 0.75rem; }
.post h3 { font-size: 1.0625rem; margin: 2rem 0 0.5rem; }

.post blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
  color: var(--muted);
}

.post code { font: 0.875em var(--mono); background: var(--rule); padding: 0.1em 0.3em; border-radius: 2px; }
.post pre { overflow-x: auto; background: var(--rule); padding: 1rem; border-radius: 2px; }
.post pre code { background: none; padding: 0; }

/* Width and height attributes are always present, so the box is reserved
   before the file arrives and nothing on the page jumps. */
img { max-width: 100%; height: auto; }

figure { margin: 2rem 0; }
figure img { display: block; width: 100%; border-radius: 2px; }
figcaption { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted); }

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
}
.post-nav span { display: flex; flex-direction: column; gap: 0.2rem; }
.post-nav span:last-child { text-align: right; align-items: flex-end; }
.post-nav b { font: 0.6875rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* --- colophon ----------------------------------------------------------- */

.colophon {
  margin-top: 4rem;
  padding-block: 1.25rem 3rem;
  border-top: 1px solid var(--rule);
  font: 0.75rem/1.5 var(--mono);
  color: var(--muted);
}
.colophon p { margin: 0; }

@media (max-width: 30rem) {
  .masthead { padding-block: 2rem 1.5rem; }
  .thumb { width: 72px; height: 72px; }
}
