@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap");
:root {
    --background: #171717;
    --sidebar: #0f0f0f;
    --surface: #1d1d1d;
    --primary: #bb86fc;
    --primary-obf: #bb86fcc4;
    --secondary: #02a68a;
    --glow: #01806a;
    --secondary-obf: #069486;
    --onBackground: #e4e4e4;
    --onSurface: #e7e7e7;
    --onPrimary: #17101d;
    --onSecondary: #000c0a;

    --skills-background: #212121;

    --glassySurface: #1d1d1dde;

    --font: "Roboto", sans-serif;
    --size-1: 35;

    --top-bar-height: 100px;

    --obf-gradient:
        145deg, rgba(187, 134, 252, 0.45) 9%, rgba(29, 29, 29, 0.4) 42%;

    font-family: "Roboto", sans-serif;
}
body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    min-height: 100vh;
    padding-left: 4rem !important;
    padding-right: 0 !important;
}

h2 {
    text-align: center;
}

/*=============>Home<============*/

.home {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    top: var(--header-height);
    height: calc(100% - var(--header-height));
    gap: 4rem;
    height: 100vh;
}

.imageBox {
    display: flex;
    width: 50%;
    height: 100%;
    justify-content: center;
    align-items: center;
}

.textBox {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: var(--onSurface);
    width: calc(50% - 4rem);
    height: 100%;
}

.title {
    background-color: var(--secondary);
    width: 100%;
    line-height: 70px;
    font-size: 60px !important;
    text-align: start;
}

.aboutMe {
    margin: 1rem 2rem;
    margin-right: 0;
    font-size: 40px;
}

.links {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}
.links a {
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 100%;
}

.links > a > img {
    width: 70px;
    height: 70px;
}

.telegram > img {
    background-color: var(--secondary);
    border-radius: 100%;
    border: 3.5px solid var(--secondary);
}

.github > img {
    background-color: var(--secondary);
    border-radius: 100%;
}

.titleMobile {
    display: none;
}

/*=============>Skills<============*/
.skills {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: var(--skills-background);
    padding: 2rem;
    margin-top: 6rem;
}
.skills_container {
    display: grid;
    width: 100%;
    margin-top: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;

    min-height: 30vh;
    justify-items: center;
}

.skills_container canvas {
    width: 100%;
    height: 100%;
}

.skill {
    width: 250px;
    height: 300px;

    background: #1b1b1b;
    background: linear-gradient(
        308deg,
        rgba(27, 27, 27, 1) 25%,
        rgba(24, 24, 24, 1) 75%
    );
    border: 2px solid var(--onSurface);
    border-radius: 12px;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    opacity: 0;
    transform: scale(0.5);
    transition:
        opacity 0.8s ease-out,
        transform 0.8s ease-out;
}

.skills_title {
    color: var(--onSurface);
    font-size: 42px;
    font-weight: bold;
    text-align: center;
}

#kotlin {
    width: 160px;
    height: 160px;
}

#java {
    width: 150px;
    height: 150px;
}

.skill h2 {
    z-index: 2;
    position: absolute;
    top: 70%;
}

.skill video {
    width: 100%;
    height: 100%;
}

.skill:hover {
    animation: shake 3s infinite;
}

/*=============>Project<============*/

#projects_title {
    color: var(--onSurface);
    font-size: 62px !important;
    font-weight: bold;
}

#projects {
    display: flex;
    width: 100%;
    min-height: 80vh;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: var(--background);
    padding: 2rem;
    margin-top: 0rem;
}

.projects_row {
    display: flex;
    margin-top: 4rem;
    flex-direction: row;
    justify-content: center;
    width: 100%;
    gap: 10%;
}

.project {
    min-width: 200px;
    max-width: 250px;
    height: 300px;

    background-color: #1e1e1e;
    border: 2px solid var(--onSurface);
    border-radius: 12px;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    opacity: 0;
    transform: scale(0.5);
    transition:
        opacity 0.8s ease-out,
        transform 0.8s ease-out;
}

.projects_row > .project_desc > p {
    font-size: 32px;
    text-wrap: wrap;
    max-width: 450px;
    color: var(--onSurface);
}

.project > h2 {
    margin: 1rem;
    color: var(--onSurface);
}
.project > p {
    margin: 0;
    text-align: center;
}

.project > img {
    width: 140px;
    height: 140px;
    box-shadow: 0 0 15px 6px black;
}

.reverse {
    flex-direction: row-reverse;
}

/*=============>Footer<============*/

footer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 200px;
    width: 100%;

    background-color: var(--sidebar);
}

.link_section_container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    gap: 5rem;
}

.link_section {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 0;
}
.footer_link {
    text-decoration: none;
    color: var(--text-color);
}
.link_section p {
    margin: 0.25rem;
}
.link_section a {
    margin: 0.25rem;
}

/*=============>Defaults<============*/
.visible {
    opacity: 1;
    transform: scale(1);
}
.invisible {
    opacity: 0;
    transform: scale(0.5);
}
@keyframes appear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shake {
    0% {
        transform: rotate(0deg) translateY(0px);
    }
    10% {
        transform: rotate(3deg) translateY(-5px) translateX(-5px);
    }
    20% {
        box-shadow: 0 0 30px 15px var(--glow);
        transform: rotate(-3deg) translateX(5px);
    }
    25% {
        transform: rotate(0deg) translateY(0px) translateX(0);
    }
    40% {
        box-shadow: 0 0 0 0px var(--glow);
    }
    100% {
        transform: rotate(0deg) translateY(0px) translateX(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(10px);
    }
    100% {
        transform: translateY(-20px); /* Spostamento più piccolo e in px */
    }
}

@media (min-width: 1800px) {
    #projects_title {
    }
    .projects_row > .project_desc > p {
        font-size: 45px;
        text-wrap: wrap;
        max-width: 650px;
        color: var(--onSurface);
    }
    .project {
        min-width: 200px;
        max-width: 250px;
        height: 400px;

        background-color: #1e1e1e;
        border: 2px solid var(--onSurface);
        border-radius: 12px;

        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }
}

@media (max-width: 1500px) {
    .aboutMe {
        font-size: 35px;
    }
}

@media (max-width: 1325px) {
    .aboutMe {
        font-size: 30px;
    }
}

@media (max-width: 965px) {
    .title {
        font-size: 50px !important;
        line-height: 60px;
    }
    .aboutMe {
        font-size: 25px;
    }
}

@media (max-width: 865px) {
    .title {
        font-size: 45px !important;
        line-height: 50px;
    }
    .aboutMe {
        font-size: 25px;
    }
}

@media screen and (max-width: 470px) {
    .home {
        gap: 10px;
    }
    .title {
        z-index: 3;
        text-align: center;
        padding: 0 0rem;
    }

    .textBox {
        width: 80%;
    }

    .aboutMe {
        margin: 0;
        font-size: 20;
        max-height: 70%;
    }

    .project > img {
        height: 120px;
        width: 120px;
        box-shadow: 0 0 15px 6px black;
    }

    .projects_row > .project_desc > p {
        font-size: 18px;
        text-wrap: wrap;
        max-width: 450px;
    }
}

@media screen and (max-width: 768px) {
    body {
        padding: 0 !important;
    }
}

@media screen and (max-width: 730px) {
    #paper {
        left: 50% !important;
        top: 25% !important;
    }

    .title {
        display: none;
    }
    .titleMobile {
        font-size: 45px !important;
        line-height: 50px;
        background-color: var(--secondary);
        width: 100%;
        text-align: center;
        display: block;
    }

    .textBox {
        width: 80%;
    }

    .imageBox {
        position: relative;
        top: 2rem;
        min-height: 50%;
        width: 80%;
    }
    .home {
        display: flex;
        flex-direction: column-reverse;
        height: auto;
    }

    .skills {
        padding: 2rem 0;
    }
    .projects_row > .project_desc > p {
        font-size: 24px;
        text-wrap: wrap;
        max-width: 450px;
    }
}
@media screen and (max-width: 390px) {
    .projects {
        padding: 2rem 1rem !important;
    }
    .project {
        min-width: 150px;
    }
    .projects_row > .project_desc > p {
        font-size: 16px;
        text-wrap: wrap;
        max-width: 450px;
    }
}
