
:root {
  --bg: #f4f7f9;
  --surface: #ffffff;
  --text: #1a2a3a;
  --muted: #5a6e82;
  --accent: #0f4c81;
  --accent-light: #d8e4f0;
  --accent-hover: #0a365c;

  --font-heading: 'Playfair Display', serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Body ora gestisce l'impaginazione verticale (contenuto + footer) */
body { background: var(--bg); color: var(--text); font-family: var(--font-body); display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; }

/* NUOVO WRAPPER: Mantiene le due colonne della stessa identica altezza */
.layout-wrapper { display: flex; flex: 1; width: 100%; max-width: 1600px; margin: 0 auto; }


/* LAYOUT: FLOATING SIDEBAR + CONTENT */
.sidebar-container {
  flex: 0 0 35%;
  position: sticky;
  top: 0;
  height: 100vh; /* La colonna è alta esattamente quanto lo schermo */
  display: flex;
  align-items: center; /* Centra la card verticalmente in modo perfetto e nativo */
  padding: 2rem 3rem;
}
.floating-card {
  width: 100%; /* Si allarga fino ai bordi del suo contenitore */
  background: var(--surface);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: 0 25px 50px -12px rgba(15, 76, 129, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid var(--accent-light);
}

.content { flex: 1; padding: 4rem 5rem 4rem 2rem; }

/* SIDEBAR ELEMENTI */
.profile-img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; margin-bottom: 1.5rem; box-shadow: 0 10px 25px rgba(15, 76, 129, 0.15); border: 2px solid var(--accent); }
h1 { font-family: var(--font-heading); font-size: 2.8rem; line-height: 1.1; margin-bottom: 0.5rem; color: var(--text); }
h2 { font-size: 0.95rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2rem; line-height: 1.4;}

/* CONTATTI CON ICONE */
.contact-list { list-style: none; padding: 0; margin-bottom: 2.5rem; text-align: left; width: 100%; }
.contact-list li { display: flex; align-items: center; gap: 12px; color: var(--muted); margin-bottom: 12px; font-size: 0.95rem; font-weight: 500;}
.contact-list svg { width: 18px; height: 18px; stroke: var(--accent); flex-shrink: 0; }
/* --- AGGIUNTE PER HOVER DEI LINK CONTATTI (LINKEDIN) --- */
.contact-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.3s ease;
}
.contact-list a:hover {
  color: var(--accent);
}
.contact-list a:hover svg {
  stroke: var(--accent-hover);
  transform: scale(1.15); /* Effetto ingrandimento al passaggio del mouse */
}

/* BOTTONE ELEGANTE HR */
.btn-req {
  display: inline-block; padding: 1rem 2.5rem; background: var(--accent); color: var(--surface);
  border-radius: 50px; font-weight: 600; text-decoration: none; transition: all 0.4s ease;
  box-shadow: 0 10px 20px rgba(15, 76, 129, 0.2); width: 100%;
}
.btn-req:hover { background: var(--accent-hover); color: #fff; transform: translateY(-3px); box-shadow: 0 15px 25px rgba(15, 76, 129, 0.3); }

/* CONTENT SECTIONS */
section { margin-bottom: 7rem; opacity: 0; transform: translateY(30px); transition: all 1s ease-out; }
section.fade-in { opacity: 1; transform: translateY(0); }

/* --- AGGIUNTE PER HOVER DEI LINK CONTATTI (LINKEDIN) --- */
.contact-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.3s ease;
}
.contact-list a:hover {
  color: var(--accent);
}
.contact-list a:hover svg {
  stroke: var(--accent-hover);
  transform: scale(1.15); /* Effetto ingrandimento al passaggio del mouse */
}

/* --- MODIFICA TITOLI SEZIONE CON ICONE --- */
.sec-title {
  display: flex;
  align-items: center;
  gap: 15px; /* Spazio tra icona e testo */
  font-family: var(--font-body);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--accent-light);
  padding-bottom: 1rem;
}

.sec-title svg {
  width: 32px;
  height: 32px;
  stroke: var(--accent);
  flex-shrink: 0;
}

.bio { font-size: 1.15rem; color: var(--muted); line-height: 1.8; font-weight: 400; text-align: justify; }
.bio strong { color: var(--text); font-weight: 600; }

/* LAYOUT: TIMELINE VERTICALE */
.timeline-container { position: relative; padding-left: 1rem; display: flex; flex-direction: column; }

.timeline-container::before {
  content: ''; position: absolute; left: 1rem; top: 10px; bottom: 20px; width: 2px; background: var(--accent-light);
}

.exp-card {
  position: relative; background: var(--surface); padding: 2.5rem; border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 76, 129, 0.04); border: 1px solid var(--accent-light);
  transition: all 0.4s ease; margin-left: 2.5rem; margin-bottom: 2.5rem;
}

.exp-card::before {
  content: ''; position: absolute; left: -2.5rem; top: 2.5rem; width: 14px; height: 14px;
  border-radius: 50%; background: var(--accent); border: 4px solid var(--bg);
  transform: translateX(-11px); transition: all 0.4s ease;
}

.exp-card:hover { transform: translateX(8px); box-shadow: 0 15px 40px rgba(15, 76, 129, 0.08); border-color: var(--accent); }

.exp-card:hover::before {
  background: var(--surface); border-color: var(--accent);
  transform: translateX(-11px) scale(1.2);
}
.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.8rem; }
.card-title { font-size: 1.25rem; font-weight: 600; color: var(--text); line-height: 1.3;}
.card-date { background: var(--accent-light); color: var(--accent); padding: 0.4rem 1rem; border-radius: 20px; font-size: 0.85rem; font-weight: 700; flex-shrink: 0; margin-left: 1rem;}

/* RIMOSSO IL CORSIVO DALLE AZIENDE E RESO PIU' PULITO */
.card-org { font-size: 1.05rem; color: var(--accent); margin-bottom: 1.2rem; font-weight: 600; font-family: var(--font-body); font-style: normal;}
.card-desc { font-size: 1rem; color: var(--muted); line-height: 1.7; }

/* SKILLS PILLS */
.skills-wrapper { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.skill-pill { padding: 0.8rem 1.5rem; background: var(--accent-light); border-radius: 50px; font-size: 0.95rem; color: var(--accent); font-weight: 600; transition: all 0.3s; border: 1px solid transparent; }
.skill-pill:hover { border-color: var(--accent); background: var(--surface); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(15, 76, 129, 0.1); }

/* FORM HR MINIMALE */
.hr-form { background: var(--surface); padding: 3rem; border-radius: 24px; box-shadow: 0 15px 35px rgba(15, 76, 129, 0.05); border: 1px solid var(--accent-light);}
.input-line { width: 100%; border: none; border-bottom: 1px solid #cbd5e1; background: transparent; padding: 1rem 0; font-family: var(--font-body); font-size: 1rem; color: var(--text); outline: none; margin-bottom: 2rem; transition: border-color 0.3s; }
.input-line:focus { border-color: var(--accent); }
.btn-submit { background: var(--text); color: #fff; border: none; padding: 1.2rem 3rem; border-radius: 50px; cursor: pointer; transition: all 0.3s; font-weight: 600; font-family: var(--font-body); font-size: 1rem; }
.btn-submit:hover { background: var(--accent); box-shadow: 0 10px 20px rgba(15, 76, 129, 0.2); }

/* FOOTER DISCRETO */
.site-footer {
  text-align: center;
  padding: 2.5rem 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--accent-light);
  background: var(--surface);
}
.site-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  transition: opacity 0.3s ease;
}
.site-footer a:hover {
  opacity: 0.7;
}
/* --- NUOVA SEZIONE SKILLS --- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
}

.category-title {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-bottom: 2px solid var(--accent-light);
  display: inline-block;
  padding-bottom: 0.5rem;
}

.skills-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.skill-pill {
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s;
}

/* Stile per software tecnici: bordo sottile, fondo bianco */
.hard-skill {
  background: var(--surface);
  border: 1px solid var(--accent-light);
  color: var(--text);
}
.hard-skill:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(15, 76, 129, 0.08);
}

/* Stile per management: fondo pieno azzurro */
.soft-skill {
  background: var(--accent-light);
  border: 1px solid transparent;
  color: var(--accent);
}
.soft-skill:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(15, 76, 129, 0.15);
}

@media (max-width: 1024px) {
  .layout-wrapper { flex-direction: column; }

  .sidebar-container {
    position: relative;
    height: auto;
    padding: 2rem 1rem; /* Ridotto leggermente il padding laterale della sidebar */
  }

  .btn-submit {
    display: block;
    margin: 0 auto; /* Centra orizzontalmente */
    width: 100%;    /* Opzionale: lo rende a tutta larghezza come il tasto della sidebar */
    max-width: 300px; /* Impedisce che diventi troppo largo su tablet */
  }

  .floating-card {
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 1rem;
  }

  /* --- NUOVE MODIFICHE PER ALLARGARE LE CARD SU MOBILE --- */
  .content {
    padding: 1.5rem 1rem; /* Ridotto il padding esterno del contenuto */
  }

  .exp-card {
    padding: 1.5rem; /* Ridotto lo spazio vuoto dentro le card */
    margin-left: 1.5rem; /* Avvicinata la card alla linea della timeline */
  }
  .exp-card:hover{transform: translateX(0); box-shadow: none;
  }

  .exp-card::before {
    left: -1.5rem; /* Adattato il puntino al nuovo margine della card */
  }

  /* Aggiungi dentro @media (max-width: 1024px) */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hr-form {
    padding: 1.5rem; /* Allarga anche il modulo dei contatti */
  }
  /* -------------------------------------------------------- */

  .card-header { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .card-date { margin-left: 0; }
  .contact-list { justify-content: center; text-align: center; }
  .contact-list li { justify-content: center; }
}
