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

body {
    background-color: #111111;
    font-family: Arial, sans-serif;
    color: white;
    overflow-x: hidden;
}

/* Performance optimizations for animations */
.profile-frame, .cat_2, .profile-description, .cat, .skill-item, .circle, .project-item, .cursus-box {
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
    /* Hide all animated elements by default */
    visibility: hidden;
}

/* Optimized animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
        visibility: visible; /* Make visible at animation start */
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
        visibility: visible;
    }
}

@keyframes bounceIn {
    from {
        opacity: 0;
        transform: translate3d(-100%, 0, 0) scale3d(0.8, 0.8, 1);
        visibility: visible; /* Make visible at animation start */
    }
    60% {
        opacity: 1;
        transform: translate3d(10px, 0, 0) scale3d(1.05, 1.05, 1);
        visibility: visible;
    }
    to {
        transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
        visibility: visible;
    }
}

@keyframes pulse {
    from {
        transform: scale3d(1, 1, 1);
        visibility: visible; /* Make visible at animation start */
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
        visibility: visible;
    }
    to {
        transform: scale3d(1, 1, 1);
        visibility: visible;
    }
}

/* Section Hero */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 531px;
    position: relative;
    overflow: hidden;
}

.left-section {
    background-color: #111111;
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    order: 1;
    transform: translateZ(0);
}

.profile-frame {
    margin-top: -150px;
    width: 200px;
    height: 240px;
    border: 2px solid #49D13C;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

.pdp {
    width: 196px;
    height: 236px;
}

.cat_2 {
    transform: translate3d(-50%, -40px, 0);
    width: 300px;
    height: 330px;
    opacity: 0;
    animation: 
        fadeInUp 1s ease-out 0.7s forwards,
        pulse 2s infinite ease-in-out 1.7s;
}

.profile-description {
    text-align: center;
    color: #49D13C;
    font-size: 14px;
    width: 75%;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.9s forwards;
}

.right-section {
    background-color: #49D13C;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    order: 2;
    z-index: 1;
    transform: translateZ(0);
}

.hero-content {
    text-align: left;
    color: #111111;
    z-index: 2;
    margin-top: -300px;
}

.hero-content h1 {
    font-size: 40px;

}

.hero-content p {
    font-size: 18px;

}

.cat {
    transform: translate3d(10%, 50%, 0);
    width: 300px;
    height: 330px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.6s forwards;
}

/* Effet dentelé avec des ellipses */
.ellipses-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate3d(-50%, -50%, 0);
    width: 50px;
    height: 300px;
    z-index: 1;
}

.ellipse {
    position: absolute;
    width: 100px;
    height: 40px;
    background-color: #49D13C;
    border-radius: 50%;
    z-index: 0;
    animation: pulse 2s infinite ease-in-out;
    transform: translateZ(0);
    visibility: hidden; /* Hide until animation starts */
}

/* Section Skills */
.skills-section {
    background-color: #111111;
    padding: 40px 0;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards;
    transform: translateZ(0);
}

.skills-section h1 {
    margin-left: 75px;
    margin-bottom: 20px;
    font-size: 36px;
}

.skills-container {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    max-width: 1200px;
    height: 550px;
    min-height: 500px;
    margin: 0 auto;
    border: 2px solid #49D13C;
    padding: 20px;
    border-radius: 10px;
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
    transform: translateZ(0);
    visibility: hidden; /* Hide until animation starts */
}

.skill-category {
    flex: 1;
    color: white;
    text-align: center;
}

.skill-category h2 {
    margin-bottom: 20px;
    font-size: 24px;
}

.skill-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    background-color: #333333;
    padding: 10px;
    border-radius: 8px;
    opacity: 0;
    animation: bounceIn 0.8s ease-out forwards;
}

.progress-bar {
    height: 10px;
    width: 100px;
    background-color: #111111;
    border-radius: 5px;
    flex: 1;
    position: relative;
}

.progress-bar-fill {
    height: 10px;
    background-color: #49D13C;
    border-radius: 5px;
    position: absolute;
    top: 20px;
    left: 10px;
}

.skill-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-basis: 25%;
}

.skill-logo {
    width: 30px;
    height: 30px;
}

.skill-name {
    font-size: 16px;
    color: #fff;
}

/* Staggered animations with proper delay */
.skill-item:nth-child(1) { animation-delay: 0.5s; }
.skill-item:nth-child(2) { animation-delay: 0.6s; }
.skill-item:nth-child(3) { animation-delay: 0.7s; }
.skill-item:nth-child(4) { animation-delay: 0.8s; }
.skill-item:nth-child(5) { animation-delay: 0.9s; }
.skill-item:nth-child(6) { animation-delay: 1.0s; }
.skill-item:nth-child(7) { animation-delay: 1.1s; }
.skill-item:nth-child(8) { animation-delay: 1.2s; }
.skill-item:nth-child(9) { animation-delay: 1.3s; }

/* Project Section */
.Project-section {
    background-color: #111111;
    width: 100%;
    height: auto;
    transform: translateZ(0);
}

.Project-section h1 {
    margin-left: 75px;
    margin-bottom: 20px;
    font-size: 36px;
}

.project-item-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-item {
    background-color: #111111;
    font-size: 20px;
    width: 280px;
    height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    position: relative;
    color: white;
    text-decoration: none;
    border: 2px solid #49D13C;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:nth-child(1) {
    animation-delay: 0.2s;
    border-color: #D13CB6;
}

.project-item:nth-child(2) {
    animation-delay: 0.4s;
    border-color: #3CAAD1;
}

.project-item:hover {
    transform: translate3d(0, -5px, 0) scale3d(1.02, 1.02, 1);
    box-shadow: 0 10px 20px rgba(73, 209, 60, 0.3);
}

.project-hover-img {
    width: 75%;
    height: auto;
    max-height: 65%;
    object-fit: cover;
    margin: 15px 0;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.project-item:hover .project-hover-img {
    transform: scale3d(1.05, 1.05, 1);
}

.project-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #49D13C;
}

.project-description {
    font-size: 14px;
    margin-top: auto;
}

/* Cursus Section */
.cursus-section {
    padding: 50px 0;
    position: relative;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards;
    transform: translateZ(0);
}

.section-title {
    margin-left: 75px;
    margin-bottom: 20px;
    font-size: 36px;
}

.timeline {
    position: relative;
    width: 80%;
    height: 5px;
    background-color: #D1983C;
    margin: 0 auto;
    display: flex;
    align-items: center;
    animation: fadeInUp 0s ease-out 0s forwards;
    justify-content: space-between;
    z-index: 1;
}

.circle {
    width: 35px;
    height: 35px;
    background-color: #D1983C;
    border-radius: 50%;
    position: absolute;
    z-index: 3;
    opacity: 1;
    animation: pulse 1.5s infinite ease-in-out;
    transform: translateZ(0);
}

.circle:nth-child(1) { left: 0; transform: translate3d(-50%, 0, 0);  }
.circle:nth-child(2) { left: 50%; transform: translate3d(-50%, 0, 0);  }
.circle:nth-child(3) { right: 0; transform: translate3d(50%, 0, 0);  }

.cursus-items {
    display: flex;
    justify-content: space-between;
    width: 80%;
    margin: 50px auto 0;
    position: relative;
    z-index: 2;
}

.cursus-box {
    width: 25%;
    height: 100px;
    border: 2px solid white;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 15px;
    border-radius: 10px;
    background-color: #111111;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.cursus-box.box1 { border-color: #3CAAD1; animation-delay: 0.6s; }
.cursus-box.box2 { border-color: #D13CB6; animation-delay: 0.8s; }
.cursus-box.box3 { border-color: #49D13C; animation-delay: 1.0s; }

/* Media Queries */
@media (max-width: 1200px) {
    .left-section {
        order: 2;
    }
    .right-section {
        margin-top: 15px;
        order: 1;
        text-align: left;
    }
    .right-section p {
        text-align: left;
    }
    .skills-container {
        padding: 15px;
        gap: 20px;
    }
    
    .project-item-container {
        padding: 15px;
    }
    
    .project-item {
        width: 250px;
        height: 300px;
    }
}

/* Écrans moyens (tablettes) */
@media (max-width: 1024px) {
    .ellipse {
        display: none;
    }
    
    .hero-section {
        flex-direction: column;
        height: auto;
        padding: 40px 0;
    }
    
    .left-section, .right-section {
        width: 100%;
        padding: 30px;
    }
    
    .left-section {
        order: 2;
    }
    
    .right-section {
        margin-top: 15px;
        order: 1;
        text-align: left;
    }
    
    .right-section p {
        text-align: left;
    }
    
    .profile-frame {
        margin-top: 0;
    }
    
    .cat_2 {
        width: 200px;
        height: 200px;
        transform: translate3d(0, 0, 0);
    }
    
    .cat {
        transform: translate3d(0, 0, 0);
        height: 180px;
        width: 180px;
        margin: 20px 0;
    }
    
    .hero-content {
        margin-top: 0;
        text-align: center;
    }
    
    .skills-container {
        flex-direction: column;
        height: auto;
    }
    
    .skills-section h1,
    .Project-section h1,
    .section-title {
        margin-left: 30px;
        font-size: 30px;
    }
    
    /* Timeline verticale à droite */
    .timeline {
        width: 5px;
        height: 450px;
        position: absolute;
        right: 25%;
        top: 225px;
        left: auto;
        transform: none;
    }
    
    /* Positionnement des cercles sur la timeline verticale */
    .circle {
        left: 50%;
        transform: translate3d(-50%, 0, 0);
        width: 30px;
        height: 30px;
    }
    .circle:nth-child(1) {
        top: 0px;
        margin-left: -13px;
    }
    
    .circle:nth-child(2) {
        top: 215px;
        margin-left: -15px;
    }
    
    .circle:nth-child(3) {
        top: 435px;
        margin-left: -15px;
    }
    
    .cursus-items {
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin-top: 100px;
        gap: 120px;
        padding-bottom: 50px;
    }
    
    .cursus-box {
        width: 60%;
        max-width: 300px;
    }
}

/* Petits écrans (mobiles) */
@media (max-width: 768px) {
    .hero-section {
        padding: 20px 0;
    }
    
    .left-section {
        order: 2;
    }
    
    .right-section {
        margin-top: 15px;
        order: 1;
        text-align: left;
    }
    
    .right-section p {
        text-align: left;
    }
    
    .hero-content h1 {
        font-size: 26px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .profile-frame {
        width: 160px;
        height: 200px;
    }
    
    .pdp {
        width: 156px;
        height: 196px;
    }
    
    .cat, .cat_2 {
        width: 150px;
        height: 150px;
    }
    
    .skills-section h1,
    .Project-section h1,
    .section-title {
        margin-left: 20px;
        font-size: 24px;
        text-align: left;
    }
    
    .skill-item {
        padding: 8px;
    }
    
    .skill-logo {
        width: 24px;
        height: 24px;
    }
    
    .skill-name {
        font-size: 14px;
    }
    
    .project-item {
        width: 90%;
        max-width: 320px;
        height: auto;
        min-height: 300px;
    }
    
    .project-hover-img {
        max-height: 150px;
    }
    
    /* Timeline mobile */
    .cursus-section {
        padding: 30px 0;
        height: auto;
        min-height: 500px;
        overflow: visible;
        position: relative;
    }
    
    .section-title {
        margin-left: 20px;
        font-size: 24px;
        text-align: left;
        margin-bottom: 40px;
    }
    
    /* Timeline verticale à droite */
    .timeline {
        width: 5px;
        height: 400px;
        position: absolute;
        right: 25%;
        top: 120px;
        left: auto;
        transform: none;
    }
    
    /* Positionnement des cercles sur la timeline verticale */
    .circle {
        left: 50%;
        transform: translate3d(-50%, 0, 0);
        width: 30px;
        height: 30px;
    }
    .circle:nth-child(1) {
        top: 0px;
        margin-left: -13px;
    }
    
    .circle:nth-child(2) {
        top: 180px;
        margin-left: -15px;
    }
    
    .circle:nth-child(3) {
        top: 380px;
        margin-left: -15px;
    }
    .progress-bar-fill {
        top: 15px;
        left: 8px;
    }


    
    /* Conteneur des cursus boxes */
    .cursus-items {
        flex-direction: column;
        align-items: flex-start;
        width: 70%;
        margin: 0;
        padding: 50px 0 50px 20px;
        gap: 0;
        position: relative;
    }
    
    .cursus-box {
        width: 100%;
        max-width: 250px;
        height: 80px;
        font-size: 14px;
        position: absolute;
        left: 0;
    }
    
    /* Positionnement spécifique pour chaque box alignée avec les cercles */
    .box1 {
        top: 20px;
        margin-left: 10px;
    }
    
    .box2 {
        top: 190px;
        margin-left: 10px;
    }
    
    .box3 {
        top: 380px;
        margin-left: 10px;
    }
}

/* Très petits écrans (moins de 480px) */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 22px;
    }
    
    .hero-content p {
        font-size: 14px;
    }
    
    .profile-frame {
        width: 140px;
        height: 180px;
    }
    
    .pdp {
        width: 136px;
        height: 176px;
    }
    
    .cat, .cat_2 {
        width: 120px;
        height: 120px;
    }
    
    .skills-section h1,
    .Project-section h1,
    .section-title {
        margin-left: 15px;
        font-size: 22px;
    }
    
    .project-item {
        width: 95%;
        min-height: 280px;
    }
    
    .project-title {
        font-size: 18px;
    }
    
    .project-description {
        font-size: 12px;
    }
    
    .project-hover-img {
        max-height: 140px;
    }
    
    /* Timeline small mobile */
    .cursus-section {
        min-height: 450px;
    }
    
    .section-title {
        margin-left: 15px;
        font-size: 22px;
    }
    
    .circle {
        width: 25px;
        height: 25px;
    }
    .circle:nth-child(1) {
        top: 0px;
        margin-left: -10px;
    }
    
    .circle:nth-child(2) {
        top: 155px;
        margin-left: -12px;
    }
    
    .circle:nth-child(3) {
        top: 320px;
        margin-left: -12px;
    }
    .progress-bar-fill {
        top: 15px;
        left: 8px;
    }

    .timeline {
        right: 15%;
        height: 330px;
    }
    
    .cursus-items {
        width: 80%;
        padding-left: 10px;
    }
    
    .cursus-box {
        width: 70%;
        height: 70px;
        font-size: 12px;
    }
    
    .box1 {
        top: 25px;
    }
    
    .box2 {
        top: 175px;
    }
    
    .box3 {
        top: 325px;
    }
    

}

footer {
    padding: 10px;
    background-color: #222222;
    color: white;
    position: relative;
    bottom: 0;
    margin-top: 50px;
    width: 100%;
    transform: translateZ(0);
}