/* ============================================================
   Filippo Diotalevi — essays
   Literary direction · Spectral · warm cream · compact
   Single stylesheet shared by the Hugo site and the preview.
   ============================================================ */
:root {
  --ink:       #1a1916;   /* warm near-black text            */
  --ink-soft:  #4a4844;   /* body secondary / excerpts       */
  --ink-mute:  #8c897f;   /* dates, nav, meta                */
  --ink-faint: #b8b3a6;   /* ornaments, footer               */
  --paper:     #faf6ec;   /* warm cream, a touch paler        */
  --rule:      #e7e0cd;   /* warm hairline                   */
  --accent:    oklch(0.47 0.12 256);  /* ink blue, links only */
  --measure:   624px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Spectral", Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }

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

/* ---------- Masthead / nav (centered name + nav under) ---------- */
.masthead { text-align: center; padding: 56px 0 0; }
.masthead .name {
  display: inline-block; font-size: 32px; font-weight: 300; font-style: italic;
  letter-spacing: 0.005em; line-height: 1.1; white-space: nowrap;
}
.masthead .name:hover { color: var(--accent); }
.nav {
  margin-top: 18px; display: flex; gap: 28px; justify-content: center;
  font-size: 13px; font-style: italic; color: var(--ink-mute);
}
.nav a:hover { color: var(--accent); }
.nav a.here { color: var(--ink); }

/* ---------- Ornament rule ---------- */
.ornament {
  text-align: center; color: var(--ink-faint);
  font-size: 15px; letter-spacing: 0.4em; margin: 10px 0 4px;
}

/* ---------- Essays index ---------- */
.essays { padding-bottom: 84px; }
.entry { display: block; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.entry:last-child { border-bottom: 0; }
.entry .date { font-size: 13px; font-style: italic; color: var(--ink-mute); margin-bottom: 7px; }
.entry .title { font-size: 22px; font-weight: 400; line-height: 1.2; margin: 0 0 9px; letter-spacing: -0.005em; }
.entry:hover .title { color: var(--accent); }
.entry .excerpt { font-size: 14px; line-height: 1.6; color: var(--ink-soft); margin: 0; }

/* ---------- Article (essay reading page) ---------- */
.article { padding-top: 34px; padding-bottom: 96px; }
.article .kicker { text-align: center; font-style: italic; font-size: 14px; color: var(--ink-mute); }
.article h1 {
  font-size: 40px; font-weight: 300; line-height: 1.1; text-align: center;
  margin: 13px 0 15px; letter-spacing: -0.01em;
}
.article .byline { text-align: center; color: var(--ink-mute); font-size: 13px; font-style: italic; margin-bottom: 11px; }
.article .ornament { margin: 11px 0 10px; }

.article .body { font-size: 14px; line-height: 1.75; color: var(--ink); }
.article .body p { margin: 0 0 22px; }
.article .body > p:first-of-type::first-letter {
  float: left; font-size: 44px; line-height: 0.82; padding: 4px 9px 0 0;
  font-weight: 400; color: var(--accent);
}
.article .body a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.article .body a:hover { text-decoration-thickness: 2px; }
.article .body h2 { font-size: 19px; font-weight: 400; font-style: italic; margin: 32px 0 12px; }
.article .body h3 { font-size: 16px; font-weight: 500; margin: 26px 0 9px; }
.article .body blockquote {
  margin: 26px 0; text-align: center; font-style: italic; font-size: 16px;
  color: var(--ink-soft); font-weight: 300; line-height: 1.45; border: 0; padding: 0;
}
.article .body ul, .article .body ol { padding-left: 22px; margin: 0 0 22px; }
.article .body li { margin-bottom: 8px; }
.article .body hr { border: 0; border-top: 1px solid var(--rule); margin: 36px auto; width: 64px; }
.article .body img { max-width: 100%; height: auto; display: block; margin: 28px auto; }
.article .body code {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.85em;
  background: rgba(26,25,22,0.05); padding: 1px 5px; border-radius: 3px;
}
.article .body pre {
  background: rgba(26,25,22,0.05); padding: 16px 18px; border-radius: 6px;
  overflow: auto; font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 14px; line-height: 1.55; margin: 0 0 22px;
}
.article .body pre code { background: none; padding: 0; }

/* Back link under an essay */
.backlink { text-align: center; margin-top: 8px; }
.backlink a { font-size: 13px; font-style: italic; color: var(--ink-mute); }
.backlink a:hover { color: var(--accent); }

/* ---------- About page (no drop cap, gentle lead) ---------- */
.about .body > p:first-of-type::first-letter {
  float: none; font-size: inherit; line-height: inherit; padding: 0; color: inherit;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  text-align: center; padding: 30px 0 52px; color: var(--ink-faint);
  font-size: 13px; font-style: italic;
}
.site-footer a { color: var(--ink-mute); }
.site-footer a:hover { color: var(--accent); }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .masthead { padding-top: 44px; }
  .masthead .name { font-size: 28px; }
  .article h1 { font-size: 33px; }
  .entry .title { font-size: 22px; }
}
