/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

header {
    background-image: url("../static/topo.png");
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid #e1e4e8;
    padding: 20px;
    text-align: center;
    min-height: calc(10vh);
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: wrap;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 100px);
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    line-height: 1.2;
}

a {
    color: #0366d6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

p {
    margin-bottom: 1em;
}

/* Menu Styles */
#menu-container {
    position: relative;
    z-index: 1000;

}

.menu-button {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 4px;
    z-index: 1001;
    transition: background-color 0.3s ease;
}

.menu-button:hover {
    background-color: #555;
}

/* Container is always in the layout */
.menu-items {
    position: absolute;
    left: 50px;
    top: 0;
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-evenly;
    width: 90vw;
    flex-wrap: wrap;

    /* start hidden */
    opacity: 0;
    transform: translateX(-200px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.menu-items.open {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* Animate both links and the Projects button */
.menu-items a,
.menu-items button {
    background-color: #333;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    border: none;
    cursor: pointer;

    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.1s ease, transform 0.3s ease;
}

/* When menu is open, fade/slide them in */
.menu-items.open a,
.menu-items.open button {
    opacity: 1;
    transform: translateX(5px);
}

/* Waterfall effect on top-level items */
.menu-items.open > *:nth-child(1) { transition-delay: 0.05s; }
.menu-items.open > *:nth-child(2) { transition-delay: 0.1s; }
.menu-items.open > *:nth-child(3) { transition-delay: 0.15s; }
.menu-items.open > *:nth-child(4) { transition-delay: 0.2s; }
.menu-items.open > *:nth-child(5) { transition-delay: 0.25s; }
.menu-items.open > *:nth-child(6) { transition-delay: 0.3s; }

.menu-items a:hover {
    background-color: #555;
}

/* Footer */
footer {
    background-color: #f6f8fa;
    border-top: 1px solid #e1e4e8;
    padding: 20px;
    text-align: center;
    color: #666;
    margin-top: 40px;
}

/* Content Layout */
#content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

#content > div:first-child {
    flex: 1;
}

#content > div:last-child {
    flex: 0 0 300px;
}

#content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    #content {
        flex-direction: column;
    }

    #content > div:last-child {
        flex: 1;
    }

    #menu-container {
        top: 10px;
        left: 10px;
    }

    main {
        padding: 10px;
    }
}
