/* Base styles */
* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    display: grid;
    line-height: 1.6;
    background-color: #f9f9f9;
    color: #333;
    grid-template-columns: 1fr max-width;
}

.darkMode {
    background-color: black;
    color: rgb(141, 129, 129);
}
#navbar.darkNav{
    background-color: #f9f9f9;
    color: #333;
}

.nav-link.darkLink{
    /* background-color: #f9f9f9; */
    color: #333;
}

code.darkCode{
    background-color: #202a42;
    color: #9fb1d1;
}
/* makes lightbulb glow when in dark mode */
@keyframes pulse {
    0% {
        text-shadow: 0 0 1px white;
    }

    25% {
        text-shadow: 0 0 16px white;
    }

    50% {
        text-shadow: 0 0 31px white;
    }

    75% {
        text-shadow: 0 0 16px white;
    }

    100% {
        text-shadow: 0 0 1px white;
    }
}

.pulse-glow {
    animation: pulse 0.5s ease-in-out;
}

#theme-toggle {
    color: #cac6be;

    font-size: 1.6rem;
}

/* Navbar styles */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background-color: #0f172a;
    color: white;
    padding: 1rem;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

#navbar header {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.nav-link {
    display: block;
    color: white;
    text-decoration: none;
    margin: 0.5rem 0;
    padding: 0.3rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease-in-out;
}

.nav-link:hover {
    border-left: 3px solid #38bdf8;
    background-color: #1e293b;
}

.nav-link.darkLink:hover{
    background-color: #e2e8f0;
}

.active {
    border-left: 3px solid #38bdf8;
    background-color: #1e293b;
    scroll-behavior: smooth;
    font-weight: bold;
    border-bottom: 2px solid #f39c12;
}

.nav-link.darkLink.active{
    background-color: #dde6f8;
}

/* Main doc styles */
#main-doc {
    margin-left: 280px;
    padding: 2rem;
    max-width: 800px;
    padding-bottom: 400px;
    /*added this so that the last section can be highlighted while scrolling*/
}

header {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

code {
    display: block;
    background-color: #e2e8f0;
    padding: 0.5rem;
    border-left: 4px solid #38bdf8;
    font-family: 'Courier New', monospace;
    margin: 1rem 0;
    overflow-x: auto;
}

ul {
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

.footer {
    text-align: center;
    background-color: #0f172a;
    color: #f1f5f9;
    padding: 1.5rem 1rem;
    font-size: 0.9rem;
    margin-top: 4rem;
    border-top: 1px solid #1e293b;
}

.footer a {
    color: #38bdf8;
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.2s ease-in-out;
}

.footer a:hover {
    color: #7dd3fc;
}

/* Media query for responsiveness */
@media (max-width: 550px) {
    #navbar {
        position: static;
        width: 100%;
        height: auto;
        box-shadow: none;
        display: grid;
        grid-template-rows: repeat(8, 1fr);
        text-align: center;
    }

    #main-doc {
        margin-left: 0;
        padding: 1rem;
    }

    .nav-link {
        display: inline-block;
        margin-right: 1rem;
    }

}

