@media only screen and (max-width: 768px) {
    .header-right {
        display: none;
        padding: 10px 15px;
        position: fixed;
        margin: 0 auto;
        top: 0;
        left: -100%;
        width: 180px; 
        height: 270px;
        background-color: #fff;
        z-index: 100; 
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3); 
        overflow-y: auto; 
        transition: left 0.3s ease;
        }

    .header-right.active {
        left: 0; 
    }

    .header-right a {
        display: block;
        padding: 15px 20px;
        border-bottom: 1px solid #ccc;
        text-align: left;
    }
    .header-right a:hover {
        background-color: #f1f1f1;
    }
    .menu-toggle {
        display: block;
        position: fixed;
        top: 20px;
        left: 200px;
        font-size: 30px;
        border: none;
        cursor: pointer;
        z-index: 101;
    }
}

@media only screen and (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}
@media only screen and (max-width: 768px) {
    body { 
        margin: 0;
        font-family: 'Courier New', monospace;
        overflow-x: hidden; 
        position: relative; 
        background-image: url('/static/images/background.jpg'); 
        background-repeat: no-repeat; 
        background-size: cover; 
        background-position: center top;
        background-attachment: scroll;
        z-index: 4;
    }
    .header {
        padding: 5px;
        flex-direction: column;
    }
    .header a {
        font-size: 14px;
        padding: 8px;
    }
    .header a.logo img {
        max-height: 40px;
    }
    .header-right {
        display: none; 
    }
    .menu-toggle {
        background-color: transparent;
        border: none;
        font-size: 30px;
        color: black;
        position: absolute;
        top: 20px;
        left: 20px; 
        cursor: pointer;
        z-index: 2000;  
    }
    .menu-toggle.active + .header-right {
        display: block;
        flex-direction: column;  
        position: absolute;
        top: 60px;
        left: 0;
        background-color: white;
        width: 120px;
        border-radius: 30px;
        padding: 10px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    }

    .header-right a {
        display: block;
        padding: 10px 20px;
        margin: 5px 0;
        text-align: left; 
        width: 80px;  
    }

    .header-right a:hover {
        background-color: #ddd; 
    }

    .gap-space {
        padding: 10px 5px;
    }
    .mega-gap-space {
        padding: 150px 5px;
    }
    .intro-container {
        flex-direction: column;
        padding: 10px;
    }
    .right-text {
        font-size: 14px;
        margin: 10px 0;
    }
    .experience-container {
        background-color: #e9c7c1;
        display: flex;
        flex-direction: column;
        gap: 150px;
        justify-content: flex-start; 
        width: 50px;
        height: 900px; 
        margin: 0; 
        border: 5px solid black;
        border-radius: 30px;
        position: relative;
        transition: all 0.3s ease;
        margin-left: 0; 
    }
    
    .each-experience-container {
        display: flex;
        flex-direction: column;
        align-items: flex-start; 
        border-radius: 10px;
        width: auto; 
        height: auto; 
        position: relative; 
        flex-basis: 250px;
        margin-bottom: 10px;
    }
    
    .button-row {
        display: flex;
        flex-direction: column; 
        align-items: flex-start; 
        width: 100%;
        margin-bottom: 20px;
    }
    
    .expandable-button {
        background-color: transparent;
        padding: 5px 5px;
        margin: 0 10px;
        margin-top: 15px;
        margin-left: 0; 
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: flex-start; 
    }
    
    .expandable-button img {
        width: 55px;
        height: auto;
        border-radius: 5px;
        z-index: 5;
    }
    
    .expandable-button:hover {
        background-color: #e9c7c1;
        border: 5px solid black;
        border-radius: 50px;
        transition: background-color 0.3s ease;
    }
    
    .expandable-content {
        max-height: 0;
        overflow-y: auto; 
        transition: max-height 0.3s ease, width 0.3s ease; 
        padding: 0 10px;
        position: absolute; 
        top: 0; 
        left: 120%; 
        background-color: #f5f5f5;
        border-radius: 10px;
        width: 0px;
        height: auto;
        box-sizing: border-box; 
        margin-left: 0; 
        z-index: 4;
    }
    
    .expandable-button.active + .expandable-content {
        max-height: 250px;
        max-width: 350px; 
        padding: 10px;
    }
    .mega-gap-space {
        overflow: hidden;
        padding: 80px 10px;
    }
    .skills-container {
        background-color: #e9c7c1;
        display: flex;
        flex-direction: column;
        align-items: center; 
        gap: 2px; 
        justify-content: center; 
        width: 100%;
        height: 100%;
        max-width: 300px;
        margin: 0 auto;
        border: 5px solid black;
        border-radius: 30px;
        padding: 10px;
    }
    
    .each-skill-container {
        perspective: 1000px;
        margin-bottom: 5px;
        display: flex;
        justify-content: center;
        width: 100%;
    }
    .card {
        width: 250px; 
        height: 450px; 
        position: relative;
    } 

    .card-front, .card-back {
        text-align: center;
        position: absolute;
        width: 100%;
        height: 100%;
        border: 5px solid black;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: #f5f5f5;
        flex-direction: column;
        text-align: center;
    }
    .skills-text {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin: 1px;
    }
    .skills-text img {
        display: block;
        margin: 10px auto;
    }

/* Projects File */
.project-container {
    display: flex;
    flex-direction: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid black;
    margin-left: -5px;
    width: 350px;
}

.right-text-projects {
    flex: 1;
    max-height: 150px; 
    overflow-y: auto; 
    text-align: left; 
    border-radius: 10px; 
}

/* Resume Container */
.center-button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background-color: transparent;
    width: 250px;
    border: 5px solid black;
    border-radius: 30px;
    cursor: pointer;
    padding: 5px 0; 
}
.button-icon {
    width: 20px;
    height: 20px;
}
.button-text {
    font-size: 20px;
    margin-left: 10px;
    color: black; 
}
.resume-viewer {
    width: 100%; 
    max-width: 300px;
    max-height: 900px;
    padding: 10px;
}

}
@media (min-width: 768px) {
    .menu-toggle {
        display: hidden;
    }

    .header-right {
        display: flex;
        flex-direction: row;
    }
}