/* RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: #f1f5f9;
  color: #334155;
  padding-top: 220px; /* altezza hero fisso */
}

/* ===== HERO (fixed) ===== */
.hero {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 220px;
  background: url("assets/torino.jpg") center/cover no-repeat;
  z-index: 1000;
}

.hero-overlay {
  height: 100%;
  background: rgba(0,0,0,0.45);
  color: #fff;                 /* <-- colore unico per tutto l’hero */
  display: flex;
  flex-direction: column;
  padding: 1.2rem 3rem;
}

/* Topbar (nav + lingua) */
.hero-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-nav {
  display: flex;
  gap: 1.2rem;
}

.hero-nav a {
  color: #e5e7eb;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.hero-nav a:hover {
  color: #60a5fa;
}

.lang-toggle {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}

/* Titolo */
.hero-title {
  margin-top: auto;
  margin-bottom: auto;
}

.hero-title h1 {
  font-size: 2.8rem;
  line-height: 1.1;
}

.hero-title p {
  color: #e5e7eb;
  margin-top: 0.25rem;
}

/* Offset ancore (hero fixed) */
section[id] {
  scroll-margin-top: 240px;
}

/* ===== LAYOUT (grid) ===== */
.layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 1rem auto;    /* <-- unico e coerente */
  padding: 1rem;
  align-items: start;
}

/* Mobile */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .hero-overlay {
    padding: 1rem 1.2rem;
  }

  .hero-nav {
    gap: 0.8rem;
    flex-wrap: wrap;
  }
}

/* Colonna sidebar (stack verticale) */
.sidebars {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ===== CARD ===== */
.card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.card h2 {
  margin-bottom: 1rem;
}

/* ===== ITEM (Esperienza/Formazione) ===== */
.item {
  margin-top: 1.6rem;
}

.item h3 {
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.item span {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  color: #64748b;
}

/* Elenchi puntati (una sola definizione) */
.item ul {
  margin-top: 0.4rem;
  margin-left: 1.2rem;
  padding-left: 0.8rem;
}

.item ul li {
  margin-bottom: 0.35rem;
  line-height: 1.45;
}

/* ===== SIDEBAR 1 ===== */
.sidebar {
  background: linear-gradient(180deg, #0f172a, #020617);
  color: #e5e7eb;
  padding: 2rem 1.5rem;
  border-radius: 16px;
  height: fit-content;
  max-width: 320px;
}

.profile-box {
  text-align: center;
  margin-bottom: 2rem;
}

.profile-pic {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.8rem;
  border: 3px solid #3b82f6;
}

.role {
  font-size: 0.85rem;
  color: #94a3b8;
}

.contacts h4 {
  margin-bottom: 0.6rem;
}

.contacts ul {
  list-style: none;
}

.contacts li {
  margin: 0.4rem 0;
}

.contacts a {
  color: #60a5fa;
  text-decoration: none;
}

/* Download button */
.download-btn {
  display: block;
  margin-top: 1.5rem;
  background: #2563eb;
  color: #fff;
  padding: 0.8rem;
  border-radius: 10px;
  text-align: center;
  font-weight: 700;
  text-decoration: none;
}

/* ===== SIDEBAR 2 (cards chiare) ===== */
.sidebar-2 {
  background: #e5e7eb; /* <-- niente gradient inutile */
  color: #0f172a;
  padding: 1.5rem 1.5rem;
  border-radius: 16px;
  height: fit-content;
  max-width: 320px;
}

.sidebar-2 h4 {
  margin-bottom: 0.6rem;
}

.sidebar-2 a {
  color: #2563eb;
  text-decoration: none;
}

/* Tabelle “invisibili” */
.languages {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.languages td {
  padding: 0.35rem 0;
  font-size: 0.9rem;
}

.languages td:first-child {
  font-weight: 600;
}

.languages td:last-child {
  text-align: right;
  color: #475569;
}

/* ===== CERTIFICAZIONI ===== */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.cert {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: #f8fafc;
  border-radius: 14px;
  text-decoration: none;
  color: #0f172a;
  transition: 0.25s ease;
}

.cert:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}

.cert img {
  width: 64px;
  height: auto;
  flex-shrink: 0;
}

.cert-info strong {
  display: block;
  font-size: 0.95rem;
}

.cert-info span {
  font-size: 0.8rem;
  color: #64748b;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  margin: 2rem 0;
  color: #64748b;
}
