*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.5;
    /* border: 1px solid red; */
}

body,
html {
    height: auto;
}

body {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background: #121212;
}

body::before {
    content: '';
    background-image: linear-gradient(155deg, #334857, #000000, #173F73);
    position: absolute;
    inset: 0;
    z-index: -1;
    --s: 300px;
    /* control the size */
    --c1: #1d1d1d;
    --c2: #4e4f51;
    --c3: #3c3c3c;

    background:
        repeating-conic-gradient(from 30deg, #0000 0 120deg, var(--c3) 0 180deg) calc(.5*var(--s)) calc(.5*var(--s)*0.577),
        repeating-conic-gradient(from 30deg, var(--c1) 0 60deg, var(--c2) 0 120deg, var(--c3) 0 180deg);
    background-size: var(--s) calc(var(--s)*0.577);
    /* 0.577 = tan(30deg)*/
}

.content {
    flex: 1 0 auto;
}

section {
    margin: 0;
    padding: 0;
    padding-block: 5rem;
    min-width: 100%;
    min-height: 100vh;
    margin-bottom: 150px;
    transition: all 1s;

}

section p {
    max-width: 65ch;
}

#about {
    position: relative;
}

#about::after {
    content: '';
    background-image: linear-gradient(90deg, rgb(23, 63, 115) 60%, #334857);
    position: absolute;
    inset: 0;
    transform: skewY(-10deg);
    z-index: -1;
}

#about::before {
    content: '';
    background-image: linear-gradient(135deg, #334857, #000000, #173F73);
    position: absolute;
    inset: 0;
    transform: skewY(10deg);
    z-index: -1;
}

#projects {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin-inline: auto;
    padding: 3rem;
}

#projects .projects-card {
    width: 48%;
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #212121;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 15px 15px 30px rgb(25, 25, 25),
        -15px -15px 30px rgb(60, 60, 60);
    --moz-box-shadow: 15px 15px 30px rgb(25, 25, 25),
        -15px -15px 30px rgb(60, 60, 60);
    --webkit-box-shadow: 15px 15px 30px rgb(25, 25, 25),
        -15px -15px 30px rgb(60, 60, 60);
}

.projects-card .card-text {
    margin-top: .5rem;
    display: flex;
    flex-direction: column;
    border: 1px solid white;
    padding: .3rem;
    border-radius: 5px;
}

.projects-card .card-text div {
    margin-block: 1.5rem;
}

.projects-card img {
    max-width: 100%;
    aspect-ratio: attr(200) / attr(auto);
    max-height: fit-content;
    border-radius: 20px;
    float: left;
    margin-right: 1.5rem;
}

#contact {
    position: relative;
}

#contact::before {
    content: '';
    background-image: linear-gradient(155deg, #334857, #000000, #173F73);
    position: absolute;
    inset: 0;
    z-index: -1;
    --mask:
        conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top/98.00px 51% repeat-x,
        conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom/98.00px 51% repeat-x;
    -webkit-mask: var(--mask);
    mask: var(--mask);
    /* transform: skewY(-10deg); */
}

#landingBtn {
    transform: translate(0%, -300%);
    position: relative;
    animation: landingBtn 1s ease infinite alternate;
    transition: all .5s ease-in;
    border-radius: 40px;
}

.footer {
    flex-shrink: 0;
    background-image: linear-gradient(135deg, #334857, #000000, #173F73);
    text-align: center;
    margin: 0;
}

.footer-socials {
    font-size: 1.7em;
}

.footer-socials a {
    color: white;
}

.navbar {
    background-image: linear-gradient(135deg, #334857, #000000, #173F73);
    backdrop-filter: blur(9.8px);
    -webkit-backdrop-filter: blur(9.8px);
}

.btnTop {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    bottom: 81px;
    right: 10px;
    width: 50px;
    height: 50px;
    background: rgb(23, 63, 115);
    text-decoration: none;
    z-index: 999;
}

.btnTop::after {
    content: "↑";
    font-size: 32px;
    font-weight: bold;
    color: aliceblue;
    transition: margin-top 250ms;
}

.btnTop:hover::after {
    margin-top: -8px;
}


.contact input {
    background-color: #121212;
    border-color: white;
}

.contact input:focus {
    background-color: #121212;
}

#landing hr {
    width: 80%;
    margin: 0 auto;
}

.btn-hover {
    color: white;
}

.btn-hover:hover {
    background-color: rgb(17, 41, 73) !important;
}

.title-hr hr {
    width: 40%;
    margin-left: auto;
}

.tec-hr hr {
    width: 60%;
}

.tec-i {
    font-size: 3rem !important;
}

@media screen and (max-width: 768px) {
    section {
        scroll-margin-top: 225px;
    }

    #landing {
        display: flex;
        justify-content: center;
    }

    #projects {
        padding: 0 !important;

    }

    #projects .projects-card {
        width: 100% !important;
        margin-bottom: 2.5rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        background-color: #212121;
        padding: 1rem;
        border-radius: 20px;
        box-shadow: 15px 15px 30px rgb(25, 25, 25),
            -15px -15px 30px rgb(60, 60, 60);
    }

    .projects-card img {
        margin-right: 0;

    }

}

/* @media screen and (max-width: 992px) {
    section {
        scroll-margin-top: 225px;
    }

    #landing {
        display: flex;
        justify-content: center;
    }

    #projects {
        padding: 0;

    }

    #projects .projects-card {
        width: 49% !important;
        margin-bottom: 2.5rem;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between;
        background-color: #212121;
        padding: 1rem;
        border-radius: 20px;
        box-shadow: 15px 15px 30px rgb(25, 25, 25),
            -15px -15px 30px rgb(60, 60, 60);
    }

    .projects-card img {
        margin-right: 0;

    }

} */

@media screen and (max-width: 1200px) {
    section {
        scroll-margin-top: 225px;
    }

    #projects {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        max-width: 1200px;
        margin-inline: auto;
        padding: 3rem;
    }
    
    #projects .projects-card {
        width: 48%;
        margin-bottom: 2.5rem;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
        align-items: center;
        background: #212121;
        padding: 1.5rem;
        border-radius: 20px;
        box-shadow: 15px 15px 30px rgb(25, 25, 25),
            -15px -15px 30px rgb(60, 60, 60);
        --moz-box-shadow: 15px 15px 30px rgb(25, 25, 25),
            -15px -15px 30px rgb(60, 60, 60);
        --webkit-box-shadow: 15px 15px 30px rgb(25, 25, 25),
            -15px -15px 30px rgb(60, 60, 60);
    }
    
    .projects-card .card-text {
        margin-top: .5rem;
        display: flex;
        flex-direction: column;
        border: 1px solid white;
        padding: .3rem;
        border-radius: 5px;
    }
    
    .projects-card .card-text div {
        margin-block: 1.5rem;
    }
    
    .projects-card img {
        max-width: 80%;
        aspect-ratio: attr(200) / attr(auto);
        max-height: fit-content;
        border-radius: 20px;
        float: left;
        margin-right: 1.5rem;
    }

}

@keyframes landingBtn {
    from {
        top: 48%;
    }

    to {
        top: 52%;
    }
}