/* ==========================================================================
   1. CORE STYLES & VARIABLES
   ========================================================================== */
:root {
    --bg-dark: #030712;
    --bg-card: rgba(15, 23, 42, 0.65);
    --bg-card-hover: rgba(30, 41, 59, 0.8);
    --border-glow: rgba(6, 182, 212, 0.25);
    --border-card: rgba(255, 255, 255, 0.08);

    --cyan-primary: #06b6d4;
    --cyan-glow: rgba(6, 182, 212, 0.4);
    --violet-accent: #8b5cf6;
    --violet-glow: rgba(139, 92, 246, 0.4);
    --emerald-accent: #10b981;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-code: 'Fira Code', monospace;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

/* Canvas background for Neural Mesh */
#neural-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #030712;
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cyan-primary);
}

/* Utility Layout & Glassmorphism */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
    border-color: var(--border-glow);
    box-shadow: 0 10px 40px -10px var(--cyan-glow);
}

.gradient-text {
    background: linear-gradient(135deg, #38bdf8 0%, #8b5cf6 50%, #d946ef 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-padding {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    font-family: var(--font-code);
    font-size: 0.875rem;
    color: var(--cyan-primary);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 12px;
    padding: 4px 12px;
    background: rgba(6, 182, 212, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyan-primary), var(--violet-accent));
    color: #ffffff;
    box-shadow: 0 4px 20px var(--cyan-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(139, 92, 246, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-card);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--cyan-primary);
    color: var(--cyan-primary);
    transform: translateY(-2px);
}

/* ==========================================================================
   2. NAVIGATION BAR
   ========================================================================== */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    z-index: 100;
    padding: 12px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 40px;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-dot {
    width: 10px;
    height: 10px;
    background: var(--cyan-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--cyan-primary);
    animation: pulse 2s infinite;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--cyan-primary);
}

/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 140px;
    padding-bottom: 60px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--emerald-accent);
    font-size: 0.85rem;
    font-family: var(--font-code);
    margin-bottom: 24px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--emerald-accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--emerald-accent);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.8rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 36px;
    max-width: 580px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

/* Hero Holographic Visual / Avatar Card */
.hero-avatar-container {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-avatar-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 4/5;
    border-radius: 24px;
    overflow: hidden;
    padding: 2px;
    background: linear-gradient(135deg, var(--cyan-primary), transparent 60%, var(--violet-accent));
}

.hero-avatar-inner {
    width: 100%;
    height: 100%;
    background: #090d16;
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    position: relative;
    z-index: 2;
}

.avatar-graphic {
    width: 100%;
    height: 500px;
    /* était 220px */
    border-radius: 16px;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.2) 0%, transparent 70%),
        linear-gradient(to bottom, rgba(6, 182, 212, 0.1), transparent);
    border: 1px solid var(--border-card);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.neural-node-center {
    font-size: 4rem;
    color: var(--cyan-primary);
    text-shadow: 0 0 30px var(--cyan-glow);
    animation: float 4s ease-in-out infinite;
}

.avatar-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    animation: float 4s ease-in-out infinite;
}

.avatar-meta {
    margin-top: 16px;
}

.avatar-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
}

.avatar-role {
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--cyan-primary);
}

/* Stats Bar */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    grid-column: 1 / -1;
    margin-top: 20px;
    padding: 24px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==========================================================================
   4. SKILLS & NEURAL ARCHITECTURES
   ========================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.skill-card {
    padding: 32px;
}

.skill-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--cyan-primary);
    margin-bottom: 20px;
}

.skill-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.skill-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-family: var(--font-code);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-card);
    color: var(--text-muted);
}

/* ==========================================================================
   5. PROJECTS SECTION
   ========================================================================== */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-card);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--cyan-primary);
    color: #000;
    border-color: var(--cyan-primary);
    font-weight: 600;
    box-shadow: 0 0 15px var(--cyan-glow);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 32px;
}

.project-card {
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.project-badge {
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--violet-accent);
    background: rgba(139, 92, 246, 0.1);
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.project-links a {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-left: 12px;
    transition: color 0.3s ease;
}

.project-links a:hover {
    color: var(--cyan-primary);
}

.project-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.project-metrics {
    display: flex;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric-val {
    font-family: var(--font-code);
    font-weight: 600;
    color: var(--cyan-primary);
    font-size: 0.9rem;
}

.metric-key {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ==========================================================================
   5bis. EVENTS SECTION
   ========================================================================== */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.event-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.event-photo {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.event-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.event-card:hover .event-photo img {
    transform: scale(1.06);
}

.event-info {
    padding: 24px;
}

.event-date {
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: var(--cyan-primary);
    margin-bottom: 8px;
}

.event-date i {
    margin-right: 6px;
}

.event-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.event-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.event-comment {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-style: italic;
    border-left: 2px solid var(--violet-accent);
    padding-left: 12px;
}

.event-comment i {
    color: var(--violet-accent);
    margin-right: 6px;
}

.project-demo-btn {
    width: 100%;
    justify-content: center;
    margin-top: 16px;
    padding: 10px 20px;
    font-size: 0.85rem;
}

/* ==========================================================================
   6. VIDEOS & INTERVIEWS SECTION
   ========================================================================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.video-card {
    overflow: hidden;
    border-radius: 16px;
}

.video-thumbnail {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #1e1b4b, #0f172a);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
}

.video-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.video-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 7, 18, 0.35);
    z-index: 1;
}

.play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.9);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 0 25px var(--cyan-glow);
    transition: transform 0.3s ease;
    padding-left: 4px;
    position: relative;
    z-index: 2;
}

.video-thumbnail:hover .play-btn {
    transform: scale(1.15);
}

.video-info {
    padding: 24px;
}

.video-meta {
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: var(--cyan-primary);
    margin-bottom: 8px;
}

.video-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.video-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ==========================================================================
   7. INTERACTIVE TERMINAL SECTION
   ========================================================================== */
.terminal-container {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-glow);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.terminal-header {
    background: #0d1322;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-card);
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red {
    background: #ef4444;
}

.dot-yellow {
    background: #f59e0b;
}

.dot-green {
    background: #10b981;
}

.terminal-title {
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--text-dim);
}

.terminal-body {
    background: #050a14;
    padding: 24px;
    font-family: var(--font-code);
    font-size: 0.9rem;
    min-height: 280px;
    max-height: 400px;
    overflow-y: auto;
    color: #e2e8f0;
}

.terminal-output {
    margin-bottom: 12px;
    white-space: pre-wrap;
}

.terminal-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prompt {
    color: var(--cyan-primary);
}

.terminal-input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: var(--font-code);
    font-size: 0.9rem;
    flex: 1;
}

/* ==========================================================================
   8. CONTACT & FOOTER
   ========================================================================== */
.contact-box {
    padding: 64px;
    text-align: center;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.15) 0%, transparent 70%), var(--bg-card);
}

.contact-phone {
    margin-top: 20px;
    font-family: var(--font-code);
    font-size: 1.05rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.contact-phone i {
    color: var(--emerald-accent);
    margin-right: 8px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 36px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-card);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-btn:hover {
    background: var(--cyan-primary);
    color: #000;
    box-shadow: 0 0 20px var(--cyan-glow);
    transform: translateY(-3px);
}

footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-card);
    color: var(--text-dim);
    font-size: 0.875rem;
    font-family: var(--font-code);
}

/* Video Modal Lightbox */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 90%;
    max-width: 900px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-glow);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto 36px auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-avatar-container {
        margin-top: 40px;
    }

    .nav-links {
        display: none;
    }

    .hero-title {
        font-size: 2.8rem;
    }
}