/* luminescence.dev — Deep-space terminal with layered depth */
/* Colors: #000000, #FFFFFF (opacity-only palette) */
/* Fonts: Jost, JetBrains Mono */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    background-color: #000000;
    color: #FFFFFF;
}

/* Layers */
.layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Layer 0: Void */
.layer-void {
    z-index: 0;
    background-color: #000000;
}

/* Layer 1: Geometric Constellations */
.layer-geometry {
    z-index: 1;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.layer-geometry.visible {
    opacity: 1;
}

.geo-shape {
    position: absolute;
}

.geo-circle {
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.03);
    animation: geo-drift 60s ease-in-out infinite;
}

.geo-line {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.025);
    animation: geo-drift 80s ease-in-out infinite reverse;
}

.geo-hex {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    border: 1px solid rgba(255, 255, 255, 0.03);
    background: transparent;
    position: relative;
}

.geo-hex::after {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

@keyframes geo-drift {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(8px, -5px); }
    50% { transform: translate(-4px, 10px); }
    75% { transform: translate(6px, 3px); }
}

/* Layer 2: Terminal */
.layer-terminal {
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.terminal-container {
    width: 70ch;
    max-width: 90vw;
    padding: 40px;
    position: relative;
}

.terminal-output {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 0.85rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
}

.terminal-output .line {
    opacity: 0;
    transition: opacity 0.3s ease;
    margin-bottom: 2px;
}

.terminal-output .line.visible {
    opacity: 1;
}

.terminal-output .line-header {
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    font-size: clamp(2rem, 5vw, 4rem);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.9);
    margin: 20px 0 10px;
    line-height: 1.2;
}

.terminal-output .line-command {
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.08em;
}

.terminal-output .line-dim {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
}

.terminal-output .line-bright {
    color: rgba(255, 255, 255, 0.85);
}

.terminal-output .line-separator {
    color: rgba(255, 255, 255, 0.08);
    letter-spacing: 0.5em;
    font-size: 0.6rem;
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background-color: rgba(255, 255, 255, 0.7);
    animation: cursor-blink 1s step-end infinite;
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.terminal-cursor.visible {
    opacity: 1;
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Layer 3: Near patterns */
.layer-near {
    z-index: 3;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.layer-near.visible {
    opacity: 1;
}

.near-dot {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    animation: near-pulse 4s ease-in-out infinite;
}

.near-dot:nth-child(2n) {
    animation-delay: -2s;
}

.near-ring {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.06);
    animation: near-pulse 6s ease-in-out infinite;
}

@keyframes near-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Layer 4: Scan-lines */
.layer-scanlines {
    z-index: 4;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.008) 2px,
        rgba(255, 255, 255, 0.008) 4px
    );
}

/* Responsive */
@media (max-width: 768px) {
    .terminal-container {
        padding: 20px;
        width: 100%;
    }

    .terminal-output .line-header {
        letter-spacing: 0.1em;
    }
}
