@import url('https://googleapis.com');

/* Base Layout & Reset */
.main-navigation {
     width: 100%;
     background: linear-gradient(to right, #77f, #22a, #227, #000);
     /* Customize background color */
     position: relative;
     z-index: 1000;
}

.navbar {
     display: flex;
     justify-content: space-between;
     align-items: center;
     padding: 15px 20px;
}

.logo a {
     color: #ffffff;
     text-decoration: none;
     font-variant: small-caps;
     text-transform: capitalize;
     font-weight: 400;
     letter-spacing: 0.1cap;
     font-size: 1.3rem;
}

/* Hide the Checkbox Toggler */
#menu-toggle {
     display: none;
}

/* --- Always Visible Hamburger Menu Icon --- */
.hamburger {
     display: flex;
     flex-direction: column;
     justify-content: space-between;
     width: 30px;
     height: 21px;
     cursor: pointer;
     z-index: 1001;
     /* Stays above overlay */
}

.hamburger .bar {
     width: 100%;
     height: 3px;
     background-color: #fff;
     /* Hamburger bars color */
     border-radius: 2px;
     transition: all 0.3s ease;
}

/* --- Navigation Links Overlay / Drawer --- */
.nav-links {
     text-decoration: none;
     /* font-variant: small-caps;
     text-transform: capitalize; */
     text-align: left;
     /* letter-spacing: 0.01em; */
     list-style: none;
     margin: 0;
     padding: 70px 20px 20px 10px;
     /* Space for the top header */
     position: fixed;
     top: 0;
     right: -300px;
     /* Keeps menu hidden off-screen by default */
     width: 300px;
     height: 100vh;
     background-color: rgba(100, 100, 200, 0.3);
     display: flex;
     flex-direction: column;
     gap: 1px;
     transition: right 0.3s ease;
     z-index: 1000;
     overflow-y: auto;
     /* Allow scrolling if links overflow screen height */

     /* Frosted glass blur effect */
     backdrop-filter: blur(15px);
     -webkit-backdrop-filter: blur(15px);
}

.nav-links li a {
     color: #f3f4f6;
     text-decoration: none;
     font-size: 0.9rem;
     display: block;
     padding: 10px;
     transition: color 0.2s ease;
}

.nav-links li a:hover {
     color: #227;
     /* font-weight: 500; */
     background-color: #ffd700;
     padding-left: 12px;
}

.nav-links li a.active {
     color: #ffd700;
     /* font-weight: 500; */
     background-color: rgba(255, 255, 255, 0.05);
     border-left: 4px solid #ffd700;
     padding-left: 12px;
}



/* --- Dark Background Overlay --- */
.menu-overlay {
     position: fixed;
     top: 0;
     left: 0;
     width: 100vw;
     height: 100vh;
     background-color: rgba(0, 0, 0, 0.5);
     opacity: 0;
     visibility: hidden;
     transition: all 0.3s ease;
     z-index: 999;
}

/* --- Pure CSS Toggle Mechanics --- */

/* 1. Slide in the menu when checkbox is checked */
#menu-toggle:checked~.nav-links {
     right: 0;
}

/* 2. Show background overlay when checkbox is checked */
#menu-toggle:checked~.menu-overlay {
     opacity: 1;
     visibility: visible;
}

/* 3. Optional: Transform hamburger bars into an 'X' close icon when open */
#menu-toggle:checked~.hamburger .bar:nth-child(1) {
     transform: translateY(9px) rotate(45deg);
}

#menu-toggle:checked~.hamburger .bar:nth-child(2) {
     opacity: 0;
}

#menu-toggle:checked~.hamburger .bar:nth-child(3) {
     transform: translateY(-9px) rotate(-45deg);
}