: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: 95%;
  height: 95%;
  overflow: hidden; /* Prevent scrolling */
  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);
  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;
}

/* About Container - Increased sizes for better visibility */
.about-container {
  color: white;
  width: 95%;
  margin: 0 auto;
  padding: var(--spacing-sm);
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.about-title {
  font-size: 2.2em; /* Increased from 1.8em */
  text-align: center;
  margin-bottom: 20px; /* Increased from 15px */
  color: var(--primary);
  position: relative;
}

.about-title::after {
  content: '';
  position: absolute;
  bottom: -5px; /* Reduced from -10px */
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px; /* Reduced from 3px */
  background: var(--primary);
  border-radius: 2px;
}

.about-content {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  align-items: center;
  height: 80vh; /* Increased from 75vh */
  max-height: 75vh; /* Ensure it doesn't exceed viewport */
}

/* About Image Section - Made larger */
.about-image-container {
  position: relative;
  width: 320px; /* Increased from 260px */
  height: 320px; /* Increased from 260px */
  margin: auto 0;
  animation: float 6s ease-in-out infinite;
  display: flex;
  align-items: center;
}

.image-frame {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-image {
  width: 90%; /* Increased from 80% */
  height: 90%; /* Increased from 80% */
  border-radius: 50%;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
}

.floating-icons {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.tech-icon {
  position: absolute;
  width: 50px; /* Increased from 40px */
  height: 50px; /* Increased from 40px */
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
  z-index: 3;
}

/* Repositioned icons to be farther from the profile photo */
.python {
  top: 5%;
  right: 15%;
}

.html {
  top: 15%;
  left: 5%;
}

.css {
  bottom: 15%;
  left: 5%;
}

.js {
  bottom: 5%;
  right: 15%;
}

@keyframes float {
  0% {
    transform: translatey(0px);
  }
  50% {
    transform: translatey(-20px);
  }
  100% {
    transform: translatey(0px);
  }
}

/* About Text Section - Larger text */
.about-text {
  flex: 2;
  min-width: 250px; /* Increased from 200px */
  display: flex;
  flex-direction: column;
  gap: 15px; /* Increased from 10px */
  max-height: 75vh; /* Increased height */
  overflow-y: hidden;
}

.greeting {
  font-size: 2em; /* Increased from 1.6em */
  font-weight: 700;
  margin-bottom: 10px; /* Increased from 5px */
}

.wave {
  display: inline-block;
  animation: wave 2.5s infinite;
}

@keyframes wave {
  0% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
  60% { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

.text-blocks {
  display: flex;
  flex-direction: column;
  gap: 15px; /* Increased from 10px */
}

.text-block {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  padding: 18px; /* Increased from 12px */
  transition: all 0.3s ease;
}

.text-block:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.text-block h3 {
  display: flex;
  align-items: center;
  gap: 10px; /* Increased from 8px */
  color: var(--primary-light);
  font-size: 1.2em; /* Increased from 1em */
  margin-bottom: 8px; /* Increased from 5px */
}

.text-block p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5; /* Increased from 1.4 */
  font-size: 1em; /* Increased from 0.85em */
}

/* Values Section */
.values-section {
  margin-top: 10px;
}

.values-section h3 {
  font-size: 1.3em;
  margin-bottom: 15px;
  color: var(--primary);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 15px;
}

.value-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  padding: 15px;
  text-align: center;
  transition: all 0.3s ease;
}

.value-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.value-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
  font-size: 1.2em;
}

.value-item h4 {
  font-size: 0.9em;
  margin-bottom: 5px;
}

.value-item p {
  font-size: 0.8em;
  color: rgba(255, 255, 255, 0.8);
}

/* Social Icons */
.social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 30px;
  color: var(--text-light);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.9em;
}

.social-link i {
  font-size: 1.2em;
  color: var(--primary);
}

.social-link:hover {
  background: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.social-link:hover i {
  color: white;
}

/* CTA Buttons */
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
}

.btn {
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 0.95em;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
}

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

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

.download-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.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;
}

.download-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Journey Timeline Section */
.journey-section {
  margin-bottom: var(--spacing-xl);
}

.section-title {
  font-size: 1.8em;
  text-align: center;
  margin-bottom: 30px;
  color: var(--primary);
  position: relative;
}

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

.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background: var(--primary);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
}

.timeline-item.left {
  left: 0;
}

.timeline-item.right {
  left: 50%;
}

.timeline-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  background-color: var(--primary);
  top: 15px;
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 0 0 4px rgba(74, 159, 238, 0.3);
}

.timeline-item.left .timeline-dot {
  right: -8px;
}

.timeline-item.right .timeline-dot {
  left: -8px;
}

.timeline-date {
  position: absolute;
  top: 12px;
  font-weight: 600;
  color: var(--primary-light);
}

.timeline-item.left .timeline-date {
  right: -95px;
}

.timeline-item.right .timeline-date {
  left: -95px;
}

.timeline-content {
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  position: relative;
}

.timeline-content::after {
  content: '';
  position: absolute;
  top: 15px;
  width: 0;
  height: 0;
  border: 10px solid transparent;
}

.timeline-item.left .timeline-content::after {
  right: -20px;
  border-left-color: rgba(255, 255, 255, 0.05);
}

.timeline-item.right .timeline-content::after {
  left: -20px;
  border-right-color: rgba(255, 255, 255, 0.05);
}

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

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

/* Fun Facts Section */
.fun-facts-section {
  margin-bottom: var(--spacing-xl);
}

.fun-facts-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.fun-fact {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.fun-fact:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.fun-fact-icon {
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 15px;
  font-size: 1.4em;
}

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

.fun-fact strong {
  color: var(--primary-light);
  font-weight: 600;
}

/* 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;
  }
  
  .about-content {
    flex-direction: column;
  }
  
  .about-image {
    margin: 0 auto;
    max-width: 300px;
  }
  
  .timeline::after {
    left: 31px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  
  .timeline-item.right {
    left: 0;
  }
  
  .timeline-dot {
    left: 23px !important;
    right: auto !important;
  }
  
  .timeline-date {
    position: relative;
    top: auto;
    left: auto !important;
    right: auto !important;
    margin-bottom: 10px;
    display: block;
  }
  
  .timeline-content::after {
    display: none;
  }
}

@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;
  }
  
  .about-title {
    font-size: 1.8em;
  }
  
  .greeting {
    font-size: 1.5em;
  }
  
  .social-icons {
    flex-direction: column;
  }
  
  .fun-facts-container {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 440px) {
  .main-section {
    border-radius: var(--border-radius-sm);
    height: 95%;
  }
  
  nav {
    padding: 10px;
  }
  
  nav h1 {
    font-size: 18px;
  }
  
  .about-title {
    font-size: 1.5em;
  }
  
  .profile-image {
    width: 250px;
    height: 250px;
  }
  
  .text-block h3 {
    font-size: 1.1em;
  }
  
  .text-block p {
    font-size: 0.9em;
  }
  
  .btn {
    padding: 10px 15px;
    font-size: 0.9em;
  }
  
  .values-grid {
    grid-template-columns: 1fr;
  }
}
  .values-grid {
    grid-template-columns: 1fr;
  }

  
  .text-block h3 {
    font-size: 1.1em;
  }
  
  .text-block p {
    font-size: 0.9em;
  }
  
  .btn {
    padding: 10px 15px;
    font-size: 0.9em;
  }
  
  .values-grid {
    grid-template-columns: 1fr;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

