/* ============
   Reset e base
   ============ */
:root {
  --bg: #ffffff;
  --bg-alt: #f7f8fb;
  --text: #181b21;
  --muted: #5a6270;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eef2ff;
  --border: #e6e9ef;
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1080px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.09);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; font-weight: 700; }

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

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ======
   Header
   ====== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}

.brand {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { color: var(--accent-dark); }

.site-nav {
  display: flex;
  gap: 26px;
}
.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--accent-dark); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg);
}
.lang-btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active {
  background: var(--accent);
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ====
   Hero
   ==== */
.hero {
  padding: 88px 0 96px;
  background:
    radial-gradient(720px 360px at 85% -10%, var(--accent-soft), transparent 65%),
    radial-gradient(560px 300px at 0% 110%, #f1f5f9, transparent 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 48px;
  align-items: center;
}

.kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-dark);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.4rem);
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}

.hero-role {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 20px;
}

.lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 30px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); color: #fff; }

.btn-ghost {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-dark); }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}
.hero-meta svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--accent-dark);
}
.dot-sep { color: var(--border); }

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-photo {
  width: min(260px, 60vw);
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

/* ========
   Sezioni
   ======== */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }

.section-head { margin-bottom: 44px; }

.section-head h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.2rem);
  margin-bottom: 8px;
}

.section-sub { color: var(--muted); max-width: 62ch; }

/* ====
   Card
   ==== */
.grid {
  display: grid;
  gap: 20px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #d6dbe5;
}

.card h3 {
  font-size: 1.06rem;
  margin-bottom: 10px;
}

.card p { color: var(--muted); font-size: 0.95rem; }

.card-plain:hover { transform: none; box-shadow: var(--shadow-sm); }

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-dark);
  margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }

/* =======
   Chi sono
   ======= */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 56px;
  align-items: start;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 18px;
}
.about-text p:last-child { margin-bottom: 0; }

.stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-dark);
}
.stat-label { color: var(--muted); font-size: 0.9rem; }

/* ==========
   Esperienze
   ========== */
.timeline {
  list-style: none;
  position: relative;
  max-width: 760px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-left: 40px;
  padding-bottom: 40px;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
}

.timeline-period {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 12px;
}

.timeline-role { font-size: 1.15rem; margin-bottom: 2px; }
.timeline-org { font-weight: 600; color: var(--muted); font-size: 0.95rem; margin-bottom: 10px; }
.timeline-desc { color: var(--muted); font-size: 0.96rem; max-width: 62ch; }

/* =========
   Formazione
   ========= */
.edu-school { font-weight: 600; color: var(--muted); font-size: 0.95rem; margin-bottom: 6px; }
.edu-note { color: var(--muted); font-size: 0.92rem; margin-bottom: 10px; }

.text-link {
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 1px solid currentColor;
}
.text-link:hover { border-bottom-color: transparent; }

.cert-title {
  margin: 44px 0 18px;
  font-size: 1.1rem;
}

/* =====
   Chips
   ===== */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.chip {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
}

/* ========
   Contatti
   ======== */
.contact-grid { margin-bottom: 24px; }

.contact-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.contact-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 4px;
}

.contact-value {
  font-weight: 600;
  font-size: 0.95rem;
  word-break: break-word;
}

.piva-line {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ======
   Footer
   ====== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 44px 0 32px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.footer-brand { font-weight: 800; margin-bottom: 4px; }
.footer-tagline { color: var(--muted); font-size: 0.92rem; max-width: 40ch; }

.footer-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.footer-nav a { color: var(--muted); font-size: 0.92rem; }
.footer-nav a:hover { color: var(--accent-dark); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ==========
   Animazioni
   ========== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn { transition: none; }
}

/* ===========
   Responsive
   =========== */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { justify-content: flex-start; }
  .hero-photo { width: 180px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .stats { flex-direction: row; flex-wrap: wrap; }
  .stat { flex: 1 1 150px; }
}

@media (max-width: 860px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    padding: 16px 24px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 10px 0; font-size: 1rem; }
  .nav-toggle { display: flex; }
  .hero { padding: 64px 0 72px; }
  .section { padding: 68px 0; }
}

@media (max-width: 600px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; }
  .hero-cta .btn { flex: 1 1 100%; justify-content: center; }
}
