/* -------------------------------------------------------------------------------- */
/* ! Base */
/* -------------------------------------------------------------------------------- */

/* Reset */
* {
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
}

li {
    list-style-type: none;
}

html {
    scroll-behavior: smooth;
}

/* Utility */
.clippy {
    clip-path: circle(39% at 50% 50%);
}

.res {
    width: 100%;
    max-width: 290px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Tipografia */
body {
    font-family: 'General Sans', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'General Sans', sans-serif;
    font-weight: 700;
}

p {
    font-size: 1.2em;
    font-weight: 400;
}

/* Tavolozza colori */
:root {
    --primary: #3986FF;
    --secondary: #FF006E;
    --accent: #FFE74C;
    --dark: #000000;
    --light: #FFFFFF;
}

.blu {
    color: var(--primary);
}

.fucsia {
    color: var(--secondary);
}

.giallo {
    -webkit-text-stroke-width: 2px;
    -webkit-text-stroke-color: var(--accent);
    color: var(--dark);
}

.arancione {
    color: #FB5607;
}

.viola {
    color: #8337EC;
}

.verde {
    color: #6CF178;
}

/* Animazioni */
@keyframes openPanel {
    0% {
        transform: scale(0.8);
    }

    100% {
        transform: scale(1);
    }
}

body {
    background-color: var(--dark);
}

/* -------------------------------------------------------------------------------- */
/* ! Grid per Mobile first */
/* -------------------------------------------------------------------------------- */
/* Grid stystem */
.grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    padding: 10px 20px;
}

/* Navigazione */

header {
    background-color: var(--primary);
    margin-top: 20px;
    margin-bottom: 20px;
    margin-left: 20px;
    margin-right: 20px;
    border-radius: 50px;
}

.site-nav img {
    grid-column: 1/5;
    /* outline: 1px solid red; */
    z-index: 1;
}

.site-nav__menu {
    position: absolute;
    top: 0;
    left: 0;
    max-height: 0;
    overflow: hidden;
    z-index: 1;
}

.open .site-nav__menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-height: 30%;
    width: 100%;
    height: 100vh;
    margin-top: 15px;
    margin-bottom: 20px;
    border-radius: 50px;
    background: var(--primary);
    animation: openPanel 0.6s;
    font-size: 1.5em;
    line-height: 1.8em;
}

.open .site-nav a {
    color: var(--light);
    font-weight: 500;
}

.open .site-nav a:hover {
    color: var(--accent);
    font-weight: 500;
}

.open .site-nav a.active {
    border: 10px solid var(--accent);
    border-radius: 50px;
    background-color: var(--accent);
    color: var(--dark);
    font-weight: 500;
}

/* Hamburger */

.site-nav__hamburger {
    cursor: pointer;
    grid-column: 8/9;
    justify-self: end;
    /* outline: 1px solid red; */
    height: 20px;
    width: 40px;
    position: relative;
    transition: 0.6s cubic-bezier(.99, .3, .06, .79);
}

.site-nav__hamburger span {
    background: var(--light);
    height: 2px;
    width: 100%;
    position: absolute;
    left: 0;
    border-radius: 20px;
    transition: 0.6s cubic-bezier(.99, .3, .06, .79);
}

.site-nav__hamburger span:nth-child(1) {
    top: 0;
    width: 90%;
    opacity: 1;

}

.site-nav__hamburger span:nth-child(2),
.site-nav__hamburger span:nth-child(3) {
    top: 10px;
    width: 70%;

}

.site-nav__hamburger span:nth-child(4) {
    top: 20px;
    width: 90%;
    opacity: 1;

}

/* Hamburger in open */
.open .site-nav__hamburger {
    transform: rotate(180deg);
    z-index: 999;
}

.open .site-nav__hamburger span:nth-child(1),
.open .site-nav__hamburger span:nth-child(4) {
    width: 0;
    opacity: 0.4;

}

.open .site-nav__hamburger span:nth-child(2) {
    transform: rotate(45deg);
    width: 80%;

}

.open .site-nav__hamburger span:nth-child(3) {
    transform: rotate(-45deg);
    width: 80%;
}


/* Section About */

.about__title {
    grid-column: 1/9;
    color: var(--light);
    font-size: 1.8em;
    line-height: 1.5em;
}

.about__text {
    grid-column: 1/9;
    color: var(--light);
    margin-top: 35px;
}

/* Section Education */
#education {
    grid-column: 1/3;
}

#education h3 {
    color: var(--light);
    font-weight: 300;
    text-align: center;
    margin-top: 50px;
}

#education h1 {
    color: var(--light);
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
}

.timeline {
    position: relative;
    max-width: 320px;
    margin: 50px auto;

}

.timeline .container {
    grid-column: 1/9;
    padding-left: 80px;
    padding-right: 25px;
    position: relative;
    animation: movedown 1s linear forwards;
    opacity: 0;
}

@keyframes movedown {
    0% {
        opacity: 1;
        transform: translateY(-30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0px);
    }
}

.timeline .container:nth-child(1) {
    animation-delay: 0s;
}

.timeline .container:nth-child(2) {
    animation-delay: 1s;
}

.timeline .container:nth-child(3) {
    animation-delay: 2s;
}

.text-box {
    padding: 20px 30px;
    background: var(--light);
    position: relative;
    border-radius: 6px;
    font-size: 13px;
}

.right-container {
    left: 0;
}

.timeline .container img {
    position: absolute;
    width: 40px;
    border-radius: 50%;
    top: 32px;
    z-index: 10;
}

.left-container img,
.right-container img {
    left: 10px;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 100%;
    background: var(--accent);
    top: 0;
    left: 50px;
    margin-left: -3px;
    z-index: -1;
    animation: moveline 2.8s linear forwards;
}

@keyframes moveline {
    0% {
        height: 0;
    }

    100% {
        height: 100%;
    }
}

.text-box h4 {
    font-weight: 500;
    color: var(--secondary);
}

.text-box h2 {
    font-weight: 600;
    color: var(--primary);
}

.text-box p {
    margin-top: 10px;
}

.left-container-arrow,
.right-container-arrow {
    height: 0;
    width: 0;
    position: absolute;
    top: 28px;
    z-index: 1;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 15px solid var(--light);
    border-left: 0;
    left: -15px;
}

/* Section Experience */
#experience {
    grid-column: 1/3;
}

#experience h3 {
    color: var(--light);
    font-weight: 300;
    text-align: center;
    margin-top: 50px;
}

#experience h1 {
    color: var(--light);
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
}

#slider {
    margin: 0 auto;
    text-align: center;
}

#slider input[type=radio] {
    display: none;
}

#slider label {
    cursor: pointer;
    text-decoration: none;
}

#slides {
    grid-column: 1/9;
    padding: 10px;
    border: 3px solid var(--light);
    background: var(--light);
    position: relative;
    z-index: 1;
}

#overflow {
    width: 100%;
    overflow: hidden;
}

#slide1:checked~#slides .inner {
    margin-left: 0;
}

#slide2:checked~#slides .inner {
    margin-left: -100%;
}

#slide3:checked~#slides .inner {
    margin-left: -200%;
}

#slide4:checked~#slides .inner {
    margin-left: -300%;
}

#slides .inner {
    transition: margin-left 800ms cubic-bezier(0.770, 0.000, 0.175, 1.000);
    width: 400%;
    height: 250px;
}

#slides .slide {
    width: 25%;
    float: left;
    display: block;
    height: 300px;
    color: var(--light);
}

#slides .slide_1 {
    background: var(--light);
}

#slides .slide_2 {
    background: var(--light);
}

#slides .slide_3 {
    background: var(--light);
}

#slides .slide_4 {
    background: var(--light);
}

.slide-content {
    padding-left: 15px;
    padding-right: 15px;
    margin-top: 15px;

}

.slide-content h4 {
    color: var(--secondary);
    margin-bottom: 10px;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
}

.slide-content h2 {
    color: var(--dark);
    margin-bottom: 15px;
    margin-top: 15px;
    font-size: 14px;
}

.slide-content p {
    color: var(--dark);
    margin-bottom: 15px;
    margin-top: 15px;
    font-size: 11px;
}


#controls {
    margin: -150px 0 0 0;
    width: 100%;
    height: 50px;
    z-index: 3;
    position: relative;
}

#controls label {
    transition: opacity 0.2s ease-out;
    display: none;
    width: 50px;
    height: 50px;
    opacity: .4;
}

#controls label:hover {
    opacity: 1;
}

/* #slide1:checked~#controls label:nth-child(2),
#slide2:checked~#controls label:nth-child(3),
#slide3:checked~#controls label:nth-child(4),
#slide4:checked~#controls label:nth-child(1) {
    background: url(https://cdn-icons-png.flaticon.com/512/14035/14035494.png) no-repeat;
    float: right;
    margin: 0 -50px 0 0;
    display: block;
}

#slide1:checked~#controls label:nth-last-child(2),
#slide2:checked~#controls label:nth-last-child(3),
#slide3:checked~#controls label:nth-last-child(4),
#slide4:checked~#controls label:nth-last-child(1) {
    background: url(https://cdn-icons-png.flaticon.com/512/14035/14035486.png) no-repeat;
    float: left;
    margin: 0 0 0 -50px;
    display: block;
} */

#bullets {
    grid-column: 1/9;
}

#bullets label {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 100%;
    background: var(--light);
    margin: 0 10px 0 10px;
}

#slide1:checked~#bullets label:nth-child(1),
#slide2:checked~#bullets label:nth-child(2),
#slide3:checked~#bullets label:nth-child(3),
#slide4:checked~#bullets label:nth-child(4) {
    background: var(--accent);
}

/* Section Languages */
#languages {
    grid-column: 1/3;
}

#languages h3 {
    color: var(--light);
    font-weight: 300;
    text-align: center;
    margin-top: 50px;
}

#languages .languages h3 {
    color: var(--light);
    margin-top: 10px;
    border: 3px solid var(--accent);
    border-radius: 50px;
    padding: 18px;
    max-width: 200px;
    text-align: center;
}

.language-1 {
    grid-column: 1/9;
    justify-self: center;
    width: 170px;
}

.language-2 {
    grid-column: -1/-9;
    justify-self: center;
    width: 250px;
}

/* Section Contacts */
#contacts {
    grid-column: 1/3;
    margin-top: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

#contacts h3 {
    color: var(--light);
    font-weight: 300;
    text-align: center;
    margin-top: 100px;
}

#contacts h1 {
    color: var(--light);
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
}

.sections__contacts {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    padding: 10px 20px;
}

.sections__contacts .wrapper-1 {
    grid-column: 1/9;
}

.sections__contacts .wrapper-2 {
    grid-column: -1/-9;
}

.wrapper-1-title,
.wrapper-2-title {
    margin-bottom: 50px;
}

.wrapper-2-title h1 {
    margin-top: 50px;
}

.wrapper-1-icon {
    display: flex;
    justify-content: space-around;
}

.wrapper-2-icon {
    display: flex;
    justify-content: space-around;
}

.icon {
    text-decoration: none;
    width: 5.625rem;
    height: 5.625rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.icon>i {
    color: var(--light);
    font-size: 1.5rem;
    transition: all 0.2s;
}

.icon:hover>i {
    scale: 2.2;
    background: var(--primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.icon::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 100%;
    background: var(--primary);
    scale: 1;
    z-index: -1;
    transition: all 300ms ease-out;
}

.icon:hover::before {
    scale: 0;
}

/* Footer */
footer {
    background-color: var(--secondary);
    margin-top: 100px;
    color: var(--light);
    text-align: center;
    height: 230px;
}

.footer .info {
    grid-column: 1/9;
}

.info h5 {
    font-weight: 300;
    margin-top: 40px;
    margin-bottom: 10px;
}

.footer .navigation {
    grid-column: -1/-9;
}

.navigation a {
    color: var(--light);
    margin-left: 10px;
    margin-right: 10px;
}

.navigation a:hover {
    color: var(--dark);
}

.footer .copyright {
    grid-column: 1/9;
    margin-top: 25px;
}

.copyright h6 {
    font-weight: 500;
    color: var(--dark);
}





/* -------------------------------------------------------------------------------- */
/* ! Dispositivi medium */
/* -------------------------------------------------------------------------------- */
@media (min-width: 768px) {

    /* Section About */
    .about__title {
        grid-column: 1/7;
        font-size: 2.5em;
        line-height: 1.5em;
        margin-top: 50px;
    }

    /* Section Experience */

    #slider {
        margin: 0 auto;
        width: 700px;
        height: 600px;
    }

    #slides .slide {
        height: 280px;
    }

    .slide-content img {
        width: 70px;
    }

    .slide-content h2 {
        font-size: 18px;
    }

    .slide-content p {
        font-size: 14px;
    }

    /* #slide1:checked~#controls label:nth-child(2),
    #slide2:checked~#controls label:nth-child(3),
    #slide3:checked~#controls label:nth-child(4),
    #slide4:checked~#controls label:nth-child(1),
    #slide1:checked~#controls label:nth-last-child(2),
    #slide2:checked~#controls label:nth-last-child(3),
    #slide3:checked~#controls label:nth-last-child(4),
    #slide4:checked~#controls label:nth-last-child(1) {
        margin: 0;
    } */

    /* Section Languages */
    .language-1 {
        grid-column: 3/5;
    }

    .language-2 {
        grid-column: 5/7;
    }

    /* Section Contacts */
    .sections__contacts .wrapper-1 {
        grid-column: 3/7;
        margin-bottom: 50px;
    }

    .sections__contacts .wrapper-2 {
        grid-column: -2/-8;
    }

    /* Footer */
    footer {
        height: 200px;
    }
}


/* -------------------------------------------------------------------------------- */
/* ! Dispositivi large */
/* -------------------------------------------------------------------------------- */
@media (min-width: 992px) {
    .grid {
        max-width: 1060px;
        margin: 0 auto;
    }

    /* Header */

    .site-nav {
        display: grid;
        grid-column: 1/9;
    }

    .site-nav img {
        width: 75px;
        align-self: center;
    }

    .site-nav .site-nav__menu {
        all: inherit;
        grid-column: 5/8;
    }

    .site-nav__menu a {
        font-size: 22px;
        color: var(--light);
        font-weight: 500;
        margin-right: 10px;
    }

    .site-nav__menu a:hover {
        color: var(--accent);
        font-weight: 500;
    }

    .site-nav__menu a.active {
        border: 10px solid var(--accent);
        border-radius: 50px;
        background-color: var(--accent);
        color: var(--dark);
        font-weight: 500;
    }

    .site-nav__hamburger {
        display: none;
    }

    /* Section Education */
    #education h3 {
        margin-top: 70px;
    }

    .timeline {
        grid-column: 1/9;
        margin: 100px auto;
    }

    .timeline .container {
        width: 50%;
    }

    .timeline::after {
        top: 0;
        left: 262px;

    }

    .text-box {
        font-size: 15px;
    }


    .left-container-arrow,
    .right-container-arrow {
        left: -14px;
    }

    /* Section Contacts */
    .sections__contacts .wrapper-1 {
        grid-column: 1/4;
        margin-bottom: 50px;
    }

    .sections__contacts .wrapper-2 {
        grid-column: 5/9;
    }

    .wrapper-2-title h1 {
        margin-top: 0px;
    }
}