@media (max-width: 576px) {
    .container {
        flex-direction: column; 
    }

    .sidebar {
        width: 100%;
        padding: 10px;
        position: relative; 
        order: -1;
    }

    .contents {
        width: 100%;
        padding: 10px;
    }

    .profilePhoto {
        width: 200px;
        height: 200px;
    }

    .profileName h1 {
        font-size: 1.5rem;
    }

    .CV-button {
        padding: 6px 12px;
        font-size: 0.6rem;
    }

    .navbar a {
        font-size: 1rem;
    }
}

@media (min-width: 576px) and (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 10px;
        position: relative; 
        order: -1; 
    }

    .contents {
        width: 100%;
        padding: 10px;
    }

    .profilePhoto {
        width: 250px;
        height: 250px;
    }

    .profileName h1 {
        font-size: 2rem;
    }

    .CV-button {
        padding: 8px 16px;
        font-size: 0.65rem;
    }

    .navbar a {
        font-size: 1.2rem;
    }
}

@media (min-width: 768px) and (max-width: 992px) {
    .container {
        flex-direction: column; 
    }

    .sidebar {
        width: 100%;
        position: relative; 
        order: -1; 
    }

    .contents {
        width: 100%;
    }

    .profilePhoto {
        width: 300px;
        height: 300px;
    }

    .profileName h1 {
        font-size: 2rem;
    }

    .CV-button {
        padding: 8px 20px;
        font-size: 0.8rem;
    }

    .navbar a {
        font-size: 1.4rem;
    }
}

@media (min-width: 992px) {
    .sidebar {
        width: 35%;

    }

    .contents {
        width: 65%;
    }

    .profilePhoto {
        width: 250px;
        height: 250px;
    }

    .profileName h1 {
        font-size: 1.8rem;
    }

    .navbar a {
        font-size: 1.5rem;
    }
}
