/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #FDF6E3;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
header {    
    background-color: #FDF6E3;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: auto; /* Let content define height */
    padding: 1.6rem 1.2rem 0.6rem;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    width: 100%;
    max-width: 720px;
    margin-left: 1rem;
    margin-top: 0;
}

header h1 {
    font-weight: 900;
    font-size: clamp(3.2rem, 8vw, 4.8rem);
    line-height: 0.9;
}

.header-subtext {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.portfolio-label {
    font-size: clamp(0.8rem, 1.4vw, 1rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #666;
}

.role {
    font-size: clamp(0.8rem, 1.4vw, 1rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #555;
}

/* Menu Box */
.menu-box {
    margin-top: 1.2rem;
    width: 100%;
    align-self: flex-start;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
    padding: 0.5rem;
}

.menu-content {
    display: block;
}

.menu-box ul {
    display: flex;
    justify-content: space-between;
    list-style: none;
    border: 2px solid #333;
    padding: 0.6rem 0.9rem;
    border-radius: 4px;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.menu-box li {
    padding: 0.3rem 0.6rem;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-box a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    text-transform: lowercase;
    font-size: clamp(0.72rem, 1.5vw, 0.9rem);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.menu-box li:hover {
    background-color: rgba(51, 51, 51, 0.1);
}

.menu-box a:hover {
    color: #000;
}

.menu-box li.active {
    background-color: #333;
}

.menu-box li.active a {
    color: #FDF6E3;
}

/* Main Content */
main {
    flex-grow: 1;
}

/* Music link section (used on multiple pages) */
.music-link-section {
    padding: 0.6rem 1.2rem 1.4rem;
    background-color: #FDF6E3;
}

.music-link-container {
    max-width: 720px;
    margin: 0.5rem auto 0;
    display: flex;
    justify-content: flex-start;
}

.music-link-subtle {
    font-size: clamp(0.8rem, 1.2vw, 0.95rem);
    color: #555;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.music-link-subtle:hover {
    color: #222;
}

/* Footer */
footer {
    text-align: center;
    padding: 0.6rem;
    background-color: #FDF6E3;
    width: 100%;
}

/* Media Queries for Shared Elements */
@media (max-width: 768px) {
    header {
        padding: 1.1rem 1rem 0.4rem;
        min-height: auto;
    }

    /* Adjust header for pages without subtext (e.g., experience.html) */
    header.no-subtext {
        min-height: 15vh; /* Reduced height since there's no subtext */
        padding: 0.8rem; /* Slightly reduced padding */
    }

    /* Adjust h1 size for pages without subtext */
    header.no-subtext h1 {
        font-size: clamp(3rem, 10vw, 4.5rem); /* Slightly smaller than default */
    }

    header h1 {
        font-size: clamp(3rem, 10vw, 5rem);
    }

    .portfolio-label, .role {
        font-size: clamp(0.8rem, 1.5vw, 1rem);
    }

    /* Show hamburger and make menu collapsible */
    .hamburger {
        display: block;
    }

    .menu-content {
        display: none;
    }

    .menu-content.active {
        display: block;
    }

    .menu-box ul {
        display: flex;
        flex-direction: column;
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .menu-box li {
        padding: 0.5rem;
        text-align: center;
    }
    
    .menu-box a {
        font-size: 1rem;
    }

    /* Adjust menu-box for pages without subtext */
    header.no-subtext .menu-box {
        margin-top: 0.6rem; /* Reduced margin since there's no subtext */
    }
}

@media (max-width: 600px) {
    .menu-box ul {
        display: flex;
        flex-direction: column;
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .menu-box li {
        padding: 0.5rem;
    }
    
    .menu-box a {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.9rem 0.8rem 0.3rem;
        min-height: auto;
    }

    /* Adjust header for pages without subtext */
    header.no-subtext {
        min-height: 12vh;
        padding: 0.5rem;
    }

    /* Adjust h1 size for pages without subtext */
    header.no-subtext h1 {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

    header h1 {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }

    .portfolio-label, .role {
        font-size: 0.9rem;
    }

    .menu-box {
        margin-top: 1rem;
        width: 100%;
    }

    /* Adjust menu-box for pages without subtext */
    header.no-subtext .menu-box {
        margin-top: 0.5rem;
    }

    .menu-box ul {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .menu-box li {
        padding: 0.5rem;
        text-align: center;
        width: 100%;
    }

    .menu-box a {
        font-size: 1rem;
        display: block;
    }

    footer {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}