.menu-toggle {
    display: none;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
    transform-origin: center;
}



#navBar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px; /* helps wrapping gracefully */
    padding: 12px 16px;
    width: 100%;

    backdrop-filter: blur(30px);
    background-color: rgba(44, 44, 44, 0.5);

    flex: 0 0 auto;
}

#logo {
    font-family: "Advent Pro", system-ui;
    font-weight: 700;

    font-size: 40px;
    color: #fff;
    padding: 0 8px;
    line-height: 1;
    white-space: nowrap; /* keep the brand on one line */
    transition: transform 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
}

#navBarList {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 2vw, 18px);
    flex-wrap: wrap;
    min-width: 0;
}

#navBarList .navBarListItem {
  color: #fff;
  font-size: 18px;
  padding: 6px 14px;
  line-height: 1.2;
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.075, 0.82, 0.165, 1),
              text-shadow 0.3s ease,
              color 0.3s ease;
}

.navBarListItem:hover {
    transform: translateY(-3px);
}

#active {
    font-weight: 800;
    text-shadow: 0px 0px 6px #fff;
}

@media screen and (max-width: 500px) {
    .hamburger-menu {
        display: flex;
    }

    #navBarList {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(44, 44, 44, 0.8);
        backdrop-filter: blur(12px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 80px 30px 30px 30px;
        gap: 0;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
        z-index: 999;
    }

    #navBarList li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    #navBarList li:last-child {
        border-bottom: none;
    }

    .navBarListItem {
        display: block;
        width: 100%;
        padding: 16px 12px !important;
        font-size: 18px !important;
        transition: all 0.3s ease;
    }

    .navBarListItem:hover {
        transform: translateX(5px);
        background: rgba(255, 255, 255, 0.1);
    }

    #logo {
        font-size: 32px;
    }

    /* Hamburger animation when menu is checked */
    .menu-toggle:checked + .hamburger-menu .hamburger-line:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .menu-toggle:checked + .hamburger-menu .hamburger-line:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }

    .menu-toggle:checked + .hamburger-menu .hamburger-line:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Show menu when checkbox is checked */
    .menu-toggle:checked ~ #navBarList {
        right: 0;
    }

    /* Show overlay when menu is open */
    .menu-toggle:checked ~ .menu-overlay {
        display: block;
    }

    /* Prevent body scroll when menu is open */
    .menu-toggle:checked ~ #navBarList ~ #appContainer {
        pointer-events: none;
        user-select: none;
    }
}