:root {
  --bg: #fbfaf7;
  --fg: #16161a;
  --muted: #5d5d68;
  --rule: #e2e0d9;
  --accent: #b07b00;
  --brand: #ffc200;
  --card: #ffffff;
  --measure: 64rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14141a;
    --fg: #ececf0;
    --muted: #a0a0ac;
    --rule: #2c2c36;
    --accent: #ffc200;
    --card: #1c1c24;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0 16px 6rem;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

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

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

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

header.top { padding: 3rem 0 0; text-align: center; }

header.top img { width: min(320px, 78%); height: auto; display: block; margin: 0 auto; }

header.top h1 {
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 1.5rem 0 .3rem;
  letter-spacing: -0.015em;
}

header.top .role { color: var(--muted); margin: 0; font-size: 1rem; }

nav.social { margin: 1.1rem 0 0; font-size: .92rem; color: var(--muted); }
nav.social a { margin: 0 .35rem; }

nav.lang {
  margin: 1.6rem 0 0;
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

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

/* ---- type ---- */

h2 {
  font-size: 1.25rem;
  margin: 2.75rem 0 .9rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

h3 { font-size: 1.02rem; margin: 1.8rem 0 .5rem; }

p { margin: 0 0 1.1rem; }

.lede { font-size: 1.1rem; }

.muted { color: var(--muted); }

small, .small { font-size: .88rem; }

ul, ol { padding-left: 1.3rem; }

li { margin-bottom: .6rem; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .87em;
  background: color-mix(in srgb, var(--fg) 7%, transparent);
  padding: .12em .38em;
  border-radius: 3px;
}

/* ---- blocks ---- */

.entry { margin-bottom: 1.6rem; }

.entry .title { font-weight: 600; }

.doi {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem;
  color: var(--muted);
  margin: .1rem 0 .35rem;
}

.note {
  border-left: 3px solid var(--brand);
  padding: .1rem 0 .1rem 1rem;
  margin: 1.6rem 0;
}

.questions { counter-reset: q; list-style: none; padding-left: 0; }

.questions > li {
  counter-increment: q;
  position: relative;
  padding-left: 2.4rem;
  margin-bottom: 1.4rem;
}

.questions > li::before {
  content: counter(q);
  position: absolute;
  left: 0;
  top: .1rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--brand);
  color: #16161a;
  font-size: .9rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.cta {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.3rem 1.4rem;
  margin: 2rem 0;
}

.cta p:last-child { margin-bottom: 0; }

.mail {
  font-size: 1.1rem;
  font-weight: 600;
  word-break: break-all;
}

footer {
  margin-top: 4rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .88rem;
}

footer a { color: var(--muted); }

@media (max-width: 480px) {
  body { font-size: 16px; }
  header.top { padding-top: 2rem; }
  header.top h1 { font-size: 1.45rem; }
}

/* subpage crown: the mark alone, smaller than the home lockup */
header.top img.mark { width: 104px; border-radius: 6px; }

/* rendered posts */
article img { max-width: 100%; height: auto; }
article p[align="center"] { margin: 2rem 0; }
article h2 { margin-top: 2.5rem; }
article ol > li, article ul > li { margin-bottom: .8rem; }
