/* Base Styles */
.list-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    justify-content: center;
    gap: 20px;
}

.element {
    flex: 1 1 calc(50% - 20px); /* Two projects per row */
    background-color: #f4f4f4;
    padding: 15px;
    border-radius: 8px;
    min-width: 300px;
}

/* Full width for mobile */
@media (max-width: 768px) {
    .element {
        flex: 1 1 100%;
    }
}

/* Centering for desktop only */
@media (min-width: 768px) {
    .list-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        justify-content: center;
        gap: 20px;
    }
    .centered-section {
        max-width: 60%;  /* Adjust the max width as needed */
        margin: auto;     /* Center the section horizontally */
        padding: 10px;    /* Optional padding for breathing room */
        gap: 20px;
    }
}

body {
    font-family: Arial, sans-serif;
    transition: background-color 0.3s, color 0.3s;
    margin: 0;
    padding: 0;
}

header {
    background: #f2e5bc;
    color: #3c3836;
    padding: 20px;
    text-align: center;
}

header a {
    color: #3c3836;
    margin: 0 10px;
    text-decoration: none;
}

header a:hover {
    text-decoration: underline;
}

section {
    padding: 20px;
    margin: 20px;
    background: #f4f4f4;
    border-radius: 8px;
}

h1, h2 {
    margin-bottom: 10px;
}

/* Light Theme */
body.light-theme {
    background-color: #fbf1c7;
    color: #3c3836;
}

body.light-theme header {
    background: #f2e5bc;
    color: #3c3836;
}

body.light-theme section {
    background: #ebdbb2;
    color: #3c3836;
}

/* Dark Theme */
body.dark-theme {
    background-color: #282828;
    color: #ebdbb2;
}

body.dark-theme header {
    background: #3c3836;
    color: #ebdbb2;
}

body.dark-theme section {
    background: #3c3836;
    color: #ebdbb2;
}

#themeToggle {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    background-color: black;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, opacity 0.3s;
}

#themeToggle:hover {
    opacity: 0.7;
}

body.light-theme #themeToggle {
    background-color: black;
    color: white;
}

body.dark-theme #themeToggle {
    background-color: white;
    color: black;
}
body.dark-theme .element {
    background-color: #282828;
    color: #ebdbb2;
}
/* Dark Theme Overrides */
body.dark-theme {
    background-color: #282828;
    color: #ebdbb2;
}

/* Ensure header background and text colors update */
body.dark-theme header {
    background: #3c3836;
    color: #ebdbb2;
}

/* Override navigation links in header */
body.dark-theme header a {
    color: #ebdbb2;
}

/* Override section backgrounds and text */
body.dark-theme section {
    background: #3c3836;
    color: #ebdbb2;
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #3c3836;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.theme-toggle:hover {
    background-color: #ebdbb2;
}

.circle {
    position: fixed;
    width: 30px;
    height: 30px;
    background: #fbf1c7;
    border-radius: 50%;
    transition: transform 0.3s, background 0.3s;
}

/* Move and change the circle when in dark theme */
body.dark-theme .circle {
    transform: translateX(0px);
    background: #282828;
}

/* Responsive Design */
@media (max-width: 1200px) {
    header {
        padding: 15px;
    }
    section {
        margin: 15px;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 10px;
        text-align: left;
    }
    header a {
        display: block;
        margin: 5px 0;
    }
    section {
        margin: 10px;
        padding: 10px;
    }
    h1 {
        font-size: 1.5em;
    }
    h2 {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    header {
        padding: 8px;
        font-size: 0.9em;
    }
    section {
        padding: 8px;
        font-size: 0.9em;
    }
    h1 {
        font-size: 1.2em;
    }
    h2 {
        font-size: 1em;
    }
}
