body {
    margin: 0;
}

#logo {
    height: 20px;
    width: auto;
}

#top-nav {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background-color: white;
    box-shadow: 1px 0 3px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid #666;
    z-index: 3;
    width: 100%;
    position: fixed;
    top: 0;
}

#left-top-nav {
    display: flex;
}

#left-top-nav a {
    color: black;
    text-decoration: none;
}

.project-name {
    font-family: franklin-gothic-urw, "Franklin Gothic Book", sans-serif;
    font-weight: 500;
    font-size: 18px;
    white-space: nowrap;
}

#nav-links {
    display: flex;
    align-items: center;
    transition: height ease-in 200ms;
    gap: 30px;
}

#nav-links a,
#candidates-toggle {
    font-family: sofia-pro, "Sofia Pro", sans-serif;
    font-size: 16px;
    /* font-weight: 700; */
    color: black;
    text-decoration: none;
}

#nav-links a:hover,
#candidates-toggle:hover {
    color: #f15a24;
    transition: color 0.2s;
}

#menu-icon {
    display: none;
    cursor: pointer;
    font-weight: 900;
    border: 0;
    padding: 0;
    color: inherit;
    background: transparent;
}

#nav-links a {
    display: block;
}

#top-nav.expand #nav-links {
    height: auto;
    padding: 0.75rem 0;
}

article {
    padding-top: 20px;
}

.fas {
    font-family: 'Font Awesome 5 Free', serif;
}

@media screen and (max-width: 600px) {
    #top-nav {
        display: grid;
        grid-template-columns: 1% 99%;
        justify-items: center;
        margin-left: auto;
        margin-right: auto;
        padding: .25rem;
    }

    #menu-icon {
        display: block;
        justify-self: start;
        font-size: 1.25rem;
        padding: .25rem .75rem;
    }

    #logo {
        height: 30px;
        justify-self: center;
    }

    .project-name {
        display: none;
    }
    
    #nav-links {
        grid-area:  2 / 1 / 3 / 3;
        height: 0;
        overflow: hidden;
        flex-basis: 100%;
        flex-direction: column;
        gap: 10px;
        justify-content: center;
        transition: height ease-in 200ms, padding ease-in 200ms;
    }
}
.nav-dropdown {
    position: relative;
}

#candidates-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

#nav-links a:focus-visible,
#candidates-toggle:focus-visible {
    outline: 2px solid #f15a24;
    outline-offset: 3px;
}

#candidates-toggle[aria-expanded="true"] .dropdown-chevron {
    transform: rotate(180deg);
}

#candidates-menu[hidden] {
    display: none;
}

#candidates-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(340px, calc(100vw - 32px));
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    box-shadow: 0 6px 20px rgb(0 0 0 / 15%);
}

#candidates-menu a {
    padding: 8px 12px;
    line-height: 1.35;
}

#candidates-menu a:hover,
#candidates-menu a:focus-visible {
    background: #f7f3f1;
}

@media screen and (max-width: 600px) {
    #top-nav.expand #nav-links {
        max-height: calc(100dvh - 48px);
        overflow-y: auto;
        justify-content: flex-start;
        width: 100%;
        box-sizing: border-box;
    }

    .nav-dropdown {
        max-width: 100%;
        text-align: center;
    }

    #candidates-menu {
        position: static;
        margin-top: 10px;
        max-height: none;
        box-sizing: border-box;
        text-align: left;
        box-shadow: none;
    }
}
