@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
body.has-site-tabs {
    --site-tabs-top: 0;
    --site-tabs-shell-height: 52px;
    --site-tabs-gap: 4px;
    --site-tabs-shell-bg: #263f8a;
    --site-tabs-shell-border: #10235e;
    --site-tab-bg: rgba(10, 14, 28, 0.94);
    --site-tab-border: rgba(240, 240, 240, 0.22);
    --site-tab-fg: #f0f0f0;
    --site-tab-active-bg: #fcefd4;
    --site-tab-active-fg: #10235e;
    --site-tab-active-border: rgba(16, 35, 94, 0.9);
    --site-world-link-alpha: 0.48;
    --site-world-glow-alpha: 0.32;
    --site-world-node-alpha: 1;
    --site-world-spark-alpha: 0.9;
    --site-world-near-line-width: 2.4;
    --site-world-far-line-width: 1.4;
    --site-world-canvas-opacity: 1;
    --site-world-overlay-opacity: 1;
}

html.dark-mode body.has-site-tabs {
    --site-world-link-alpha: 0.3;
    --site-world-glow-alpha: 0.22;
    --site-world-node-alpha: 0.96;
    --site-world-spark-alpha: 0.7;
    --site-world-near-line-width: 1.8;
    --site-world-far-line-width: 1.1;
    --site-world-canvas-opacity: 0.94;
    --site-world-overlay-opacity: 0.97;
}

.site-tabs {
    position: fixed;
    top: var(--site-tabs-top);
    left: 0;
    width: 100%;
    min-height: var(--site-tabs-shell-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    box-sizing: border-box;
    z-index: 1400;
    background: var(--site-tabs-shell-bg);
    border-bottom: 2px solid var(--site-tabs-shell-border);
    box-shadow: 0 2px 0 0 #ffffff;
    font-family: 'Space Mono', 'Courier New', Courier, monospace;
}

.site-tabs-group {
    display: flex;
    gap: var(--site-tabs-gap);
}

.site-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--site-tab-border);
    border-bottom: none;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    background: var(--site-tab-bg);
    color: var(--site-tab-fg);
    text-decoration: none;
    text-align: center;
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(0.5rem, 0.85vw, 0.75rem);
    line-height: 2;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    top: 2px; /* Push down slightly so it rests on bottom border */
    overflow: hidden;
    box-sizing: content-box;
}

/* Per-tab progress bar accent */
.site-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #d62020;
    border-radius: 6px 6px 0 0;
    z-index: 1;
}
html.dark-mode .site-tab::before {
    background: #00ff00;
}
.site-tab.is-active::before {
    width: var(--tab-scroll-progress, 0%);
    height: 3px;
    transition: width 0.1s;
}

@keyframes site-tab-text-glitch {
    0%, 100% { text-shadow: none; }
    20% { text-shadow: -2px 0 red, 2px 0 #00ffff; }
    40% { text-shadow: 2px 0 red, -2px 0 #00ffff; }
    60% { text-shadow: none; }
    80% { text-shadow: -1px 0 #00ff00, 1px 0 red; }
}

.site-tab:not(.is-active):hover {
    color: #d62020;
    text-decoration: underline;
    animation: site-tab-text-glitch 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
}

.site-tab.is-active {
    background: var(--site-tab-active-bg);
    color: var(--site-tab-active-fg);
    border-color: var(--site-tab-active-border);
    top: 0;
    padding-bottom: calc(0.3rem + 2px);
    pointer-events: none;
    font-weight: bold;
}

/* Controls inside site-tabs */
.site-tabs-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-tabs-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 4px;
    color: #fff;
    transition: opacity 0.2s, transform 0.2s;
    line-height: 1;
}

.site-tabs-btn:hover {
    transform: scale(1.2);
}

body.index-page {
    --site-world-a: rgba(50, 190, 255, 0.22);
    --site-world-b: rgba(255, 120, 60, 0.20);
    --site-world-c: rgba(255, 230, 80, 0.20);
    padding-top: 76px !important;
}

body.blog-page {
    --site-world-a: rgba(40, 240, 150, 0.12);
    --site-world-b: rgba(60, 130, 255, 0.12);
    --site-world-c: rgba(255, 70, 70, 0.12);
    padding-top: 74px !important;
}



body.blog-page header {
    top: 56px;
}

body.blog-page .tag-filter {
    top: 106px;
}

body.photo-page {
    --site-world-a: rgba(80, 210, 255, 0.18);
    --site-world-b: rgba(255, 155, 70, 0.18);
    --site-world-c: rgba(255, 90, 140, 0.18);
    padding-top: 74px !important;
}



body.game-page {
    --site-world-a: rgba(255, 210, 105, 0.20);
    --site-world-b: rgba(255, 120, 120, 0.20);
    --site-world-c: rgba(255, 255, 255, 0.12);
    padding-top: 72px !important;
}

body.game-page .back-btn {
    top: 66px;
}

body.game-page #ui-layer {
    top: 70px;
}

body.resume-page {
    --site-tabs-top: 0;
    --site-tabs-shell-bg: #263f8a;
    --site-tabs-shell-border: #10235e;
    --site-tab-active-bg: #fcefd4;
    --site-tab-active-fg: #10235e;
    --site-tab-active-border: rgba(16, 35, 94, 0.9);
    --site-world-a: rgba(70, 240, 210, 0.18);
    --site-world-b: rgba(110, 80, 255, 0.16);
    --site-world-c: rgba(255, 200, 60, 0.14);
}

body.resume-page .content {
    padding-top: 96px;
}

[data-theme="light"] body.resume-page {
    --site-tabs-shell-bg: #263f8a;
    --site-tabs-shell-border: #10235e;
    --site-tab-active-bg: #fcefd4;
    --site-tab-active-fg: #10235e;
    --site-tab-active-border: rgba(16, 35, 94, 0.9);
}

@media (max-width: 900px) {
    body.resume-page {
        --site-tabs-top: 0;
    }

    body.resume-page .content {
        padding-top: 60px !important;
    }

    body.resume-page .sidebar {
        top: 0 !important;
        padding-top: 68px !important;
        height: auto !important;
        min-height: auto !important;
        position: relative !important;
    }
}

@media (max-width: 760px) {
    body.has-site-tabs {
        --site-tabs-shell-height: 52px;
        --site-tabs-gap: 2px;
    }

    .site-tabs {
        width: 100%;
        padding: 3px 4px;
    }

    .site-tab {
        padding: 0.15rem 0.25rem;
        font-size: clamp(0.32rem, 1.6vw, 0.45rem);
    }

    .site-tabs-btn {
        font-size: 0.8rem;
        padding: 0 2px;
    }

    body.blog-page header {
        top: 48px;
    }

    body.blog-page .tag-filter {
        top: 96px;
    }

    body.game-page .back-btn {
        top: 60px;
    }

    body.game-page #ui-layer {
        top: 64px;
    }
}

/* Global Dark/Hacker mode overrides for consistency across pages */
body.hacker-mode {
    --bg-color: #121010 !important;
    --text-color: #00ff00 !important;
    --border-color: #1a4a1a !important;
    --link-color: #00ff00 !important;
    --link-hover: #ff00ff !important;
}

body.hacker-mode.game-page #ui-layer, 
body.hacker-mode.game-page .restart-btn,
body.hacker-mode.game-page canvas {
    background-color: #000 !important;
}

@media (min-width: 901px) {
    body.resume-page .sidebar {
        top: 52px !important;
        height: calc(100vh - 52px) !important;
        justify-content: center !important;
        padding-top: 0 !important;
    }
    body.resume-page .top-social-bar {
        top: 52px !important;
    }
}



/* Global Scrollbar Hiding */
::-webkit-scrollbar { display: none; }
html, body { -ms-overflow-style: none; scrollbar-width: none; overflow-x: hidden; }

/* Full-width scroll progress bar (all pages) */
#site-full-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #22d3ee, #a78bfa, #14b8a6);
    z-index: 9999;
    transition: width 0.08s linear;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.4);
}
html.dark-mode #site-full-progress {
    background: linear-gradient(90deg, #22d3ee, #a78bfa, #14b8a6);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.4);
}

/* Shared world canvas */
.site-world-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: var(--site-world-canvas-opacity, 0.88);
    filter: saturate(1.16) contrast(1.03);
}

body.has-site-tabs::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 16% 18%, var(--site-world-a, rgba(90, 197, 255, 0.16)), transparent 30%),
        radial-gradient(circle at 84% 24%, var(--site-world-b, rgba(255, 143, 92, 0.12)), transparent 28%),
        radial-gradient(circle at 50% 82%, var(--site-world-c, rgba(255, 255, 255, 0.08)), transparent 34%);
    opacity: var(--site-world-overlay-opacity, 0.95);
}

@media (max-width: 760px) {
}

