@font-face {
    font-family: 'FiraCodeLight';
    src: url('/fonts/FiraCode-Light.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}


@font-face {
    font-family: 'Bobble';
    src: url('/fonts/Daydream.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: '04B';
    src: url('/fonts/04B_30__.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Gameboy';
    src: url('/fonts/EarlyGameBoy.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'tempesta';
    src: url('/fonts/pf_tempesta_five_condensed.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'metropolisThin';
    src: url('/fonts/Metropolis-Thin.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'metropolisLight';
    src: url('/fonts/Metropolis-Light.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/*colore di selezione smartphone*/
a, a:active, a:focus {
    -webkit-tap-highlight-color: rgba(255, 0, 187, 0.3); /* Safari/Chrome mobile */
    tap-highlight-color: rgba(255, 0, 187, 0.3);         /* Standard */
}


/*per immagini di copertina in works*/
.work a.work-link {
    display: flex;
    align-items: center;
    gap: 1.2em;
    text-decoration: none;
    color: inherit;
    padding: 0.4em;
    border-radius: 4px;
    transition: background-color 0.35s ease;
}

.work a.work-link:hover {
    background-color: rgb(255, 255, 255); /*rgba(0, 0, 0, 0.05); leggero sfondo */
}

.work a.work-link img {
    width: 95px;
    height: 95px;
    object-fit: cover;
    border-radius: 3px;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.work a.work-link:hover img {
    transform: scale(1.08);
    opacity: 0.92;
}

.work a.work-link h2,
.work a.work-link p {
    transition: transform 0.35s ease;
}

.work a.work-link:hover h2,
.work a.work-link:hover p {
    transform: scale(1.03) translateX(15px); /* ingrandisce e sposta leggermente a destra */
}


/*fine works */

/*contacts griglia*/
.contacts-container {
    display: flex;
    flex-wrap: wrap;       /* va a capo se lo spazio è poco */
    gap: 3em;              /* spazio tra le colonne */
    justify-content: center;
    margin: 2em 0;
}

.contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 250px;      /* larghezza minima di ciascun box */
}

/*fine contacts griglia*/

body {
    height: 100%;
    background-color: #E0E0DC;
    font-family: 'metropolisLight', monospace;
    margin: 140px auto 0 auto; /* margine top + centratura orizzontale */
    padding: 0 1rem; /* padding laterale per non attaccare ai bordi */
    line-height: 1;
    text-align: justify;
    max-width: 900px; /* larghezza massima leggibile */
    padding-bottom: 90px; /* Aggiungi un margine in alto per evitare che il contenuto si sovrapponga alla barra di navigazione */
}


h1 {
    font-size: 2em;
    padding: 0.8em 0.6em;
    margin: 0;
    text-align: center;  /* testo centrato dentro il box */
}

h2 {
  font-size: 2em;
}

h2 a {
    color: black;
}


h3 {

  font-size: 1em;
  margin: 0 0 1em 0;
  text-align: center;
}

h4, h5, h6 {
    color: #000000;
    margin: 0;
    padding: 0;
}

p {
    color: #000000;
    margin: 0 0 1em 0;
    padding: 0;
    text-align: justify;
}

p a {
    color: #000000;
}


a {
    color: #f0f0f0;
    text-decoration: none;
    padding: 0;
}

a:hover {
    text-decoration: underline;
}

footer {
    background-color: #FB2B54;
    color: #00ABAD;
    text-align: center;
    padding: 1px;
    position: fixed;
    bottom: 0;
    width: 100%;
    box-sizing: border-box;
}

.brand {
    font-family: 'FiraCodeLight';
    text-transform: lowercase !important;
    color: rgb(255, 0, 187) !important;
}


.container {
    width: 90%;
    margin: 0 auto;
    padding: 1em;
}
.image-container {
    position: relative;
    width: 56.5em;
    margin-top: -5em;  /* sposta verso l’alto */
    left: 0;
}


.image-container img {
    position: absolute;
    top: 10%;           /* sposta verso il basso */
    left: 50%;
    width: 80em;
    height: 50em;
    object-fit: cover;
    transform: translateX(-50%); /* solo orizzontale */
    opacity: 0;
    transition: opacity 1s ease-in-out;
}


.single-image-container {
    width: 12.5em;
    max-width: 56.25em; /* 900px / 16 */
    margin: 0 auto;
    position: relative;
}

.single-image-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin-bottom: 1em;
}



button {
    border: 2px solid #000;
    background-color: #fff;
    color: #000;
    padding: 0.8em 0.6em;
    margin-bottom: 0.3em;
    font-family: "FiraCodeLight", monospace;
    font-size: 12px;
    cursor: pointer;
    border-radius: 0; /* nessun arrotondamento */
    outline: none;
}

button:hover {
    background-color: #000;
    color: #fff;
}

hr.full-width {
    border: none;
    border-top: 1px solid #979797;
    margin: 3em auto;
    padding: 0;
    width: 100%;
    max-width: 2000px; /* opzionale */
}


hr.full-width-spessa {
    border: none;
    border-top: 4px solid #979797;
    width: 100%;
    max-width: 900px;   /* stessa larghezza massima del testo */
    margin: 3em auto;   /* centrato */
    position: relative;
    left: 0;
    transform: none;
}

/* Navbar container */

.nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3em;
    background: #000;
    padding: 0.5em 1em;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 340;
    font-family: 'metropolisThin', sans-serif;
    font-size: 1rem; 
    box-sizing: border-box;
    border-left: 10px solid rgb(255, 0, 187);
    border-right: 10px solid rgb(255, 0, 187);
    
  }
  
  /* Link */
  .nav a {
    color: #fff;
    text-decoration: none;
    align-items: center;
    padding: 0.4em 0.6em;
    padding-top: 1.8;
    transition: 0.3s;
  }
  
  .nav a:hover,
  .nav a:active {
    background: #fff;
    color: #000;
  }
  
  /* Dropdown */
  .dropdown {
    position: relative;
  }
  
  .dropdown-content,
  .sub-dropdown-content {
    display: none;
    position: absolute;
    background: #000;
    min-width: 160px;
    z-index: 999;
    padding: 0.4em 0;
  }
  
  /* Mostra dropdown */
  .dropdown:hover .dropdown-content {
    display: block;
  }
  
  /* Sub-dropdown */
  .sub-dropdown {
    position: relative;
  }
  
  .sub-dropdown-content {
    top: 0;
    left: 100%;
  }
  
  .sub-dropdown:hover .sub-dropdown-content {
    display: block;
  }
  
  /* Link del menu */
  .dropdown-content a,
  .sub-dropdown-content a {
    color: #fff;
    display: block;
    padding: 0.4em 0.8em;
    transition: 0.3s;
  }
  
  .dropdown-content a:hover,
  .sub-dropdown-content a:hover {
    background: #fff;
    color: #000;
  }
  

/* ----------- GALLERIA ----------- */
.gallery {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 2em auto;
    text-align: center;
}

.gallery img {
    width: 60%;
    height: 500px; /* Altezza fissa per formato uniforme */
    object-fit: cover; /* Mantiene proporzioni tagliando se necessario */
    transition: opacity 0.5s ease-in-out;
    cursor: pointer; /* Indica che l'immagine è cliccabile */
    border-radius: 8px; /* Opzionale: angoli arrotondati */
}

.gallery img:hover {
    opacity: 0.8; /* Effetto hover per indicare interattività */
}

.controls {
    margin-top: 0.5em;
}

.controls button {
    padding: 0.5em 1em;
    margin: 0 1em;
    font-size: 1.2em;
    cursor: pointer;
}

/* Modal per visualizzare immagine originale */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
}

.modal-content img {
    width: 100%;
    height: auto;
    object-fit: contain; /* Mantiene proporzioni originali */
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close:hover {
    opacity: 0.7;
}

/* Frecce di navigazione */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 60px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    z-index: 1001;
    padding: 10px;
    transition: opacity 0.3s ease;
}

.nav-prev {
    left: 20px;
}

.nav-next {
    right: 20px;
}

.nav-arrow:hover {
    opacity: 0.7;
}

/* Contatore immagini */
.modal-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 14px;
}
/* ----------- AGGIUNTA RICHIESTA DAL GRANDE PINGUINO ----------- */
#bio p {
    font-size: 0.75rem; /* o usa 12px se preferisci */
    line-height: 1.6;
}
/* -------------------------------------------------------------- */
/* FILTRO*/
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    font-family: "FiraCodeLight", monospace;
    font-size: small;
}

.filter-bar label {
    color: #473f3d;
    padding: 0.3em 0.6em;
    border: 1px solid #000000;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4em;
}

.filter-bar input[type="checkbox"] {
    accent-color: yellow;
}

.project-list .project {
    margin-bottom: 0.8em;
    font-size: 0.9rem;
}




@media (max-width: 500px) {
    body {
        font-size: 14px;
        padding: 0 10px;
    }

    .container {
        width: 95%;
    }

    h1 {
        padding: 0 0 1em;
        font-size: 2em;

    }
    h2 {
        font-size: 1.5em;

    }
    h3 {   
        margin: 0;
        padding: 0;
        text-align: center;
    }

    .brand {
        margin-top: 10px;
    }

    p {
        margin: 0 0 0.8em 0;
    }
    .nav {
        flex-direction: column;
        align-items: center;
        gap: 0.5em; /* spazio tra i link */
    }

    .nav, .links {
        margin-bottom: 10px;
    }
    .image-container {
        background-color: #fff;
        position: relative;
        width: 100%;
        aspect-ratio: 9 / 16;
    }

    .image-container img {
        width: 100%;
        height: 100%;
        object-fit: contain; /* mostra tutta l'immagine, ma possono restare spazi vuoti */
        position: absolute;
        top: 0;
        left: 0;
        opacity: 0;
        transition: opacity 1s ease-in-out;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 12px;
    }

    .container {
        width: 100%;
    }

    h1 {
        padding: 0 0 1em;
        font-size: 2em;
    }
    h2 {
        font-size: 1.5em;

    }
    h3 {
        margin: 0;
        padding: 0;
        text-align: center;
    }
    
    .brand {
        margin-top: 10px;
    }

    p {
        margin: 0 0 0.8em 0;
    }

    .nav, .links {
        margin-bottom: 10px;
    }
    .image-container {
        position: relative;
        width: 100%;
        aspect-ratio: 9 / 16;
        top: -60px
    }

    .image-container img {
        width: 100%;
        height: 100%;
        object-fit: contain; /* mostra tutta l'immagine, ma possono restare spazi vuoti */
        position: absolute;
        margin-top: 7em;
        margin-left: 16em;
        opacity: 0;
        transition: opacity 1s ease-in-out;
    }


}


