:root {
  --bg: #000000;
  --fg: #ffffff;
  --muted: #9ca3af;
  --accent: #7dd3fc;
  --border: #374151;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

header {
  padding: 1rem 0 1rem;
  border-bottom: 1px solid var(--border);
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-weight: bold;
  font-size: 1.25rem;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

main {
  padding: 2rem 0;
  min-height: calc(100vh - 8rem);
}

article {
  margin: 2rem 0;
}

article h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

article time {
  color: var(--muted);
  font-size: 1rem;
}

article h2,
article h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

article p {
  margin-bottom: 1.25rem;
}

article img {
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
}

article blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--muted);
}

article pre {
  background: #111;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 4px;
  margin: 1rem 0;
}

article code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

ul, ol {
  margin: 1rem 0 1rem 1.5rem;
}

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

footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
}

/* --- Dimensione testo della bio nella home --- */
.bio-text .prose {
  font-size: 0.9rem;
  line-height: 1;
}

.bio-text .prose p {
  margin-bottom: 1.2rem;
}

/* --- Contenuti renderizzati dai Markdown (.prose) --- */
.prose p {
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

/* --- newsletter --- */
.newsletter {
  border-top: 1px solid #313244;
  margin-top: 4rem;
  padding-top: 2rem;
  text-align: center;
}

.newsletter-title {
  color: #cba6f7;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.newsletter-text {
  max-width: 34rem;
  margin: 0 auto 1.5rem;
  color: #a6adc8;
  font-size: 0.95rem;
  line-height: 1.6;
}

.newsletter-btn {
  display: inline-block;
  color: #cdd6f4;
  background: transparent;
  border: 1px solid #cba6f7;
  padding: 0.5rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.newsletter-btn:hover {
  background: #cba6f7;
  color: #1e1e2e;
}

@media (max-width: 600px) {
  header nav {
    flex-direction: column;
    gap: 1rem;
  }

  nav ul {
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }
}
