/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    color: #1a1a1a;
    background-color: #ffffff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent horizontal overflow on mobile */
html, body {
    overflow-x: hidden;
}

/* Prevent background scroll when mobile menu is open */
.menu-open {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    color: #666;
}

.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    color: #333;
    margin: 0;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23667eea" stop-opacity="0.1"/><stop offset="100%" stop-color="%23667eea" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/></svg>');
    opacity: 0.5;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #667eea;
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}
@media (max-width: 768px) {
    .social-links {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 0.75rem;
    }
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    background: #667eea;
    color: white;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-placeholder {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.profile-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.profile-placeholder p {
    color: white;
    opacity: 0.9;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border: 2px solid #667eea;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Section Styles */
section {
    padding: clamp(80px, 12vh, 100px) 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    background: #f8f9fa;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-weight: 500;
    margin: 0;
}

.about-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.about-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.about-placeholder p {
    color: white;
    opacity: 0.9;
}

/* Experience Section */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 0;
    margin-right: 50%;
    padding-right: 2rem;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 50%;
    margin-right: 0;
    padding-left: 2rem;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 0;
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
    transform: translateX(-50%);
    border: 4px solid white;
    box-shadow: 0 0 0 4px #667eea;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
}

.timeline-date {
    color: #667eea;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.timeline-company {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.timeline-description {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.timeline-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Skills Section */
.skills {
    background: #f8f9fa;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.skill-category {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-10px);
}

.skill-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.skill-icon i {
    font-size: 2rem;
    color: white;
}

.skill-title {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-name {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.skill-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    width: 0;
    transition: width 1s ease-in-out;
}

/* Education Section */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.education-item {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 1.5rem;
    transition: transform 0.3s ease;
}

.education-item:hover {
    transform: translateY(-5px);
}

.education-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.education-icon i {
    font-size: 1.5rem;
    color: white;
}

.education-title {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.education-institution {
    color: #667eea;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.education-date {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.education-description {
    line-height: 1.6;
    margin: 0;
}

/* Contact Section */
.contact {
    background: #f8f9fa;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon i {
    color: white;
    font-size: 1.2rem;
}

.contact-details h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.contact-details p {
    color: #666;
    margin: 0;
}

.contact-social {
    margin-top: 2rem;
}

.contact-social h3 {
    color: #333;
    margin-bottom: 1rem;
}

.social-links-contact {
    display: flex;
    gap: 1rem;
}
@media (max-width: 768px) {
    .social-links-contact {
        flex-wrap: wrap;
        justify-content: flex-start;
        row-gap: 0.75rem;
    }
}

.contact-form {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Languages Section */
.languages-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.language-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.language-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.language-flag {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.language-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.language-item p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.language-level {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
}

.level-bar {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    transition: all 0.3s ease;
}

.level-bar.full {
    background: var(--primary-color);
}

@media (max-width: 768px) {
    .languages-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }
    .languages-grid .language-item {
        flex: 1 1 200px;
        padding: 1rem;
    }
    .language-flag {
        font-size: 2rem;
    }
}
    background: #333;
    color: white;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-text p {
    color: #ccc;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 2rem;
}
@media (max-width: 768px) {
    .footer-links {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100vw;
        right: 0;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100vw;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        height: calc(100vh - 70px);
        overflow-y: auto;
        padding-bottom: 3rem;
    }
    
    .nav-menu.active {
        left: 0;
    }

    /* Nascondi il toggle lingua quando il menu è aperto per evitare sovrapposizioni */
    .nav-menu.active ~ .lang-toggle {
        display: none;
    }
    
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }
    
    .hero-title {
        font-size: clamp(2rem, 7vw, 3rem);
    }
    .hero-description {
        font-size: clamp(0.95rem, 3.8vw, 1.1rem);
    }
    
    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
    
    .profile-placeholder {
        width: 300px;
        height: 300px;
    }
    
    .about-content {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    /* Reduce section header spacing on mobile */
    .section-header {
        margin-bottom: 2.5rem;
    }
    
    .about-stats {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    /* Mobile-friendly timeline: flex column, no central line/dots */
    .timeline {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }
    .timeline::before {
        display: none;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
        text-align: left;
    }

    .timeline-dot {
        display: none;
    }
    
    .skills-grid {
        display: flex;
        flex-direction: column;
    }
    
    .education-grid {
        display: flex;
        flex-direction: column;
    }
    
    .contact-content {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: clamp(1.8rem, 8vw, 2.2rem);
    }
    
    .section-title {
        font-size: 2rem;
    }

    .hero-description {
        line-height: 1.9;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .profile-placeholder {
        width: 250px;
        height: 250px;
    }
    
    .timeline-skills {
        justify-content: center;
    }

    /* Nascondi l'indicatore di scroll su schermi molto piccoli */
    .scroll-indicator { display: none; }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}
.countries {
    padding: 4rem 0;
}

.countries-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
}

.country-tag {
    background: #f5f7fb;
    border: 1px solid #e5e9f2;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    font-weight: 500;
    color: #334;
}

.countries-summary {
    text-align: center;
    margin-top: 1.5rem;
}

.countries-summary .stat-number {
    font-size: 2rem;
    color: #1a73e8;
}

/* Tooltip con elenco paesi */
.countries-tooltip {
    position: absolute;
    background: #ffffff;
    border: 1px solid #e5e9f2;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 0.75rem;
    z-index: 10000;
    max-width: 420px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.countries-tooltip-title {
    width: 100%;
    font-weight: 600;
    color: #334;
    margin-bottom: 6px;
}

.countries-tooltip .country-chip {
    background: #f5f7fb;
    border: 1px solid #e5e9f2;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 500;
    color: #334;
}

/* Immagini profilo e workspace */
.profile-photo {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  border: 4px solid rgba(255,255,255,0.6);
}

.about-image-photo {
  width: 100%;
  max-height: 420px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  border: 1px solid rgba(0,0,0,0.06);
}

@media (max-width: 992px) {
  .profile-photo { width: 320px; height: 320px; }
}
@media (max-width: 768px) {
  .profile-photo { width: clamp(180px, 50vw, 280px); height: clamp(180px, 50vw, 280px); }
}
@media (max-width: 480px) {
  .profile-photo { width: clamp(160px, 60vw, 240px); height: clamp(160px, 60vw, 240px); }
}


.countries-tooltip {
    position: absolute;
    background: #ffffff;
    border: 1px solid #e5e9f2;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 0.75rem;
    z-index: 10000;
    max-width: 420px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.countries-tooltip-title {
    width: 100%;
    font-weight: 600;
    color: #334;
    margin-bottom: 6px;
}

.countries-tooltip .country-chip {
    background: #f5f7fb;
    border: 1px solid #e5e9f2;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 500;
    color: #334;
}

.countries-tooltip {
    position: absolute;
    background: #ffffff;
    border: 1px solid #e5e9f2;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 0.75rem;
    z-index: 10000;
    max-width: 420px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.countries-tooltip-title {
    width: 100%;
    font-weight: 600;
    color: #334;
    margin-bottom: 6px;
}

.countries-tooltip .country-chip {
    background: #f5f7fb;
    border: 1px solid #e5e9f2;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 500;
    color: #334;
}
/* Pulsante cambio lingua - stile migliorato coerente con il tema */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 2px solid #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.12) 100%);
  color: #667eea;
  font-weight: 600;
  letter-spacing: 0.2px;
  box-shadow: 0 6px 18px rgba(102, 126, 234, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 140ms ease;
}

.lang-toggle::before {
  content: "🌐";
  font-size: 0.95em;
  opacity: 0.9;
}

.lang-toggle:hover,
.lang-toggle:focus {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(102, 126, 234, 0.35);
}

.lang-toggle:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.lang-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.35), 0 6px 18px rgba(102, 126, 234, 0.25);
}

/* In navbar, mantieni coerenza con lo stato scrolled */
.navbar.scrolled .lang-toggle {
  background: rgba(255, 255, 255, 0.9);
  border-color: #667eea;
  color: #667eea;
  box-shadow: 0 6px 18px rgba(102, 126, 234, 0.22);
}

/* Spaziature per allineamento a destra vicino all’hamburger */
.navbar .lang-toggle {
  margin-left: 12px;
}

/* Fallback per browser senza backdrop-filter */
@supports not ((-webkit-backdrop-filter: blur(6px)) or (backdrop-filter: blur(6px))) {
  .lang-toggle {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.25);
    color: #667eea;
  }
  .navbar.scrolled .lang-toggle {
    background: rgba(255, 255, 255, 0.98);
  }
}

/* Mobile: layout navbar con flexbox, azioni a destra */
@media (max-width: 768px) {
  .nav-container { justify-content: flex-start; }
  .nav-logo { margin-right: auto; }
  .lang-toggle {
    position: static;
    padding: 10px 16px;
    z-index: auto;
    margin-left: 12px;
  }
  .hamburger { margin-left: 8px; }
}
.scroll-arrow {
    width: 30px;
    height: 30px;
    border: 2px solid #667eea;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Section Styles */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    background: #f8f9fa;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-weight: 500;
    margin: 0;
}

.about-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.about-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.about-placeholder p {
    color: white;
    opacity: 0.9;
}

/* Experience Section */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 0;
    margin-right: 50%;
    padding-right: 2rem;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 50%;
    margin-right: 0;
    padding-left: 2rem;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 0;
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
    transform: translateX(-50%);
    border: 4px solid white;
    box-shadow: 0 0 0 4px #667eea;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
}

.timeline-date {
    color: #667eea;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.timeline-company {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.timeline-description {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.timeline-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Skills Section */
.skills {
    background: #f8f9fa;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.skill-category {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-10px);
}

.skill-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.skill-icon i {
    font-size: 2rem;
    color: white;
}

.skill-title {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-name {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.skill-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    width: 0;
    transition: width 1s ease-in-out;
}

/* Education Section */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.education-item {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 1.5rem;
    transition: transform 0.3s ease;
}

.education-item:hover {
    transform: translateY(-5px);
}

.education-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.education-icon i {
    font-size: 1.5rem;
    color: white;
}

.education-title {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.education-institution {
    color: #667eea;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.education-date {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.education-description {
    line-height: 1.6;
    margin: 0;
}

/* Contact Section */
.contact {
    background: #f8f9fa;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon i {
    color: white;
    font-size: 1.2rem;
}

.contact-details h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.contact-details p {
    color: #666;
    margin: 0;
}

.contact-social {
    margin-top: 2rem;
}

.contact-social h3 {
    color: #333;
    margin-bottom: 1rem;
}

.social-links-contact {
    display: flex;
    gap: 1rem;
}

.contact-form {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Languages Section */
.languages-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.language-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.language-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.language-flag {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.language-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.language-item p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.language-level {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
}

.level-bar {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    transition: all 0.3s ease;
}

.level-bar.full {
    background: var(--primary-color);
}

@media (max-width: 768px) {
    .languages-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }
    .languages-grid .language-item {
        flex: 1 1 200px;
        padding: 1rem;
    }
    .language-flag {
        font-size: 2rem;
    }
}
    background: #333;
    color: white;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-text p {
    color: #ccc;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100vw;
        right: 0;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100vw;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .profile-placeholder {
        width: 300px;
        height: 300px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 50px;
        margin-right: 0;
        padding-left: 1rem;
        padding-right: 1rem;
        text-align: left;
    }
    
    .timeline-dot {
        left: 20px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .education-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .profile-placeholder {
        width: 250px;
        height: 250px;
    }
    
    .timeline-skills {
        justify-content: center;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}
.countries {
    padding: 4rem 0;
}

.countries-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
}

.country-tag {
    background: #f5f7fb;
    border: 1px solid #e5e9f2;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    font-weight: 500;
    color: #334;
}

.countries-summary {
    text-align: center;
    margin-top: 1.5rem;
}

.countries-summary .stat-number {
    font-size: 2rem;
    color: #1a73e8;
}

/* Tooltip con elenco paesi */
.countries-tooltip {
    position: absolute;
    background: #ffffff;
    border: 1px solid #e5e9f2;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 0.75rem;
    z-index: 10000;
    max-width: 420px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.countries-tooltip-title {
    width: 100%;
    font-weight: 600;
    color: #334;
    margin-bottom: 6px;
}

.countries-tooltip .country-chip {
    background: #f5f7fb;
    border: 1px solid #e5e9f2;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 500;
    color: #334;
}

/* Immagini profilo e workspace */
.profile-photo {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  border: 4px solid rgba(255,255,255,0.6);
}

.about-image-photo {
  width: 100%;
  max-height: 420px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  border: 1px solid rgba(0,0,0,0.06);
}

@media (max-width: 992px) {
  .profile-photo { width: 320px; height: 320px; }
}
@media (max-width: 768px) {
  .profile-photo { width: clamp(180px, 50vw, 280px); height: clamp(180px, 50vw, 280px); }
}
@media (max-width: 480px) {
  .profile-photo { width: clamp(160px, 60vw, 240px); height: clamp(160px, 60vw, 240px); }
}


.countries-tooltip {
    position: absolute;
    background: #ffffff;
    border: 1px solid #e5e9f2;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 0.75rem;
    z-index: 10000;
    max-width: 420px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.countries-tooltip-title {
    width: 100%;
    font-weight: 600;
    color: #334;
    margin-bottom: 6px;
}

.countries-tooltip .country-chip {
    background: #f5f7fb;
    border: 1px solid #e5e9f2;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 500;
    color: #334;
}

.countries-tooltip {
    position: absolute;
    background: #ffffff;
    border: 1px solid #e5e9f2;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 0.75rem;
    z-index: 10000;
    max-width: 420px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.countries-tooltip-title {
    width: 100%;
    font-weight: 600;
    color: #334;
    margin-bottom: 6px;
}

.countries-tooltip .country-chip {
    background: #f5f7fb;
    border: 1px solid #e5e9f2;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 500;
    color: #334;
}