/* ==========================================================================
   Variables & Reset
   ========================================================================== */
   :root {
    /* Color Palette */
    --clr-bg: #0b0f19;
    --clr-bg-alt: #111827;
    --clr-bg-card: #1e293b;
    
    --clr-text-main: #f8fafc;
    --clr-text-muted: #94a3b8;
    
    --clr-primary: #0ea5e9; /* Sky blue */
    --clr-secondary: #06b6d4; /* Cyan */
    --clr-accent: #38bdf8;
    
    /* Layout */
    --nav-height: 80px;
    --border-radius: 12px;
    --border-radius-lg: 20px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--clr-bg);
    color: var(--clr-text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 100px 0;
}

.bg-alt {
    background-color: var(--clr-bg-alt);
}

.text-cyan {
    color: var(--clr-secondary);
}

.mt-4 { margin-top: 2rem; }

/* Section Header */
.section-header {
    margin-bottom: 4rem;
    position: relative;
}

.section-header h2 {
    font-size: 2.2rem;
    color: var(--clr-text-main);
    display: inline-block;
}

.section-header .line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--clr-primary), var(--clr-secondary));
    margin-top: 10px;
    border-radius: 2px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.5);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--clr-text-main);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: rgba(11, 15, 25, 0.95);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--clr-text-main);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--clr-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--clr-text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--clr-text-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--clr-primary);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--clr-text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--nav-height);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    z-index: -2;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(11, 15, 25, 0.95) 0%, rgba(11, 15, 25, 0.8) 100%);
    z-index: -1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.greeting {
    color: var(--clr-primary);
    font-family: 'Roboto Mono', monospace;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.name {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
}

.name span {
    color: var(--clr-primary);
}

.title {
    font-size: 1.8rem;
    color: var(--clr-text-muted);
    font-weight: 500;
}

.bio {
    font-size: 1.1rem;
    color: var(--clr-text-muted);
    max-width: 540px;
    margin-bottom: 2.5rem;
}

.bio strong {
    color: var(--clr-text-main);
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

/* Profile Picture */
.hero-image {
    display: flex;
    justify-content: center;
}

.profile-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    padding: 10px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(6, 182, 212, 0.05));
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.profile-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--clr-primary);
    filter: blur(80px);
    opacity: 0.15;
    z-index: 1;
    animation: pulse 4s infinite alternate;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.15; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.25; }
}

/* ==========================================================================
   Parcours (Timeline)
   ========================================================================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 14px;
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--clr-primary);
    box-shadow: 0 0 10px var(--clr-primary);
}

.timeline-content {
    background: var(--clr-bg-card);
    padding: 1.8rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.timeline-date {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(14, 165, 233, 0.1);
    color: var(--clr-primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Roboto Mono', monospace;
    margin-bottom: 1rem;
}

.timeline-title {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.timeline-company {
    color: var(--clr-text-muted);
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.timeline-desc {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   Compétences (Skills)
   ========================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--clr-bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    height: 100%;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.skill-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(6, 182, 212, 0.05));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--clr-primary);
    margin-bottom: 1.5rem;
}

.skill-category h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skill-tags li {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--clr-text-muted);
    transition: var(--transition);
    font-family: 'Roboto Mono', monospace;
}

.skill-category:hover .skill-tags li {
    background: rgba(255, 255, 255, 0.1);
    color: var(--clr-text-main);
}

/* ==========================================================================
   Projets
   ========================================================================== */
.projects-grid {
    display: flex;
    overflow-x: auto;
    gap: 2rem;
    padding-bottom: 2rem;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE Default */
}

.projects-grid::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.project-card {
    background: var(--clr-bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-width: 320px;
    max-width: 350px;
    flex: 0 0 auto;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(14, 165, 233, 0.2);
}

.project-img-wrapper {
    position: relative;
    height: 200px;
    background: #151b23; /* fallback */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.project-img {
    height: 100px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.project-card:hover .project-img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 25, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(3px);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.github-link {
    background: var(--clr-primary);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transform: translateY(20px);
    transition: var(--transition);
}

.project-card:hover .github-link {
    transform: translateY(0);
}

.github-link:hover {
    background: var(--clr-accent);
}

.project-info {
    padding: 1.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
}

.project-info p {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.project-stack span {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.75rem;
    color: var(--clr-secondary);
}

/* ==========================================================================
   Contact & Footer
   ========================================================================== */
.contact-box {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    background: var(--clr-bg-card);
    padding: 4rem 2rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    background-image: radial-gradient(circle at top right, rgba(14, 165, 233, 0.1), transparent 40%);
}

.contact-box h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-box p {
    color: var(--clr-text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: var(--clr-text-main);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--clr-primary);
    transform: translateY(-3px);
}

footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content p {
    color: var(--clr-text-muted);
    font-size: 0.9rem;
}

.ai-notice {
    font-size: 0.75rem !important;
    opacity: 0.5;
    margin-top: 0.5rem;
}

/* ==========================================================================
   Responsive & Animations
   ========================================================================== */
@media screen and (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .bio {
        margin-left: auto;
        margin-right: auto;
    }
    
    .profile-wrapper {
        width: 280px;
        height: 280px;
    }
}

@media screen and (max-width: 768px) {
    .nav-links {
        display: flex;
        position: fixed;
        top: var(--nav-height);
        right: -100%;
        width: 100%;
        background: rgba(11, 15, 25, 0.98);
        height: calc(100vh - var(--nav-height));
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: var(--transition);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-link {
        font-size: 1.2rem;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .name {
        font-size: 3rem;
    }
    
    .title {
        font-size: 1.4rem;
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .timeline-dot {
        left: 9px;
    }
    
    .timeline-item {
        padding-left: 45px;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.fade-in.appear {
    opacity: 1;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.appear {
    opacity: 1;
    transform: translateY(0);
}

.slide-in {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in.appear {
    opacity: 1;
    transform: translateX(0);
}
