/* Define Color Variables */
:root {
    /*--background-color: #E5DDDC;*/
    /*--background-color: #4B8BBE;*/
    --background-color: white;
    --primary-text-color: #306998;
    --secondary-text-color: #4B8BBE;
    --accent-color: #FFE873;
}

/* General Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif; /* Use a clean sans-serif font */
    color: var(--primary-text-color);
    background-color: var(--background-color);
    line-height: 1.8;
    font-size: 16px;
}

h1 {
    font-size: 3em;
}

h2 {
    font-size: 1.2em;
    margin: 0.5em 0;
}

a {
    color: var(--primary-text-color);
    text-decoration: underline var(--accent-color) dotted 3px;
}

a:hover {
    text-decoration: underline var(--accent-color) solid 3px;
}

.main-container {
    display: flex;
    justify-content: space-between;
}

header {
    flex-direction: column;
    display: flex;
    padding: 1.5em 1em 1.5em 8em;
    position: sticky;
    top: 0;
    width: 50%;
    height: 100vh;
}

main {
    width: 50%;
    padding-left: 0;
    padding-right: 15vw;
}

#logo {
    height: 8em;
}

header nav {
    align-self: start;
}

header nav ul {
    display: flex;
    flex-direction: column;
    list-style: none;
}

header nav ul li a {
    text-decoration: none;
    font-size: 1.3em;
}

header nav ul li a:hover {
    text-decoration: underline var(--accent-color) solid 3px;
}

.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    height: 50vh;
}

.hero h3 {
    font-weight: normal;
    color: var(--secondary-text-color);
}

.button {
    padding: 0.8em 1.5em;
    color: var(--primary-text-color);
    border: 1px solid var(--accent-color);
    background: var(--accent-color);
    font-size: 1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

.button:hover {
    background-color: var(--primary-text-color);
    color: var(--background-color);
    text-decoration: none;
}

section.section {
    padding-top: 2em;
}

.project-card {
    border: 2px solid var(--accent-color);
    padding: 2em;
    border-radius: 8px;
    margin: 1.5em 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.project-card p, .project-card .links {
    padding-top: 1.5em;
}

.project-card .links {
    margin-left: 1em;
}

.project-card .controls {
    margin-top: 1em;
}

.project-card .close-modal, .project-card .extra-info {
    display: none;
}

.project-card.modal .close-modal, .project-card.modal .extra-info {
    display: block;
}

.project-card.modal .controls {
    display: none;
}

#overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
    align-items: center;
    justify-content: center;
}

#overlay.visible {
    display: block;
}

.project-card.modal {
    position: fixed;
    z-index: 1000;
    left: 10vw;
    top: 10vh;
    width: 80vw;
    height: 80vh;
    overflow: auto;
    background-color: var(--background-color);
    margin: auto;
    padding: 2em;
    border-radius: 8px;
}

.project-card.modal:hover {
    transform: none;
    box-shadow: none;
}

.project-card.modal h3 {
    font-size: 2em;
}

.close-modal {
    color: var(--primary-text-color);
    float: right;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--secondary-text-color);
}

/* Footer */
footer {
    padding: 2em;
    text-align: center;
    font-size: 0.9em;
    color: var(--secondary-text-color);
    background-color: var(--background-color);
}

footer p {
    margin-bottom: 0.5em;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #fff;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    body {
        font-size: 12px;
    }

    #logo {
        height: 6em;
    }

    h1 {
        font-size: 2.5em;
    }

    .main-container {
        flex-direction: column;
    }

    header {
        width: 100%;
        padding: 1.5em 1rem;
        position: relative;
        height: auto;
    }

    .hero {
        height: auto;
    }

    header nav {
        display: none;
    }

    main {
        width: 100%;
        padding: 1.5em 1em 0 1em;
    }

    section.section {
        padding-top: 0.5em;
    }

    .project-card:hover {
        transform: none;
        box-shadow: none;
    }

    .project-card.modal {
        left: 1vw;
        top: 1vh;
        width: 98vw;
        height: 98vh;
    }
}
