:root {
  --bg-color: #1b1d25;
  --bg-nav: #0f1118;
  --text-color: #e5e7eb;
  --accent: #22d3ee;
  --muted: #9ca3af;
  --divider: rgba(229,231,235,0.25);
}

.light {
  --bg-color: #ffffff;
  --bg-nav: #f8fafc;
  --text-color: #1f2937;
  --divider: rgba(31,41,55,0.25);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Navbar */
header {
  background: var(--bg-nav);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.6);
  padding: 0 1rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
}

nav.main-nav {
  justify-self: center;
}
nav.main-nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav.main-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}
nav.main-nav a[aria-current="page"] {
  color: white;
  font-weight: 700;
}
nav.main-nav a:hover,
nav.main-nav a:focus,
nav.main-nav a:active {
  color: var(--accent);
}

.moon {
  font-size: 1.35rem;
  cursor: pointer;
  user-select: none;
  margin-right: 1.5rem;
}

/* Posts list */
.posts-wrapper {
  max-width: 950px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}
.page-title {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 3rem;
}
.post {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--divider);
}
.post:last-of-type {
  border: none;
}
.post-body {
  flex: 1 1 0;
}
.post-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}
.post-title a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.15s;
}
.post-title a:hover,
.post-title a:focus,
.post-title a:active {
  color: var(--accent);
}
.post-excerpt {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  color: var(--muted);
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.post-meta i {
  margin-right: 0.25rem;
}
.post-thumb {
  max-height: 140px;
  height: auto;
  width: auto;
  object-fit: contain;
  border-radius: 0.35rem;
}

/* Main container/profile */
.container {
  max-width: 900px;
  margin: 4rem auto;
  padding: 0 1.5rem;
  text-align: center;
}
.avatar-wrapper {
  width: 220px;
  height: 220px;
  margin: 0 auto;
}
.avatar-wrapper img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
h1 {
  font-size: 2.75rem;
  margin: 1.75rem 0 0.5rem;
  font-weight: 700;
}
hr.divider {
  width: 70%;
  max-width: 380px;
  margin: 0 auto 1.25rem;
  border: 0;
  border-top: 2px solid var(--divider);
}
.role {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 2rem;
}
.social {
  margin: 0 0 2rem;
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  font-size: 1.55rem;
}
.social a {
  display: inline-block;                  /* necessario per il transform */
  color: var(--text-color);
  transition: 
    color 0.2s ease,
    transform 0.2s ease;                  /* aggiungi la transizione sul transform */
}

.social a:hover {
  transform: scale(1.2);                  /* ingrandisci al 120% */
}


.social a.linkedin:hover  { color: #0072B1; }  

.bio {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.025rem;
  line-height: 1.8;
  text-align: justify;
}
