/* ========== CSS VARIABLES ========== */
:root {
    --void-black: #0a0a0f;
    --deep-blue: #0d0d2b;
    --liminal-purple: #1a0a2e;
    --neon-magenta: #ff2d95;
    --neon-cyan: #00f0ff;
    --muted-lavender: #8a7ca8;
    --checker-dark: #12122a;
    --checker-light: #1e1e3a;
    --text-primary: #d4cfe6;
    --text-dim: #6b6590;
    --glass-bg: rgba(13, 13, 43, 0.7);
    --glass-border: rgba(138, 124, 168, 0.15);
}

/* ========== RESET & BASE ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--void-black);
    color: var(--text-primary);
    font-family: 'Share Tech Mono', monospace;
    overflow-x: hidden;
    min-height: 100vh;
    cursor: crosshair;
}

a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--neon-magenta);
    text-shadow: 0 0 12px var(--neon-magenta);
}

/* ========== CHECKERBOARD BACKGROUND ========== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-conic-gradient(
            var(--checker-dark) 0% 25%,
            var(--checker-light) 0% 50%
        ) 0 0 / 60px 60px;
    opacity: 0.15;
    z-index: -2;
    perspective: 800px;
    transform: perspective(600px) rotateX(45deg) scale(2.5);
    transform-origin: center 20%;
}

/* Fog / gradient overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 50% 0%, transparent 0%, var(--void-black) 70%),
        linear-gradient(180deg,
            rgba(10, 10, 15, 0.3) 0%,
            rgba(26, 10, 46, 0.5) 40%,
            rgba(13, 13, 43, 0.8) 70%,
            var(--void-black) 100%
        );
    z-index: -1;
}

/* ========== SCANLINE OVERLAY ========== */
.scanlines {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}

/* ========== NAVIGATION ========== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(10, 10, 15, 0.95) 0%, rgba(10, 10, 15, 0.6) 80%, transparent 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 32px;
}

.nav-brand {
    font-family: 'Cinzel', serif;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--neon-cyan);
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--muted-lavender);
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--neon-magenta);
    box-shadow: 0 0 6px var(--neon-magenta);
    transition: width 0.4s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
    text-shadow: none;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--neon-cyan);
}

/* ========== HERO SECTION ========== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    position: relative;
}

/* Floating orb decoration */
.hero::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 45, 149, 0.08) 0%, transparent 70%);
    top: 20%;
    left: 10%;
    animation: float-orb 12s ease-in-out infinite;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.05) 0%, transparent 70%);
    bottom: 15%;
    right: 5%;
    animation: float-orb 16s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.1); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

.hero-title {
    font-family: 'Cinzel', serif;
    font-weight: 900;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(
        180deg,
        var(--text-primary) 0%,
        var(--muted-lavender) 50%,
        var(--text-dim) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: title-reveal 2s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes title-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--text-dim);
    letter-spacing: 4px;
    margin-bottom: 48px;
    animation: subtitle-reveal 2s ease-out 0.5s forwards;
    opacity: 0;
}

@keyframes subtitle-reveal {
    to { opacity: 1; }
}

.hero-divider {
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--muted-lavender), transparent);
    margin-bottom: 48px;
    animation: subtitle-reveal 2s ease-out 0.8s forwards;
    opacity: 0;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    animation: pulse-fade 3s ease-in-out infinite;
}

.scroll-indicator .arrow {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, var(--muted-lavender), transparent);
}

@keyframes pulse-fade {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* ========== GALLERY SECTION ========== */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 32px;
}

.section-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    letter-spacing: 0.08em;
    margin-bottom: 48px;
    color: var(--text-primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 4px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--checker-dark);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s ease;
    filter: saturate(0.7) brightness(0.8);
}

.gallery-item:hover img {
    transform: scale(1.08);
    filter: saturate(1.1) brightness(1);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(10, 10, 15, 0.6) 100%);
    pointer-events: none;
}

.gallery-item .item-label {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 2;
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(212, 207, 230, 0.6);
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.4s ease;
}

.gallery-item:hover .item-label {
    opacity: 1;
    transform: translateY(0);
}

/* Featured (first item spans 2 cols) */
.gallery-item.featured {
    grid-column: span 2;
    aspect-ratio: 32 / 9;
}

/* ========== SYSTEMS PANEL (Killdozer + links) ========== */
.systems-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 80px;
}

.sys-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s ease;
}

.sys-card:hover {
    border-color: rgba(138, 124, 168, 0.35);
}

.sys-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.sys-card:hover::before {
    opacity: 0.5;
}

.sys-card-label {
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.sys-card-title {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.sys-card-desc {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-dim);
    margin-bottom: 24px;
}

.sys-btn {
    display: inline-block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 240, 255, 0.25);
    padding: 12px 24px;
    transition: all 0.3s ease;
    background: transparent;
}

.sys-btn:hover {
    color: var(--void-black);
    background: var(--neon-cyan);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
    text-shadow: none;
}

.sys-btn.magenta {
    color: var(--neon-magenta);
    border-color: rgba(255, 45, 149, 0.25);
}

.sys-btn.magenta:hover {
    color: var(--void-black);
    background: var(--neon-magenta);
    border-color: var(--neon-magenta);
    box-shadow: 0 0 30px rgba(255, 45, 149, 0.2);
}

/* Full-width variant */
.sys-card.full-width {
    grid-column: 1 / -1;
}

/* ========== ABOUT SECTION ========== */
.about-section {
    margin-top: 80px;
    padding: 64px 0;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.about-content {
    max-width: 680px;
}

.about-content p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    line-height: 2;
    color: var(--muted-lavender);
}

.about-content .terminal-block {
    margin-top: 32px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    line-height: 2;
    color: var(--text-dim);
}

.about-content .terminal-block span.prompt {
    color: var(--neon-cyan);
}

.about-content .terminal-block span.output {
    color: var(--muted-lavender);
}

/* ========== MUSIC PLAYER ========== */
.music-section {
    margin-top: 80px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.music-label {
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-dim);
    white-space: nowrap;
}

.music-section audio {
    flex: 1;
    max-width: 400px;
    height: 36px;
    filter: invert(0.85) hue-rotate(180deg) saturate(0.5);
    opacity: 0.7;
    transition: opacity 0.3s;
}

.music-section audio:hover {
    opacity: 1;
}

/* ========== FOOTER ========== */
footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 2px;
}

footer a {
    color: var(--text-dim);
}

footer a:hover {
    color: var(--neon-magenta);
}

/* ========== SCROLL ANIMATIONS ========== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== LIGHTBOX ========== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border: 1px solid var(--glass-border);
}

.lightbox-close {
    position: absolute;
    top: 32px;
    right: 32px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-dim);
    background: none;
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    color: var(--neon-magenta);
    border-color: var(--neon-magenta);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .nav-inner {
        flex-direction: column;
        gap: 12px;
        padding: 12px 20px;
    }

    .nav-links {
        gap: 16px;
        justify-content: center;
    }

    .nav-links a {
        font-size: 10px;
        letter-spacing: 2px;
    }

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

    .gallery-item.featured {
        grid-column: span 1;
        aspect-ratio: 16 / 9;
    }

    .systems-panel {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 60px 20px;
    }

    .music-section {
        flex-direction: column;
        align-items: flex-start;
    }

    footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}