/* ── Font ── */

@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ── Reset ── */

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

/* ── Base ── */

body {
  font-family: "Geist", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 18px;
  line-height: 1.6;
  max-width: 52rem;
  margin: 0 auto;
  padding: 6rem 1.5rem 2rem;
  background: #fff;
  color: #374151;

}

/* ── Headings ── */

h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  line-height: 1.2;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

h1 { font-size: 1.8rem; margin-bottom: 1.5rem; }
h2 { font-size: 1.4rem; margin-bottom: 1.25rem; }
h3 { font-size: 1.15rem; }
h4, h5, h6 { font-size: 1rem; }

/* ── Prose ── */

strong, b {
  font-weight: 500;
}

p {
  margin-bottom: 1rem;
}

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.25rem;
}

blockquote {
  border-left: 3px solid #ccc;
  padding-left: 1rem;
  color: #555;
  margin-bottom: 1rem;
}

code {
  font-family: "Geist Mono", monospace;
  background: #eee;
  padding: 0.15em 0.3em;
  border-radius: 3px;
  font-size: 0.9em;
  line-height: normal;
}

pre {
  overflow-x: auto;
  margin-bottom: 1rem;
  border-radius: 4px;
  padding: 1rem;
  border: 1px solid #e5e7eb;
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 0.8em;
  line-height: 1.4;
}

.giallo-ln {
  user-select: none;
  padding-right: 1em;
}

a {
  color: #2f76d0;
  text-decoration: none;
  border-bottom: 1px solid #82ade3;
}

a:hover {
  border-bottom-color: #2f76d0;
}

hr {
  border: none;
  border-top: 1px solid #ccc;
  margin: 2rem 0;
}

img {
  max-width: 100%;
  height: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

th, td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

th {
  font-weight: 500;
}

/* ── Navigation ── */

nav {
  display: flex;
  gap: 1.75rem;
  margin-bottom: 4rem;
}

nav a {
  color: #374151;
  text-decoration: none;
  border-bottom: none;
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: #374151;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

nav a:hover::after {
  transform: scaleX(1);
}

nav a.active::after {
  transform: scaleX(1);
}

/* ── Page list ── */

.page-list {
  list-style: none;
  padding-left: 0;
}

.page-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
}

.page-list .date {
  color: #555;
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-left: 2rem;
}

/* ── Article header ── */

article header {
  margin-bottom: 1.5rem;
}

article header h1 {
  margin-top: 0;
  margin-bottom: 0.25rem;
}

article header .date {
  color: #555;
  font-size: 0.9rem;
}

/* ── Responsive ── */

@media (max-width: 600px) {
  body {
    font-size: 16px;
    padding: 1.25rem 1rem;
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.1rem; }

  nav {
    gap: 1.25rem;
    margin-bottom: 2rem;
  }
}
