/* andrearizzato.net — typography first, no frameworks, no animations. */

:root {
  --fg: #22252a;
  --fg-soft: #5c6370;
  --bg: #fdfdfc;
  --accent: #0055a4;
  --rule: #e3e3e0;
  --code-bg: #f3f3f1;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #d6d3cd;
    --fg-soft: #92948f;
    --bg: #17191c;
    --accent: #7ab3e8;
    --rule: #2b2e33;
    --code-bg: #212428;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0 auto;
  max-width: 42rem;
  padding: 2rem 1.25rem 4rem;
  background: var(--bg);
  color: var(--fg);
  font-family: Charter, Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

@media (min-width: 50rem) {
  body { padding-top: 3.5rem; }
}

/* ---------- navigation & footer ---------- */

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 1.25rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
}

.site-nav a { color: var(--fg-soft); text-decoration: none; }
.site-nav a:first-child { color: var(--fg); font-weight: 600; }
.site-nav a:hover { color: var(--accent); }
.nav-links a { margin-left: 1rem; }

.site-footer {
  margin-top: 5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--fg-soft);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
}

/* ---------- prose ---------- */

main > :first-child { margin-top: 0; }

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 2.5em 0 0.6em;
}

h1 { font-size: 1.9em; margin-top: 0; }
h2 { font-size: 1.4em; }
h3 { font-size: 1.15em; }

p, ul, ol { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.35em; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-offset: 3px;
}

a:hover { text-decoration-thickness: 2px; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

blockquote {
  margin: 1.5em 0;
  padding: 0.1em 0 0.1em 1.2em;
  border-left: 3px solid var(--rule);
  color: var(--fg-soft);
}

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

img {
  max-width: 100%;
  height: auto;
  border-radius: 3px;
}

figure { margin: 2em 0; }
figure img { display: block; margin: 0 auto; }
figcaption { margin-top: 0.75em; text-align: center; color: var(--fg-soft); font-size: 0.9em; }

/* ---------- code ---------- */

code, pre, kbd, samp {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
}

code {
  background: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 4px;
}

pre {
  background: var(--code-bg);
  padding: 1em 1.25em;
  border-radius: 6px;
  overflow-x: auto;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  font-size: 1em;
}

/* ---------- article list & post meta ---------- */

.post-meta {
  color: var(--fg-soft);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  margin-bottom: 2.5em;
}

.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  margin-bottom: 1.75em;
}

.post-list a { font-weight: 600; }
.post-list .post-meta { margin: 0.2em 0 0; }

/* ---------- 404 ---------- */

.not-found { text-align: center; padding: 6rem 0 4rem; }
