/* Reset e font */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  background: #f2f2f2; /* grigio chiaro */
  color: #111;         /* testo scuro */
}
a {
  text-decoration: none;
  color: inherit;
}

/* Navbar */
header {
  background: #1a1a1a;         /* grigio scuro */
  padding: 15px 0;
  border-bottom: 2px solid #fff; /* linea bianca sotto */
}
nav {
  max-width: 1100px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-weight: 300;
  color: white; 
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
}
.nav-links a {
  color: #e0e0e0;
  font-weight: 500;
  transition: color 0.3s ease;
}
.nav-links a:hover {
  color: #00bfff; /* blu elettrico */
}

/* Sezioni */
.section {
  position: relative;
  padding: 60px 20px;
  background: #f2f2f2; /* sfondo grigio chiaro */
  color: #111;
}
.container {
  max-width: 1100px;
  margin: auto;
}
.section h2 {
  color: dimgray; /* titoli blu elettrico */
  margin-bottom: 20px;
}

/* Home */
.home-container {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}
.home-text h2 {
  font-size: 2rem;
  color: #00bfff;
}
.home-text span {
  color: #f9ff00;
}
.home-text p {
  font-size: 1.2rem;
  line-height: 1.6;
  color: #111;
}
.home-img img {
  width: 250px;
  border-radius: 50%;
  border: 3px solid #00bfff;
  box-shadow: 0 0 20px #0077ff;
}

/* Curriculum timeline */
.timeline {
  border-left: 3px solid #00bfff;
  padding-left: 20px;
  margin: 20px 0;
}
.timeline-item {
  margin-bottom: 20px;
}
.timeline-item h3 {
  color: #00bfff;
}

/* Progetti */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.project-card {
  padding: 20px;
  border: 1px solid #222;
  border-radius: 10px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.project-card h3 {
  color: #00bfff;
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 15px #0077ff;
  border-color: #00bfff;
}

/* Bottoni */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background: #00bfff;
  color: white;
  font-weight: 600;
  border-radius: 5px;
  margin-top: 10px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.btn2 {
    display:inline-block;
    padding:0.6em 1em;
    border:none;
    margin:0.2em 0.1em;
    box-sizing: border-box;
    text-decoration:none;
    font-family:"arial";
    font-weight:80;
    color:#FDFDFD;
    border-radius:3em;
    text-align:center;
    transition: 0.1s;
    background: gainsboro;
    cursor:pointer;
    font-weight:bold;
    letter-spacing: 0.05em;
}
.btn:hover {
  background: #6495ed;
  box-shadow: 0 0 10px #00bfff;
}

.btn2:hover{
      background: #6495ed;
  box-shadow: 0 0 10px #00bfff;
  }
.btn2:active, .btn4:focus{
      background: #6495ed;
  box-shadow: 0 0 10px #00bfff;
  }
/* Footer */
footer {
  background: #000;
  color: #888;
  text-align: center;
  padding: 15px;
  margin-top: 40px;
  border-top: 1px solid #111;
}
footer a {
  color: #00bfff;
}

/* Sezione Contatti */
.bg-dark {
  background: #e6e6e6; /* più chiaro per staccare */
}
#contatti h2 {
  color: dimgray;
  margin-bottom: 20px;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.contact-item {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.contact-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 10px #6495ed;
  border-color: #00bfff;
}
.contact-item h3 {
  color: #00bfff;
  margin-bottom: 10px;
}
.contact-item a {
  color: #111;
}
.contact-item a:hover {
  color: #00bfff;
}

/* Lista progetti */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}
.project-item {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.project-item h3 {
  color: #00bfff;
  margin-bottom: 10px;
}
.project-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 10px #6495ed;
  border-color: #00bfff;
}

/* Home con immagine di sfondo */
.home-hero {
  background: url("img/rete.jpg") no-repeat center center/cover;
  position: relative;
  height: 100vh; /* tutta la schermata */
  display: flex;
  align-items: center;   /* centra verticalmente */
  justify-content: center; /* centra orizzontalmente */
  text-align: center;
}

/* Box testo in home */
.home-text {
  max-width: 900px;
  margin: auto;
  color: #fff; /* testo bianco */
  padding: 30px;
  background: rgba(105, 105, 105, 0.6); /* dimgray quasi pieno */
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.home-text h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #fff; /* forzo bianco */
}

.home-text span {
  color: #f9ff00; /* blu elettrico per evidenziare */
}

.home-text p {
  font-size: 1.2rem;
  line-height: 1.6;
  color: #f0f0f0; /* bianco tenue */
}


/* Linea di separazione tra le sezioni */
.section::after {
  content: "";
  display: block;
  height: 2px;
  background: #000;
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  opacity: 0.2;
}

/* Logo animazione */
.logo svg circle, .logo svg line {
  transition: fill 0.3s ease, stroke 0.3s ease;
}
.logo:hover svg circle {
  fill: #00bfff;
}
.logo:hover svg line {
  stroke: #f9ff00;
}
/* Logo testo */
.logo-text {
  color: #fff;
  font-weight: 700;
  transition: color 0.3s ease;
}
.logo:hover .logo-text {
  color: #f9ff00; /* giallo fluo */
}





/* Container progetto principale */
.project-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
  max-width: 900px;
  margin: auto;
}

/* Box con sfondo chiaro/scuro */
.project-box {
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Alternanza chiaro / scuro */
.project-box.light {
  background: #fff; /* chiaro */
  color: #111;
}
.project-box.dark {
  background: #2a2a2a; /* scuro */
  color: #fff;
}

/* Titoli box */
.project-box h3 {
  color: #00bfff;
  margin-bottom: 15px;
}

/* Paragrafi box */
.project-box p {
  line-height: 1.6;
}

/* Pulsanti moderni dentro box */
.project-box .btn-modern {
  margin-top: 15px;
}


/* Navbar */
header {
  background: #1a1a1a; 
  padding: 15px 0;
  border-bottom: 2px solid #fff;
}

.navbar {
  max-width: 1200px; /* puoi regolare */
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Blocchi laterali */
.nav-left, .nav-right {
  flex: 1; /* occuperanno spazio uguale */
  display: flex;
  justify-content: space-around; /* distribuisce i link in modo uniforme */
  list-style: none;
}

.nav-left li a,
.nav-right li a {
  white-space: nowrap; /* impedisce di andare a capo */
  color: #e0e0e0;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-left li a:hover,
.nav-right li a:hover {
  color: #00bfff;
}

/* Logo centrale */
.nav-logo {
  flex: 0 0 auto; /* il logo mantiene la sua dimensione */
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 21px;
  margin-left: 21px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 5px;
}


.nav-left,
.nav-right {
  display: flex;
  flex: 1; /* occuperanno lo stesso spazio dx e sx */
  justify-content: space-around; /* spazi equidistanti */
}

.nav-left li,
.nav-right li {
  flex: 1; /* ogni <li> prende spazio uguale */
  text-align: center;
}

.nav-left li a,
.nav-right li a {
  position: relative;
  display: inline-block;
  width: 100%;        /* ogni link largo come il suo slot */
  padding: 12px 0;    /* padding solo verticale */
  color: #e0e0e0;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-left li a::before,
.nav-left li a::after,
.nav-right li a::before,
.nav-right li a::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav-left li a::before,
.nav-right li a::before {
  left: 0;
}

.nav-left li a::after,
.nav-right li a::after {
  right: 0;
}

.nav-left li a:hover::before,
.nav-left li a:hover::after,
.nav-right li a:hover::before,
.nav-right li a:hover::after {
  background: #fff;
  box-shadow: 0 0 0px #e6e6e6;
}

/* Sezione hero con immagine di sfondo */
.intro-hero {
  background: url("img/rete.jpg") no-repeat center center/cover;
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px; /* lascia spazio navbar */
}

/* Container principale della sezione */
.about-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap; /* mobile responsive */
}

/* Box testo */
.about-text-box {
  flex: 1;
  min-width: 300px;
  background-color: rgba(105, 105, 105, 0.85); /* dimgray trasparente */
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  z-index: 2; /* sopra l'immagine */
}

/* Titolo e testo */
.about-text-box h2 {
  color: white;
  font-size: 2rem;
  margin-bottom: 20px;
}

.about-text-box p {
  color: white;
  line-height: 1.6;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

/* Evidenzia parole chiave */
.about-text-box .highlight {
  color: #f9ff00;
  font-weight: bold;
}

/* Colonna immagine */
.about-image img {
  max-width: 280px;
  width: 100%;
  height: auto;
  border-radius: 0;
  border: none;
  opacity: 1;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}

.about-image img:hover {
  transform: scale(1.05);
  opacity: 1;
  box-shadow: 0 0 18px rgba(0, 191, 255, 0.5);
}

/* Griglia progetti */
.project-grid1 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 50px;
  
}

/* Box progetto chiaro */
.project-box1 {
  background-color: #fff; /* box chiaro */
  color: #000;               /* testo principale */
  text-decoration: none;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  min-height: 200px;         /* altezza minima */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3); /* ombra leggera */
  border: 2px solid transparent;         /* bordo inizialmente invisibile */
  transition: border 0.3s ease, transform 0.3s ease;
}
.projects-section {
  background: url("img/rete.jpg") no-repeat center center/cover;
  position: relative;
  height: 120vh; /* tutta la schermata */
  

}


/* Titolo dentro il box */
.project-box1 h3 {
  color: dimgray; /* leggermente più scuro */
  font-size: 1.2rem;
  line-height: 1.4;
}

/* Hover solo bordo blu elettrico */
.project-box1:hover {
  transform: translateY(-20px) rotate(-1deg);
  box-shadow: 0 8px 20px rgba(0,191,255,0.4);
  border: 2px solid #00bfff;
}

/* Sezione con sfondo */
.funzone-section {
  background: url("img/fun.jpg") no-repeat center center/cover;
  padding: 60px 20px;
  color: #fff;
  text-align: center;
}

/* Titoli */
.funzone-title {
  font-size: 2.4rem;
  margin-bottom: 10px;
  color: #fff;
  
}

.funzone-subtitle {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: fff;
}

/* Griglia */
.fun-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  justify-items: center;
}

/* Box chiari */
.fun-item {
  background: #f9f9f9;
  border-radius: 16px;
  padding: 25px;
  text-align: center;
  width: 100%;
  max-width: 300px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
  border: 2px solid transparent;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
}

.fun-item h3 {
  color: dimgray;
  margin-bottom: 12px;
}

.fun-item p {
  color: #333;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

/* Hover “simpatico” */
.fun-item:hover {
  transform: translateY(-10px) rotate(-1deg);
  box-shadow: 0 8px 20px rgba(0,191,255,0.4);
  border: 3px solid #f9ff00;
}

/* Contenitore faccia del dado */
.dice-face {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 200px; /* per mantenere proporzioni */
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f9f9f9;
  border-radius: 16px;
}

/* Pallini del dado */
.dot {
  position: absolute;
  width: 35px;
  height: 35px;
  background: black;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* Contenitore del dado */
.dice-face {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f9f9f9;
  border-radius: 16px;
  flex-direction: column; /* così possiamo aggiungere il bottone dentro */
}




