:root {
  /* Palette di colori sobria */
  --primary: #4a9fee;
  --primary-light: #6db5f8;
  --primary-dark: #2c6ca0;
  --accent: #f0f0f0;
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-light: rgba(255, 255, 255, 0.9);
  --bg-dark: rgba(44, 62, 80, 0.85);
  --border-light: rgba(255, 255, 255, 0.2);
  
  /* Dimensioni e spaziature */
  --border-radius-lg: 20px;
  --border-radius-md: 15px;
  --border-radius-sm: 10px;
  --spacing-xl: 40px;
  --spacing-lg: 30px;
  --spacing-md: 20px;
  --spacing-sm: 10px;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Montserrat:wght@400;500;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  padding: 30px 0;
  justify-content: center;
  align-items: center;
  background-color: var(--text-dark);
}

.back-vid {
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  filter: brightness(0.6);
}

@media (max-aspect-ratio: 16/9) {
  .back-vid {
    width: auto;
    height: 100%;
  }
}

@media (min-aspect-ratio: 16/9) {
  .back-vid {
    width: 100%;
    height: auto;
  }
}

.main-section {
  width: 90%;
  height: 90%;
  background-color: var(--bg-dark);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  overflow-y: auto; /* Barra di scorrimento attiva */
  border: 1px solid var(--border-light);
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

/* Barra di navigazione */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) var(--spacing-lg);
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav h1 {
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 30px;
  font-weight: 700;
  position: relative;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

nav li {
  position: relative;
  margin: 0 5px;
}

nav a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 10px 20px;
  border-radius: 30px;
  display: inline-block;
  position: relative;
  z-index: 1;
  letter-spacing: 0.5px;
}

nav a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary);
  border-radius: 30px;
  z-index: -1;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
}

nav a:hover::before,
.attivo::before {
  opacity: 1;
  transform: scale(1);
}

nav a:hover,
.attivo {
  color: var(--text-light);
  transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

nav a i {
  margin-right: 8px;
  font-size: 14px;
}

/* Skills Container */
.skills-container {
  color: white;
  width: 90%;
  margin: 0 auto;
  padding: var(--spacing-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.skills-title {
  font-size: 2.2em;
  text-align: center;
  margin-bottom: 15px;
  color: var(--primary);
  position: relative;
}

.skills-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.skills-intro {
  text-align: center;
  max-width: 800px;
  margin: 25px auto 30px;
  color: var(--text-light);
  font-size: 1.05em;
  line-height: 1.6;
  opacity: 0.9;
}

/* Skills Tabs */
.skills-tabs-container {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.skills-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.tab-btn {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-light);
  border-radius: 30px;
  font-size: 0.95em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover,
.tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

/* Skill Card */
.skill-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.skill-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.skill-icon {
  width: 70px;
  height: 70px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
}

.skill-icon img {
  max-width: 100%;
  max-height: 100%;
}

.skill-icon i {
  font-size: 2em;
  color: var(--primary);
}

.skill-card h3 {
  font-size: 1.2em;
  margin-bottom: 15px;
  color: var(--primary-light);
}

/* Skill Level */
.skill-level {
  width: 100%;
  margin-bottom: 15px;
}

.level-text {
  display: block;
  font-size: 0.85em;
  margin-bottom: 6px;
  color: var(--text-light);
  opacity: 0.9;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: var(--primary);
  border-radius: 5px;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.5s ease;
}

.progress.animate {
  transform: scaleX(1);
}

/* Skill Tags */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}

.tag {
  background: rgba(74, 159, 238, 0.15);
  padding: 5px 10px;
  border-radius: 30px;
  font-size: 0.75em;
  color: var(--primary-light);
  border: 1px solid rgba(74, 159, 238, 0.3);
}

/* Skill Description */
.skill-description {
  font-size: 0.9em;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

/* Certifications Section */
.certifications-section {
  margin-bottom: var(--spacing-xl);
}

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.certificate-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  padding: 25px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.certificate-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.certificate-icon {
  width: 60px;
  height: 60px;
  background: rgba(74, 159, 238, 0.1);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 15px;
  font-size: 1.5em;
  color: var(--primary);
  border: 2px solid rgba(74, 159, 238, 0.3);
}

.certificate-card h3 {
  font-size: 1.1em;
  margin-bottom: 10px;
  color: var(--primary-light);
}

.certificate-card p {
  font-size: 0.9em;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

/* CTA Section */
.cta-section {
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-md);
  margin-bottom: var(--spacing-lg);
}

.cta-section h2 {
  font-size: 1.5em;
  margin-bottom: 20px;
  color: var(--primary-light);
}

.cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.btn {
  padding: 12px 25px;
  border-radius: 30px;
  font-size: 0.95em;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cta-btn {
  background: var(--primary);
  color: white;
  border: none;
}

.secondary-btn {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.cta-btn:hover {
  background: var(--primary-light);
}

.secondary-btn:hover {
  background: var(--primary);
  color: white;
}

/* Barre di scorrimento personalizzate */
::-webkit-scrollbar {
  width: 8px;
  display: block;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* Media Queries */
@media (min-width: 1220px) {
  body {
    width: 100%;
    height: 100vh;
    overflow: hidden;
  }
}

@media (max-width: 980px) {
  body {
    height: 100vh;
    overflow: hidden;
    padding: 15px 0;
  }
  
  .main-section {
    height: 95%;
  }
  
  nav {
    padding: 15px;
  }
  
  nav ul {
    width: 100%;
    justify-content: center;
    gap: 5px;
  }
  
  nav a {
    padding: 8px 12px;
    font-size: 15px;
  }
  
  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
  }
  
  .learning-path {
    padding-left: 30px;
  }
  
  .learning-path::before {
    left: 6px;
  }
  
  .step-icon {
    left: -30px;
    width: 16px;
    height: 16px;
    font-size: 0.7em;
  }
}

@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .certificates-grid {
    grid-template-columns: 1fr;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .cta-buttons {
    flex-direction: column;
    max-width: 250px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .main-section {
    width: 95%;
    border-radius: var(--border-radius-md);
  }
  
  nav {
    padding: 10px;
  }
  
  nav h1 {
    font-size: 22px;
  }
  
  nav ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 5px;
  }
  
  nav li {
    margin: 0 3px;
  }
  
  .skills-title {
    font-size: 1.8em;
  }
  
  .skills-intro {
    font-size: 0.95em;
  }
  
  .skills-tabs {
    gap: 8px;
  }
  
  .tab-btn {
    padding: 8px 15px;
    font-size: 0.9em;
  }
  
  .skill-card {
    padding: 20px;
  }
  
  .step-content {
    padding: 15px;
  }
  
  .step-content h3 {
    font-size: 1em;
  }
}

@media (max-width: 440px) {
  .main-section {
    border-radius: var(--border-radius-sm);
    height: 95%;
  }
  
  nav {
    padding: 10px;
  }
  
  nav h1 {
    font-size: 18px;
  }
  
  .skills-title {
    font-size: 1.5em;
  }
  
  .section-title {
    font-size: 1.4em;
  }
  
  .skill-icon {
    width: 60px;
    height: 60px;
  }
  
  .skill-card h3 {
    font-size: 1.1em;
  }
  
  .certificate-icon {
    width: 50px;
    height: 50px;
    font-size: 1.3em;
  }
}
