/* style.css - Cyber Blue Edition */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&family=Fira+Code:wght@300;400;500;600;700&family=Orbitron:wght@400;500;600;700;800;900&display=swap');

:root {
    /* Palette Cyber Blue */
    --primary: #00e5ff;       /* Bleu Cyan Néon */
    --primary-dim: rgba(0, 229, 255, 0.1);
    --secondary: #2979ff;     /* Bleu Roi électrique */
    --accent: #ff0055;        /* Rouge/Rose pour les alertes/erreurs */
    
    --bg-dark: #050a10;       /* Fond très sombre bleuté */
    --bg-card: #0a1520;       /* Fond des cartes */
    --bg-light: #f0f4f8;      /* Pour le mode clair */
    
    --text-main: #e0f2fe;     /* Blanc cassé bleuté */
    --text-muted: #94a3b8;
    
    --border: rgba(0, 229, 255, 0.2);
    --shadow: 0 0 20px rgba(0, 229, 255, 0.15);
    
    --font-main: 'Tajawal', sans-serif;
    --font-mono: 'Fira Code', monospace;
    --font-display: 'Orbitron', sans-serif;
}

[data-theme="light"] {
    --bg-dark: #f0f9ff;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --border: rgba(0, 100, 255, 0.2);
    --shadow: 0 5px 15px rgba(0, 100, 255, 0.1);
    --primary: #0077ff; 
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

/* --- LOADER STYLE --- */
.loader-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #020408; z-index: 9999;
    display: flex; justify-content: center; align-items: center;
}
.hack-terminal {
    width: 90%; max-width: 600px;
    background: rgba(10, 20, 30, 0.95);
    border: 1px solid var(--primary);
    border-radius: 8px; overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.2);
}
.terminal-header {
    background: rgba(0, 229, 255, 0.1);
    padding: 10px; display: flex; align-items: center; border-bottom: 1px solid var(--border);
}
.terminal-dots span {
    display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }
.terminal-body { padding: 20px; font-family: var(--font-mono); font-size: 0.9rem; color: var(--primary); }
.terminal-line { margin-bottom: 8px; opacity: 0; animation: fadeIn 0.1s forwards; }
.output.success { color: var(--primary); font-weight: bold; }

/* --- HEADER & NAV --- */
.header {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: rgba(5, 10, 16, 0.85); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 5%; height: 80px;
}
.nav-brand {
    font-family: var(--font-display); font-size: 1.5rem; color: var(--primary);
    text-decoration: none; display: flex; align-items: center; gap: 10px;
}
.nav-link {
    color: var(--text-main); text-decoration: none; margin-left: 2rem;
    font-family: var(--font-mono); font-size: 0.9rem; position: relative;
    transition: color 0.3s;
}
.nav-link:hover, .nav-link.active { color: var(--primary); text-shadow: 0 0 10px var(--primary); }
.mobile-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh; display: flex; align-items: center; position: relative;
    padding: 0 5%; overflow: hidden;
}
.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
}
#matrixCanvas { width: 100%; height: 100%; opacity: 0.3; }

.hero-content { z-index: 1; max-width: 800px; }
.hero-title {
    font-family: var(--font-display); font-size: 3.5rem; line-height: 1.1; margin-bottom: 1rem;
}
.hero-title span.highlight {
    color: var(--primary); text-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
}
.hero-subtitle {
    font-family: var(--font-mono); color: var(--secondary); font-size: 1.2rem; margin-bottom: 2rem;
}
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 12px 30px; border-radius: 4px; text-decoration: none;
    font-family: var(--font-display); letter-spacing: 1px;
    transition: all 0.3s; margin-right: 15px;
}
.btn-primary {
    background: transparent; border: 1px solid var(--primary); color: var(--primary);
    position: relative; overflow: hidden;
}
.btn-primary:hover {
    background: var(--primary); color: #000; box-shadow: 0 0 30px var(--primary);
}
.btn-secondary {
    color: var(--text-main);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
}

/* --- SECTIONS --- */
.section { padding: 6rem 5%; border-top: 1px solid var(--border); }
.section-title {
    font-family: var(--font-display); font-size: 2.5rem; color: var(--text-main);
    margin-bottom: 3rem; position: relative; display: inline-block;
}
.section-title::after {
    content: ''; position: absolute; bottom: -10px; left: 0; width: 60%; height: 4px;
    background: var(--primary); box-shadow: 0 0 10px var(--primary);
}

/* --- CARDS & TIMELINE --- */
.timeline-item, .card {
    background: var(--bg-card); border: 1px solid var(--border);
    padding: 2rem; margin-bottom: 2rem; border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.timeline-item:hover, .card:hover {
    transform: translateY(-5px); box-shadow: 0 0 25px rgba(0, 229, 255, 0.2);
    border-color: var(--primary);
}
.badge {
    display: inline-block; padding: 4px 12px; background: rgba(0, 229, 255, 0.15);
    color: var(--primary); border-radius: 50px; font-size: 0.8rem; font-family: var(--font-mono);
    border: 1px solid var(--primary);
}
.badge-spaced { margin-bottom: 1rem; }
.hero-actions { margin-top: 2rem; }

.section-container-narrow {
    max-width: 1000px;
    margin: 0 auto;
}
.card-text {
    color: var(--text-muted);
    margin: 10px 0;
}
.card-link {
    color: var(--primary);
    text-decoration: none;
}
.card-link:hover { text-decoration: underline; }

.delay-02 { animation-delay: 0.2s; }
.delay-08 { animation-delay: 0.8s; }
.delay-15 { animation-delay: 1.5s; }

/* TOGGLE SWITCH */
.theme-switch {
    background: none; border: 1px solid var(--border); color: var(--primary);
    width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
    display: flex; justify-content: center; align-items: center;
    transition: all 0.3s; margin-left: 20px;
}
.theme-switch:hover { background: var(--primary); color: #000; }

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .nav {
        position: relative;
        flex-wrap: wrap;
        gap: 0.75rem;
        height: auto;
    }
    .mobile-menu-toggle {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        order: 2;
    }
    .theme-switch {
        order: 3;
        margin-left: 0;
    }
    .nav-menu {
        display: none;
        order: 4;
        width: 100%;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 0.5rem;
    }
    .nav-menu.nav-menu-open { display: block; }
    .nav-link {
        display: block;
        margin: 0;
        padding: 0.75rem 1rem;
        border-radius: 8px;
    }
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
        margin-right: 0;
        margin-bottom: 0.75rem;
    }
}

@keyframes fadeIn { to { opacity: 1; } }
