/* --- 1. Base Styles --- */
body, html {
    margin: 0;
    padding: 0;
    background-color: #f6c944;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #000;
}

/* --- 2. Header & Nav --- */
.site-header { 
    padding: 19px 4vw 0 4vw; 
    width: 100%; 
    box-sizing: border-box; 
}

.header-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: baseline;
}

.header-title a { 
    font-family: 'Instrument Serif', serif; 
    font-size: 25px; 
    font-weight: 400; 
    color: #000; 
    text-decoration: none; 
    transition: opacity 0.3s ease;
    letter-spacing: -0.02em;
}

.header-title a:hover { opacity: 0.7; }

.header-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 2.5vw;
    justify-content: flex-end;
    min-width: 40px; /* Ensures the container doesn't collapse to 0 */
}

.header-nav-desktop { display: flex; gap: 2.5vw; }

.header-nav-item a { 
    font-family: 'Newsreader', serif; 
    font-size: 16px; 
    color: #000; 
    text-decoration: none; 
    transition: opacity 0.3s ease;
}

.header-nav-item a:hover { opacity: 0.6; }

.header-nav-item a[aria-current="page"] { 
    border-bottom: 1px solid #000; 
    padding-bottom: 2px; 
}

.header-burger {
    display: none; /* Hidden on desktop */
    width: 30px;
    height: 30px;
    cursor: pointer;
    position: relative;
    z-index: 1001;
}

.burger-box {
    width: 100%;
    height: 100%;
    position: relative;
}

.burger-inner, 
.burger-inner::before, 
.burger-inner::after {
    width: 24px;
    height: 2px;
    background-color: #000000; /* Ensure this is a visible color */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
}

.burger-inner {
    top: 50%;
    transform: translate(-50%, -50%);
}

.burger-inner::before {
    content: "";
    top: -8px; /* Gap between top and middle line */
}

.burger-inner::after {
    content: "";
    top: 8px; /* Gap between bottom and middle line */
}

/* When clicked, hide the middle line */
#burger-menu.active .burger-inner {
    background-color: transparent;
}

/* Turn top and bottom lines into an X */
#burger-menu.active .burger-inner::before {
    transform: translateY(8px) rotate(45deg);
}

#burger-menu.active .burger-inner::after {
    transform: translateY(-8px) rotate(-45deg);
}

@media screen and (max-width: 1024px) {
    .header-nav-desktop {
        display: none !important;
    }
    .header-burger {
        display: block !important; /* Force visibility */
    }
}

/* --- 3. Hero Section --- */
.hero-section { 
    padding: 40px 4vw 80px 4vw;
    width: 100%; 
    box-sizing: border-box; 
}

.hero-text { 
    font-family: 'Instrument Serif', serif; 
    font-size: clamp(70px, 10vw, 148px); 
    font-weight: 400; 
    line-height: 1; 
    letter-spacing: -0.02em; 
    margin: 0; 
}

.hero-text .second-line {
    letter-spacing: .007em;
    display: inline-block;
    width: 100%;
}

/* --- 4. Divider --- */
.full-width-divider { width: 100%; }
.hairline { border: 0; border-top: 1px solid #000; width: 100%; margin: 0; }

/* --- 5. Bio Section --- */
.bio-section { 
    padding: 10px 4vw 40px 4vw;
    width: 100%; 
    box-sizing: border-box; 
}

.bio-container {
    display: flex;
    flex-direction: row;  /* Keeps them side-by-side on desktop */
    align-items: center;  /* This vertically centers the image against the text column */
    gap: 0px;            /* Adjust based on your preferred spacing */
    padding: 80px 0 30px 0;      
    width: 100%;
}

.bio-text-column { 
    flex: 0 0 570px; 
}

.bio-image-column { 
    flex: 1; 
    display: flex;
    justify-content: center;
    margin: 0;
}

.bio-large { 
    font-family: 'Instrument Serif', serif; 
    font-size: 2.4rem; 
    line-height: 1.12; 
    font-weight: 400;
    margin-bottom: 2.5rem; 
    letter-spacing: -0.025em; 
}

.bio-small { 
    font-family: 'Newsreader', serif; 
    font-size: 1.05rem; 
    line-height: 1.55; 
}

.bio-small p { margin-bottom: 1.2rem; }

.image-cropper { 
    width: 420px; 
    aspect-ratio: 1 / 1.15; 
    overflow: hidden; 
    background-color: #1a1a1a; 
}

.bio-image { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- 6. Unified Footer (Finalized Source of Truth) --- */
.site-footer { 
    padding: 80px 4vw 140px 4vw; 
    box-sizing: border-box; 
    width: 100%;
}

.footer-container { 
    display: flex; 
    justify-content: flex-start; 
    align-items: flex-start; 
}

.footer-content-left { 
    flex: 0 0 570px; 
}

.footer-heading { 
    font-family: 'Instrument Serif', serif; 
    font-size: clamp(50px, 7vw, 90px); 
    font-weight: 400;
    line-height: 1.1; 
    letter-spacing: -0.01em; 
    margin: 0 0 1.8rem 0; 
    white-space: nowrap; 
}

.footer-subtext { 
    font-family: 'Instrument Serif', serif; 
    font-size: 2rem; 
    line-height: 1.2; 
    margin: 0;
}

.footer-contact-right { 
    display: flex; 
    flex-direction: column; 
    gap: 35px; 
    padding-top: 12px; 
    margin-left: 30%; 
    flex: 0 1 420px; 
    align-items: flex-start; 
}

.contact-group { display: flex; flex-direction: column; gap: 4px; }

.contact-label { 
    font-family: 'Instrument Serif', serif; 
    font-size: 1.1rem; 
}

.contact-detail-link { 
    font-family: 'Instrument Serif', serif; 
    font-size: 1.7rem; 
    color: #000; 
    text-decoration: none; 
    line-height: 1.1; 
    letter-spacing: -0.02em; 
    transition: opacity 0.3s ease;
}

.contact-detail-link:hover { opacity: 0.6; }

.social-icons-wrapper { 
    display: flex; 
    gap: 28px; 
    margin-top: 12px; 
}

.social-icon-img { 
    width: 30px; 
    height: auto; 
    filter: brightness(0); 
    transition: opacity 0.3s ease; 
}

.social-icon-img:hover { opacity: 0.5;
}

/* --- 7. Music Page Layout Styles (Strict 4-Column Grid) --- */

.project-grid-wrapper {
    display: grid;
    /* This tells the grid: "Fit as many 220px columns as you can, but never less than 1fr" */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 60px 30px; /* Slightly tighter gap for better mobile fit */
    padding: 110px 4vw 15px 4vw;
    margin: 0 auto;
    max-width: 1200px;
    justify-items: center; 
}

.project-stack-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%; 
    /* This ensures the stack doesn't vanish if the screen is tiny */
    max-width: 220px;
}

.project-poster-wrapper {
    height: 32vh;
    aspect-ratio: 2 / 3;
    background-color: #1a1a1a;
    margin-bottom: 12px;
}

.project-poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.track-name-middle {
    font-family: 'Newsreader', serif;
    font-size: 1.1rem;
    font-style: italic;
    opacity: 0.8;
    margin: 4 0 12px 0;
    line-height: 1.2;
    /* Prevents long names from stretching the container wider than the image */
    max-width: 100%; 
    font-weight: 300;
}

/* --- Custom Player Styles --- */

.custom-player-pill {
    display: flex !important;
    width: 100% !important; /* Matches image width because of min-content above */
    height: 32px;
    background-color: #d9b13c;
    border-radius: 30px;
    align-items: center;
    padding: 0 12px;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
    -webkit-tap-highlight-color: transparent; /* Removes the default mobile tap box */
    margin-top: auto;
}

.custom-player-pill:hover {
    background-color: #c9a12c;
}

.play-btn {
    background: none;
    border: none;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    margin-right: 10px;
    display: flex;
    align-items: center;
    color: #000;
    flex-shrink: 0;
}

.progress-container {
    flex-grow: 1;
    height: 3px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    cursor: pointer; /* Changes the mouse to a hand when hovering over the bar */
}

.progress-container:hover {
    background: rgba(0, 0, 0, 0.3); /* Darkens the track slightly on hover */
}

.progress-container:hover .progress-bar {
    background: #222; /* Makes the moving bar look "active" */
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: #000;
    border-radius: 2px;
}

.grid-bottom-spacer {
    grid-column: 1 / -1; /* Tells the line to span across all 4 columns */
    border: 0;
    border-top: 1px solid #000;
    width: 100%;
    margin: 80px 0 0 0;
}

/* The hidden menu state */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f6c944; /* Matches your site background */
    z-index: 1000; /* Just below the burger icon */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-in-out;
}

/* The visible menu state */
.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Style the links inside the mobile menu */
.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 30px;
    text-align: center;
}

.mobile-nav-links a {
    font-family: 'Instrument Serif', serif;
    font-size: 42px;
    text-decoration: none;
    color: #000;
}

/* --- 8. Mobile Responsiveness (Optimized) --- */
@media screen and (max-width: 1024px) {

    /* 1. Scale down the Site Title for mobile */
    .header-title a {
        font-size: 22px; /* Reduced from 38px */
    }

    /* 2. Scale down the Desktop Nav Items (if they are visible before the burger kicks in) */
    .header-nav-item a {
        font-size: 15px; /* Reduced from 19px */
    }

    /* 1. Tighten the Grid for smaller screens */
    .project-grid-wrapper {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 60px 30px;
        padding: 110px 4vw 0 4vw;
        margin: 0 auto;
        max-width: 1200px;
        justify-items: center;
    }

    /* 2. Scale the Hero Text so it doesn't overwhelm the phone */
    .hero-text {
        font-size: clamp(42px, 12vw, 80px);
        line-height: 1.0;
        letter-spacing: -0.02em;
    }

    /* 3. Make the Player Pill slightly taller for "Fat Fingers" */
    .custom-player-pill {
        height: 40px; /* Increased from 32px for better touch accuracy */
        padding: 0 15px;
    }

    .bio-section {
        padding: 10px 4vw 40px 4vw;
    }

    .bio-container {
        flex-direction: column; /* Stacks text and image */
        gap: 0px;
        padding: 80px 0 60px 0;
    }

    .bio-text-column, 
    .bio-image-column {
        width: 100%;
    }

    .footer-container {
        flex-direction: column;
        gap: 0px;
    }

    /* 4. Ensure the poster doesn't take up the WHOLE height of a phone */
    .project-poster-wrapper {
        height: 40vh; /* Adjusts the scale for vertical mobile screens */
    }

    /* 5. Footer Adjustments */
    
    .site-footer {
        padding: 60px 4vw 80px 4vw;
    }

    .footer-heading {
        font-size: 42px;
        white-space: normal;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .footer-content-left {
        flex: none !important;
        width: 100%;
    }

    .footer-contact-right {
        margin-left: 0 !important;
        gap: 20px;
        padding-top: 20px;
        flex: none !important;
    }
}