/* Loader overlay Lottie duplication */
#lottie-loader-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

#lottie-foreground {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 350px;
    z-index: 2;
    pointer-events: none;
}

#lottie-container {
    position: relative;
    z-index: 3;

}

:root {
    --cyan: #00DBFF;
    --magenta: #FF007A;
    --white: #FFFFFF;
    --bg-dark: #050505;
    --grey-ui: #f0f0f0;
    --font-main: 'Fira Code', 'Courier New', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
    text-transform: uppercase;
}

body {
    background: var(--bg-dark);
    color: #fff;
    height: 100vh;
    overflow: hidden;
    font-size: 10px;
}


.social-links {
    text-align: left;
}

.social-icons {
    display: inline-flex;
    gap: 15px;
    margin-top: 10px;
}

.social-icons a {
    font-size: 24px;
    color: #000;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--cyan);
}


/* Loader & Transitions */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#lottie-container {
    width: 100vw;
    height: 100vh;
    background: #000;
    overflow: hidden;
    z-index: 0;
}

#lottie-container canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.transition-layer {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 0.4s cubic-bezier(0.8, 0, 0.2, 1);
}

.transition-layer.active {
    left: 0;
}

.scanlines {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.05) 50%);
    background-size: 100% 2px;
    pointer-events: none;
    z-index: 100;
}

/* Layout Grid */
.background-layer {
    position: fixed;
    display: flex;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.side-cyan {
    width: 15%;
    background: var(--cyan);
}

.center-void {
    width: 45%;
    background: var(--grey-ui);
}

.side-magenta {
    width: 40%;
    background: var(--magenta);
}

.ui-wrapper {
    display: grid;
    grid-template-columns: 15% 45% 40%;
    height: calc(100vh - 80px);
    z-index: 10;
}

/* Navigation */
.nav-section {
    padding: 20px;
    color: #000;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

.logo-box {
    border: 3px solid #000;
    padding: 12px;
    margin-bottom: 30px;
    cursor: pointer;
    transition: 0.1s;
    display: inline-block;
    z-index: 3;
}

.logo-box:hover {
    background: #000;
    color: var(--cyan);
}

.logo-inner {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 16px;
    font-weight: 900;
}

.logo-sub {
    font-size: 8px;
}

.nav-item {
    font-weight: 900;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 11px;
}

.nav-item:hover {
    color: var(--white);
    background: #000;
    padding-left: 5px;
}

/* Main Content */
.content-main {
    padding: 40px;
    color: #333;
    overflow-y: auto;
    position: relative;
}

.header-block {
    border-bottom: 5px solid #000;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.glitch-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.project-box {
    background: #fff;
    border: 1px solid #000;
    padding: 15px;
    color: #000;
    cursor: pointer;
    animation: glitchPop 0.3s forwards;
    z-index: 2;
}

.project-box:hover {
    background: var(--cyan);
    color: #fff;
}

/* image gallery container placed beneath the letter/box elements */
.image-gallery {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.gallery-image {
    width: calc(33% - 10px);
    cursor: pointer;
    object-fit: cover;
}

.text-block {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    color: #000;
    opacity: 0.6;
    opacity: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 60px;
    transition: min-height 0.3s, height 0.3s, padding 0.3s;
    z-index: 2;
}

.text-block p {
    font-size: 13px;
    line-height: 1.5;
    margin-top: 5px;
    width: 100%;
    text-align: left;
}

.text-block.secondary {
    background: #fff;
    color: #000;
    opacity: .8;
}

.text-block.tirt {
    background: #fff;
    padding: 20px;
    height: 50%;
}

.block-label {
    position: absolute;
    top: -8px;
    left: 10px;
    background: var(--cyan);
    color: #000;
    font-size: 7px;
    font-weight: 900;
    padding: 2px 5px;
}

.block-label.secondary {
    background: #FF007A;
    color: #00DBFF;
}

.text-block p {
    font-size: 13px;
    line-height: 1.5;
    margin-top: 5px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.visual-placeholder {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #fff;
    height: 180px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: #fff;
}

/* Right Panel */
.right-panel {
    position: relative;
    /* Established for background layering */
    padding: 30px;
    color: #fff;
    overflow-y: auto;
    overflow-x: hidden;
}

.node-map {
    font-family: monospace;
    font-size: 8px;
    line-height: 1;
    opacity: 1;
}

.project-detail-view {
    position: relative;
    animation: glitchPop 0.4s steps(3) forwards;
}

.project-close-btn {
    display: inline-block;
    border: 1px solid var(--cyan);
    padding: 5px 10px;
    font-size: 8px;
    font-weight: 900;
    color: var(--cyan);
    cursor: pointer;
    margin-bottom: 20px;
    z-index: 100;
    position: relative;
    transition: all 0.2s;
}

.project-close-btn:hover {
    background: var(--cyan);
    color: #000;
    box-shadow: 0 0 10px var(--cyan);
}

/* Footer */
.system-footer {
    height: 80px;
    background: #000;
    border-top: 2px solid var(--cyan);
    display: flex;
    padding: 10px;
}

.log-window {
    flex: 1;
    height: 100%;
    overflow: hidden;
    border-right: 1px solid #333;
}

.log-header {
    font-size: 7px;
    color: #666;
    margin-bottom: 4px;
}

.log-content {
    color: var(--cyan);
    font-family: monospace;
    font-size: 8px;
}

.metadata-bits {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 7px;
    color: #fff;
    gap: 4px;
}

/* THEME INJECTION */
.color-main-bg {
    background-color: var(--magenta) !important;
}

.color-var-bg {
    background-color: var(--cyan) !important;
}

.terminal-header,
.logo-box:hover,
.social-icon:hover {
    background: var(--magenta) !important;
}

/* Social Dock */
.social-dock {
    margin-top: auto;
    display: flex;
    gap: 10px;
    padding: 20px 0;
}

.social-icon {
    width: 30px;
    height: 30px;
    border: 2px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #000;
    font-weight: 900;
    background: #fff;
}

/* Modal Settings */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #000;
    border: 2px solid var(--magenta);
    width: 300px;
}

.settings-grid {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.settings-grid label {
    font-size: 8px;
    color: var(--magenta);
}

/* ASCII Clock Styling */
.ascii-clock-style {
    background: #fff;
    color: #000;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    line-height: 1;
    ;
    margin-top: 10px;
    overflow-x: auto;
}

/* Vector Art Graphics (Screenshot Inspired) */
.vector-deco {
    position: absolute;
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 100px;
    height: 100px;
    pointer-events: none;
}

.v1 {
    top: 10%;
    right: 5%;
    border-radius: 50%;
    border-width: 5px;
}

.v2 {
    bottom: 20%;
    left: 10%;
    transform: rotate(45deg);
    border-right: 10px solid var(--cyan);
}

/* Terminal */
.terminal-window {
    background: #fff;
    border: 2px solid var(--magenta);
    overflow: hidden;
    margin-bottom: 20px;
}

.terminal-header {
    background-color: var(--magenta);
    color: #000;
    padding: 4px 10px;
    font-weight: 900;
    font-size: 8px;
    display: flex;
    justify-content: space-between;
}

.terminal-body {
    padding: 10px;
    color: var(--magenta);
    font-family: monospace;
    font-size: 10px;
}

/* Interactive Terminal */
#interactive-terminal {
    height: 250px;
    display: flex;
    flex-direction: column;
}

#terminal-output {
    flex-grow: 1;
    overflow-y: auto;
    color: var(--cyan);
}

.terminal-input-container {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    background: #111;
    border-top: 1px solid var(--magenta);
}

.terminal-input-container .prompt {
    color: var(--magenta);
    margin-right: 5px;
    font-weight: bold;
}

.terminal-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: monospace;
    font-size: 12px;
}

/* Effects */
.center-void.glitch {
    animation: glitch-anim 0.3s steps(2, end) infinite;
}

#matrix-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    background: #000;
}

/* Background Lottie Animation */
.lottie-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 1;
    pointer-events: none;
}

/* Animations */
@keyframes glitchPop {
    0% {
        filter: invert(1);
        opacity: 0;
    }

    100% {
        filter: invert(0);
        opacity: 1;
    }
}



/* Info Widget */
#info-widget h5 {
    color: var(--cyan);
    font-size: 8px;
    margin-bottom: 5px;
}

#clocks span {
    display: inline-block;
    margin-right: 15px;
    font-size: 10px;
}

#weather p,
#news p {
    font-size: 10px;
    margin-top: 5px;
}

weather p,
#news p {
    font-size: 10px;
    margin-top: 5px;
}

/* Custom Media Display & Lightbox */
.media-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

@media (min-width: 1024px) {
    .media-gallery {
        grid-template-columns: 1fr 1fr;
    }
    .video-container {
        grid-column: 1 / -1; /* Make videos span full width for cinematic look */
    }
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    border: 1px solid var(--cyan);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.media-fit {
    width: 100%;
    height: auto;
    border: 1px solid var(--cyan);
    margin-bottom: 15px;
    transition: transform 0.2s;
    break-inside: avoid;
    display: block;
}

img.media-fit.clickable {
    cursor: zoom-in;
}

img.media-fit.clickable:hover {
    transform: scale(1.02);
}

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.3s;
}

.lightbox-overlay.active {
    opacity: 1;
}

.lightbox-img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border: 1px solid var(--cyan);
    box-shadow: 0px 0px 30px rgba(0, 219, 255, 0.2);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--cyan);
    font-size: 24px;
    font-family: var(--font-main);
    cursor: pointer;
    font-weight: 900;
}

/* VOLUME SLIDER - INDUSTRIAL BLACK */
.volume-control {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-bottom: 15px;
}

.volume-label {
    font-size: 8px;
    color: #fff;
    margin-bottom: 4px;
    font-weight: 900;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 6px;
    background: #fff;
    /* Pure black as requested */
    border: 1px solid rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
}

/* Thumb for Chrome/Safari */
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 16px;
    background: #fff;
    border: 1px solid #fff;
    cursor: pointer;
}

/* Thumb for Firefox */
.volume-slider::-moz-range-thumb {
    width: 10px;
    height: 16px;
    background: #fff;
    border: 1px solid #fff;
    cursor: pointer;
    border-radius: 0;
}

/* Ensure Side Panel Animation acts as a Background */
#lottie-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Behind terminal content */
    pointer-events: none;
    /* Let clicks pass through to content */
    overflow: hidden;
    opacity: 0.8;
    /* Subtle transparency for better text readability */
}

#terminal-content {
    position: relative;
    z-index: 10;
    /* Above the background animation */
    pointer-events: auto;
}

#lottie-panel canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    /* This makes it fill the whole div regardless of aspect ratio */
}

/* Mobile Optimizations - Moved to end for proper override precedence */
@media (max-width: 768px) {
    body {
        background: var(--grey-ui);
        overflow-y: auto;
        height: auto;
    }

    h2 {
        color: #000;
    }

    .background-layer {
        display: none;
    }

    .ui-wrapper {
        display: flex;
        flex-direction: column;
        height: auto;
    }

    .nav-section {
        background: var(--cyan);
        padding: 15px;
        color: #000;
        z-index: 1;
    }

    .content-main {
        background: var(--grey-ui);
        min-height: auto;
        padding: 20px;
        z-index: 1;
    }

    .right-panel {
        background: var(--magenta);
        min-height: auto;
        padding: 20px;
        overflow: visible;
        z-index: 1;
    }

    .glitch-grid {
        grid-template-columns: 1fr;
    }

    #interactive-terminal {
        height: 200px;
        margin-bottom: 20px;
    }

    .system-footer {
        position: relative;
        height: auto;
        flex-direction: column;
    }

    .log-window {
        border-right: none;
        padding-bottom: 10px;
    }

    /* Hide all animation containers on mobile for performance */
    #lottie-loader,
    #lottie-loader-bg,
    #lottie-foreground,
    #lottie-container,
    #lottie-background,
    #lottie-panel,
    .lottie-bg-container,
    .volume-control,
    div[onclick="togglePanelAnim()"] {
        display: none !important;
    }
}