/* -------------------------------------------------------------------------------- */
/* ! Impostazioni BASE */
/* -------------------------------------------------------------------------------- */
/* Tavolozza colore */
:root {
    --dark: #232323;
    --light: #F7F7F7;
    --accent: #BC2A41;
    --primary: #A0A0A0;
    --secondary: #E9E9E9;
}

/* Preset */
* {
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
}

li {
    list-style: none;
}



/* Utility */
.res {
    width: 100%;
    max-width: 290px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.clippy {
    clip-path: circle();
}

html {
    scroll-behavior: smooth;
}

/* Tipografia */
p {
    font-family: 'Switzer', sans-serif;
    font-size: 20px;
}

h1 {
    font-family: "enra-slab-variable", sans-serif;
    font-variation-settings: 'wght' 400;
    font-size: 1.88em;
}

h2 {
    font-family: "enra-slab-variable", sans-serif;
    font-variation-settings: 'wght' 400;
    font-size: 1.66em;
}

h3 {
    font-family: "enra-slab-variable", sans-serif;
    font-variation-settings: 'wght' 400;
    font-size: 1.35em;
}

h5 {
    font-family: "enra-slab-variable", sans-serif;
    font-size: 0.6em;
    font-weight: 200px;
    font-size: 1.1em;
}

h6 {
    font-family: 'Switzer', sans-serif;
    font-size: 0.6em;
    font-weight: 100px;
    font-size: 1em;
}

.sottolineato {
    text-decoration: underline;
}

/* Tavolozza colore */

/* Animazioni */
@keyframes slideFromTop {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}


/* -------------------------------------------------------------------------------- */
/* ! Grid per Mobile first */
/* -------------------------------------------------------------------------------- */
/* Grid system */
.grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 25px;
    padding: 10px 20px;
}

/* Navigazione */
header.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
}

.header__logo {
    max-width: 30px;
}

.header__menu .site-nav>li {
    display: inline-block;
}

.header__icon {
    display: block;
    color: var(--light);
    text-align: center;
    z-index: 3;
}

/* Hamburger */

.icon-hamburger {
    cursor: pointer;
    height: 20px;
    width: 40px;
    position: relative;
    transition: 0.3s cubic-bezier(.38, .95, .67, -0.19);
}

.icon-hamburger span {
    background: var(--light);
    height: 2px;
    width: 100%;
    position: absolute;
    left: 0;
    border-radius: 20px;
    transition: var(--micro);
}

.icon-hamburger span:nth-child(1) {
    top: 0;
    width: 90%;
    opacity: 1;
}

.icon-hamburger span:nth-child(2),
.icon-hamburger span:nth-child(3) {
    top: 10px;
    width: 70%;
}

.icon-hamburger span:nth-child(4) {
    top: 20px;
    width: 90%;
    opacity: 1;
}

/* Hamburger in open */
.open .icon-hamburger {
    transform: rotate(180deg);
}

.open .icon-hamburger span:nth-child(1),
.open .icon-hamburger span:nth-child(4) {
    width: 0;
    opacity: 0.4;
}

.open .icon-hamburger span:nth-child(2) {
    transform: rotate(45deg);
    width: 100%;
}

.open .icon-hamburger span:nth-child(3) {
    transform: rotate(-45deg);
    width: 100%;
}

.sticky {
    position: sticky;
    top: 0;
    background-color: var(--dark);
    z-index: 3;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.2);
}

.header__icon {
    display: block;
    color: var(--light);
    text-align: center;
    z-index: 3;
}

.site-nav {
    padding-top: 10px;
    padding-bottom: 10px;
    align-items: center;
    overflow: hidden;
    transition: 0.4s cubic-bezier(.17, .67, .83, .67);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    transition: transform 0.3s;
    gap: 75px;
}

.site-nav img {
    min-width: 40px;
}

.site-nav h1 {
    grid-column: 1/5;
    /* outline: 1px solid red; */
    z-index: 2;
}



.site-nav a {
    color: var(--light);
    font-size: 28px;
    font-family: "enra-slab-variable", sans-serif;
    font-variation-settings: 'wght' 400;
}


.site-nav a:hover {
    color: var(--accent);
}

.open .site-nav {
    transform: translateY(0);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-height: 100%;
    width: 100%;
    height: 100vh;
    background-color: var(--dark);
    animation: slideFromTop 0.6s;
    z-index: 2;

}

.site-nav__hamburger {
    cursor: pointer;
    grid-column: 8/9;
    justify-self: end;
    z-index: 2;
    position: absolute;
    top: 5;
    right: 10;
    font-size: 2em;
}

.open .site-nav__hamburger {
    position: fixed;
}







/* Benvenuto */
.welcome__text {
    grid-column: 1/9;
    margin: 80px 20px 60px 20px;
    text-align: center;

}

.welcome__text h1 {
    margin-bottom: 15px;
    color: var(--accent);
}

.welcome__text h3 {
    line-height: 1.3;

}

.welcome__img {

    display: flex;
    justify-content: center;
    margin: 0 auto;
}

.welcome__img img {
    width: 300px;
}

/* Portfolio */
#portfolio {
    border-radius: 50px;
    background-color: var(--secondary);
    margin-bottom: 120px;
    padding-bottom: 80px;
}

/* #portfolio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
} */

#portfolio h2 {
    position: relative;
    z-index: 0;
    color: var(--accent);
    text-align: center;
    padding: 50px 30px 50px 30px;

}

.portfolio__projects {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
    row-gap: 50px;
    column-gap: 50px;
}

.project__item {
    grid-column: 1/9;
    border-radius: 10px;
    background-color: var(--light);
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    transition: transform 0.3s ease;
    margin: 0 auto;
    filter: grayscale(100%);
}

.project__item:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 8px 8px rgba(176, 176, 176, 0.5);
}


.project__item img {
    display: flex;
    /* width: 100%; */
    /* height: auto; */
    border-radius: 10px 10px 0px 0px;
}

.intestazione__carta {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 15px 15px 10px 15px;
    color: var(--primary);
}

.portfolio__projects h3 {
    color: var(--dark);
    margin-bottom: 5px;
}

.portfolio__projects p {
    color: var(--primary);
}

/* Back to top */
.backtotop {
    text-align: right;
    padding: 50px 10px 30px 0px;
}


/* Skills */

#skills h2 {
    position: relative;
    z-index: 1;
    color: rgb(0, 60, 255);
    text-align: center;
    padding: 15px 30px;
}

#skills img {
    width: 80px;
}

#skills li {
    grid-column: span 4;
    text-align: center;
    background-color: rgb(220, 157, 157);
    padding: 12px;
    border: 1px solid black;
}


.footer {
    grid-template-columns: 8, 1fr;
    grid-gap: 20px;
    background-color: var(--dark);
    color: var(--light);
    padding: 50px 24px;
}

.footer__nav {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
    grid-template-rows: 8, 1fr;
    gap: 20px;
    justify-content: stretch;
    margin-bottom: 80px;
}

.footer__cta {
    grid-column: 1/9;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
}

.footer__cta p {
    width: 100%;
    max-width: 400px;
    margin-top: 15px;
    font-family: "enra-slab-variable", sans-serif;
    font-variation-settings: 'wght' 400;
    line-height: 1.3;
    font-size: 1.1em;
}

.footer__cta img {
    width: 60px;
}

.footer__cta a {
    grid-template-columns: 1fr;
    max-width: 180px;
    text-align: center;
    padding: 8px 15px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--light);
    font-weight: 700;
    transition: 0.3s ease;
    margin-top: 20px;
    font-family: 'Switzer', sans-serif;
}

.footer__cta a:hover {
    transform: scale(1.1);
}

.footer__links {
    grid-column: 1/9;
    margin-top: 30px;
    display: flex;
    flex-direction: column;

}

.footer__links p {
    font-size: 1.2em;
    font-family: 'Switzer', sans-serif;
}

.footer__links p {
    color: var(--accent);
}

.footer__linksA,
.footer__linksB {
    grid-column: 1/9;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-wrap: wrap;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer__linksA a,
.footer__linksB a {
    color: var(--light);
    font-size: 1.1em;
    margin-bottom: 5px;
    font-family: "enra-slab-variable", sans-serif;
    font-variation-settings: 'wght' 400;
}


.footer__linksA a:hover {
    color: var(--accent);
    padding-left: 5px;

}

.footer__linksB a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer__social {
    grid-column: 1/9;
    display: flex;
    flex-direction: row;
}

.footer__social a {
    color: var(--light);
    font-size: 1.5rem;
    margin-right: 15px;
    margin-top: 25px;
}

.footer__info {
    display: grid;
    grid-template-columns: 8, 1fr;
    grid-template-rows: 8, 1fr;
    grid-column: 1/9;
    text-align: left;
    margin-top: 30px;
    color: var(--primary);
}

.footer__info p,
.footer__info a {
    font-size: 0.98em;
}

.footer__policy {
    grid-column: 1/9;
    text-align: left;
    margin-top: 15px;
    font-family: switzer, sans-serif;
}

.footer__policy a {
    color: var(--primary);
}

.design__by {
    grid-column: 1/9;
    text-align: left;
    margin-top: 30px;
}

#gdpr_36606 {
    border: none;
}

/* ABOUT */
.welcome__text__about {
    grid-column: 1/9;
    margin: 50px 24px 50px 24px;
    text-align: center;
}

.welcome__text__about h3 {
    line-height: 160%;
    letter-spacing: 0.04em;
}

.content__about {
    padding-top: 60px;
    padding-bottom: 40px;
    background-color: var(--secondary);
    border-radius: 50px;
    transition: transform 0.3s ease-in;
}

.content__about:hover {
    transform: scale(1.015);
}

.testo__A {
    grid-column: 1/9;
    text-align: left;
    padding-bottom: 20px;
}

.testo__A p {
    padding-bottom: 10px;
    line-height: 1.7em;
    padding-right: 30px;
    padding-left: 30px;
}

.testo__A p a {
    color: var(--accent);
}

.foto__A {
    grid-column: 1/9;
    padding-bottom: 40px;

}

.foto__A img {
    width: 100%;
}

.foto__B {
    grid-column: 1/9;
    padding-bottom: 20px;
}

.foto__B img {
    width: 100%;
}

.testo__B {
    grid-column: 1/9;
    padding-bottom: 10px;
}

.testo__B p {
    padding-bottom: 10px;
    line-height: 1.7em;
    padding-right: 30px;
    padding-left: 30px;
}

.testo__B p a {
    color: var(--accent);
}

.content__about h5 {
    padding-top: 15px;
    letter-spacing: 0.05em;
    text-align: center;
    line-height: 1.5em;
    font-weight: 100em;
}

.content__about h6 {
    color: var(--primary);
    padding-top: 5px;
    text-align: center;
}

.content__about h6 a {
    color: var(--primary);
    padding-top: 5px;
    text-align: center;
}

.content__about h5 a {
    color: var(--accent);
}

#software {
    margin-bottom: 120px;
}


#software h1 {
    grid-column: 1/9;
    padding: 120px 20px 30px 20px;
    text-align: center;
    color: var(--accent);
}

#software img {
    width: 60px;

}

#software li {
    grid-column: span 4;
    text-align: center;
    padding: 12px;
    margin-bottom: 20px;
}

#software li p {
    margin-top: 10px;
}




/* CONTACT */
.contact {
    margin: 60px 20px;
    background-color: var(--secondary);
    padding: 60px 30px 30px 30px;
    border-radius: 30px;
    transition: transform 0.3s ease-in;
}

.contact:hover {
    transform: scale(1.015);
}

.cta__contact {
    max-width: 400px;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
}

.contact h1 {
    color: var(--accent);
    display: flex;
    flex-direction: column;
    align-items: center;
    letter-spacing: 0.05em;
    padding-bottom: 10px;
}

.contact h2 {
    color: var(--dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    letter-spacing: 0.05em;
    text-align: center;
    line-height: 1.2em;
    margin-bottom: 60px;
    letter-spacing: 0.05em;
}

.form {
    margin: 0 auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}

.form-group input {
    height: 30px;
}

.form label {
    color: var(--dark);
    font-family: 'Switzer', sans-serif;
}

#message {
    height: 100px;
}

.form button {
    margin: 0 auto;
    display: flex;
    padding: 12px 20px;
    background-color: var(--accent);
    color: var(--light);
    border-radius: 50px;
    width: 160px;
    border: none;
    text-transform: uppercase;
    margin-top: 60px;
    margin-bottom: 10px;
    transition: 0.3s ease;
    justify-content: center;
}



.form button:hover {
    transform: scale(1.1);
}

.form button h3 {
    margin: 0 auto;
    line-height: 1.5em;
    letter-spacing: 0.08em;
    font-weight: 50em;
}

.form textarea {
    border: none;
    border-radius: 5px;
    height: 50px;
    margin-top: 10px;
}

.form input {
    border: none;
    border-radius: 5px;
    margin-top: 10px;
    margin-right: 10px;
}



/* CHANGES */
.welcome__text__project {
    grid-column: 1/9;
    margin: 50px 50px 50px 50px;
    text-align: center;
}

.welcome__text__project h1 {
    color: var(--accent);
    margin: 0 25px 0 25px;
}

.welcome__text__project h3 {
    line-height: 160%;
    letter-spacing: 0.04em;
    margin-top: 10px;
}

#body__project {
    margin-top: 80px;
}

.testo__A .italic {
    font-style: italic;
    font-variation-settings: 'wght' 650;
}

.testo__hero {
    grid-column: 1/9;
    padding-bottom: 10px;
}

.testo__hero p {
    padding-bottom: 10px;
    line-height: 1.7em;
    padding-right: 15px;
}

.testo__hero p a {
    color: var(--accent);
}

.foto__hero {
    grid-column: 1/9;
    padding-bottom: 45px;
}

.foto__hero img {
    width: 100%;
    transition: transform 0.3s ease-out;
}

.foto__hero img:hover {
    transform: scale(1.015);
}

.content__about:hover {
    transform: scale(1.015);
}

.foto__hero h5 {
    padding-top: 15px;
    letter-spacing: 0.05em;
    text-align: center;
    line-height: 1.5em;
    font-weight: 100em;
}

.foto__hero h5 a {
    color: var(--accent);
    cursor: pointer;
}

.foto__hero h6 {
    text-align: center;
    color: var(--primary);
}

.foto__hero h6 a {
    color: var(--primary);
    padding-top: 5px;
    text-align: center;
    cursor: pointer;
}

#similar {
    margin-top: 120px;
    margin-bottom: 120px;
}

/* NON MANTELLO  */

.testo__hero .italic {
    font-style: italic;
    font-variation-settings: 'wght' 650;
}

/* LEVANTE */
.welcome__text__project h6 {
    color: var(--primary);
}

.welcome__text__project h6 a {
    color: var(--primary);
}

.foto__orizzontale {
    grid-column: 1/9;
    padding-bottom: 80px;

    margin: 0 auto;
}

.foto__orizzontale img {
    width: 100%;
}

.foto__orizzontale h5 {
    padding-top: 15px;
    letter-spacing: 0.05em;
    text-align: center;
    line-height: 1.5em;
    font-weight: 100em;
}

.foto__orizzontale h5 a {
    color: var(--accent);
}

.foto__orizzontale h6 {
    color: var(--primary);
    text-align: center;
}

.foto__orizzontale h6 a {
    color: var(--primary);
}

.foto__orizzontale #set__video {
    max-width: 800px;

}


.foto__A,
.foto__B {
    padding-bottom: 45px;
}





/* MEDIUM*/
@media (min-width: 768px) {

    h1 {
        font-size: 2.77em;
    }

    h2 {
        font-size: 1.94em;
    }

    h3 {
        font-size: 1.3em;
    }

    h5 {
        font-size: 1.1em;
    }

    h6 {
        font-size: 0.98em;
    }

    /* header */
    .header__menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--primary);
        transform: translateY(-100%);
        transition: var(--micro);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header__logo img {
        max-width: 50px;
    }

    /* Richiamo la classe in base al click */
    .open .header__menu {
        transform: translateY(0);
    }

    /* welcome */
    .welcome__text {
        grid-column: 3/7;
        justify-self: center;
        text-align: center;
    }

    .welcome__img img {
        width: 400px;
    }

    #portfolio h2 {
        padding: 70px 30px 40px 30px;
    }

    .portfolio__projects a:nth-child(1) {
        grid-column: 2/5;
    }

    .portfolio__projects a:nth-child(2) {
        grid-column: 5/8;
    }

    .portfolio__projects a:nth-child(3) {
        grid-column: 2/5;
    }

    .portfolio__projects a:nth-child(4) {
        grid-column: 5/8;
    }

    .portfolio__projects a:nth-child(5) {
        grid-column: 2/5;
    }

    .portfolio__projects a:nth-child(6) {
        grid-column: 5/8;
    }

    .portfolio__projects a:nth-child(7) {
        grid-column: 2/5;
    }

    .portfolio__projects a:nth-child(8) {
        grid-column: 5/8;
    }

    .intestazione__carta {
        padding: 15px 15px 15px 15px;
    }

    .footer__nav {
        display: grid;
        margin-bottom: 80px;
    }

    .footer__info {
        display: grid;
        color: var(--primary);
    }

    .footer__cta {
        grid-column: 1/3;
    }

    .footer__social {
        grid-column: 8/9;
    }

    .footer__info {
        grid-column: 1/7;
        margin-top: 0px;
    }

    .footer__policy {
        grid-column: 8/9;
        margin-top: 0px;
    }

    .footer__cta {
        grid-column: 1/3;
        grid-row-start: 1;
        grid-row-end: 3;
    }

    .footer__links,
    .footer__linksA {
        display: grid;
        grid-column: 4/6;
        gap: 0px;
    }

    .footer__linksB {
        display: grid;
        grid-column: 6/8;
    }

    .footer__social {
        grid-column: 8/9;
    }

    .footer__info {
        margin-top: 100px;
    }


    /* ABOUT */
    .welcome__text__about {
        grid-column: 3/7;
        justify-self: center;
        text-align: center;
    }

    .welcome__img img {
        max-width: 600px;
    }

    .testo__A {
        grid-column: 2/8;
        text-align: left;
        padding-bottom: 20px;

    }

    .foto__A {
        grid-column: 3/7;
        padding-bottom: 40px;
    }

    .foto__B {
        grid-column: 3/7;
        padding-bottom: 20px;
    }

    .testo__B {
        grid-column: 2/8;
        padding-bottom: 40px;

    }

    .testo__A p,
    .testo__B p {
        padding-left: 0px;
        padding-right: 0px;
    }


    /* CONTACT */
    .contact {
        max-width: 500px;
        margin: 100px auto;
    }

    #software li {
        grid-column: span 2;
    }

    /* CHANGES */
    .welcome__text__project {
        grid-column: 3/7;
        justify-self: center;
        text-align: center;
        margin: 50px 100px 50px 100px;
    }


    .testo__hero {
        grid-column: 2/8;
        padding-bottom: 40px;
    }

    .foto__hero {
        grid-column: 3/7;
        padding-bottom: 30px;
    }


    /* LEVANTE */
    .foto__orizzontale {
        grid-column: 2/8;
        padding-bottom: 50px;
    }

    .foto__orizzontale #set__video {
        margin: 0 auto;
        padding-top: 40px;

    }

}

/* -------------------------------------------------------------------------------- */
/* LARGE */
/* -------------------------------------------------------------------------------- */
@media (min-width: 992px) {

    /* RIDIMENSIONAMETNO FONT */
    h1 {
        font-size: 2.77em;
    }

    h2 {
        font-size: 1.94em;
    }

    h3 {
        font-size: 1.5em;
    }

    h5 {
        font-size: 1em;
    }

    h6 {
        font-size: 0.98em;
    }

    .grid {
        max-width: 1200px;
        margin: 0 auto;
    }




    .site-nav__hamburger {
        font-size: 2.3em;
    }

    .welcome__text {
        grid-column: 3/7;
        justify-self: center;
        text-align: center;
    }

    .welcome__img {
        grid-column: 5/8;
        justify-self: center;
    }

    #portfolio {
        border-radius: 120px;
    }

    #portfolio h2 {
        padding: 80px 30px 50px 30px;
    }

    .project__item {
        border-radius: 20px;
    }

    .project__item img {
        border-radius: 20px 20px 0px 0px;
    }

    .portfolio__projects a * {
        max-width: 100%;
    }



    .portfolio__projects a:nth-child(1) {
        grid-column: 2/5;
    }

    .portfolio__projects a:nth-child(2) {
        grid-column: 5/8;
    }

    .portfolio__projects a:nth-child(3) {
        grid-column: 2/5;
    }

    .portfolio__projects a:nth-child(4) {
        grid-column: 5/8;
    }

    .portfolio__projects a:nth-child(5) {
        grid-column: 2/5;
    }

    .portfolio__projects a:nth-child(6) {
        grid-column: 5/8;
    }

    .portfolio__projects a:nth-child(7) {
        grid-column: 2/5;
    }

    .portfolio__projects a:nth-child(8) {
        grid-column: 5/8;
    }




    /* ABOUT */
    .welcome__text__about {
        grid-column: 3/7;
        justify-self: center;
        text-align: center;
        margin: 80px 24px 40px 24px;
    }

    .welcome__img {
        margin: 0 auto;

    }

    .welcome__img img {
        max-width: 800px;
    }

    .content__about {
        border-radius: 80px;
    }

    .testo__A {
        grid-column: 2/5;
        text-align: left;
    }

    .foto__A {
        grid-column: 5/8;
    }


    .foto__B {
        grid-column: 2/5;
    }

    .testo__B {
        grid-column: 5/8;
    }

    .content__about h5 {
        text-align: left;
    }

    .content__about h6 {
        text-align: left;
    }

    #software li {
        grid-column: span 2;
        text-align: center;
        padding: 12px;
        margin-bottom: 20px;
    }

    /* CONTACT */
    .contact {
        max-width: 500px;
        margin: 100px auto;
    }

    /* CHANGES */
    .welcome__text__project {
        grid-column: 3/7;
        justify-self: center;
        text-align: center;
        margin: 50px 600px 50px 600px;
    }

    .testo__hero {
        grid-column: 5/8;
    }

    .foto__hero {
        grid-column: 2/5;
        gap: 30px;
    }

    .foto__hero h5 {
        text-align: left;
    }

    .foto__hero h6 {
        text-align: left;
    }

    /* NON MANTELLO */
    #body__project .testo__B {
        grid-column: 2/8;
    }

    #body__project .testo__A {
        grid-column: 2/8;
    }


    /* LEVANTE */
    .foto__orizzontale {
        grid-column: 2/8;
        padding-bottom: 80px;
    }
}