:root {
    --navbar-height: 70px; 
}

section {
    scroll-margin-top: var(--navbar-height);
}

/* Main navbar styles */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    height: var(--navbar-height);
    background: var(--background-color);
    color: var(--text-color);
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0 2rem;
    transition: all 0.3s ease;
    opacity: 1;
}

body.initial-load .navbar {
    opacity: 1;
    pointer-events: auto;
}

.nav-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0.5rem 1rem;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-buttons-container {
    display: flex;
    position: relative;
    gap: 8px;
    align-items: center;
    margin-left: 1rem;
}

.theme-toggle-container {
    margin-left: auto;
}

input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

input[type="radio"]:checked + .button {
    opacity: 1;
}

.button {
    position: relative;
    border: none;
    background: transparent;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    color: var(--text-color);
    opacity: 0.7;
}

.button::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

input[type="radio"]:checked + .button {
    opacity: 1;
    box-shadow: 0 0 15px var(--primary-color);
}

input[type="radio"]:checked + .button::after {
    transform: scaleX(1);
}

.button:hover {
    opacity: 1;
}

/* Theme toggle specific styles */
.theme-toggle-container .button {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Light mode styles */
body:not(.dark-mode) .button {
    box-shadow: none;
    background: transparent;
}

body:not(.dark-mode) input[type="radio"]:checked + .button {
    box-shadow: 0 0 15px var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

body:not(.dark-mode) .button:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Dark mode styles */
body.dark-mode .button {
    box-shadow: 0px 0px 20px -5px rgba(255, 255, 255, 0.2);
}

body.dark-mode .button .shadow {
    background: rgba(0, 0, 0, 0.3);
}

body.dark-mode .button .edge {
    background: linear-gradient(
        to left,
        #000000 0%,
        #1a1a1a 8%,
        #1a1a1a 92%,
        #000000 100%
    );
}

body.dark-mode .button .front {
    background: #2a2a2a;
    color: #ffffff;
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 0.1),
        inset -2px -2px 4px rgba(0, 0, 0, 0.5);
}

.button .shadow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    will-change: transform;
    transform: translateY(2px);
    transition: transform 600ms cubic-bezier(.3, .7, .4, 1);
}

.button .edge {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

.button .front {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    will-change: transform;
    transform: translateY(-4px);
    transition: transform 600ms cubic-bezier(.3, .7, .4, 1);
}

.theme-toggle-container .front i {
    font-size: 0.9rem;
}

/* Hover effects */
.button:hover {
    opacity: 1;
}

.button:hover .front {
    transform: translateY(-6px);
    transition: transform 250ms cubic-bezier(.3, .7, .4, 1.5);
}

.button:active .front {
    transform: translateY(-2px);
    transition: transform 34ms;
}

.button:hover .shadow {
    transform: translateY(4px);
    transition: transform 250ms cubic-bezier(.3, .7, .4, 1.5);
}

.button:active .shadow {
    transform: translateY(1px);
    transition: transform 34ms;
}

/* Glowing line effect */
.nav-buttons-container .line,
.theme-toggle-container .line {
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    opacity: 0.2;
}

body:not(.dark-mode) .line {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 0, 0, 0.5),
        transparent
    );
}

body.dark-mode .line {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.5),
        transparent
    );
}

/* Pop animation */
@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

input[type="radio"]:checked + .button {
    opacity: 1;
    animation: pop 0.3s cubic-bezier(.3, .7, .4, 1.5);
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0.5rem 1rem;
        justify-content: center;
    }
    
    .nav-buttons-container .button {
        width: 80px;
        height: 32px;
    }
    
    .theme-toggle-container .button {
        width: 32px;
        height: 32px;
    }
    
    .button .front {
        font-size: 0.8rem;
    }
}

/* Navbar styling */
.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: black;
    font-weight: 500;
    transition: var(--transition);
}

/* Dark mode styles */
body.dark-mode .navbar {
    background: var(--background-color);
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

/* Dark mode: Navbar link text color */
body.dark-mode .nav-links a {
    color: white; 
}

/* Light mode: Active link */
.nav-links a.active {
    color: var(--primary-color); 
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Dark mode: Active link */
body.dark-mode .nav-links a.active {
    color: var(--primary-color); 
}

body.dark-mode .nav-links a:hover {
    color: var(--primary-color);
}

/* Theme Toggle Button */
.theme-toggle {
    width: 60px;
    height: 30px;
    border-radius: 15px;
    border: 2px solid var(--text-color);
    background: transparent;
    cursor: pointer;
    position: relative;
    overflow: visible;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 1000;
}

.theme-toggle .moon {
    position: absolute;
    width: 16px;
    height: 16px;
    fill: var(--text-color);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* test */
@keyframes testGlow {
    0% { background-color: red; }
    100% { background-color: blue; }
}

.theme-toggle.active {
    animation: testGlow 1.5s ease-in-out;
}

/* Glow effect, will change later prolly */
@keyframes spiralGlowLight {
    0% {
        box-shadow: 
            5px 0 15px rgba(0, 0, 0, 0.7),
            -5px 0 15px rgba(0, 0, 0, 0.7);
    }
    25% {
        box-shadow: 
            0 5px 15px rgba(0, 0, 0, 0.7),
            0 -5px 15px rgba(0, 0, 0, 0.7);
    }
    50% {
        box-shadow: 
            -5px 0 15px rgba(0, 0, 0, 0.7),
            5px 0 15px rgba(0, 0, 0, 0.7);
    }
    75% {
        box-shadow: 
            0 -5px 15px rgba(0, 0, 0, 0.7),
            0 5px 15px rgba(0, 0, 0, 0.7);
    }
    100% {
        box-shadow: 
            5px 0 15px rgba(0, 0, 0, 0.7),
            -5px 0 15px rgba(0, 0, 0, 0.7);
    }
}

@keyframes spiralGlowDark {
    0% {
        box-shadow: 
            5px 0 15px rgba(255, 255, 255, 0.7),
            -5px 0 15px rgba(255, 255, 255, 0.7);
    }
    25% {
        box-shadow: 
            0 5px 15px rgba(255, 255, 255, 0.7),
            0 -5px 15px rgba(255, 255, 255, 0.7);
    }
    50% {
        box-shadow: 
            -5px 0 15px rgba(255, 255, 255, 0.7),
            5px 0 15px rgba(255, 255, 255, 0.7);
    }
    75% {
        box-shadow: 
            0 -5px 15px rgba(255, 255, 255, 0.7),
            0 5px 15px rgba(255, 255, 255, 0.7);
    }
    100% {
        box-shadow: 
            5px 0 15px rgba(255, 255, 255, 0.7),
            -5px 0 15px rgba(255, 255, 255, 0.7);
    }
}

/* based on theme */
body:not(.dark-mode) .theme-toggle.active {
    animation: spiralGlowLight 1s ease-in-out;
}

body.dark-mode .theme-toggle.active {
    animation: spiralGlowDark 1s ease-in-out;
}

body.dark-mode .theme-toggle {
    border-color: white;
}

body.dark-mode .theme-toggle .moon {
    fill: white;
}

body:not(.dark-mode) .theme-toggle .moon {
    fill: black;
}

/* Mobile Navigation when I get there */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.cursor-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--text-color);
    background: transparent;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cursor-toggle i {
    font-size: 1.2rem;
    color: var(--text-color);
}

.cursor-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    background: var(--background-color);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 5px;
    min-width: 150px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cursor-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: none;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.cursor-option i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

