        /* === VARIABILI COLORE=== */
        :root {
            /* Colori di sfondo*/
            --bg-main: #0f172a;       /* Sfondo scuro principale */
            --bg-alt: #1e293b;        /* Sfondo alternativo per stacco sezioni */
            --bg-card: rgba(30, 41, 59, 0.6); /* Vetro per le card */
            
            /* Colori del testo*/
            --text-main: #f8fafc;     /* Bianco per i titoli */
            --text-muted: #cbd5e1;    /* Grigio chiaro per i paragrafi */
            
            /* Accenti*/
            --accent-primary: #38bdf8; 
            --accent-glow: rgba(56, 189, 248, 0.3);
            --accent-hover: #0ea5e9;
        }

        /* === RESET & BASE === */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            scroll-behavior: smooth;
        }

        body {
            background-color: var(--bg-main);
            color: var(--text-main);
            overflow-x: hidden;
            line-height: 1.6;
        }

        /* Classi per alternare gli sfondi delle sezioni */
        .section-dark { background-color: var(--bg-main); }
        .section-light { background-color: var(--bg-alt); }

        /* === TYPOGRAPHY === */
        h1, h2, h3 { color: var(--text-main); font-weight: 600; }
        h2 {
            font-size: 2.2rem;
            margin-bottom: 2.5rem;
            text-align: center;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            display: inline-block;
            position: relative;
        }
        /* Sottolineatura tech sotto i titoli */
        h2::after {
            content: '';
            position: absolute;
            width: 50%;
            height: 3px;
            background: var(--accent-primary);
            bottom: -10px;
            left: 25%;
            border-radius: 2px;
            box-shadow: 0 0 10px var(--accent-glow);
        }
        .section-title-container { text-align: center; margin-bottom: 3rem; }
        a { text-decoration: none; color: var(--accent-primary); transition: 0.3s ease; }

        /* === NAVBAR === */
        nav {
            position: fixed;
            top: 0; width: 100%;
            background: rgba(15, 23, 42, 0.85);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            padding: 20px 8%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 1000;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            transition: all 0.3s ease;
        }
        .logo { font-weight: 700; font-size: 1.5rem; letter-spacing: 0.5px; z-index: 1001;}
        .logo span { color: var(--accent-primary); }
        
        .nav-links { 
            display: flex; 
            gap: 35px; 
            list-style: none; 
        }
        .nav-links a { 
            color: var(--text-main); 
            font-weight: 500; 
            font-size: 1rem;
            position: relative;
        }
        .nav-links a:hover { color: var(--accent-primary); }
        /* Effetto hover sui link navbar */
        .nav-links a::after {
            content: ''; position: absolute; width: 0; height: 2px; 
            background: var(--accent-primary); bottom: -5px; left: 0; transition: width 0.3s;
        }
        .nav-links a:hover::after { width: 100%; }

        /* === HAMBURGER MENU (Mobile) === */
        .hamburger {
            display: none; /* Nascosto su desktop */
            cursor: pointer;
            z-index: 1001;
            flex-direction: column;
            gap: 6px;
        }
        .hamburger span {
            display: block;
            width: 30px;
            height: 3px;
            background-color: var(--text-main);
            border-radius: 3px;
            transition: all 0.3s ease-in-out;
        }

        /* === HERO SECTION === */
        #hero {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            padding: 80px 20px 0;
            position: relative;
        }
        /* Sfondo decorativo Hero */
        #hero::before {
            content: ''; position: absolute; width: 60vw; height: 60vw;
            background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
            top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: -1; opacity: 0.5;
        }
        
        .profile-img-container {
            width: 170px; height: 170px;
            border-radius: 50%;
            border: 4px solid var(--accent-primary);
            padding: 6px;
            margin-bottom: 25px;
            background-color: var(--bg-alt);
            box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px var(--accent-glow);
            overflow: hidden;
            position: relative;
        }
        .profile-img-container img {
            width: 100%; height: 100%;
            border-radius: 50%;
            object-fit: cover;
        }

        #hero h1 { font-size: 3.5rem; margin-bottom: 10px; font-weight: 700; letter-spacing: -1px;}
        
        /* === EFFETTO TYPEWRITER === */
        .typing-container { 
            display: inline-block; 
            margin-bottom: 40px;
            max-width: 100%; /* Evita overflow su mobile */
        }
        .typing-text {
            font-family: 'Courier New', Courier, monospace;
            font-size: 1.5rem;
            color: var(--accent-primary);
            border-right: 3px solid var(--accent-primary);
            white-space: nowrap;
            overflow: hidden;
            margin: 0 auto;
            width: 0; /* Parte da zero per l'animazione */
            animation: typing 3s steps(40, end) forwards, blink-caret .75s step-end infinite;
        }

        @keyframes typing {
            from { width: 0 }
            to { width: 100% }
        }
        @keyframes blink-caret {
            from, to { border-color: transparent }
            50% { border-color: var(--accent-primary); }
        }

        .contact-info { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;}
        
        .btn {
            padding: 12px 28px;
            border: 2px solid var(--accent-primary);
            color: var(--accent-primary);
            background: transparent;
            font-weight: 600;
            border-radius: 8px;
            transition: all 0.3s ease;
            cursor: pointer;
            font-size: 0.95rem;
            letter-spacing: 0.5px;
        }
        .btn:hover {
            background: var(--accent-primary);
            color: var(--bg-main);
            box-shadow: 0 5px 20px var(--accent-glow);
            transform: translateY(-2px);
        }
        .btn-solid {
            background: var(--accent-primary);
            color: var(--bg-main);
        }
        .btn-solid:hover {
            background: var(--accent-hover);
            border-color: var(--accent-hover);
        }

        /* === SECTIONS GENERAL === */
        section { padding: 100px 10%; }
        .text-center { text-align: center; max-width: 800px; margin: 0 auto; font-size: 1.1rem; color: var(--text-muted); }

        /* === SKILLS (Tags) === */
        .skills-container {
            display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; max-width: 900px; margin: 0 auto;
        }
        .skill-tag {
            background: var(--bg-card);
            border: 1px solid rgba(255, 255, 255, 0.1);
            padding: 12px 24px;
            border-radius: 30px;
            font-size: 1rem;
            font-weight: 500;
            transition: 0.3s ease;
            cursor: default;
            color: var(--text-main);
            backdrop-filter: blur(5px);
        }
        .skill-tag:hover {
            border-color: var(--accent-primary);
            background: rgba(56, 189, 248, 0.1);
            box-shadow: 0 5px 15px var(--accent-glow);
            transform: translateY(-3px);
            color: var(--accent-primary);
        }

        /* === GRID LAYOUT (Experience & Projects) === */
        .grid-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            gap: 30px;
        }
        .card {
            background: var(--bg-card);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 16px;
            padding: 35px;
            transition: all 0.4s ease;
            position: relative;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        /* Linea di accento superiore della card */
        .card::before {
            content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--accent-primary);
            opacity: 0.5; transition: opacity 0.3s;
        }
        .card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,0.4); border-color: rgba(255,255,255,0.15); }
        .card:hover::before { opacity: 1; }
        
        .card h3 { font-size: 1.4rem; margin-bottom: 8px; color: var(--text-main); }
        .card .date { color: var(--accent-primary); font-size: 0.9rem; font-weight: 500; margin-bottom: 20px; display: inline-block; padding: 4px 10px; background: rgba(56, 189, 248, 0.1); border-radius: 20px; }
        .card p, .card ul { color: var(--text-muted); font-size: 1rem; flex-grow: 1; }
        .card ul { padding-left: 20px; margin-top: 10px; }
        .card li { margin-bottom: 8px; }

        /* === FOOTER === */
        footer { 
            text-align: center; 
            padding: 40px 20px; 
            background: var(--bg-main);
            border-top: 1px solid rgba(255,255,255,0.05); 
            color: var(--text-muted); 
            font-size: 0.9rem;
        }

        /* === ANIMAZIONI SCROLL REVEAL (JS Oberserver) === */
        .reveal {
            opacity: 0;
            transform: translateY(40px);
            transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .reveal.active {
            opacity: 1;
            transform: translateY(0);
        }
        /* Gestione del ritardo a cascata (Staggering) */
        .delay-1 { transition-delay: 0.1s; }
        .delay-2 { transition-delay: 0.2s; }
        .delay-3 { transition-delay: 0.3s; }

        /* === RESPONSIVE DESIGN === */
        @media (max-width: 900px) {
            section { padding: 80px 5%; }
            #hero h1 { font-size: 2.8rem; }
        }

        @media (max-width: 768px) {
            /* Attivazione Hamburger */
            .hamburger { display: flex; }
            
            /* Stili Navbar Mobile */
            .nav-links {
                position: fixed;
                top: 0;
                right: -100%; /* Nascosto fuori dallo schermo */
                width: 70%;
                height: 100vh;
                background: var(--bg-alt);
                flex-direction: column;
                justify-content: center;
                align-items: center;
                transition: 0.4s ease-in-out;
                box-shadow: -10px 0 30px rgba(0,0,0,0.5);
            }
            .nav-links.active {
                right: 0; /* Menu aperto */
            }
            .nav-links li { margin: 20px 0; }
            .nav-links a { font-size: 1.3rem; }

            /* Animazione Hamburger Icon in una X */
            .hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
            .hamburger.active span:nth-child(2) { opacity: 0; }
            .hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

            /* Aggiustamenti generali mobile */
            #hero h1 { font-size: 2.2rem; }
            /* Adatto il testo per la macchina da scrivere su mobile */
            .typing-text { font-size: 1.05rem; } 
            
            .profile-img-container { width: 140px; height: 140px; }
            .contact-info { flex-direction: column; width: 100%; max-width: 300px; }
            .btn { width: 100%; text-align: center; }
            h2 { font-size: 1.8rem; }
        }
        
        /* Aggiustamento estremo per telefoni molto stretti per la typewriter */
        @media (max-width: 380px) {
            .typing-text { font-size: 0.9rem; border-right-width: 2px; }
        }
