:root {
  --bg: #fbfaf8;
  --fg: #1c1a17;
  --muted: #6b6660;
  --rule: #e3ded6;
  --accent: #c01a92;
  --code-bg: #f2efe9;
  --max: 34rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16150f;
    --fg: #e8e4dc;
    --muted: #9a948a;
    --rule: #2e2b24;
    --accent: #ef6ac4;
    --code-bg: #201e18;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 ui-serif, Georgia, "Times New Roman", serif;
  padding: 0 1.4rem;
}

main { max-width: var(--max); margin: 0 auto; padding: 4.5rem 0 3rem; }

h1, h2, h3 {
  font-family: ui-sans-serif, -apple-system, "Helvetica Neue", sans-serif;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
h1 { font-size: 1.85rem; margin: 0 0 1.6rem; }
h2 { font-size: 1.15rem; margin: 2.8rem 0 0.9rem; }
h3 { font-size: 1rem; margin: 2rem 0 0.6rem; color: var(--muted); }

p { margin: 0 0 1.15rem; }

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

.back {
  display: inline-block;
  margin-bottom: 2.8rem;
  font-family: ui-sans-serif, sans-serif;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
}
.back:hover { color: var(--accent); }

.date {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

blockquote {
  margin: 1.6rem 0;
  padding: 0 0 0 1.1rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
  font-style: italic;
}
blockquote p { margin: 0 0 0.6rem; }
blockquote p:last-child { margin: 0; }

pre {
  background: var(--code-bg);
  border-radius: 5px;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
pre code { font-size: 0.78rem; line-height: 1.55; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
  background: var(--code-bg);
  padding: 0.1em 0.34em;
  border-radius: 3px;
}
pre code { background: none; padding: 0; }

ul { padding-left: 1.15rem; margin: 0 0 1.15rem; }
li { margin-bottom: 0.42rem; }

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

/* --- journal listing --- */
.entries { margin-top: 3.5rem; }
.entry {
  display: block;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
}
.entry:last-child { border-bottom: 1px solid var(--rule); }
.entry .date { display: block; margin-bottom: 0.3rem; }
.entry .t {
  display: block;
  font-family: ui-sans-serif, sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
  margin-bottom: 0.28rem;
}
.entry .s { display: block; color: var(--muted); font-size: 0.94rem; }
.entry:hover .t { color: var(--accent); }

/* --- the lesson box --- */
.lesson {
  margin: 3rem 0 0;
  padding: 1.2rem 1.3rem;
  background: var(--code-bg);
  border-radius: 6px;
}
.lesson .k {
  font-family: ui-sans-serif, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}
.lesson p:last-child { margin: 0; }

footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.82rem;
  font-family: ui-sans-serif, sans-serif;
  line-height: 1.55;
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  main { padding-top: 3rem; }
  h1 { font-size: 1.55rem; }
}


/* --- brand --- */
.logo { display: block; margin: 0 auto 2.2rem; }
.back { display: inline-flex; align-items: center; gap: 0.45rem; }
.back img { display: block; }
