@import url(../root.css);

header {
    width: 100%;
    height: 0;
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    background: transparent;
}

.nav-container {
    width: 100%;
    height: var(--nav-height);
    background-color: transparent;
}

.nav-expand {
    width: 100%;
    height: var(--nav-height);
    margin-top: calc(var(--nav-height) * -1);
    position: fixed;
    z-index: 1;
    background-color: transparent;
}

nav {
    height: var(--nav-height);
    padding: 1em;
    margin: var(--nav-height) var(--nav-height) 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: margin-top .3s ease-in-out 0s;
}

#nav-logo > svg {
    width: 2em;
    height: 2em;
    display: inline;
    transition: width, height 200ms ease-in-out 0s;
}

#nav-logo > svg .fill {
    fill: var(--text-color);
}

#nav-links {
    height: 100%;
    display: inline;
    list-style: none;
}

.nav-link .active {
    color: var(--primary-color);
}

.nav-link {
    display: inline;
}

.nav-link a {
    padding: 10px;
    margin-left: 10.8em;
    text-decoration: none;
    position: relative;
    color: var(--text-color);
    font-size: 0.7em;
    font-weight: 700;
    line-height: 174.69%;
    letter-spacing: 0.055em;
    transition: color 200ms ease-in-out 0s;
}

#social-links {
    display: flex;
    justify-content: center;
    flex-direction: column;
    position: fixed;
    z-index: 100;
    transform: translate(100%, -50%);
    top: 50%;
    left: calc(100% - 3em);
    list-style: none;
}

.social-link {
    display: flex;
    justify-content: center;
    margin: 0.5em 0;
}

.social-link .icon {
    vertical-align: middle;
}

.social-link svg {
    width: 15px;
    height: 15px;
    fill: var(--text-color);
    transition: fill 200ms ease-in-out 0ms;
}

.social-link a:hover svg {
    fill: gray;
}

#burger-menu {
    position: absolute;
    margin-top: -22px;
    right: calc(var(--nav-height) + 5px);
    cursor: pointer;
    transition: margin-top 200ms ease-out 0ms;
}

#burger-menu .bar {
    fill: var(--text-color);
    transition: transform 300ms ease, opacity 200ms ease;
    transform-origin: center;
}

/* Theme button */

#theme-button-container {
    width: 15px;
    height: 15px;
    right: 10px;
}

#theme-button-container #theme-button {
    background: transparent;
    border: none;
}

#theme-button-container {
    margin-bottom: 43px;
}

#theme-button .light-mode {
    margin-left: -3px;
}

#theme-button .dark-mode {
    margin-left: 1px;
}

#theme-button-container #theme-button .light-mode:hover,
#theme-button-container #theme-button .dark-mode:hover {
    color: var(--primary-color);
    cursor: pointer;
}

#theme-button .light-mode, #theme-button .dark-mode {
    color: var(--text-color);
}

body #theme-button-container #theme-button .light-mode,
body.dark-mode #theme-button-container #theme-button .light-mode {
    display: inline-block;
}

body.dark-mode #theme-button-container #theme-button .dark-mode,
body #theme-button-container #theme-button .light-mode {
    display: none;
}

/* Resume button */

#resume-button-container {
    width: 150px;
    height: 150px;
    position: fixed;
    right: 0;
    bottom: 0;
}

#resume-button {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    margin-bottom: 20px;
    padding: 7px;
    position: fixed;
    z-index: 100;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--primary-color);
    border-radius: 50%;
    transition: background-color 0.4s ease-in-out;
}

#resume-button img {
    width: 100%;
    height: 100%;
}

#resume-button:hover {
    background-color: var(--primary-color);
    cursor: pointer;
}

#resume-tooltip {
    position: fixed;
    z-index: 100;
    bottom: var(--nav-height);
    right: var(--nav-height);
    list-style: none;
    width: 100px;
    height: 100px;
    visibility: hidden;
    opacity: 0;
    transition: opacity .3s ease-in-out;
}

#tooltip-bubble {
    width: 100px;
    height: 100px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--light-color) !important;
    border-radius: 5px;
    border: 2px solid var(--border-color);
    background-color: var(--primary-color);
}

#tooltip-tail {
    width: 0;
    height: 0;
    margin-right: -12px;
    position: absolute;
    right: 0;
    bottom: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 40px solid var(--primary-color);
}

#resume-button:hover + #resume-tooltip {
    visibility: visible;
    opacity: 100;
}

/* ================ Media Queries =====================*/

@media screen and (max-width: 896px) {
    #nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        background-color: var(--bg-color);
        max-height: 0;
        overflow: hidden;
        transition: max-height 400ms cubic-bezier(0.4, 0, 0.2, 1),
                    padding 400ms cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 99;
    }

    #nav-links.open {
        max-height: 100dvh;
        padding: calc(var(--nav-height) * 2 + 16px) 0 2em;
    }

    .nav-link {
        width: 100%;
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 250ms ease, transform 250ms ease;
    }

    #nav-links.open .nav-link {
        opacity: 1;
        transform: translateY(0);
    }

    #nav-links.open .nav-link:nth-child(1) { transition-delay: 80ms; }
    #nav-links.open .nav-link:nth-child(2) { transition-delay: 140ms; }
    #nav-links.open .nav-link:nth-child(3) { transition-delay: 200ms; }
    #nav-links.open .nav-link:nth-child(4) { transition-delay: 260ms; }

    .nav-link a {
        display: block;
        margin-left: 0;
        padding: 1em 2em;
        font-size: 1.1em;
        text-align: center;
        border-bottom: 1px solid color-mix(in srgb, var(--text-color) 10%, transparent);
        transition: color 200ms ease, background-color 200ms ease;
    }

    .nav-link a:active,
    .nav-link a:hover {
        color: var(--secondary-color);
        background-color: color-mix(in srgb, var(--secondary-color) 8%, transparent);
    }

    .nav-link:last-child a {
        border-bottom: none;
    }

    #social-links {
        position: fixed;
        bottom: 2.5em;
        left: 50%;
        top: auto;
        flex-direction: row;
        transform: translateX(-50%);
        gap: 1.5em;
        opacity: 0;
        visibility: hidden;
        transition: opacity 300ms ease 0ms, visibility 300ms ease 0ms;
        z-index: 100;
    }

    body.menu-open #social-links {
        opacity: 1;
        visibility: visible;
        transition-delay: 300ms;
    }

    .social-link svg {
        width: 20px;
        height: 20px;
    }

    .social-link a:active svg,
    .social-link a:hover svg {
        fill: var(--secondary-color);
    }

    #burger-menu {
        z-index: 101;
    }

    nav {
        z-index: 101;
    }
}

/* Desktop hover for nav links */
@media (hover: hover) {
    .nav-link a:hover {
        color: var(--secondary-color);
    }
}

@media screen and (min-width: 897px) {
    #burger-menu {
        display: none;
    }
}
