﻿.window-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center; /* Centered content */
    padding-left: 4vw;
    padding-right: 4vw;
    gap: 4vw; /* Increased gap for better separation */
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 70;
    perspective: 1200px;
    box-sizing: border-box;
}

body.is-window-scroll-content .window-overlay {
    position: absolute;
    top: 14vh;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 0;
    align-items: flex-start;
    padding-top: 0;
}

.window-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}

.window-figure {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.window-panel {
    position: relative;
    width: min(468px, 63vw);
    height: min(648px, 63vh);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    overflow: hidden;
    transform-origin: center center;
    transform: rotateY(-75deg) translateZ(-40px);
    transition: transform 0.9s ease-in-out;
    backdrop-filter: blur(6px) saturate(120%);
    cursor: pointer;
}

.window-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.9s ease-in-out;
}

.window-hover-caption {
    position: fixed;
    left: 2vw;
    bottom: 6vh;
    width: calc(100vw - 4vw);
    max-width: calc(100vw - 4vw);
    text-align: center;
    text-transform: uppercase;
    
    /* Updated typography and color */
    color: #ff00de;
    font-family: 'bianzhidai-Base', sans-serif;
    font-style: italic;
    
    font-size: clamp(1.2rem, 5vw, 5rem);
    line-height: 1.12;
    letter-spacing: 0.15px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    
    /* Pink glow shadow */
    text-shadow: 0 0 10px rgba(255, 0, 222, 0.5);
    
    overflow: hidden;
    white-space: nowrap;
    z-index: 72;
    --reveal-x: 50%;
    --reveal-y: 50%;
    --reveal-size: 0px;
    -webkit-mask-image: radial-gradient(
        circle var(--reveal-size) at var(--reveal-x) var(--reveal-y),
        rgba(0,0,0,1) 0%,
        rgba(0,0,0,0.94) 62%,
        rgba(0,0,0,0) 100%
    );
    mask-image: radial-gradient(
        circle var(--reveal-size) at var(--reveal-x) var(--reveal-y),
        rgba(0,0,0,1) 0%,
        rgba(0,0,0,0.94) 62%,
        rgba(0,0,0,0) 100%
    );
    transition: filter 0.2s ease;
}

body.is-window-scroll-content .window-hover-caption {
    position: absolute;
    left: 2vw;
    top: 74vh;
    bottom: auto;
}

.window-hover-caption.is-reveal {
    --reveal-size: 184px;
    filter: saturate(1.1);
}

.window-media {
    position: relative;
    width: 100%;
    height: 100%;
    isolation: isolate;
    cursor: crosshair;
    --mx: 50%;
    --my: 50%;
    --b1x: 50%;
    --b1y: 50%;
    --b2x: 50%;
    --b2y: 50%;
    --b3x: 50%;
    --b3y: 50%;
    --b4x: 50%;
    --b4y: 50%;
}

.window-overlay.is-active .window-panel {
    transform: rotateY(0deg) translateZ(0);
}

.window-panel.is-flipped .window-card {
    transform: rotateY(180deg);
}

.window-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.window-face-front {
    z-index: 2;
}

.window-face-back {
    z-index: 1;
    transform: rotateY(180deg);
    padding: clamp(20px, 3.2vw, 36px);
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    background: #fff;
    color: #000;
    overflow: auto;
}

.window-alphabet {
    width: 100%;
    margin: 0;
    font-size: clamp(13px, 1.05vw, 16px);
    line-height: 1.5;
    letter-spacing: 0.01em;
    text-align: left;
    color: #000;
    white-space: pre-line;
}

.window-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    will-change: filter, transform, opacity, clip-path;
}

#windowImage {
    filter: blur(0px) brightness(1);
    transform: scale(1);
    transition: filter 0.38s ease, transform 0.38s ease;
}

#windowImageFx {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    filter: blur(0.2px) saturate(1.14) contrast(1.08) brightness(1.03);
    transform: scale(1.018);
    -webkit-mask-image:
        radial-gradient(132px 108px at var(--b1x) var(--b1y), rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.82) 56%, transparent 100%),
        radial-gradient(108px 124px at var(--b2x) var(--b2y), rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.72) 58%, transparent 100%),
        radial-gradient(96px 86px at var(--b3x) var(--b3y), rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.68) 62%, transparent 100%),
        radial-gradient(78px 98px at var(--b4x) var(--b4y), rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.64) 60%, transparent 100%);
    mask-image:
        radial-gradient(132px 108px at var(--b1x) var(--b1y), rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.82) 56%, transparent 100%),
        radial-gradient(108px 124px at var(--b2x) var(--b2y), rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.72) 58%, transparent 100%),
        radial-gradient(96px 86px at var(--b3x) var(--b3y), rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.68) 62%, transparent 100%),
        radial-gradient(78px 98px at var(--b4x) var(--b4y), rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.64) 60%, transparent 100%);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    transition: opacity 0.28s ease, filter 0.28s ease, transform 0.28s ease;
}

.window-media.is-hovered #windowImage {
    filter: blur(5.5px) brightness(0.9) saturate(0.92);
    transform: scale(1.02);
}

.window-media.is-hovered #windowImageFx {
    opacity: 1;
}

.window-info {
    max-width: min(460px, 34vw);
    color: #111;
    font-size: 1.05rem;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(36px);
    transition: transform 0.9s ease, opacity 0.9s ease;
    text-shadow: 0 1px 3px rgba(255,255,255,0.35);
}

.window-info-details {
    /* Reset old styles */
    white-space: normal;
}

.window-info {
    /* Reposition to the right side of the window panel for desktop layout */
    max-width: min(400px, 30vw); 
    color: #ff00de; /* Electric pink instead of white */
    text-shadow: 0 0 5px rgba(255,0,222,0.4); /* Glow effect */
    font-family: 'Space Mono', monospace; /* Tech feel */
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(30px);
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.8s ease;
    
    /* Liquid Glass Container */
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    border: 1px solid rgba(255, 0, 222, 0.2); /* Pinker border */
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.founder-signature {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.founder-role {
    font-family: 'bianzhidai-Base', sans-serif;
    font-size: 1.4rem;
    font-weight: normal; 
    font-style: italic;
    color: #ff00de; /* Ensure pink */
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 0, 222, 0.3); /* Electric pink line */
    text-align: center;
}

.neon-brand {
    color: #ff00de;
    text-shadow: 0 0 8px rgba(255, 0, 222, 0.6);
}

.founder-titles {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ff00de;
    opacity: 0.9;
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: 700;
}

.founder-titles .separator {
    color: #fff;
    opacity: 0.6;
}

.founder-academic {
    font-size: 0.8rem;
    color: #ff00de;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.academic-row strong {
    color: #ff00de;
    filter: brightness(1.3); /* Softer pink for strong text to differentiate */
    font-weight: 700;
}

.founder-collec {
    font-size: 0.75rem;
    color: rgba(255, 0, 222, 0.7);
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.collec-row strong {
    color: #ff00de;
}

.founder-email {
    margin-top: 12px;
    display: inline-block;
    color: #ff00de;
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 0, 222, 0.3);
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-align: center;
    background: rgba(255, 0, 222, 0.05);
}

.founder-email:hover {
    background: rgba(255, 0, 222, 0.15);
    box-shadow: 0 0 15px rgba(255, 0, 222, 0.4);
    transform: translateY(-2px);
    color: #fff;
}

.window-overlay.is-active .window-info {
    opacity: 1;
    transform: translateY(0);
}




/* Responsive behavior for window overlay */

@media (max-width: 768px) {

    .window-overlay {

        flex-direction: column;

        justify-content: center;

        align-items: center;

        padding: 8vh 4vw;

        overflow-y: auto; /* Allow scroll if content is tall */

    }



    .window-figure {

        margin-bottom: 24px;

        align-items: center;

    }



    .window-panel {

        width: 80vw;

        height: 50vh;

        margin: 0 auto;

    }



    .window-info {

        max-width: 90vw;

        width: 90vw;

        padding: 20px;

        transform: translateY(20px);

    }

    

    .window-overlay.is-active .window-info {

        transform: translateY(0);

    }

}



/* Founder Links */
.founder-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 8px;
}

.link-item {
    display: block;
    color: #ff00de;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 8px 12px;
    border: 1px solid rgba(255, 0, 222, 0.4);
    border-radius: 4px;
    transition: all 0.3s ease;
    text-align: center;
    background: rgba(255, 0, 222, 0.05);
    letter-spacing: 0.5px;
}

.link-item:hover {
    background: rgba(255, 0, 222, 0.2);
    box-shadow: 0 0 10px rgba(255, 0, 222, 0.5);
    transform: translateX(4px);
    color: #fff;
    border-color: #ff00de;
}

/* Responsive behavior for window overlay */
@media (max-width: 768px) {
    .window-overlay {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 5vh 4vw;
        overflow-y: auto;
    }

    .window-figure {
        margin-bottom: 24px;
        align-items: center;
    }

    .window-panel {
        width: 85vw;
        height: 45vh;
        margin: 0 auto;
    }

    .window-info {
        max-width: 90vw;
        width: 90vw;
        padding: 24px;
        transform: translateY(0);
        margin-bottom: 40px;
    }
}
