/* header styles */

header {
    width: 100%;
    height: 70px;
    background-color: var(--header-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3%;
    position: fixed;
    z-index: 999;
}

header.scroll {
    height: 50px;
    border-bottom: 1px solid var(--header-border);
}

header .content {
    width: 100%;
    max-width: 1280px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header .social {
    width: calc(40px * 3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header .social a {
    display: flex;
    align-items: center;
    justify-content: center;
}

header .social img {
    cursor: pointer;
}

/* desktop nav */
header nav {
    height: 40px;
    transition: .2s;
    display: flex;
    align-items: center;
}

header.scroll nav {
    height: 30px;
}

/* theme toggle */
.theme-toggle {
    width: 40px;
    height: 20px;
    background-color: #ccc;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.theme-toggle span {
    position: relative;
    left: -5px;
    display: block;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-color: #eee;
}

html.dark .theme-toggle {
    background-color: #444;
}

html.dark .theme-toggle span {
    background-color: #666;
}

/* languages */
header nav .languages {
    height: 100%;
    display: flex;
    align-items: center;
    margin: 0 20px;
}

header nav .languages > div {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    margin: 0 5px;
    margin-bottom: 2px;
    cursor: pointer;
}

header nav .languages > div:hover a {
    color: var(--languages-color-hover);
}

header nav .languages > div.active a {
    color: var(--languages-color-active);
}

header nav .languages > div a {
    color: var(--languages-color);
    text-decoration: none;
}

/* nav ul */
header nav ul {
    height: 100%;
    display: flex;
}

header nav ul li {
    height: 100%;
    list-style: none;
    margin: 0 5px;
}

header nav ul li a {
    height: 100%;
    padding: 0 10px;
    text-decoration: none;
    color: var(--header-a-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    padding-bottom: 3px;
}

header nav ul li a.active,
header nav ul li a:hover {
    background-color: var(--header-a-active);
}

/* mobile nav */
.menu-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; 
    width: 28px;
    height: 24px;
    cursor: pointer
}

.menu-toggle span {
    position: relative;
    width: 100%;
    height: 3px;
    background-color: var(--menu-toggle-bg);
    transition: .2s;
}

.menu-toggle.active span:nth-child(1) {
    top: 10px;
    transform: rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    top: -11px;
    transform: rotate(-45deg);
}

header nav.mobile {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    height: calc(100dvh - 50px);
    background-color: var(--header-mobile-nav-bg);
    padding-top: 20px;
    position: absolute;
    z-index: 999;
    top: 50px;
    bottom: 0;
    left: 0;
    right: 0;
    transition: none;
}

/* theme toggle */

/* ... */

/* languages */
header nav.mobile .languages {
    height: 40px;
    margin: 0px;
    margin: 20px 0;
}

/* nav ul */
header nav.mobile ul {
    width: auto;
    height: auto;
    flex-direction: column;
    font-size: 18px;
}

header nav.mobile ul li {
    height: 40px;
    margin: 5px 0;
}

/* header responsiveness */

@media only screen and (max-width: 815px) {
    header nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }
}
