body, html {
    margin: 0; padding: 0;
    width: 100%; height: 100%;
    background-color: #000;
    overflow: hidden; /* Lock scroll during video */
    color: white; /* Default font color */
}

.top-center-avatar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;  
    border: 4px solid white;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);

    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s ease, 
                border-color 0.3s ease;
}

.top-center-avatar:hover {
    transform: translateX(-50%) scale(1.1); 
    border-color: #ffffff;     
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.2), 
                0 0 20px rgba(8, 0, 255, 0.4);
}

.top-center-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Container adjustment */
.projects-scroller.about-view {
    justify-content: center;
    overflow: hidden;
}

/* The Wide Card */
.about-card {
    font-family: "Inconsolata", monospace;
    font-weight: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #1a1a1a;
    border: 4px solid #ffffff; /* Blue glow border */
    padding: 20px;
    max-width: 850px;
    gap: 30px;
    animation: fadeIn 0.6s ease-out;
    overflow-x: hidden;     
    overflow-y: auto;       
    max-height: 60vh;
}

.about-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.about-text-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.about-text-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #eee;
}

/* Responsive: Stack it on phones */
@media (max-width: 768px) {
    .about-card {
        flex-direction: column;
        padding: 20px;
        max-width: 90%;
    }
    .about-card img {
        width: 100%;
        height: 200px;
    }
}

/* --- The Video Overlay (Same as before) --- */
#intro-overlay {
    position: fixed; top: 8vh; left: 0;
    width: 100%; height: 100%;
    z-index: 100; /* Stays on top */
    transition: opacity 0.2s ease-out;
}
video {
    width: 100%; height: 100%;
    object-fit: contain;
}

/* --- The Interactive Main Content --- */
#main-content {
    position: fixed; top: 8vh;
    width: 100%; height: 100vh;
    background-image: url('/salem_sky_pics/Salems_Sky.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

/* --- The Logo Structure --- */

/* This centers a single imaginary point in the exact middle of the screen */
.interactive-logo-grid {
    position: absolute; top: 50px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%); /* The 'True Center' */
    width: 80%; /* Creates a container bounds */
    height: 80vh;
}

/* General styling for each cluster link */
.interactive-logo {
    position: absolute;
    display: flex;
    flex-direction: column; /* Icon over Text */
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: white;
    font-family: serif; /* Change this to match your handwriting font */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7); /* The glow effect */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
}

.interactive-logo:hover{
    transform: rotate(2deg) scale(0.8);
    opacity: 0.8;
}

.interactive-logo .clicked {
    transform: scale(0.6);
    opacity: 0.6;
}

.interactive-logo img {
    height: 220px;
    margin-bottom: 1px;
}

.interactive-logo span {
    font-size: 1.2rem;
}


.code-pos { top: 10%; left: 10%; transform: rotate(2deg);} /* Far top left */
.random-pos { top: 0%; left: 40%; transform: rotate(2deg); } /* Center top */
.space-pos { top: 10%; left: 70%; transform: rotate(2deg); } /* Far top right */

/* Bottom Row */
.writing-pos { top: 55%; left: 20%; transform: rotate(2deg);} /* Left bottom */
.art-pos { top: 55%; left: 60%; transform: rotate(2deg); } /* Right bottom */

.no-navigation:hover {
    transform: rotate(-5deg) scale(1.1); /* Slight grow */
    opacity: 0.8;
}

/* The Modal Backdrop */
#project-modal {
    position: fixed;
    inset: 0; /* Shorthand for top/bottom/left/right: 0 */
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px); /* Blurs the nebula background */
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease;
}

#modal-title {
    font-family: "Luxurious Roman", serif;
    font-weight: 400;
    font-size: 48px;
    font-style: normal;
}
.modal-hidden {
    opacity: 0;
    pointer-events: none;
}

/* The Box and Scroller */
.modal-content {
    width: 90%;
    max-width: 1000px;
    position: relative;
}

.projects-scroller {
    display: flex;
    gap: 20px;
    overflow-x: auto; /* This enables the sideways scroll */
    padding: 20px 0;
    scroll-snap-type: x mandatory; /* Makes it "snap" to boxes */
    scrollbar-width: thin; /* For Firefox */
}

/* Individual Project Box */
.project-card {
    min-width: 150px;
    max-width: 400px;
    background: #1a1a1a;
    border: 4px solid #ffffff;
    padding: 15px;
    scroll-snap-align: center;
    flex-shrink: 0;
    font-family: "Inconsolata", monospace;
    font-weight: 200;
    font-style: normal;
}

.project-card img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    border-radius: 8px;
}

.project-card .image-container {
    width: 100%;
    height: 180px;
    border-radius: 8px;
    overflow: hidden; /* This crops the zoom so it doesn't spill out */
    position: relative;
    background: #000; /* Backdrop in case image takes a second to load */
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smooth zoom */
    transform-origin: center; /* Zooms into the middle */
}

.project-card:hover img {
    transform: scale(3.0) translateY(-10px);
    filter: brightness(1.1); /* Optional: makes it pop a little when zoomed */
}

.image-container {
    cursor: zoom-in;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 180px;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.1s ease-out; 
    pointer-events: none;
}

#close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    color: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
}
#lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 1000; /* Above everything else */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(25, 0, 130, 0.3); /* That blue glow again */
}

#close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

a {
    color: rgb(53, 177, 255)
}

a:hover {
    color: rgb(147, 214, 255)
}

/* This code only runs on screens narrower than 768px (Phones/Tablets) */
@media (max-width: 768px) {
    
    #main-content {
        background-size: contain; 
    }

    .interactive-logo-grid {
        width: 95%; /* Give it more room on small screens */
    }

    /* Adjust positions for a vertical layout */
    .code-pos { top: 15%; left: 5%; }
    .space-pos { top: 15%; left: auto; right: 5%; }
    
    .random-pos { top: 5%; left: 50%; }

    .writing-pos { bottom: 15%; left: 5%; }
    .art-pos { bottom: 15%; left: auto; right: 5%; }

    /* Make the icons and text a bit bigger for fingers to tap */
    .interactive-logo img {
        height: 12vw; 
    }
    .interactive-logo span {
        font-size: 4vw;
    }
    .top-center-avatar {
        width: 60px;
        height: 60px;
        top: 10px;
    }
}