/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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

.nav-logo {
    font-size: 24px;
    font-weight: 700;
    color: #6366f1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

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

.nav-link:hover {
    color: #6366f1;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #6366f1;
    transition: width 0.3s ease;
}

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

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

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.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"><polygon fill="rgba(255,255,255,0.1)" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.highlight {
    color: #fbbf24;
    position: relative;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 20px;
    color: #e5e7eb;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: #d1d5db;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: #fbbf24;
    color: #1f2937;
}

.btn-primary:hover {
    background: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(251, 191, 36, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

/* Code Animation */
.code-animation {
    background: rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.8;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.code-line {
    margin-bottom: 5px;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.code-line:nth-child(1) { animation-delay: 0.2s; }
.code-line:nth-child(2) { animation-delay: 0.4s; }
.code-line:nth-child(3) { animation-delay: 0.6s; }
.code-line:nth-child(4) { animation-delay: 0.8s; }

.code-keyword { color: #c792ea; }
.code-variable { color: #82aaff; }
.code-operator { color: #89ddff; }
.code-string { color: #c3e88d; }
.code-function { color: #f78c6c; }
.code-bracket { color: #89ddff; }

/* Sections communes */
section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: #1f2937;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #6366f1;
    border-radius: 2px;
}

/* About Section */
.about {
    background: #f9fafb;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #6b7280;
    line-height: 1.8;
}

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

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #6366f1;
    margin-bottom: 10px;
}

.stat p {
    color: #6b7280;
    font-weight: 500;
}

.about-image {
    display: flex;
    justify-content: center;
}

.profile-image {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-image:hover img {
    transform: scale(1.05);
}

.image-placeholder {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.image-placeholder i {
    font-size: 4rem;
    margin-bottom: 20px;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.skill-category {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #1f2937;
    text-align: center;
}

.skill-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: 10px;
    background: #f9fafb;
    transition: all 0.3s ease;
}

.skill-item:hover {
    background: #6366f1;
    color: white;
    transform: translateY(-3px);
}

.skill-item i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #6366f1;
    transition: color 0.3s ease;
}

.skill-item:hover i {
    color: white;
}

.skill-item span {
    font-weight: 500;
    text-align: center;
}

/* Projects Section */
.projects {
    background: #f9fafb;
}

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

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.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;
    gap: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.project-link,
.project-github {
    width: 50px;
    height: 50px;
    background: #6366f1;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-link:hover,
.project-github:hover {
    background: #fbbf24;
    color: #1f2937;
    transform: scale(1.1);
}

.project-content {
    padding: 30px;
}

.project-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1f2937;
}

.project-content p {
    color: #6b7280;
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    background: #e0e7ff;
    color: #6366f1;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1f2937;
}

.contact-info p {
    color: #6b7280;
    margin-bottom: 40px;
    line-height: 1.8;
}

.contact-details {
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: #6b7280;
}

.contact-item i {
    width: 20px;
    margin-right: 15px;
    color: #6366f1;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-link {
    width: 50px;
    height: 50px;
    background: #6366f1;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #fbbf24;
    color: #1f2937;
    transform: translateY(-3px);
}

.contact-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
}


.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: white;
    border: none;
    padding: 14px 22px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-whatsapp i {
    font-size: 1.2rem;
}

.btn-whatsapp:hover {
    background: #1ebe5d;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-content p {
    margin-bottom: 10px;
    color: #d1d5db;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
    }

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

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

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

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

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

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

    .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

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

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

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

    .skill-items {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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


/* Smooth scrolling for anchor links */
html {
    scroll-padding-top: 70px;
}

/* Logo brand */
.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-brand img {
    height: 60px;
    width: auto;
    display: inline-block;
}

.nav-brand span {
    font-size: 24px;
    font-weight: 700;
    color: #6366f1;
}

/* --- Enhanced Animations & Effects --- */
/* Logo subtle hover */
.nav-brand:hover img {
    transform: scale(1.05) rotate(-1deg);
    transition: transform 200ms ease;
}

/* Buttons glow and ripple */
.btn {
    position: relative;
    overflow: hidden;
}

.btn.btn-primary::after,
.btn.btn-secondary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transform: skewX(-20deg);
    transition: left 0.4s ease;
}

.btn:hover::after {
    left: 150%;
}

/* Floating cards */
.project-card,
.skill-category,
.contact-form {
    will-change: transform, box-shadow;
}

/* Gentle pulse for call-to-action */
@keyframes softPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }
.hero .btn-primary { animation: softPulse 3s ease-in-out infinite; }

/* Hero background slow pan */
@keyframes panBg { 0% { background-position: 0% 0%; } 100% { background-position: 100% 100%; } }
.hero { background-size: 120% 120%; animation: panBg 20s linear infinite alternate; }

/* Nav underline grow (already present) + slight lift */
.nav-link:hover { transform: translateY(-1px); }

/* Input focus glow */
.form-group input:focus,
.form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
