/* Import dei font da Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200&family=Open+Sans&display=swap');

/* Animazione fadeInUp */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stili globali per il body */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.8em;
  background-color: #121212;
  color: #e0e0e0;
  animation: fadeInUp 1s ease-in-out;
  scroll-behavior: smooth;
  cursor: url('img/custom-cursor.png'), auto;
}

/* Stili per i link */
a {
  color: #bb86fc;
  text-decoration: none;
  transition: opacity 0.3s, color 0.3s, transform 0.3s;
}

a:hover {
  opacity: 0.7;
  color: #ff79c6;
  transform: scale(1.05);
  cursor: url('img/custom-cursor-hover.png'), auto;
}

/* Stili per gli articoli */
article {
  padding: 0 1em;
}

/* Stili per le sezioni */
section {
  margin: 1em;
  padding: 1em;
  background: rgba(30, 30, 30, 0.8);
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  opacity: 0;
  animation: fadeInUp 1s forwards;
}

section:nth-child(odd) {
  animation-delay: 0.3s;
}

section:nth-child(even) {
  animation-delay: 0.6s;
}

/* Stili per l'header, main, footer */
header, main, footer {
  margin: 0 auto;
}

/* Stili per l'header */
.header-bg {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-image: url('img/bg-dark.jpg');
  height: 100vh;
}

header {
  padding: 2em;
  text-align: center;
  background: none;
  color: white;
  position: relative;
}

header section {
  margin: 0 auto;
  max-width: 640px;
  position: relative;
  z-index: 1;
}

header img {
  border-radius: 50%;
  max-width: 150px;
  transition: transform 0.3s;
  animation: fadeInUp 1s ease-in-out;
}

header img:hover {
  transform: scale(1.2);
}

/* Stili per gli heading */
h1, h3, h4 {
  text-transform: uppercase;
  background: linear-gradient(to right, #bb86fc, #ff79c6);
  -webkit-background-clip: text;
  color: transparent;
}

h3, h4 {
  font-weight: bold;
}

/* Stili per il main */
main {
  max-width: 1140px;
}

main section:not(:last-child) {
  border-bottom: 1px solid #333;
}

/* Stili per i link icona */
.fab {
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  font-size: 1.5em;
  width: 1.5em;
  height: 1.5em;
  line-height: 1.5em;
  margin: 5px;
  text-align: center;
  transition: background-color 0.3s, color 0.3s;
}

a .fab {
  color: #e0e0e0;
}

a .fab:hover {
  background-color: #bb86fc;
  color: #121212;
}

/* Stili per le sezioni 'course' e 'skills' */
.course, .skills {
  display: flex;
  flex-wrap: wrap;
}

.course .title {
  color: #bb86fc;
  flex: 0 0 33.3%;
  max-width: 33%;
}

.course .description {
  flex: 0 0 66.6%;
  max-width: 66.6%;
}

.course .description p {
  padding-left: 1em;
}

.skills .column {
  flex: 0 0 50%;
  max-width: 50%;
}

.skills .column ul, ul.job-description {
  list-style-type: none;
  padding: 0;
}

.skills .column ul > li:before {
  content: "►"; /* Simbolo di puntamento per le liste */
  padding-right: 0.5em;
  color: #bb86fc;
}

ul.job-description li:before {
  content: "✔"; /* Simbolo di spunta per le descrizioni */
  padding-right: 0.5em;
  color: #bb86fc;
}

/* Stili per le classi 'school' e 'job-title' */
.school, .job-title {
  text-transform: capitalize;
}

.school span, .job-title span {
  color: #889499;
  text-decoration: underline;
}

/* Stili per il footer */
footer {
  padding: 1em 1.5em;
  background: #1e1e1e;
  color: white;
  text-align: right;
}

/* Media query per schermi fino a 768px */
@media only screen and (max-width: 768px) {
  .course {
    display: block;
  }

  .course .title, .course .description {
    max-width: 100%;
  }
}

/* Media query per schermi fino a 576px */
@media only screen and (max-width: 576px) {
  .skills {
    display: block;
  }

  .skills .column {
    max-width: 100%;
  }

  footer {
    text-align: center;
  }
}

/* Stili per il pulsante di dropdown */
.dropbtn {
  background: linear-gradient(to right, #bb86fc, #ff79c6);
  color: white;
  padding: 16px;
  font-size: 16px;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s, transform 0.3s;
  position: relative;
  overflow: hidden;
}

.dropbtn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300%;
  height: 300%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.5s ease-out;
  border-radius: 50%;
}

.dropbtn:hover {
  background: linear-gradient(to right, #9346e6, #ff79c6);
}

.dropbtn:hover::before {
  transform: translate(-50%, -50%) scale(1);
}

/* Stili per il menu dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #2a2a2a;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  transition: opacity 0.3s;
  opacity: 0;
}

.dropdown-content a {
  color: #e0e0e0;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  transition: background-color 0.3s;
}

.dropdown-content a:hover {
  background-color: #3a3a3a;
}

.dropdown:hover .dropdown-content {
  display: block;
  opacity: 1;
}

/* Stili per la barra di navigazione superiore */
.topnav {
  background-color: #333;
  overflow: hidden;
  transition: background-color 0.3s;
}

.topnav a {
  float: left;
  display: block;
  color: #f2f2f2;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
  transition: background-color 0.3s, color 0.3s;
}

.topnav a:hover {
  background-color: #ddd;
  color: #121212;
}

.topnav a.active {
  background-color: #bb86fc;
  color: white;
}

.topnav .icon {
  display: none;
}

/* Media query per la barra di navigazione superiore su schermi fino a 600px */
@media screen and (max-width: 600px) {
  .topnav a:not(:first-child) {
    display: none;
  }

  .topnav a.icon {
    float: right;
    display: block;
  }
}

@media screen and (max-width: 600px) {
  .topnav.responsive {
    position: relative;
  }

  .topnav.responsive a.icon {
    position: absolute;
    right: 0;
    top: 0;
  }

  .topnav.responsive a {
    float: none;
    display: block;
    text-align: left;
  }
}
