:root {
    --bg-color: #f0f0f4;
    --text-color: #2a2a2a;
    --header-bg: #d3d7e2;
    --footer-bg: #d3d7e2;
    --accent-color: #446ebc;
    --button-color: #e09310;
}

body.dark-mode {
    --bg-color: #23232b;
    --text-color: #e5e5e5;
    --header-bg: #1b1b23;
    --footer-bg: #1b1b23;
    --accent-color: #7aa5e4;
    --button-color: #e89e1b;
}

* {
    box-sizing: border-box;
    font-family: inherit;
}

body, html {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    font-family: Consolas, Menlo, Monaco, "Courier New", monospace;
    font-size: 1rem;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

header {
    background-color: var(--header-bg);
    padding: 1rem 0;
    position: relative;
    z-index: 10;
    
}

header .container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    flex-direction: column;
}

.menu-button {
    display: none;
    position: absolute;
    left: 1rem;
    font-size: 1.5rem;
    background: none;
    color: var(--text-color);
    border: none;
    cursor: pointer;
}

.navbar {
    position: absolute;
    display: none;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
    background-color: var(--header-bg);
}

.navbar.open {
    display: flex;
}

.navbar a {
    text-decoration: none;
    color: var(--text-color);
    padding: 0.5rem 1rem;
}

.navbar a:hover {
    text-decoration: overline;
}

.menu-button {
    display: block;
}

#themeToggle {
    position: absolute;
    padding: 0.5rem 1rem;
    right: 1rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-color)
}

#theme-toggle {
    position: absolute;
    right: 1rem;
    top: 1rem;
}

main {
    flex: 1;
}

main .container {
    padding: 1.5rem 1rem;
}


footer {
    background-color: var(--footer-bg);
    margin: 0;
    padding: 1rem 0;
}

footer .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

a:hover {
    color: var(--accent-color)
}

button {
    background-color: var(--button-color);
    color: #2a2a2a;
    border-radius: 6px;
    padding: 8px;
    font-size: 1em;
    border: 1px solid #ccc;
    cursor: pointer;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.field {
    display: flex;
    flex-direction: column;
}

.row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.container {
    max-width: 960px;
    margin: auto;
    padding: 0 1rem;
}

.projects {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-card {
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 8px;
}

@media (min-width: 768px) {
    body {
        font-size: 1.1rem;
    }

    header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .navbar {
        display: flex;
        justify-content: center;
        left: 0;
        right: 0;
        top: 0%;
        flex-direction: row;
        gap: 1rem;
        background: none;
        padding: 1rem;
    }

    .navbar a {
        line-height: 1;
    }

    .menu-button {
        display: none;
    }

    #themeToggle {
        cursor: pointer;

    }

    .row {
        flex-direction: row;
    }

    .row .field {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .projects {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .project-card {
        flex: 1 1 calc(50% - 1rem);
    }
}