* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #A38A3C #1D2E28;
    -webkit-user-select: none;
}

img {
    -webkit-user-drag: none;
    pointer-events: none;   
}

body {
    margin: 0;
    padding: 0;
    background-color: #1D2E28;
    font-family: 'Montserrat', sans-serif;
    color: white;

}

header {
    background-color: rgba(29, 46, 40, 0.95);
    padding: 25px 5%;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(163, 138, 60, 0.25);
}

.container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
}

nav {
    display: flex;
    flex-direction: row;
    gap: 50px;
    align-items: center;
    justify-content: center;
}

nav a {
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    letter-spacing: 1.5px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #A38A3C;
}

#home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 5% 60px;
    position: relative;
}

#home::before {
    content: "";
    position: absolute;
    top: -60px;
    right: -60px;
    width: 320px;
    height: 320px;
    border: 2px solid #A38A3C;
    border-radius: 50%;
    pointer-events: none;
}

.main-h1 {
    font-weight: 800;
    letter-spacing: 2px;
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    color: white;
    line-height: 1.1;
    text-transform: uppercase;
}

#about {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-logo {
    max-width: 760px;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.card-about {

    width: 100%;
    background-color: #15231E;
    border: 2px solid #A38A3C;
    border-radius: 10px;
    padding: 50px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 50px;
}

#about h1 {
    font-size: 2.5rem;
    margin: 0 0 15px 0;
    letter-spacing: 2px;
    color: #FFFFFF;
}

#about hr {
    border: none;
    height: 2px;
    background-color: #A38A3C;
    margin: 25px 0;
    width: 100%;
}

#about p {

    font-size: 1.15rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}


.container-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 100px;

    width: 100%;
    margin: 40px auto;
    padding: 0 5%;
}

.card {
    background-color: #15231E;
    border-radius: 10px;
    border: 1px solid #A38A3C;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, background-color 0.3s ease;
    width: 110%;
}

.project-link {
    background-color: transparent;
    border: 2px solid #A38A3C;
    border-radius: 6px;
    text-decoration: none;
    color: #A38A3C;
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    padding: 12px 20px;
    margin-top: 25px;
    width: 100%;
    text-align: center;
    display: block;
}

.home-nav {
    font-size: 2rem;
}

footer {
    text-align: center;
}

.project-link:hover {
    background-color: #253B33;
    transform: translateY(-1px);
    color: #bcc1bf;
}

.card:hover {
    background-color: #253B33;
    transform: translateY(-5px);
}

#projects h1 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
}

#skills {
    margin-top: 200px;
    background-color: #15231E;
    margin-bottom: 100px;
    border: #A38A3C dotted 2px;
    border-radius: 10px;
}


.container-skills {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
    margin: 0px 20px 70px 20px;

}

#skills h1 {
    margin: 40px auto;
    text-align: center;
    font-size: 2.5rem;
}

.card2 {
    border: #A38A3C dotted 2px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 12px;

}

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #1D2E28;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-logo {
    width: 70px;
    height: auto;
    z-index: 2;
}

.spinner {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 3px solid rgba(163, 138, 60, 0.2);
    border-top: 3px solid #A38A3C;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


#loader.hidden {
    opacity: 0;
    visibility: hidden;
}


.card2 img {
    height: auto;
    width: 70px;
    align-items: center;
    padding-top: 12px;
}

.card2:hover {
    background-color: #253B33;
    transform: translateY(-1px);
    color: #bcc1bf;
}

#contact {
    margin: 100px auto;
    border: #A38A3C solid 2px;
    border-radius: 10px;
}

#contact {
    padding: 80px 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.text-contact {
    text-align: center;
    margin-bottom: 30px;
}

.container-contact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    justify-content: center;
    justify-items: center;
}

.card3 {
    background-color: #15231E;
    border: 2px solid #A38A3C;
    border-radius: 10px;
    padding: 20px;
    width: 130px;
    height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.card3 a {
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 100%;
    justify-content: center;
}

.card3:hover {
    background-color: #253B33;
    transform: translateY(-5px);
}

.card3:hover a {
    color: #A38A3C;
}

.card3 img {
    height: 45px;
    width: 45px;
}


@media (max-width: 768px) {
    header {
        padding: 15px 5%;
    }

    .container {
        flex-direction: column;
        gap: 15px;
        display: flex;
        text-align: center;
    }

    nav {
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }

    nav a {
        font-size: 0.85rem;
    }

    #home {
        justify-content: center;
        text-align: center;
        padding-top: 140px;
    }

    #home::before {
        width: 200px;
        height: 200px;
        top: -40px;
        right: -40px;
    }

    .card-about {
        padding: 30px 20px;
    }

    #about p {
        font-size: 1rem;
    }

    .container-cards {
        grid-template-columns: repeat(1, 1fr);
        gap: 2px;
    }

    #about {
        padding: 80px 5% 40px;
        margin-bottom: 50px;
    }

    .card-about {
        flex-direction: column;
        padding: 30px 20px;
        gap: 25px;
        text-align: center;
    }

    .about-logo {
        max-width: 300px;
    }

    #about h1 {
        font-size: 2rem;
    }

    #about p {
        font-size: 1rem;
    }

    .card {
        width: 100%;
        max-width: 1100px;
        display: flex;
    }

    .container-skills {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-bottom: 20px;
        margin: 0px 20px 70px 20px;
    }

    .card2 p {
        text-align: center;
    }

    .card2 img {
        padding-top: 12px;
    }


}