/* CSS minimale: niente font esterni, niente dipendenze, una pagina = contenuto. */

:root {
  --max: 42rem;
  --fg: #1a1a1a;
  --muted: #666;
  --bg: #fdfdfc;
  --accent: #225;
  --line: #e6e6e3;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e6e6e3;
    --muted: #9a9a96;
    --bg: #15161a;
    --accent: #9db7ff;
    --line: #2a2c33;
  }
}

* { box-sizing: border-box; }

html { font-size: 18px; }

body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
}

main, .site-header, .site-footer {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1.2rem;
}

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.site-title {
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--fg);
}
.site-nav a {
  margin-left: 1rem;
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover { color: var(--accent); }
.lang-switch { margin-left: 1rem; font-size: 0.8rem; letter-spacing: 0.03em; }
.lang-switch a, .lang-switch strong { margin-left: 0.4rem; }
.lang-switch strong { color: var(--fg); }
.lang-switch a { color: var(--muted); text-decoration: none; }

/* Links */
a { color: var(--accent); }

/* Intro */
.intro { color: var(--muted); margin: 1.5rem 0; }

/* Lista articoli */
.post-list { list-style: none; padding: 0; margin: 2rem 0; }
.post-item { margin-bottom: 2.2rem; }
.post-item time { color: var(--muted); font-size: 0.85rem; }
.post-item h2 { margin: 0.2rem 0 0.3rem; font-size: 1.25rem; line-height: 1.3; }
.post-item h2 a { text-decoration: none; }
.post-item h2 a:hover { text-decoration: underline; }
.summary { margin: 0.3rem 0; color: var(--fg); }
.tags a { color: var(--muted); text-decoration: none; font-size: 0.85rem; margin-right: 0.4rem; }

/* Articolo */
.article-header h1 { margin-bottom: 0.2rem; line-height: 1.2; }
.article-header .meta { color: var(--muted); font-size: 0.9rem; margin-top: 0; }
.article-header .meta a { color: var(--muted); }
.article-body { margin-top: 2rem; }
.article-body img { max-width: 100%; height: auto; }
.article-body pre {
  background: rgba(127,127,127,0.12);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.85rem;
}
.article-body code {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, monospace;
}
.article-body blockquote {
  margin: 1.2rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--line);
  color: var(--muted);
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 2rem 1.2rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer p { margin: 0; }

.footer-rss {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--muted);
  text-decoration: none;
}

.footer-rss:hover { color: var(--accent); }

.back { margin-top: 2.5rem; font-size: 0.9rem; }
