.navbar{
    padding: 1em;
    width: 100%;
    height: auto;
}

.navbar ul{
    list-style: none;
    display: flex;
    justify-content: center;
    gap: .5em;
    font-size: clamp(1rem, 3vw, 1.2rem);
    flex-wrap: wrap;
    padding: .2em;
}

.navbar a{
    display: inline-block;
    width: 7.5rem;
    text-align: center;
    color: red;
    background-color: black;
    padding: 0.5em;
    border: 2px solid black;
    border-radius: 1em;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color 0.5s ease, color 0.5s ease, border 0.5s ease;
}

/* .navbar a:active {
    background-color: grey;

} */

.navbar a:hover{
    background-color: transparent;
    color: black;
}



/* Hamburger button (initially hidden) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5em;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2;
    padding: 0;
    position: absolute;
    top: .1em;
    right: 1em;
  }

/* Backdrop for fade effect */
#menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

/* Show when active */
#menu-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.fake-button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.5rem;
    color: red;
    background-color: black;
    border: black solid 2px;
    border-radius: .5em;
}

.fake-button:hover{
    display: flex;
    justify-content: center;
    text-align: center;
    background-color: transparent;
    color: black;
    transition-duration: 0.15s;
    border: black solid 2px;
    border-radius: .5em;
    word-wrap: normal;
}

.socials-container{
    display: flex;
    gap: .5em;
    list-style: none;
    justify-content: center;
    height: 5em;
}

.socials-container a{
    display: flex;
    flex-direction: column;
    align-items: center;
    color: black;
    font-size: 0.9em;
    text-align: center;
    padding: .5em;
    border: black 2px solid;
    border-radius: 1em;

}

.socials-container span {
    display: none;
}

.socials-container a:hover span {
    display: block;
}

.alink{
    display: inline-block;
    color: black;
    padding: .4rem;
    line-height: 1;
    transition: background-color 0.3s ease;
    border-radius: .5em;
}

.alink span{
    white-space: nowrap;
}

.alink:hover{
    color: white;
    background-color: rgba(40, 40, 40, .3);
}

.alink i:hover{
    background-color: transparent;
}

.portfolio article img{
    object-fit: cover;
    max-height: 200px;
}

@media(max-width: 37rem){
    .alink:hover{
        background-color: transparent;
    }
}

@media (max-width: 67rem) {
    .navbar {
        flex-direction: column;
        position: relative;
        z-index: 3;
    }

    .hamburger {
        display: flex;
    }

    .navbar ul {
        flex-direction: column;
        align-items: center;
        border-radius: 1em;
        gap: 0.5em;
        position: absolute;
        top: 100%;
        right: 0;
        margin-right: 1em;
        transform: translateY(-20px);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.5s ease, opacity 0.5s ease;
    }

    .navbar ul.show {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .navbar a {
        color: red;
        border: none;
        text-align: center;
        max-width: clamp(7rem, 4vw, 12.6rem);
    }

    .navbar a:hover {
        background-color: black;
        color: white;
    }

    /* Prevent background scroll */
    body.menu-open {
        overflow: hidden;
        padding-right: var(--scrollbar-compensation, 0px);
        position: fixed;
    }
}/* End Media query */