/* ============================================================
   BENSALAH MOHAMED — Pixel / Retro Landing Page
   Orange + Black aesthetic
   ============================================================ */

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

:root {
    --black: #0a0a0a;
    --black-800: #111;
    --orange: #ff6b00;
    --orange-bright: #ff8800;
    --orange-glow: rgba(255, 107, 0, 0.4);
    --orange-dim: rgba(255, 107, 0, 0.15);
    --text-dim: #888;
    --text-muted: #555;
    --font-pixel: 'Press Start 2P', monospace;
    --font-ui: 'Inter', sans-serif;
    --scanline-size: 4px;
}

html, body {
    height: 100%;
    background: var(--black);
    color: var(--orange);
    font-family: var(--font-pixel);
    overflow: hidden;
}

/* ---------- LAYERS ---------- */
.crt-overlay {
    position: fixed;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.03) 0px,
        rgba(0, 0, 0, 0.03) 2px,
        transparent 2px,
        transparent 4px
    );
}

.scanlines {
    position: fixed;
    inset: 0;
    z-index: 9;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
}

.grid-bg {
    position: fixed;
    inset: 0;
    z-index: 1;
    background-image:
        linear-gradient(rgba(255, 107, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 107, 0, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

.vignette {
    position: fixed;
    inset: 0;
    z-index: 8;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    z-index: 5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    max-width: 960px;
    margin: 0 auto;
}

/* ---------- PIXEL CORNERS ---------- */
.pixel-corner {
    position: absolute;
    width: 32px;
    height: 32px;
    border-color: var(--orange);
    border-style: solid;
    opacity: 0.5;
}
.pixel-corner.tl { top: 16px; left: 16px; border-width: 3px 0 0 3px; }
.pixel-corner.tr { top: 16px; right: 16px; border-width: 3px 3px 0 0; }
.pixel-corner.bl { bottom: 16px; left: 16px; border-width: 0 0 3px 3px; }
.pixel-corner.br { bottom: 16px; right: 16px; border-width: 0 3px 3px 0; }

/* ---------- TERMINAL BAR ---------- */
.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--black-800);
    border: 1px solid #222;
    border-radius: 6px 6px 0 0;
    width: 100%;
    max-width: 680px;
    margin-bottom: 0;
}

.term-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.term-dot.red { background: #ff5f57; }
.term-dot.yellow { background: #ffbd2e; }
.term-dot.green { background: #28c840; }

.term-path {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-left: auto;
}

/* ---------- PROMPT LINE ---------- */
.prompt-line {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--text-dim);
    width: 100%;
    max-width: 680px;
    padding: 6px 16px;
    background: var(--black-800);
    border-left: 1px solid #222;
    border-right: 1px solid #222;
    display: flex;
    align-items: center;
    gap: 4px;
}
.prompt-user { color: var(--orange); }
.prompt-sep { color: var(--text-muted); }
.prompt-path { color: #5af; }
.prompt-dollar { color: var(--orange-bright); }
.prompt-cmd {
    color: var(--text-dim);
    animation: typing 2s steps(14) forwards;
    overflow: hidden;
    white-space: nowrap;
    max-width: 0;
    animation-fill-mode: forwards;
}

@keyframes typing {
    from { max-width: 0; }
    to { max-width: 200px; }
}

/* ---------- NAME ---------- */
.name {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 24px 16px;
    background: var(--black-800);
    border-left: 1px solid #222;
    border-right: 1px solid #222;
    width: 100%;
    max-width: 680px;
    position: relative;
}

.name-line {
    font-family: var(--font-pixel);
    font-size: clamp(2.2rem, 10vw, 5.5rem);
    color: var(--orange);
    text-shadow:
        0 0 20px var(--orange-glow),
        0 0 60px var(--orange-glow),
        0 0 100px rgba(255, 107, 0, 0.15);
    line-height: 1.2;
    letter-spacing: 6px;
    text-align: center;
    animation: glitch-flicker 4s infinite alternate;
}

.name-line.last {
    font-size: clamp(1.8rem, 7vw, 4rem);
    letter-spacing: 8px;
    opacity: 0.85;
}

@keyframes glitch-flicker {
    0%, 100% { opacity: 1; transform: translate(0); }
    92% { opacity: 0.97; }
    94% { opacity: 1; transform: translate(-1px, 0); }
    96% { opacity: 0.95; transform: translate(1px, 0); }
    98% { opacity: 1; transform: translate(0); }
}

/* ---------- CURSOR ---------- */
.cursor-block {
    width: 100%;
    max-width: 680px;
    background: var(--black-800);
    border-left: 1px solid #222;
    border-right: 1px solid #222;
    padding: 0 16px 16px;
    text-align: left;
}

.cursor-char {
    color: var(--orange);
    font-size: 1.5rem;
    animation: blink-cursor 1s step-end infinite;
}

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

/* ---------- SUB INFO ---------- */
.sub-info {
    width: 100%;
    max-width: 680px;
    background: var(--black-800);
    border-left: 1px solid #222;
    border-right: 1px solid #222;
    padding: 8px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-line {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    display: flex;
    gap: 8px;
}

.info-label {
    color: var(--orange-bright);
    min-width: 70px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-sep {
    color: var(--text-muted);
}

.info-value {
    color: #5af;
}

/* ---------- BOOT FOOTER ---------- */
.boot-footer {
    width: 100%;
    max-width: 680px;
    background: var(--black-800);
    border: 1px solid #222;
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.progress-track {
    width: 100%;
    height: 4px;
    background: #222;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    width: 0;
    height: 100%;
    background: var(--orange);
    border-radius: 2px;
    animation: progress-load 3s ease-in-out forwards;
    box-shadow: 0 0 8px var(--orange-glow);
}

@keyframes progress-load {
    0% { width: 0; }
    30% { width: 35%; }
    60% { width: 72%; }
    85% { width: 88%; }
    100% { width: 100%; }
}

.boot-text {
    font-family: var(--font-ui);
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: blink-text 2s ease-in-out 3s infinite;
}

@keyframes blink-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 700px) {
    .hero {
        padding: 1rem;
    }
    .name-line {
        letter-spacing: 3px;
    }
    .name-line.last {
        letter-spacing: 4px;
    }
    .term-path, .prompt-line {
        font-size: 0.6rem;
    }
    .terminal-bar {
        padding: 6px 12px;
    }
    .pixel-corner {
        width: 20px;
        height: 20px;
    }
    .pixel-corner.tl { top: 10px; left: 10px; }
    .pixel-corner.tr { top: 10px; right: 10px; }
    .pixel-corner.bl { bottom: 10px; left: 10px; }
    .pixel-corner.br { bottom: 10px; right: 10px; }
}

@media (max-width: 480px) {
    .name-line {
        font-size: 1.6rem;
        letter-spacing: 2px;
    }
    .name-line.last {
        font-size: 1.3rem;
        letter-spacing: 3px;
    }
    .sub-info {
        padding: 6px 12px 12px;
    }
    .info-line {
        font-size: 0.6rem;
    }
    .info-label {
        min-width: 55px;
    }
}