        /* RESET GENERALE */
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: "Montserrat", sans-serif;
            background: var(--bg-color);
            overflow-x: hidden;
            cursor: none !important;
            color: var(--text-primary);

            /* blocco selezione testo */
            user-select: none;
            -webkit-user-select: none; /* Safari */
            -ms-user-select: none;     /* IE */
        
        }

        /* Bloccare drag e interazione immagini*/
        img {
            pointer-events: none;
            -webkit-user-drag: none;
        }

        /* Abilita lo scroll fluido per tutto il documento */
        html {
            scroll-behavior: smooth;
        }

        a, button {
            cursor: none !important;
        }

        /* LOGO */
        .logo {
            position: fixed;
            top: 5%;
            left: 5%;
            font-size: 50px;
            color: var(--text-primary);
            mix-blend-mode: difference;
            z-index: 10;
            font-family: "Syncopate", sans-serif;
        }


        /* --------------------------------------------------------------------------------------------- */
        /* HERO TITLE                                                                       */
        /* --------------------------------------------------------------------------------------------- */
        
        .hero {
            font-family: "Syncopate", sans-serif;
            position: fixed; /* Torna fisso come prima */
            top: 0;
            left: 0;
            width: 100%;
            height: 30vh; /* Altezza originale */
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 2;
            pointer-events: none;
            color: var(--text-primary);
        }

        .hero-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }

        /* PORTFOLIO - Caratteristiche originali */
        .main-title {
            font-size: clamp(40px, 8vw, 80px);
            font-weight: 400;
            letter-spacing: 0.5em; 
            margin-right: -0.5em; /* Per centratura perfetta */
            line-height: 1;
            text-transform: uppercase;
        }

        /* MATTEO ZANGHI - Sottotitolo spaziato */
        .sub-title {
            font-size: clamp(10px, 1.2vw, 16px); /* Più piccolo */
            font-weight: 700;
            letter-spacing: 1.15em; /* Regola questo valore per allineare i bordi */
            margin-right: -1.15em;
            margin-top: 15px;
            opacity: 0.9;
            text-transform: uppercase;
        }

        /* FIX PER MOBILE */
        @media (max-width: 768px) {
            .hero {
                height: 25vh; /* Leggermente più basso su mobile */
            }
            .main-title {
                font-size: 8vw;
                letter-spacing: 0.2em;
                margin-right: -0.2em;
            }
            .sub-title {
                font-size: 1.8vw;
                letter-spacing: 0.55em;
                margin-right: -0.55em;
                margin-top: 8px;
            }
        }

        @media (max-width: 480px) {
            .hero {
                font-size: 8vw; /* Ancora più piccolo per telefoni stretti */
                align-items: center;
            }
        }


        /* --------------------------------------------------------------------------------------------- */
        /* GRID SETTINGS                                                                                 */
        /* --------------------------------------------------------------------------------------------- */

        .grid {
            position: fixed;
            top: 25vh;
            left: 0;
            width: 100%;
            height: 60vh;
            display: grid;
            grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
            gap: 20px;
            padding: 40px;
            transition: grid-template-columns 0.5s cubic-bezier(0.2, 1, 0.3, 1);
            z-index: 1;
        }

        .grid .box {
            background: var(--img);
            background-position: center;
            background-size: cover;
            position: relative;
            overflow: hidden; 
            transition: 0.4s;
            filter: grayscale(1) brightness(0.7);
            text-decoration: none;
        }

        /* HOVER INTERACTION */
        .grid:hover .box {
            filter: grayscale(1) brightness(0.3);
        }

        .grid .box:hover {
            filter: grayscale(0) brightness(1.1);
            z-index: 10;
        }

        /* EXPANSION LOGIC */
        .grid:has(.one:hover) { grid-template-columns: 2.5fr 0.6fr 0.6fr 0.6fr 0.6fr; }
        .grid:has(.two:hover) { grid-template-columns: 0.6fr 2.5fr 0.6fr 0.6fr 0.6fr; }
        .grid:has(.three:hover) { grid-template-columns: 0.6fr 0.6fr 2.5fr 0.6fr 0.6fr; }
        .grid:has(.four:hover) { grid-template-columns: 0.6fr 0.6fr 0.6fr 2.5fr 0.6fr; }
        .grid:has(.five:hover) { grid-template-columns: 0.6fr 0.6fr 0.6fr 0.6fr 2.5fr; }

        /* SFALSAMENTO ARCHITETTONICO */
        .box:nth-child(even) { transform: translateY(35px); }
        .box:nth-child(odd) { transform: translateY(-35px); }

        /* NUMERO GRANDE */
        .grid .box::before {
            content: var(--number);
            position: absolute;
            bottom: -55px;
            /* left: -10px; */
            left: 10px;
            font-family: "Syncopate", sans-serif;
            font-size: 160px;
            font-weight: 700;
            line-height: 1;
            color: var(--text-primary);
            opacity: 0.7;
            transition: all 0.6s cubic-bezier(0.2, 1, 0.3, 1);
            z-index: 1;
            pointer-events: none;
        }

        /* TITOLO PROGETTO */
        .grid .box::after {
            content: attr(data-text);
            position: absolute;
            bottom: 25px; 
            left: 20px;
            font-family: "Syncopate", sans-serif;
            font-size: 10px; 
            font-weight: 700;
            letter-spacing: 2px;
            color: var(--text-primary);
            text-transform: uppercase;
            text-shadow: 2px 2px 15px rgba(0,0,0,0.9);
            transition: all 0.6s cubic-bezier(0.2, 1, 0.3, 1);
            z-index: 5;
        }

        /* HOVER STATE: ESPANSIONE ELEMENTI */
        .grid .box:hover::before {
            bottom: 15px;
            opacity: 1;
            font-size: 145px;
        }

        .grid .box:hover::after {
            font-size: 32px;
            bottom: 70px;
            left: 45px;
            letter-spacing: 6px;
        }

        /* SEZIONI SUCCESSIVE */
        /* .spacer { height: 100vh; } */
        /* AGGIORNAMENTO SPACER */
        #about-section {
            /* Aumenta questo valore finché non vedi scomparire il nero.
            150px o 200px solitamente bastano a coprire la curva dell'SVG.
            */
            scroll-margin-top: 100px; 
        }

        .spacer { 
            height: 100vh; 
            display: flex;
            justify-content: center;
            align-items: flex-end; /* Posiziona la freccia in fondo */
            padding-bottom: 50px; /* Distanza dal bordo inferiore dello schermo */
            z-index: 5; /* Sopra la griglia fixed, sotto la section 'about' */
        }

        @keyframes arrow-bob {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(15px); }
        }


        /* --------------------------------------------------------------------------------------------- */
        /* STILE FRECCIA UP & DOWN                                                                       */
        /* --------------------------------------------------------------------------------------------- */
         .scroll-down-arrow,
        .scroll-up-arrow {
            display: flex; /* Necessario per allineare testo e SVG in colonna */
            flex-direction: column; /* Testo sopra l'SVG */
            align-items: center; /* Centra orizzontalmente */
            color: var(--text-primary);
            opacity: 0.7;
            transition: opacity 0.3s ease, transform 0.3s ease;
            animation: arrow-bob 2s infinite; /* L'animazione si applica all'intero link (testo + SVG) */
            text-decoration: none;
            gap: 10px; /* Spazio tra il testo e la freccia */
        }

        /* Stile specifico per l'etichetta di testo */
        .arrow-label {
            font-family: "Syncopate", sans-serif;
            font-size: 12px;
            font-weight: 400;
            text-transform: uppercase;
            letter-spacing: 2px;
            pointer-events: none; /* Il testo non interferisce con il click */
        }

        .scroll-up-arrow {
            /* display: inline-flex; -- Rimosso: ora usa flex column per l'etichetta */
            color: var(--text-secondary); /* Mantiene il colore nero nella sezione bianca */
        }

        .scroll-down-arrow:hover,
        .scroll-up-arrow:hover {
            opacity: 1;
            /* transform: scale(1.1); -- Rimosso: può interferire con l'animazione 'bob' */
        }

        /* ANIMAZIONE 'BOB' (SU E GIÙ) - Invariata */
        @keyframes arrow-bob {
            0%, 100% {
                transform: translateY(0);
            }
            50% {
                transform: translateY(15px); /* Si sposta verso il basso di 15px */
            }
        }


        /* --------------------------------------------------------------------------------------------- */

        .section { position: relative; z-index: 10; background: transparent; }
        .section__shape { display: block; margin-bottom: -1px; width: 100%; height: auto; }
        
        /* Uso la variabile per la forma SVG */
        .section__shape path { fill: var(--about-bg); }

        .section__content {
            background: var(--about-bg);
            padding: 100px 10%;
            color: var(--text-secondary);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            display: flex;
            flex-direction: column; /* Dispone il blocco flex e le icone uno sopra l'altro */
        }


         /* SOCIAL ICONS NELL'ABOUT */

        .about-container {
            display: flex;
            flex-direction: column; /* Dispone il blocco flex e le icone uno sopra l'altro */
            align-items: center;    /* Centra tutto orizzontalmente */
            gap: 60px;
            width: 100%;
        }


        /* BLOCCO FOTO + TESTO */
        .about-flex {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 50px;
            flex-wrap: wrap; /* Importante per il mobile */
        }

        .about-image img {
            width: 350px;
            height: auto;
            /* border-radius: 20px; */
            filter: grayscale(0.2);
        }

        .about-text H2 {
            font-family: "Syncopate", sans-serif;
        }

        .about-text {
            max-width: 550px;
            line-height: 1.6;
        }

        /* ICONE SOCIAL CENTRATE */
        .about-socials {
            display: flex;
            gap: 30px;
            justify-content: center; /* Centra le icone nel loro div */
            width: 100%;
        }

        .about-socials a {
            transition: transform 0.3s ease;
        }

        .about-socials a:hover {
            transform: translateY(-5px);
        }

        .about-socials img {
            width: 45px; /* Leggermente più grandi per visibilità */
            height: 45px;
            object-fit: contain;
        }

        /* --------------------------------------------------------------------------------------------- */
        /* CUSTOM CURSOR                                                                                 */
        /* --------------------------------------------------------------------------------------------- */
        
        .cursor-dot, .cursor-outline {
            position: fixed;
            top: 0; left: 0;
            pointer-events: none;
            z-index: 9999;
            mix-blend-mode: difference;
        }
        .cursor-dot { width: 12px; height: 12px; background-color: var(--cursor-color); border-radius: 50%; }
        .cursor-outline { width: 40px; height: 40px; border: 1.5px solid var(--cursor-color); border-radius: 50%; transition: width 0.3s, height 0.3s, opacity 0.3s; }
        
        .cursor-dot.hovering { width: 50px; height: 50px; opacity: 0.8; }
        .cursor-outline.hovering { opacity: 0; }

       /* Nasconde il cursore su tutti i dispositivi che non hanno un mouse (Touch) */
        @media (pointer: coarse), (hover: none) {
            .cursor-dot, 
            .cursor-outline {
                display: none !important;
            }

            /* Ripristina il cursore normale di sistema per il touch */
            body, a, button {
                cursor: auto !important;
            }
        }