/* ============================================================
   alberoandrea.com — stylesheet
   ============================================================ */

/* === Reset === */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
  background-color: #070d1a;
  color: #c8d6e8;
  line-height: 1.65;
}

/* Dot grid background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, #1c2e4a 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   Topbar / Navbar
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  padding: 0 48px;
  background: rgba(7, 13, 26, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.brand {
  font-size: 0.95rem;
  font-weight: 700;
  color: #e2e8f4;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.topbar nav a {
  padding: 6px 14px;
  border-radius: 6px;
  color: #6a88a8;
  font-size: 0.875rem;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.15s, background 0.15s;
}

.topbar nav a:hover {
  color: #c8d6e8;
  background: rgba(59, 130, 246, 0.07);
}

/* ============================================================
   Homepage
   ============================================================ */
.home {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 48px 96px;
}

.home-title {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.022em;
  color: #e2e8f4;
  margin: 0 0 20px;
}

.home-description {
  font-size: 1rem;
  color: #7a94b0;
  line-height: 1.78;
  margin: 0;
}

.home-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.home-nav a {
  color: #60a5fa;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 4px 14px;
  border-bottom: 1px solid rgba(96, 165, 250, 0.18);
  transition: color 0.14s, border-color 0.14s;
}

.home-nav a:first-child {
  padding-left: 0;
}

.home-nav a + a {
  border-left: 1px solid #182035;
}

.home-nav a:hover {
  color: #93c5fd;
  border-bottom-color: rgba(147, 197, 253, 0.4);
}

/* ============================================================
   Page layout (single pages)
   ============================================================ */
.page {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 48px 96px;
}

.page-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.022em;
  color: #e2e8f4;
  margin: 0 0 14px;
  line-height: 1.15;
}

.page-divider {
  height: 1px;
  background: linear-gradient(to right, #1e3054 0%, transparent 80%);
  border: none;
  margin: 0 0 48px;
}

/* ============================================================
   Prose
   ============================================================ */
.prose {
  font-size: 1rem;
  line-height: 1.8;
  color: #7a94b0;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  color: #c8d6e8;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-top: 2em;
  margin-bottom: 0.5em;
}

.prose h1 { font-size: 1.5rem; }
.prose h2 { font-size: 1.2rem; }
.prose h3 { font-size: 1.05rem; }

.prose h1:first-child,
.prose h2:first-child,
.prose h3:first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 1.1em;
}

.prose a {
  color: #60a5fa;
  text-decoration: none;
  border-bottom: 1px solid rgba(96, 165, 250, 0.22);
  transition: color 0.14s, border-color 0.14s;
}

.prose a:hover {
  color: #93c5fd;
  border-bottom-color: rgba(147, 197, 253, 0.5);
}

.prose strong {
  color: #c8d6e8;
  font-weight: 600;
}

.prose hr {
  border: none;
  border-top: 1px solid #182035;
  margin: 2.5em 0;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
  margin: 0 0 1em;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose code {
  font-family: ui-monospace, "Cascadia Code", "Fira Code", Menlo, monospace;
  font-size: 0.86em;
  background: #0d1a2e;
  border: 1px solid #182035;
  border-radius: 4px;
  padding: 0.15em 0.45em;
  color: #60a5fa;
}

/* ============================================================
   Contact block
   ============================================================ */
.contact-block {
  margin-top: 2.5em;
  padding: 18px 22px;
  background: rgba(13, 21, 38, 0.6);
  border: 1px solid #182035;
  border-left: 3px solid #1d4ed8;
  border-radius: 0 8px 8px 0;
  font-size: 0.92rem;
  color: #4a6a8a;
}

.contact-block a {
  color: #60a5fa;
  text-decoration: none;
  border-bottom: 1px solid rgba(96, 165, 250, 0.2);
  transition: color 0.14s;
}

.contact-block a:hover {
  color: #93c5fd;
}

/* ============================================================
   In costruzione
   ============================================================ */
.costruzione {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 58px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 40px;
}

.costruzione-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 4px;
  padding: 5px 12px;
  margin-bottom: 28px;
}

.costruzione h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.022em;
  color: #e2e8f4;
  margin: 0 0 16px;
  line-height: 1.15;
}

.costruzione p {
  color: #2e4a64;
  font-size: 1rem;
  max-width: 340px;
  line-height: 1.7;
  margin: 0 0 36px;
}

.costruzione-back {
  color: #60a5fa;
  text-decoration: none;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(96, 165, 250, 0.18);
  transition: color 0.14s, border-color 0.14s;
}

.costruzione-back:hover {
  color: #93c5fd;
  border-bottom-color: rgba(147, 197, 253, 0.4);
}

/* ============================================================
   Footer
   ============================================================ */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px 48px;
  border-top: 1px solid #0d1628;
  color: #1e3054;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
  .topbar {
    height: auto;
    padding: 12px 20px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .topbar nav {
    flex-wrap: wrap;
  }

  .home {
    padding: 48px 24px 72px;
  }

  .home-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-nav a + a {
    border-left: none;
    padding-left: 0;
  }

  .page {
    padding: 48px 24px 72px;
  }
}
