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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #0f0f0f;
    overflow-x: hidden;
}

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

/* ==================================
   TYPOGRAPHY
   ================================== */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #a0a0a0;
    max-width: 600px;
    margin: 0 auto;
}

/* ==================================
   BUTTONS
   ================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* ==================================
   NAVIGATION
   ================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo span {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #fff;
    transition: all 0.3s ease;
}

/* ==================================
   HERO SECTION
   ================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 100%);
    position: relative;
    overflow: hidden;
    padding-top: 80px; /* Espace pour la navbar fixe */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23667eea" stop-opacity="0.1"/><stop offset="100%" stop-color="%23667eea" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #a0a0a0;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.125rem;
    color: #b0b0b0;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-links a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-3px);
}

.image-container {
    position: relative;
    display: flex;
    justify-content: center;
}

.profile-image {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(102, 126, 234, 0.3);
    position: relative;
    z-index: 2;
}

.image-backdrop {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 1;
    animation: pulse 2s ease-in-out infinite;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-arrow {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, #667eea);
    position: relative;
    animation: bounce 2s ease-in-out infinite;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -4px;
    width: 10px;
    height: 10px;
    border-right: 2px solid #667eea;
    border-bottom: 2px solid #667eea;
    transform: rotate(45deg);
}

/* ==================================
   ABOUT SECTION
   ================================== */
.about {
    padding: 6rem 0;
    background: #111;
}

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

.about-description {
    font-size: 1.125rem;
    color: #b0b0b0;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #a0a0a0;
    font-size: 0.875rem;
}

.about-img-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

.about-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 20px;
}

/* ==================================
   SKILLS SECTION
   ================================== */
.skills {
    padding: 6rem 0;
    background: #0f0f0f;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: rgba(102, 126, 234, 0.3);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.skill-header i {
    font-size: 1.5rem;
    color: #667eea;
}

.skill-header h3 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-name {
    display: block;
    color: #b0b0b0;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.skill-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 1s ease;
    animation: skillLoad 2s ease forwards;
}

.skill-progress[data-percent="95"] { width: 95%; }
.skill-progress[data-percent="90"] { width: 90%; }
.skill-progress[data-percent="92"] { width: 92%; }
.skill-progress[data-percent="88"] { width: 88%; }
.skill-progress[data-percent="85"] { width: 85%; }
.skill-progress[data-percent="80"] { width: 80%; }
.skill-progress[data-percent="75"] { width: 75%; }
.skill-progress[data-percent="70"] { width: 70%; }

/* ==================================
   PROJECTS SECTION
   ================================== */
.projects {
    padding: 6rem 0;
    background: #111;
}

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

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: rgba(102, 126, 234, 0.3);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

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

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.project-link:hover {
    background: #667eea;
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-category {
    color: #667eea;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.project-title {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-description {
    color: #b0b0b0;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    padding: 0.25rem 0.75rem;
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ==================================
   EXPERIENCE SECTION
   ================================== */
.experience {
    padding: 6rem 0;
    background: #0f0f0f;
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: 50%;
    position: relative;
    margin-bottom: 4rem;
}

.timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-left: 50%;
    padding-right: 0;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
    border: 4px solid #0f0f0f;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-right: 2rem;
    max-width: 400px;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 2rem;
    margin-right: 0;
}

.timeline-date {
    color: #667eea;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: #a0a0a0;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.timeline-content p {
    color: #b0b0b0;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.timeline-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.timeline-list li {
    color: #b0b0b0;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.timeline-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #667eea;
}

.timeline-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-badge {
    padding: 0.25rem 0.75rem;
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ==================================
   EDUCATION SECTION
   ================================== */
.education {
    padding: 6rem 0;
    background: #111;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.education-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.education-card:hover {
    transform: translateY(-5px);
    border-color: rgba(102, 126, 234, 0.3);
}

.education-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.education-icon i {
    font-size: 1.5rem;
    color: #fff;
}

.education-date {
    color: #667eea;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.education-content h3 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.education-content h4 {
    color: #a0a0a0;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.education-school {
    color: #b0b0b0;
    margin-bottom: 1rem;
}

.education-content ul {
    list-style: none;
}

.education-content li {
    color: #b0b0b0;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.education-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #667eea;
}

/* ==================================
   CONTACT SECTION
   ================================== */
.contact {
    padding: 6rem 0;
    background: #0f0f0f;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
}

.contact-icon i {
    color: #fff;
    font-size: 1.125rem;
}

.contact-details h4 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-details a,
.contact-details span {
    color: #b0b0b0;
    text-decoration: none;
}

.contact-details a:hover {
    color: #667eea;
}

.contact-social {
    margin-top: 2rem;
}

.contact-social h4 {
    color: #fff;
    margin-bottom: 1rem;
}

.contact-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a0a0a0;
}

/* ==================================
   FOOTER
   ================================== */
.footer {
    padding: 2rem 0;
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-text p {
    color: #a0a0a0;
    font-size: 0.875rem;
}

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

.footer-links a {
    color: #a0a0a0;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #667eea;
}

/* ==================================
   ANIMATIONS
   ================================== */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes skillLoad {
    from {
        width: 0;
    }
}

/* ==================================
   RESPONSIVE DESIGN
   ================================== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(15, 15, 15, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.3s ease;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    /* Hero Section Mobile Fixes */
    .hero {
        min-height: 100vh;
        padding: 2rem 0;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding-top: 100px; /* Space for fixed navbar */
    }

    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .btn {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }

    .profile-image {
        width: 250px !important;
        height: 250px !important;
    }

    .image-backdrop {
        width: 250px !important;
        height: 250px !important;
    }

    .social-links {
        justify-content: center;
        margin-top: 1rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        padding-left: 60px;
        padding-right: 0;
        justify-content: flex-start;
    }

    .timeline-item:nth-child(even) {
        padding-left: 60px;
        padding-right: 0;
        justify-content: flex-start;
    }

    .timeline-dot {
        left: 20px;
        transform: translateX(-50%);
    }

    .timeline-content {
        margin-left: 0;
        margin-right: 0;
        max-width: none;
    }

    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 0;
    }

    .education-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .section-title {
        font-size: 2rem;
    }

    .container {
        padding: 0 1rem;
    }
}

/* Additional mobile optimizations for very small screens */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .profile-image {
        width: 200px !important;
        height: 200px !important;
    }
    
    .image-backdrop {
        width: 200px !important;
        height: 200px !important;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
}
