:root {
  --bg:      #f4f1e8;
  --ink:     #1c1b18;
  --muted:   #6b675d;
  --rule:    #d9d4c6;
  --mark:    #fbec8f;
  --code-bg: #ece8dc;
  --serif:   Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
  --mono:    ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
mark { background: var(--mark); color: inherit; padding: 0 .12em; border-radius: 1px; }

/* ---- top bar ---- */
header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.15rem clamp(1.1rem, 4vw, 2.6rem);
  flex-wrap: wrap;
}
.brand { font-size: 1.06rem; letter-spacing: .01em; white-space: nowrap; }
.brand a { text-decoration: none; }
.brand a:hover { text-decoration: underline; text-underline-offset: 3px; }
nav { display: flex; align-items: baseline; gap: clamp(.9rem, 2.2vw, 1.7rem); flex-wrap: wrap; }
nav a { text-decoration: none; font-size: .98rem; color: var(--ink); }
nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
nav a.current { font-weight: 700; }
nav .search { opacity: .8; transform: translateY(2px); }
nav a.login { color: var(--muted); font-size: .9rem; }
nav a.login:hover { color: var(--ink); }

/* ---- content column ---- */
main {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(3rem, 9vh, 6rem) clamp(1.1rem, 4vw, 2.6rem) 5rem;
}
h1 {
  font-size: clamp(2.7rem, 8vw, 4rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 1.6rem;
  display: inline;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}
.subtitle {
  font-variant: small-caps;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .02em;
  margin-left: .55rem;
}
.intro-body { margin-top: 1.9rem; }
p { margin: 0 0 1.05rem; }

h2 {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 2.4rem 0 .7rem;
}

/* ---- recent list ---- */
ul.recent { list-style: square; padding-left: 1.4rem; margin: 0; }
ul.recent li { margin: 0 0 .5rem; padding-left: .2rem; }
ul.recent .ctx { color: var(--ink); }

/* ---- beliefs list ---- */
ol.beliefs { padding-left: 1.5rem; margin: 0; }
ol.beliefs li { margin: 0 0 .5rem; padding-left: .25rem; }

footer {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 clamp(1.1rem, 4vw, 2.6rem) 4rem;
  color: var(--muted);
  font-size: .85rem;
}
footer a { color: inherit; }

@media (max-width: 620px) {
  header { gap: .8rem; }
  nav { gap: .9rem 1.1rem; }
}

/* ==== blog index ==================================================== */
ul.posts { list-style: none; padding: 0; margin: 0; }
ul.posts li { margin: 0 0 1.9rem; }
.post-link { text-decoration: none; font-size: 1.28rem; font-weight: 700; line-height: 1.25; }
.post-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.post-date {
  color: var(--muted);
  font-size: .78rem;
  font-variant: small-caps;
  letter-spacing: .04em;
}
.post-summary { margin: .35rem 0 0; }
.empty { color: var(--muted); font-style: italic; }

/* ==== a single post ================================================= */
article.post h1 {
  display: block;
  font-size: clamp(1.95rem, 5.5vw, 2.85rem);
  line-height: 1.1;
  text-decoration: none;
  margin: 0 0 .45rem;
}
article.post .post-date { display: block; margin-bottom: 2.4rem; }
article.post h2 { font-size: 1.34rem; margin: 2.7rem 0 .75rem; }
article.post h3 { font-size: 1.1rem; margin: 2.1rem 0 .55rem; }
article.post ul, article.post ol { padding-left: 1.45rem; margin: 0 0 1.05rem; }
article.post ul { list-style: square; }
article.post li { margin: 0 0 .45rem; }
article.post li > p { margin: 0; }

blockquote {
  margin: 1.7rem 0;
  padding: .1rem 0 .1rem 1.2rem;
  border-left: 3px solid var(--rule);
  color: var(--muted);
  font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }

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

code {
  font-family: var(--mono);
  font-size: .87em;
  background: var(--code-bg);
  padding: .08em .32em;
  border-radius: 2px;
}
pre {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: .85rem 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
pre code { background: none; padding: 0; font-size: .85rem; line-height: 1.5; }

/* ---- figures: sizes are capped in px, never 100vw, so nothing can scroll sideways ---- */
.fig { margin: 2.1rem 0; }
.fig img { display: block; width: 100%; height: auto; border-radius: 2px; }
.fig figcaption {
  margin-top: .55rem;
  color: var(--muted);
  font-size: .84rem;
  font-style: italic;
  line-height: 1.5;
}
.fig-wide, .fig-full {
  max-width: calc(100vw - 2.4rem);
  margin-left: 50%;
  transform: translateX(-50%);
}
.fig-wide { width: 1040px; }
.fig-full { width: 1280px; }
.embed { position: relative; padding-top: 56.25%; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 2px; }

/* ---- back link under a post ---- */
.post-nav { margin-top: 3.5rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); font-size: .95rem; }
