* { margin: 0; padding: 0; box-sizing: border-box; }

body { font-family: sans-serif; }

.header {
    position: relative;
    min-height: 100vh;
}

main {
    margin-left: 60px; /* Offset for menu width */
    padding: 20px;
}

/* Hide checkbox off-screen */
#menu-btn {
    position: absolute;
    top: -100%;
    left: -100%;
}

/* Hamburger icon */
.menu-icon {
    position: fixed;
    top: 15px;
    left: 15px;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Give it a white background */
.menu-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: white;
    border-radius: 4px;
    z-index: -1;
}

.navicon {
    background: #333;
    display: block;
    height: 2px;
    width: 20px;
    position: relative;
}

.navicon:before,
.navicon:after {
    background: #333;
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    transition: all 0.3s ease-out;
}

.navicon:before { top: 6px; }
.navicon:after { top: -6px; }

/* Menu dropdown */
.menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 70px; /* Below hamburger */
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    border-radius: 4px;       /* Optional: slight rounding */
    background-color: white;
    z-index: 1000;
}

.nav-item {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.nav-item:hover { background: #f5f5f5; }

/* Toggle states */
.menu-btn:checked ~ .menu-icon .navicon {
    background: transparent;
}

.menu-btn:checked ~ .menu-icon .navicon:before {
    transform: rotate(45deg);
    top: 0;
}

.menu-btn:checked ~ .menu-icon .navicon:after {
    transform: rotate(-45deg);
    top: 0;
}

.menu-btn:checked ~ .menu {
    transform: translateX(0);
}
