/* style.css (Final Working Version) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

:root {
    --background-color: #0d0d0d;
    --text-color: #e9e9e9;
    --accent-color: #888;
    --border-color: #2a2a2a;
    --content-width: 850px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

header {
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 90%;
    z-index: 100;
    background-color: transparent;
}

header .artist-name {
    font-size: 2.0rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-color);
}

/* DESKTOP: Nav links are inside the header */
#main-nav nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 400;
}

/* DESKTOP: Hide the mobile menu button */
#menu-toggle {
    display: none;
}


main {
    padding: 4rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 8rem;
}

main.fullscreen-portfolio {
    max-width: none;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
}

.artwork-promo {
    aspect-ratio: 16 / 9;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    text-decoration: none;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.artwork-promo.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.artwork-promo img {
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    transition: transform 8.6s ease-in-out;
}

.artwork-promo:hover img {
    transform: scale(1.05);
}

.artwork-promo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
}

.artwork-promo-title-line {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
    padding-left: 5%;
    padding-right: 5%;
}

.artwork-promo h3, .artwork-promo .artwork-subtitle {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.artwork-promo h3 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.artwork-promo-title-line p {
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
}

.artwork-subtitle {
    font-size: 1.1rem;
    color: var(--accent-color);
    font-style: italic;
    margin: 0.5rem 0 0 0;
    max-width: 80%;
    position: relative;
    z-index: 2;
    padding-left: 5%;
    padding-right: 5%;
    padding-bottom: 2.5rem;
}


/* === Artwork Detail Pages Section === */
.artwork-container {
    max-width: var(--content-width);
    margin: 0 auto;
}

/* MODIFICATION: New rule to style meta information */
.artwork-meta,
.artwork-description > p:has(> strong) {
    font-size: 0.8rem;
    color: var(--accent-color);
}

.artwork-header h1 { font-size: 2.5rem; font-weight: 600; margin-bottom: 0.5rem; line-height: 1.2; }
.artwork-header .year { font-size: 1rem; color: var(--accent-color); margin-bottom: 2rem; }
.artwork-description { font-size: 1.1rem; margin-bottom: 3rem; }
.artwork-meta { border-bottom: 1px solid var(--border-color); margin-bottom: 4.5rem; padding-bottom: 2.5rem; }
.artwork-meta p { margin-bottom: 1.5rem; }
.artwork-meta p:last-child { margin-bottom: 0; }
.artwork-description p { margin-bottom: 1.5rem; }
.artwork-media, .video-container { margin-bottom: 2rem; }
.artwork-media img, .artwork-media video { width: 100%; height: auto; display: block; }
.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.artwork-credits { margin: 0; padding: 0; border: none; font-size: 1.0rem; color: inherit; }
.artwork-credits p { margin: 0; }


/* --- Other Pages (Bio, Contact, Events) --- */
.text-page-container { max-width: var(--content-width); margin: 0 auto; }
.text-page-container h1 { font-size: 2.5rem; margin-bottom: 2rem; }
.text-page-container p, .text-page-container ul { font-size: 1.1rem; margin-bottom: 1.5rem; }
.text-page-container a { color: var(--text-color); }
.event-list { list-style: none; padding: 0; }
.event-list li { padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); }
.event-list li:last-child { border-bottom: none; }
.event-date { display: block; color: var(--accent-color); margin-bottom: 0.25rem; }
.bio-layout-container { display: flex; gap: 3rem; align-items: flex-start; }
.bio-text { flex: 1.5; }
.bio-image { flex: 1; }
.bio-image img { width: 100%; height: auto; }

/* === Lightbox Styles === */
.artwork-media img { cursor: pointer; transition: opacity 0.2s ease-in-out; }
.artwork-media img:hover { opacity: 0.85; }
#lightbox-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); z-index: 2000; padding: 20px; box-sizing: border-box; display: none;  justify-content: center; align-items: center; }
#lightbox-overlay.visible { display: flex; }
#lightbox-image { max-width: 95%; max-height: 95%; object-fit: contain; box-shadow: 0 0 35px rgba(0,0,0,0.5); }
#close-lightbox { position: absolute; top: 20px; right: 30px; font-size: 45px; color: white; cursor: pointer; font-weight: bold; line-height: 1; }
#close-lightbox:hover { color: #ccc; }


/* === START: Mobile View and Navigation Styles (max-width: 768px) === */
@media (max-width: 768px) {
    .bio-layout-container { flex-direction: column; gap: 2rem; }
    
    /* --- Mobile Header & Navigation --- */
    header {
        background-color: rgba(13, 13, 13, 0.8);
        backdrop-filter: blur(5px);
    }
    
    /* MOBILE: Hide the nav container by default */
    #main-nav {
        display: none;
    }

    /* MOBILE: Show the menu button */
    #menu-toggle {
        display: block;
        background: transparent;
        border: none;
        padding: 0;
        color: var(--text-color);
        font-size: 1.1rem;
        text-decoration: underline;
        text-underline-offset: 3px;
        cursor: pointer;
        z-index: 1001; /* Above the menu overlay */
    }

    /* MOBILE: This is the magic. When .show is added, the nav becomes a fixed overlay */
    #main-nav.show {
      display: flex;
      flex-direction: column;
      align-items: center;
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background-color: rgba(0, 0, 0, 0.8);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      padding-top: 6rem;
      z-index: 1000;
    }
    
    /* MOBILE: Show the navigation links inside the overlay */
    #main-nav.show nav {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    /* MOBILE: Style the links inside the overlay */
    #main-nav.show nav a {
        margin: 0;
        padding: 1.5rem 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
        font-size: 1.5rem;
    }

    /* --- Mobile Index Page Artwork Styles --- */
    main.fullscreen-portfolio { padding-top: 5rem; }
    .artwork-promo h3 { font-size: 1.6rem; }
    .artwork-subtitle { display: none; }

    /* MODIFICATION: Fix for multi-line artwork titles */
    .artwork-promo-title-line {
        display: block; /* Disable flex to allow text wrapping */
    }
    .artwork-promo-title-line h3 {
        display: inline; /* Make title and year flow like text */
        margin-right: 0.75rem; /* Recreate the gap */
    }
    .artwork-promo-title-line p {
        display: inline;
    }
}