/* =====================
   FONT IMPORTS & FONTS
   ===================== */
@import url('https://fonts.googleapis.com/css2?family=Mulish:wght@200;300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700;800;900&display=swap');

body {
    font-family: "Mulish", sans-serif;
}

#menu-works h1 {
    font-family: "Rubik", sans-serif;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 0.07em;
}

#menu-works span {
    font-size: 16px;
}

#menu-works a {
    font-family: "Mulish", sans-serif;
    font-weight: 400;
}

.work-item.active .works-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.05em;
    font-family: "Mulish", sans-serif;
    text-transform: uppercase;
}

.work-item.active .work-details {
    font-size: 14px;
    font-family: "Mulish", sans-serif;
    line-height: 1.6;
    font-weight: 400;
}

.work-item.active .work-excerpt {
    font-size: 14px;
    font-style: italic;
    font-family: "Mulish", sans-serif;
    line-height: 1.6;
    font-weight: 400;
}

.works-title {
    font-family: 'Rubik', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.05em;
}

.works-title-container {
    /* If you want to add font rules here, do so */
}

.work-title-text {
    /* If you want to add font rules here, do so */
}

.work-year {
    /* If you want to add font rules here, do so */
}
/* =====================
   END FONT SECTION
   ===================== */

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

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    background-color: #f8f8f8;
    color: #1c1b1b;
    overflow-x: hidden;
}

/* Black overlay */
#black-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    z-index: 5;
    opacity: 1;
    display: block;
    transition: opacity 1s ease;
}

/* Featured image and TV static */
#featured-image-container,
#tv-static {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 0;
    backface-visibility: hidden;
}

#featured-image-container a,
#featured-image-container .featured {
    position: fixed;
    z-index: 2;
    pointer-events: auto;
}

#featured-image-container .featured {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    object-position: center;
    margin: 0;
    padding: 0;
    transition: none !important;
    transform: none !important;
}

#tv-static video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: 1;
    backface-visibility: hidden;
}

/* Menu styling for works */
#menu-works {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 3;
   
}

#menu-works h1 {
    color: #1c1b1b;
    font-size: 21px;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    margin-bottom: -20px;
    padding-left: 2.2px;
    font-family: "mulish", sans-serif;
    letter-spacing: 0.07em;
}

#menu-works span {
    font-size: 16px;
}

#menu-works a {
    text-decoration: none;
    color: #1c1b1b;
    padding: 0 1px;
    font-weight: 400;
    font-family: "Mulish", sans-serif;
}

/* Titles and work items */
.archive-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.work-list {
    flex: none;
    width: 40%;
    height: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    padding-top: 20px;
    padding-left: 5vw;
    padding-right: 5vw;
    overflow-y: auto; /* Make it scrollable */
    padding-bottom: 20px;
}

.work-item-wrapper {
    margin-bottom: 10px;
}

.work-item {
    display: none;
    opacity: 0;
    padding: 15px;
    background: rgba(248, 248, 248, 0.7);
    position: relative;
    width: 100%;
    z-index: 2;
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 10px;
}

.work-item:hover {
    opacity: 0.0;
    background: rgba(248, 248, 248, 0.8);
}

.work-item.active {
    display: block;
    opacity: 1;
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    transform: none;
    z-index: 9999;
    background: rgba(248, 248, 248, 0.9);
}

.work-item.active .works-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
    margin-top: 10px;
    letter-spacing: 0.05em;
    font-family: "Mulish", sans-serif;
    text-transform: uppercase;
}

.work-item.active .work-details {
    font-size: 14px;
    margin-top: 0px;
    font-family: "Mulish", sans-serif;
    line-height: 1.6;
    font-weight: 400;
}

.work-item.active .work-excerpt {
    font-size: 14px;
    margin-top: 3px;
    font-style: italic;
    font-family: "Mulish", sans-serif;
    line-height: 1.6;
    font-weight: 400;
}

.works-title {
    font-family: 'Rubik', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0;
    padding: 0;
    line-height: 1.4;
    letter-spacing: 0.05em;
    color: #000;
}

.work-title-text {
    color: #000;
    margin-right: 0.2em; /* Add small space after title */
}

.work-year {
    color: #000;
}

.work-item:hover .works-title {
    color: #666;
}

/* Work Cover Image */
.work-cover-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100vh;
    overflow: hidden;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#main-image-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 50vw;
    height: 70vh;
    transform: translateY(15vh);
    display: flex;
    justify-content: center;
    align-items: center;
}

#active-cover-container {
    position: absolute;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,255,0,0.1) !important;
      min-width: 100vw !important;
      min-height: 100vh !important;
      overflow: visible !important;
}

#active-cover-image {
    position: absolute;
    max-width: 100%;
    max-height: 70vh;
    padding-right: 50px;
    transform: scale(1);
    opacity: 0;
    transition: transform 0.1s ease;
    backface-visibility: hidden;
}

#active-cover-image.show {
    opacity: 1;
    transform: scale(1);
    /* transition: all 0.2s ease-in-out; */
}

/* Preview containers */
.preview-container {
    position: absolute;
    display: flex;
    width: 50vw;
    justify-content: center;
    align-items: center;
    gap: 20px;
    pointer-events: auto;
    z-index: 9999;
    transition: opacity 0.5s ease;
    background: rgba(248, 248, 248, 0.1);
    padding: 10px;
}

.preview-image {
    width: 60px;
    height: 60px;

    object-fit: contain;
    box-sizing: border-box;
    cursor: pointer;
    opacity: 0.7;
    border: 2px solid rgba(248, 248, 248, 0.3);
    display: block;
}

.preview-image:hover {
    /* transform: scale(1.1); */  /* Commented out for JS control */
    opacity: 1;
    border-color: rgba(248, 248, 248, 0.8);
}

#top-preview-container {
    top: 20px;
    right: 0;
    padding-right: 50px;
}

#bottom-preview-container {
    bottom: 20px;
    right: 0;
    padding-right: 50px;
}

/* Preview grid */
.preview-grid {
    position: absolute;
    width: 50vw;
    z-index: 9999;
    right: 0;
}

.preview-grid:first-child {
    top: 0;
}

.preview-grid:last-child {
    bottom: 0;
}

/* Animating images that move between preview and main */
.animating-image {
    /* position: absolute; */ /* JS sets position: fixed for clones */
    z-index: 10000;
    /* transition: all 0.5s cubic-bezier(0.4,0,0.2,1); */ /* JS sets transition for clones */
    will-change: transform, opacity, top, left, width, height;
    object-fit: contain;
    max-width: 100%;
    max-height: 80vh;
    padding-right: 50px;
    backface-visibility: hidden;
    transform-origin: center;
}

/* Initial states for images coming from previews */
.animating-image.from-top {
    top: 20px;
    right: 25vw;
    width: 60px;
    height: 60px;
    opacity: 0.7;
    transform: scale(0.5);
}

.animating-image.from-bottom {
    bottom: 20px;
    right: 25vw;
    width: 60px;
    height: 60px;
    opacity: 0.7;
    transform: scale(0.5);
}

/* Final states for images becoming main */
.animating-image.animate-in {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    opacity: 1;
    padding-right: 50px;
}

/* Final states for images going to previews */
.animating-image.animate-out {
    opacity: 0;
    transform: scale(0.5);
}

.animating-image.animate-out.going-to-top {
    top: 20px;
    right: 25vw;
    width: 60px;
    height: 60px;
}

.animating-image.animate-out.going-to-bottom {
    bottom: 20px;
    right: 25vw;
    width: 60px;
    height: 60px;
}


/* Play button */
#play-button {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 80px;
    height: 80px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

#play-button:hover {
    opacity: 1;
}

#play-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#tv-static {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    opacity: 0.3;
    pointer-events: none;
}

/* Add scrollbar styling but keep everything else the same */
.work-list::-webkit-scrollbar {
    width: 6px;
}

.work-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.work-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.work-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Card transition animation for work change */
.work-cards-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1), opacity 0.5s cubic-bezier(0.4,0,0.2,1);
    will-change: transform, opacity;
    z-index: 10;
}
.work-cards-wrapper.card-out-down {
    transform: translateY(-100%);
    opacity: 1;
}
.work-cards-wrapper.card-in-down {
    transform: translateY(100%);
    opacity: 1;
}
.work-cards-wrapper.card-out-up {
    transform: translateY(100%);
    opacity: 1;
}
.work-cards-wrapper.card-in-up {
    transform: translateY(-100%);
    opacity: 1;
}
.work-cards-wrapper.card-active {
    transform: translateY(0);
    opacity: 1;
}

.work-item.card-active {
    position: fixed;
    top: 50%;
    left: 5vw;
    width: 30vw;
    transform: translateY(-50%);
    z-index: 9999;
    background: rgba(248, 248, 248, 0.9);
}

.work-item-wrapper,
.work-item,
.works-title-container,
.works-title,
.work-details,
.work-excerpt {
    pointer-events: none;
    cursor: default;
}

/* =====================================================
   =============== MOBILE STYLES BELOW =================
   ===================================================== */

   @media (max-width: 1024px) {
    .works-title a {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    html, body {
        height: 100vh;
        overflow: auto;
    }
    .archive-container {
        display: flex;
        flex-direction: column;
        width: 100vw;
        height: 100vh;
        overflow: hidden;
        position: relative;
    }
    .work-cover-container {
        display: block;
        width: 100vw;
        height: 50vh;
        min-height: 200px;
        max-height: 60vh;
        position: relative;
        z-index: 2;
        background: #f8f8f8;
    }
    #main-image-container {
        width: 100vw;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 3;
        border: none !important;
    }
    #active-cover-image {
        display: block;
        width: auto;
        height: 90%;
        max-width: 98vw;
        max-height: 90%;
        margin: 0 auto;
        padding: 0;
        opacity: 1 !important;
        background: none;
        border: none !important;
        box-shadow: none;
        position: relative;   
        left: 0;
        right: 0;
        object-fit: contain;
    }
    .preview-container,
    .preview-grid {
        display: none !important;
    }
    .work-list {
        flex: none;
        width: 100%;
        height: 100%;
        position: fixed;
        top: 50%;
        left: 0;
        overflow-y: auto;
        transform: translateY(-50%);
    }
    #active-work-wrapper {
        display: block;
        width: 100vw;
        height: 50vh;
        overflow-y: auto;
        background: #f8f8f8;
        z-index: 4;
        box-sizing: border-box;
        padding: 16px;
        position: relative;
    }
    .work-item.active {
        display: block;
        width: 100vw;
        box-sizing: border-box;
        padding: 16px;
    }
    #menu-works {
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 10;
        background: none;
    }
    #menu-works h1 {
        font-size: 18px;
        margin-bottom: -15px;
    }
    #menu-works span {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .works-title a {
        font-size: 11px;
    }

    #active-work-wrapper {
        width: 90%;
        left: 5%;
        padding: 15px;
    }

    .preview-container img {
        width: 40px;
        height: 40px;
    }
}

/* =====================================================
   ============= END MOBILE STYLES SECTION =============
   ===================================================== */










