@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&display=swap');

body {
    font-family: 'Inter', sans-serif;
    background-color: #000000;
    color: #e2e8f0;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Background Structure */
.code-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Changed from -1 to 0 to sit on top of body bg */
    background: #000;
    overflow: hidden;
    font-family: 'Fira Code', monospace;
    pointer-events: none;
    user-select: none;
}

/* Code Stream Container */
.code-stream {
    width: 100%;
    color: #475569;
    opacity: 0.2;
    /* Increased opacity for better visibility */
    font-size: 14px;
    /* Slightly larger text */
    line-height: 1.6;
    white-space: pre;
    padding-left: 1rem;
    animation: drift 120s linear infinite;
    will-change: transform;
    /* Performance optimization */
}

/* Animation */
@keyframes drift {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-50%);
    }
}

/* Utility to ensure text readability over code */
.backdrop-fade {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 1) 100%);
}

/* --- Avatar Terminal & Hero Layout --- */

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

@media (min-width: 1024px) {
    .hero-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 3rem;
    }

    .hero-text {
        flex: 1;
        text-align: left;
    }
}

.avatar-terminal {
    width: 100%;
    max-width: 500px;
    height: 500px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(71, 85, 105, 0.5);
    box-shadow: 0 0 30px rgba(71, 85, 105, 0.3);
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
}

.avatar-canvas-container {
    width: 100%;
    height: calc(100% - 40px);
    position: relative;
    background: transparent;
}

.terminal-header {
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

/* --- System Terminal Component --- */

/* Glassbox Container */
.terminal-box {
    background: rgba(15, 23, 42, 0.6);
    /* Dark Slate Blue/Black tint */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(71, 85, 105, 0.2);
    /* Slate border */
    box-shadow: 0 0 20px rgba(71, 85, 105, 0.2);
    /* Soft glow */
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
    transform: translateZ(0);
    /* Hardware acceleration */
}

/* MacOS Window Dots */
.window-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
}

.dot-red {
    background: #ff5f56;
}

.dot-yellow {
    background: #ffbd2e;
}

.dot-green {
    background: #27c93f;
}

/* Scanline Effect */
.scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0.2));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
    opacity: 0.3;
}

/* Moving Scan Bar Animation */
.scan-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: rgba(71, 85, 105, 0.3);
    animation: scan 3s linear infinite;
    z-index: 11;
    pointer-events: none;
}

@keyframes scan {
    0% {
        top: 0%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Typing Effect Cursor */
.typing-cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background-color: #475569;
    /* Slate Blue cursor */
    vertical-align: bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Model Viewer Customization */
model-viewer {
    --poster-color: transparent;
}

model-viewer::part(default-progress-bar) {
    display: none;
}