:root {
    --static-cyan: #00f3ff;
    --static-cyan-shadow: #00f3ff;
}

/* Horizontal alignment for main content */
.post {
    padding: 32px;
    border-radius: 8px;
    flex: 0 1 700px;
    /* Posts take up twice the space of the sidebar */
    width: 100%;
    max-width: calc(100% - 300px);
    /* Leave space for sidebar */
    box-sizing: border-box;
    margin: 0 auto;
    /* Centers the post container */
    text-align: left;
    /* Restore left alignment */
    font-family: "overpass-mono-variable", sans-serif;
    font-variation-settings: "wght" 300;
}

body::after {
    content: '';
    display: none;
    animation: colorVariableAnimation var(--animation-duration) infinite;
    animation-delay: var(--animation-delay);
}

/* Also apply the overlay approach to nav links */
nav ul li a::before {
    content: '';
    position: absolute;
    top: -2px;
    /* Cover link completely */
    left: -2px;
    right: -2px;
    bottom: -2px;
    background-color: transparent;
    border: 1px solid transparent;
    box-shadow: none;
    z-index: -1;
    /* Place behind text */
    pointer-events: none;
    /* Allow clicks to pass through */
}

/* Change the overlay on hover for nav links */
nav ul li a:hover::before,
.has-submenu:hover > a::before {
    background-color: white;
    border-color: white;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.archive-list {
    list-style-type: none;
    display: block;
    margin: 0px;
    margin: -15px 0 0px -28px;
}

/* Make hover elements use absolute positioning to prevent layout shifts */
nav ul li,
.archive-list li {
    position: relative;
    /* Create positioning context for absolute children */
    margin-bottom: 20px;
    /* Maintain consistent spacing */
}


@keyframes navTextShadowColorCycle {

    0%,
    100% {
        text-shadow: 0 0 3px var(--base-purple);
    }

    33% {
        text-shadow: 0 0 3px var(--base-blue);
    }

    66% {
        text-shadow: 0 0 3px var(--base-pink);
    }
}

/* Apply border animation to archive links */
.archive-list a {
    /* Do not show border by default */
    border: 1px solid transparent;
    animation: navTextShadowColorCycle 20s infinite;
    animation-delay: 0s;
}

@keyframes backgroundColorAnimation {

    0%,
    100% {
        --dynamic-bg-color: var(--bg-purple);
    }

    33% {
        --dynamic-bg-color: var(--bg-blue);
    }

    66% {
        --dynamic-bg-color: var(--bg-pink);
    }
}

/* --------------------------- General styles ------------------------------ */

/* Set one master animation for everything to sync with */
body {
    font-family: "VT323", monospace;
    font-weight: 300;
    font-style: normal;
    /* background-color: #000000; */
    /* Use the main animation to update global CSS variables */
    animation: colorVariableAnimation var(--animation-duration) infinite;
}

/* --------------------------- Scan Lines ------------------------------ */

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.2),
            rgba(0, 0, 0, 0.2) 1px,
            rgba(0, 200, 0, 0.05) 2px);
    pointer-events: none;
}

/* ----------------------------------header/nav----------------------------------- */

header {
    background-color: transparent;
    color: white;
    padding: 0;
    text-align: center;
    margin-top: 0;
    margin-bottom: 0;
    pointer-events: none;
    /* Let clicks pass through header area */
}

.header-video-styled {
    position: fixed;
    top: 50%;
    left: calc(50% - 50px);
    width: 1224px;
    height: 688.5px;
    transform: translate(-50%, -50%);
    z-index: -100;
    margin: 0;
    border: none;
    box-shadow: none;
}



h3 {
    color: white;
    animation: textShadowColorCycle 20s infinite;
    animation-delay: 0s;
}

.ascii-art-container {
    overflow-x: auto;
    /* Enables horizontal scrolling on smaller screens */
    text-align: center;
    padding: 10px;
    /* Some padding for a better experience */
}

pre.ascii-art {
    font-size: 14px;
    color: white;
    /*header color*/
    white-space: pre;
    line-height: 1.2;
    max-width: 100%;
    text-shadow:
        0 0 5px #ffa445,
        0 0 10px #ffa445,
        0 0 15px #ffa445,
        0 0 18px #ffa445;
}

.menu {
    display: flex;
    gap: 20px;
}

.menu-item {
    position: relative;
    /* For positioning the cursor within the item */
    padding: 10px;
}

nav ul li a {
    text-decoration: none;
    font-weight: none;
    color: #ffffff;
    /* Link color remains white */
    text-shadow: 0 0 3px var(--base-red);
    /* Starting shadow color */
    transition: all 0.3s ease;
    /* Add transition for all properties */
    padding: 2px 7px;
    /* Adjusted padding to account for border */
    border-radius: 0;
    /* Sharp square edges */
    position: relative;
    /* For better positioning of the glow effect */
    border: 1px solid transparent;
}

/* Absolutely no glow or shadow on hover */
nav ul li a:hover,
.archive-list a:hover,
.has-submenu:hover > a {
    text-decoration: none;
    color: #000000 !important;
    text-shadow: none !important;
    /* Multiple declarations to override any potential shadow */
    -webkit-text-shadow: none !important;
    -moz-text-shadow: none !important;
    /* Override any other potential styling */
    background-image: none !important;
    /* Force override of animations during hover */
    animation: none !important;
}

/*--------------------------------- Posts --------------------------------------*/

.main-content {
    display: flex;
    flex-wrap: nowrap;
    /* Prevent items from wrapping */

    /* Fixed centering overlay */
    position: fixed;
    top: 50%;
    left: 50%;
    width: 1920px;
    height: 1080px;
    transform: translate(-50%, -50%);

    /* Reset margins since we use transform centering */
    margin: 0;

    /* Align items */
    justify-content: center;
    align-items: flex-start;
    pointer-events: none;
    /* Allow clicks to pass through empty areas if needed */
}

/* Re-enable pointer events for children */
.main-content>* {
    pointer-events: auto;
}

.post {
    padding: 32px;
    border-radius: 8px;
    flex: 0 1 700px;
    /* Posts take up twice the space of the sidebar */
    width: 100%;
    max-width: calc(100% - 300px);
    /* Leave space for sidebar */
    box-sizing: border-box;
    margin: 0 auto;
    /* Centers the post container */
    text-align: center;
    /* Center all post content */
    font-family: "overpass-mono-variable", sans-serif;
    font-variation-settings: "wght" 300;
}

/* Ensure all links get the animation for coloring */
.sidebar {
    position: sticky;
    top: 180px;
    font-family: "Orbit", serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-size: 12px;
    flex: 0 1 300px;
    /* Sidebar takes less space */
    margin-top: 470px;
    max-width: 300px;
    /* Optional: limit sidebar width */
    box-sizing: border-box;
    /* Ensures padding doesn't break layout */
    border-left: none !important;
    color: var(--static-cyan);
    text-shadow: 0 0 5px var(--static-cyan);
    box-shadow: none !important;
    /* Remove the box shadow that causes the square look */
}



.sidebarz {
    position: sticky;
    top: 180px;
    font-family: "Orbit", serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-size: 12px;
    flex: 0 1 300px;
    /* Sidebar takes less space */
    margin-top: 35px;
    max-width: 300px;
    /* Optional: limit sidebar width */
    box-sizing: border-box;
    /* Ensures padding doesn't break layout */
    animation: borderColorCycle var(--animation-duration) infinite, colorCycle var(--animation-duration) infinite;
    /* Use the same timing as other animations */
    animation-delay: var(--animation-delay);
    color: var(--base-red);
    /* Starting color to match the animation */
}

.anchor {
    max-width: 240px;
    /* Maximum width of the content */
    width: 28%;
    /* For responsive sizing */
    margin: 0 auto;
    /* Center the flex container horizontally */
}

.anchorz {
    max-width: 180px;
    /* Maximum width of the content */
    width: 100%;
    /* For responsive sizing */
    margin: 0 auto;
    /* Center the flex container horizontally */
}

.anchorx {
    max-width: 75px;
    /* Maximum width of the content */
    width: 100%;
    /* For responsive sizing */
    margin: 0 auto;
    /* Center the flex container horizontally */
}

/* Archive title without quotations */
.archive-page-title {
    text-align: left;
    font-size: 20px;
    color: hsl(0, 0%, 100%);
    /* No quotation marks for archive title */
}

.post-title {
    text-align: left;
    font-size: 20px;
    color: hsl(0, 0%, 100%);
    animation: postTitleShadowCycle 20s infinite;
    animation-delay: 0s;
}

/* Style just the quotation marks in cyan */
.post-title::before {
    content: '"';
    color: white;
    text-shadow:
        0 0 3px orange,
        0 0 6px orange;
}

.post-title::after {
    content: '"';
    color: white;
    text-shadow:
        0 0 3px orange,
        0 0 6px orange;
}

.services-title {
    text-align: left;
    font-size: 14px;
    color: hsl(0, 0%, 100%);
    animation: postTitleShadowCycle 20s infinite;
    animation-delay: 0s;
}

.post-date {
    font-size: 12px;
    color: #888888;
    margin-bottom: 15px;
    text-align: left;
}

.post-content {
    font-size: 14px;
    line-height: 1.5;
    color: hsl(0, 0%, 83%);
    margin-bottom: 20px;
    text-align: left;
}

.temp {
    font-size: 14px;
    display: flex;
    justify-content: center;
    line-height: 1.5;
    color: hsl(0, 0%, 83%);
    margin-top: 85px;
    margin-bottom: 20px;
    text-align: left;
}

.services {
    font-size: 12px;
    line-height: 1.5;
    color: hsl(0, 0%, 83%);
    margin-bottom: 5px;
    color: hsl(0, 0%, 100%);
    animation: postTitleShadowCycle 20s infinite;
    text-align: left;
}

.coming-soon {
    text-align: center;
    color: #ffffff;
}

.image-container {
    position: relative;
    display: flex;
    justify-content: center;
    margin-right: 85px;
    overflow: hidden;
    /* Hide overflow to create a clean transition */
    height: 500px;
    /* Set the height to match your images */
}

.image-container img {
    position: absolute;
    top: 0;
    /* Start below the visible area */
    transition: top 1s ease, opacity 1s ease;
    /* Smooth transition for top and opacity */
    opacity: 0;
    /* Start with opacity 0 */
}

.image-container img:first-child {
    opacity: 1;
    /* Make the first image visible */
}

.image-container img.fade-in {
    opacity: 1;
    /* Fully visible */
}

.image-container img.fade-out {
    top: -100%;
    /* Move out of the visible area */
    opacity: 0;
    /* Fade out */
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        /* Stack sidebar and posts vertically */
        align-items: center;
        /* Center items horizontally */
    }

    .sidebar,
    .post {
        max-width: 100%;
        /* Ensure items take up full width */
        width: 100%;
        /* Ensure full width */
    }
}



/*--------------------------------- Archive --------------------------------------*/

.archive-post {
    padding: 32px;
    border-radius: 8px;
    flex: 0 1 700px;
    /* Posts take up twice the space of the sidebar */
    max-width: calc(100% - 300px);
    /* Leave space for sidebar */
    box-sizing: border-box;
    margin: 0 auto;
    /* Centers the post container */
    margin-top: 0px;
    /* Align with regular posts */
    text-align: left;
    font-family: "overpass-mono-variable", sans-serif;
    font-variation-settings: "wght" 300;
}


.archive-entries {
    margin-top: 460px;
    margin-left: 250px; /* Shift to the right towards the sidebar */

}

.archive-entry {
    display: flex;
    flex-direction: row;
    align-items: center;
    /* Vertically center the items */
    margin-bottom: 20px;
    justify-content: flex-start;
    /* Align items to the start */
}

.archive-entry .date {
    display: inline-block;
    /* Changed from block */
    margin-right: 15px;
    /* Add space between date and title */
    min-width: 100px;
    /* Ensures consistent date width */
}

.archive-entry .story {
    display: inline-block;
}

.story {
    width: 100%;
    text-align: left;
    font-size: 13px;
    color: white;
    /* Remove glow - plain white text */
    text-decoration: none;
    transition: color 0.3s ease;
}

.story:hover {
    color: #ffffff;
}

.date {
    margin-top: 1px;
    font-size: 12px;
    color: white;
    /* Remove glow - plain white text */
    text-decoration: none;
}


.archive-title {
    color: #ffffff !important;
    text-shadow: none;
    /* Remove animation - static cyan color */
}

/* Create an overlay effect instead of modifying the links directly */
.archive-list li {
    position: relative;
    /* Enable absolute positioning of pseudo-elements */
    margin: 20px 0;
    /* Space between list items */
    /* Lock the width to prevent shifts */
    width: 100%;
}

/* Create a hover overlay using pseudo-element */
.archive-list a::before {
    content: '';
    position: absolute;
    top: -2px;
    /* Cover link completely */
    left: -2px;
    right: -2px;
    bottom: -2px;
    background-color: transparent;
    border: 1px solid transparent;
    box-shadow: none;
    z-index: -1;
    /* Place behind text */
    transition: background-color 0.1s ease;
    pointer-events: none;
    /* Allow clicks to pass through */
}

/* Change the overlay on hover */
.archive-list a:hover::before,
.has-submenu:hover > a::before {
    background-color: white;
    border-color: white;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    z-index: -1;
}

.archive-list a {
    text-decoration: none;
    /* Remove underline */
    color: #ffffff;
    /* Link color remains white */
    text-shadow: 0 0 3px;
    /* Starting shadow color */
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    /* Transitions for shadow and transform */
    padding: 2px 7px;
    /* Adjusted padding to account for border */
    border-radius: 0;
    /* Sharp square edges */
    display: inline-block;
    /* Needed for the background to show properly */
    position: relative;
    /* For better positioning of the glow effect */
}

.archive-list a:hover,
.has-submenu:hover > a {
    text-decoration: none;
    color: white;
    border-style: solid;
    border-width: 1px;
    /* Shift slightly to the right */
    transform: translateX(3px);
    /* Add a transition for smooth appearance/disappearance */
    transition: transform 0.2s ease;
}

/* Sub-menu styling for Optics */
.has-submenu {
    position: relative;
}

.sub-menu {
    display: none;
    list-style-type: none;
    padding-left: 25px; /* Indent the sub-menu items */
    margin: 0 0 0 15px; /* Shift to align with text */
    padding-top: 10px; /* Cover the gap to maintain hover state */
    position: relative;
}

/* Vertical line */
.sub-menu::before {
    content: '';
    position: absolute;
    top: 2px; /* Meet exactly at the bottom edge of the Optics hover box */
    bottom: 100%; /* Stop near the bottom of the last item */
    left: 0;
    width: 1px;
    background-color: #ffffff;
}

/* Sub-menu items */
.sub-menu li {
    margin: 10px 0; /* Tighter spacing */
    position: relative;
}

.sub-menu li a {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

/* Horizontal branch */
.sub-menu li::before {
    content: '';
    position: absolute;
    top: 50%; /* Center vertically with the text */
    left: -25px; /* Meet exactly at the vertical line */
    width: 0; /* Leave a 5px gap before the text */
    height: 1px;
    background-color: #ffffff;
}

.has-submenu:hover .sub-menu {
    display: block;
}

/* Sub-menu animations */
.has-submenu:hover .sub-menu::before {
    animation: wipeDownBottom 0.4s ease-out forwards;
}

.has-submenu:hover .sub-menu li:nth-child(1)::before {
    animation: wipeRightWidth 0.3s ease-out 0.2s forwards;
}

.has-submenu:hover .sub-menu li:nth-child(2)::before {
    animation: wipeRightWidth 0.3s ease-out 0.4s forwards;
}

.has-submenu:hover .sub-menu li:nth-child(1) a {
    opacity: 1;
    transition-delay: 0.4s;
}

.has-submenu:hover .sub-menu li:nth-child(2) a {
    opacity: 1;
    transition-delay: 0.6s;
}

@keyframes wipeDownBottom {
    0% { bottom: 100%; }
    100% { bottom: 10px; }
}

@keyframes wipeRightWidth {
    0% { width: 0; }
    100% { width: 20px; }
}



/* Sub-menu item hover - glowy cyan */
html body nav ul li .sub-menu a:hover,
html body .archive-list .sub-menu a:hover,
.archive-list .sub-menu a:hover,
.sub-menu a:hover,
.sub-menu li a:hover {
    color: var(--static-cyan) !important;
    text-shadow: 
        0 0 5px var(--static-cyan), 
        0 0 10px var(--static-cyan), 
        0 0 20px var(--static-cyan) !important;
    -webkit-text-shadow: 
        0 0 5px var(--static-cyan), 
        0 0 10px var(--static-cyan), 
        0 0 20px var(--static-cyan) !important;
    -moz-text-shadow: 
        0 0 5px var(--static-cyan), 
        0 0 10px var(--static-cyan), 
        0 0 20px var(--static-cyan) !important;
    border-style: none !important;
    background-image: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important; /* Force opacity to 1 because global hover disables the fade-in animation */
    transform: none !important; /* Prevent the 3px translation from parent archive-list hover */
}

/* Don't show the white background box on sub-menu items */
html body nav ul li .sub-menu a:hover::before,
html body .archive-list .sub-menu a:hover::before,
.archive-list .sub-menu a:hover::before {
    background-color: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    display: none !important;
}

/* -------------------- SOCIAL MEDIA ICONS ------------------ */

.social-media-container {
    text-align: center;
    /* Center text */
    margin: 0 auto;
    scale: 100%;
    padding-bottom: 10px;
}

.social-media-text {
    gap: 100px;
    /* Space between icons */
    font-size: 13px;

}

.lol {
    color: orange;
    font-size: 13px;
}

.social-media-text a {
    display: inline-flex;
    /* changed from inline-block */
    align-items: center;
    /* vertically centers content */
    justify-content: center;
    /* horizontally centers content */
    transition: transform 0.3s ease;
    color: white;
    /* White social media links */
    text-decoration: none;
    min-height: 44px;
    min-width: 44px;
    padding: 0 15px;
    /* removed top/bottom padding since we're using min-height */
    box-sizing: border-box;
}

.social-media-text a:hover {
    transform: scale(1.1);
    text-decoration: none;

}




/* Update all animations to use the same duration variable */
/* One synchronized animation controls all color changes */
@keyframes colorCycle {

    0%,
    100% {
        color: var(--base-purple);
    }

    33% {
        color: var(--base-blue);
    }

    66% {
        color: var(--base-pink);
    }
}

@keyframes navColorCycle {

    0%,
    100% {
        color: var(--base-purple);
    }

    33% {
        color: var(--base-blue);
    }

    66% {
        color: var(--base-pink);
    }
}

/* -------------------- BORDER COLOR CYCLING ------------------ */

@keyframes borderColorCycle {

    0%,
    100% {
        border-left: 0.10px ridge var(--base-purple);
    }

    33% {
        border-left: 0.10px ridge var(--base-blue);
    }

    66% {
        border-left: 0.10px ridge var(--base-pink);
    }
}

/* -------------------- TEXT SHADOW COLOR CYCLING ------------------ */

@keyframes textShadowColorCycle {

    0%,
    100% {
        text-shadow: 0 0 5px var(--base-purple),
            0 0 10px var(--base-purple),
            0 0 20px var(--base-purple);
    }

    33% {
        text-shadow: 0 0 5px var(--base-blue),
            0 0 10px var(--base-blue),
            0 0 20px var(--base-blue);
    }

    66% {
        text-shadow: 0 0 5px var(--base-pink),
            0 0 10px var(--base-pink),
            0 0 20px var(--base-pink);
    }
}

@keyframes postTitleShadowCycle {

    0%,
    100% {
        text-shadow: 0 0 3px var(--base-purple);
    }

    33% {
        text-shadow: 0 0 3px var(--base-blue);
    }

    66% {
        text-shadow: 0 0 3px var(--base-pink);
    }
}

/* -------------------- HOVER BOX COLOR CYCLING ------------------ */

.dynamic-border-color {
    /* This class applies our border animation to any element */
    animation: colorVariableAnimation var(--animation-duration) infinite;
}

/* Main animation that updates all dynamic color variables */
@keyframes colorVariableAnimation {

    0%,
    100% {
        --dynamic-border-color: var(--base-purple);
        --dynamic-shadow-color: var(--shadow-purple);
        --dynamic-bg-color: var(--bg-purple);
        --sync-phase: 0;
        /* Track animation phase */
    }

    33% {
        --dynamic-border-color: var(--base-blue);
        --dynamic-shadow-color: var(--shadow-blue);
        --dynamic-bg-color: var(--bg-blue);
        --sync-phase: 1;
        /* Track animation phase */
    }

    66% {
        --dynamic-border-color: var(--base-pink);
        --dynamic-shadow-color: var(--shadow-pink);
        --dynamic-bg-color: var(--bg-pink);
        --sync-phase: 2;
        /* Track animation phase */
    }
}

/* Base style for all navigation and archive links with fixed size and padding */
nav ul li a,
.archive-list a {
    /* Animation for text shadow only */
    animation: navTextShadowColorCycle var(--animation-duration) infinite;
    animation-delay: var(--animation-delay);
    /* Make sure no hover box is visible by default */
    background-color: transparent !important;
    border-color: transparent !important;
    border-width: 0px !important;
    box-shadow: none !important;
    /* Set fixed position */
    position: relative;
    left: 0;
    /* Ensure consistent padding - same in hover and non-hover */
    padding-left: 7px;
    padding-right: 7px;
    /* Lock in the display properties */
    display: inline-block;
}

/* -------------------- FLICKER ------------------ */

@keyframes flicker {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }

    80% {
        opacity: 0.9;
    }
}

.wrapper {
    animation: flicker 0.1s infinite;
}



/* -------------------- LOADING PAGE TRANSITION ------------------ */

.loading-overlay {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    max-width: 70vw;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
    border-radius: 6px;
    padding: 18px;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.loading-text {
    font-size: 14px;
    margin-bottom: 15px;
    color: #ffffff;
    font-family: "overpass-mono-variable", sans-serif;
    font-variation-settings: "wght" 300;
    letter-spacing: 0.5px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.loading-bar-container {
    width: 220px;
    max-width: 100%;
    height: 14px;
    border: 1px solid #ffffff;
    overflow: hidden;
    position: relative;
    background-color: #000;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.loading-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg,
            #ffffff 0%,
            #ffffff 100%);
    position: relative;
    overflow: hidden;
    transition: width 0.1s ease;
}

.loading-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    animation: shine 1.5s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.loading-percentage {
    margin-top: 12px;
    font-size: 12px;
    color: #ffffff;
    font-family: "overpass-mono-variable", sans-serif;
    font-variation-settings: "wght" 300;
    letter-spacing: 0.5px;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

/* SPA Content Transitions - Only animate main content, not sidebar */
#contentContainer {
    opacity: 1;
}

#contentContainer .main-content-area {
    opacity: 1;
}

#contentContainer.content-fade-out .main-content-area {
    opacity: 0;
    animation: contentFadeOut 1s ease forwards;
}

#contentContainer.content-fade-in .main-content-area {
    opacity: 0;
    animation: contentFadeIn 2s ease forwards;
}

@keyframes contentFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Error styling */
.error {
    text-align: center;
    color: #ff4444;
    font-family: "VT323", monospace;
    font-size: 18px;
    margin: 50px;
}

.ascii-creds {
    margin: 0;
    font-family: "overpass-mono-variable", sans-serif;
    font-variation-settings: "wght" 300;
    font-size: 10px !important;
    line-height: 1;
    white-space: pre;
    color: white !important;
    justify-content: Center;
}



/* -------------------- MOBILE ------------------ */

.mobile-message {
    display: flex;
    width: 100%;
    margin: 0 auto;
    /* Centers the post container */
    justify-content: center;
    text-align: center;
    font-family: "overpass-mono-variable", sans-serif;
    font-size: 12px;
    font-variation-settings: "wght" 300;
    color: white;
    max-width: 400px;
}

/* -------------------- MAIL ICON ------------------ */

.mail-container {
    display: flex;
    justify-content: flex-start;
    /* Align to the left */
    width: 100%;
    margin: 1px 0;
}

.mail-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 25px;
    vertical-align: middle;
    filter: invert(1);
    /* Make the icon white */
    transition: transform 0.3s ease;
}

.mail-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    animation: navColorCycle var(--animation-duration) infinite;
    animation-delay: 0s;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    /* Make sure the link is only as wide as needed */
    width: fit-content;
}

.mail-link:hover {
    transform: scale(1.1);
}

.mail-link:hover .mail-icon {
    transform: translateY(-2px);
}

/* CSS-only Mobile Menu */
.mobile-menu-checkbox {
    display: none;
    /* Hide the actual checkbox */
}

.mobile-menu-button {
    display: none;
    /* Hidden by default on desktop */
    cursor: pointer;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
}

.bar1,
.bar2,
.bar3 {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: 0.4s;
    box-shadow: 0 0 5px var(--base-purple);
    animation: navColorCycle var(--animation-duration) infinite;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 999;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.mobile-nav-list {
    list-style-type: none;
    padding: 0;
}

.mobile-nav-list li {
    margin: 20px 0;
}

.mobile-nav-link {
    font-size: 24px;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    display: block;
    text-shadow: 0 0 5px var(--base-purple);
    animation: textShadowColorCycle var(--animation-duration) infinite;
}

/* The CSS magic happens here - when checkbox is checked */
#mobile-menu-toggle:checked~.mobile-nav {
    display: flex;
}

#mobile-menu-toggle:checked~.mobile-menu-button .bar1 {
    transform: translate(0, 8px) rotate(-45deg);
}

#mobile-menu-toggle:checked~.mobile-menu-button .bar2 {
    opacity: 0;
}

#mobile-menu-toggle:checked~.mobile-menu-button .bar3 {
    transform: translate(0, -8px) rotate(45deg);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .mobile-menu-button {
        display: block;
        /* Show on mobile */
    }

    .sidebar,
    .sidebarz {
        display: none;
        /* Hide sidebar on mobile */
    }

    .post,
    .archive-post {
        max-width: 100%;
        /* Full width content */
    }

    /* Additional mobile styles */
    .main-content {
        flex-direction: column;
        align-items: center;
        width: 95%;
    }

    .sidebar,
    .sidebarz {
        position: static;
        max-width: 100%;
        margin-top: 30px;
        padding: 0 15px;
    }

    .post-content,
    .services {
        font-size: 16px;
        line-height: 1.6;
    }

    .social-media-container {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 15px;
    }

    /* Loading overlay mobile adjustments */
    .loading-overlay {
        width: 80vw;
        padding: 15px;
        top: 40%;
        left: 50%;
    }

    .loading-bar-container {
        width: 100%;
        max-width: 200px;
        height: 12px;
    }

    .loading-text {
        font-size: 12px;
    }

    .loading-percentage {
        font-size: 10px;
    }

    /* Gallery mobile adjustments */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 20px 0;
    }

    .gallery-item {
        border-radius: 5px;
    }

    .gallery-item img {
        height: 180px;
    }

    .lightbox-container {
        max-width: 95vw;
        max-height: 95vh;
        padding: 20px;
    }

    .lightbox-close {
        top: -30px;
        right: 0px;
        font-size: 24px;
        width: 35px;
        height: 35px;
    }

    /* -------------------- ASCII ANIMATION ------------------ */

    .ascii-animation-container {
        margin-top: 20px;
        text-align: center;
        border-radius: 8px;
        padding: 20px;
    }

    #ascii-output {
        background: #000;
        padding: 15px;
        border-radius: 4px;
        overflow: auto;
        width: 100%;
        min-height: 300px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #ascii-output pre {
        margin: 0;
        line-height: 1;
        white-space: pre;
    }

    @media (max-width: 768px) {
        #ascii-output pre {
            font-size: 6px;
            transform: scale(0.8);
        }
    }
}

.home-layout .sidebar {
    position: fixed;
    top: 50%;
    left: 58%;
    transform: translateY(-50%);
    margin: 0;
    padding-left: 20px;
}

html {
    background-color: #000;
}

/* Audio Toggle */
.audio-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: 1px solid white;
    padding: 10px;
    font-family: 'VT323', monospace;
    cursor: pointer;
    z-index: 1000;
    font-size: 16px;
    pointer-events: auto;
    /* Ensure clickable even if header ignores events, but it is button so auto is default */
}

.audio-toggle:hover {
    background: white;
    color: black;
}

.audio-toggle svg {
    display: block;
}

/* Ensure SVG fits */

/* Support for video fading */
#bgVideo.video-hidden {
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

#bgVideo {
    opacity: 1;
    transition: opacity 2s ease-in-out;
}

/* Ensure content area behaves correctly in the new flex layout */
.content-area {
    width: 100%;
    /* Same flex properties as .post had, or allowing .post to fill it */
    flex: 0 1 700px;
    max-width: 700px;
    /* Constrain it */
    box-sizing: border-box;
    margin: 0;
    /* Let flex gap handle spacing if any */

    /* Scroll support */
    max-height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
    /* Optional style choice */
}

.content-area::-webkit-scrollbar {
    display: none;
}

/* Ensure .post inside content-area fills it */
.content-area .post {
    flex: none;
    width: 100%;
    max-width: 100%;
    margin: 200px auto 150px auto;
    /* Lower stories by 200px, add 150px space at the bottom */
}

.content-area .archive-post {
    flex: none;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 150px auto;
    /* Archive handles its own internal margins, add 150px space at the bottom */
}

/* -------------------- Header ASCII Art ------------------ */


.header-ascii-art {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -100;
    pointer-events: none;
    text-align: center;
    width: 100%;
    /* Removed negative margin to center exactly */
}

.header-ascii-art pre {
    font-family: "VT323", monospace;
    color: white;
    /* Default to white */
    text-shadow: 0 0 2px white;
    /* Subtle white glow */
    font-size: 16px;
    line-height: 1.2;
    margin: 0;
    white-space: pre;
    display: inline-block;
    letter-spacing: 0;
    text-align: left;
    /* Ensure lines align relative to each other */
}

.header-ascii-art .cyan {
    color: var(--static-cyan);
    text-shadow:
        0 0 5px var(--static-cyan),
        0 0 10px var(--static-cyan),
        0 0 20px var(--static-cyan);
}

/* -------------------- OPTICS PAGE ------------------ */

.optics-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 65%;
    margin: 50px auto 0 auto; /* Align gap with Logs */
    position: relative;
    left: 50px; /* Move closer to the menu */
}

.optics-box {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid #555;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.optics-box:hover {
    border-color: var(--static-cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

.optics-box::after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65); /* Darken overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Orbit", serif; /* Menu font */
    font-size: 24px;
    letter-spacing: 4px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Ensure it doesn't block hover/click */
    z-index: 10;
}

.photo-box::after {
    content: "Photo";
}

.video-box::after {
    content: "Video";
}

.optics-box:hover::after {
    opacity: 1;
}

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

/* -------------------- PHOTO GALLERY PAGE ------------------ */

.photo-gallery-page {
    flex-basis: 1200px; /* Widen the page from default 700px */
    max-width: calc(100% - 250px);
    width: 100%;
    padding: 20px 40px 100px 40px; /* Generous bottom padding to prevent bottom clipping */
}

.photo-gallery {
    display: flex;
    flex-direction: row;
    gap: 30px; /* Space between columns */
    width: 100%;
}

.photo-gallery-single {
    flex-direction: column;
    align-items: center;
    margin-bottom: 100px;
}

.gallery-column {
    display: flex;
    flex-direction: column;
    flex: 1; /* Both columns take equal width */
    gap: 30px; /* Space between images vertically */
    width: 100%;
}

.photo-gallery img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #333;
    position: relative; /* Required for z-index */
}

.photo-gallery img:hover {
    transform: scale(1.02);
    z-index: 10; /* Ensure hovered image pops over adjacent columns */
}

.load-more-btn {
    text-decoration: none;
    color: #ffffff;
    padding: 2px 7px;
    border-radius: 0;
    display: inline-block;
    position: relative;
    background-color: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    font-family: "Orbit", serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 30px;
    margin-bottom: 80px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    /* To mimic menu entry static appearance initially */
    text-shadow: none;
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background-color: transparent;
    border: 1px solid transparent;
    box-shadow: none;
    z-index: -1;
    transition: background-color 0.1s ease;
    pointer-events: none;
}

.load-more-btn:hover {
    color: #000000 !important;
    border-style: solid !important;
    border-width: 1px !important;
    transform: translateX(3px);
}

.load-more-btn:hover::before {
    background-color: white;
    border-color: white;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    z-index: -1;
}

.video-box {
    background-color: #000;
}

.wireframe {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.wire-cross1, .wire-cross2 {
    position: absolute;
    top: 50%;
    left: -20%;
    width: 140%;
    height: 1px;
    background-color: #555;
}

.wire-cross1 {
    transform: rotate(29.35deg);
}

.wire-cross2 {
    transform: rotate(-29.35deg);
}

.yt-text {
    font-family: "VT323", monospace;
    font-size: 48px;
    color: #fff;
    z-index: 2;
    background-color: #000;
    padding: 0 20px;
    letter-spacing: 4px;
}