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

    .sidebar {
        width: 100%;
        margin: 0;
        border-radius: 0;
        position: static;
        min-height: auto;
        max-height: auto;
        overflow-y: visible;
    }

    .menu-toggle {
        display: block; /* Display the menu toggle button on mobile */
        margin-right: 0px; /* Adjust margin as needed */
        /* resize size of the button */
        width: 40px;
        height: 40px;
    }

    .header-nav {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative; /* Add relative positioning to position the dropdown */
    }

    .header-nav h1 {
        padding-right: 0;
    }

    .navigation {
        display: none; /* Hide navigation links on mobile by default */
        position: absolute;
        top: 100%; /* Position the navigation menu below the button */
        right: 0; /* Align to the right edge of the button */
        background-color: var(--primary-color);
        padding: 10px;
        border-radius: 10px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Optional: Add shadow for dropdown effect */
        transition: opacity 0.3s ease, transform 0.3s ease; /* Add transitions for opacity and transform */
        transform-origin: top; /* Set transform origin to top */
        opacity: 0; /* Initially hide the navigation menu */
        z-index: 1000; /* Ensure it's above other content */
    }

    .navigation.show {
        display: flex; /* Show navigation links when the class is added */
        flex-direction: column;
        opacity: 1; /* Show the navigation menu */
        transform: translateY(10px); /* Adjust vertical position as needed */
    }

    .menu-toggle img {
        width: 100%; /* Make the image fill the button */
        height: 100%; /* Make the image fill the button */
        object-fit: contain; /* Maintain the aspect ratio and fit within the button */
    }

    .social-links {
        margin-top: 20px; /* Adjusted margin */
    }

    .about-me {
        padding: 15px;
    }

    .about-me p {
        margin-bottom: 10px; /* Adjusted margin */
    }

    .main-content {
        width: 100%;
    }

    .hobby {
        width: 100%;
    }

    .skills-list {
        flex-direction: column;
        gap: 20px; /* Reduce gap for smaller screens */
    }

    .skill-category ul {
        grid-template-columns: 1fr; /* One per line on mobile */
    }

    .skill-category ul li {
        justify-content: flex-start; /* Align items to the start */
    }

    .project-grid {
        grid-template-columns: 1fr; /* Change to single column */
        gap: 30px; /* Increase gap between cards */
    }

    .project-card {
        height: auto; /* Allow height to adjust based on content */
        max-width: 100%; /* Ensure card doesn't exceed screen width */
    }

    .card-front, .card-back {
        position: relative; /* Change from absolute positioning */
        height: auto; /* Allow height to adjust */
    }

    .card-front {
        padding-bottom: 15px; /* Add some padding at the bottom */
    }

    .card-back {
        transform: none; /* Remove the rotation */
        display: none; /* Hide initially */
    }

    .project-card:hover .card-inner {
        transform: none; /* Remove flip effect on hover */
    }

    .project-card.active .card-front {
        display: none; /* Hide front when active */
    }

    .project-card.active .card-back {
        display: flex; /* Show back when active */
    }

    .card-front img {
        height: 150px; /* Reduce image height for mobile */
    }

    .card-front h3 {
        font-size: 18px; /* Reduce title font size */
        margin-bottom: 10px;
    }

    .project-tag {
        font-size: 10px; /* Reduce tag font size */
        margin: 2px;
    }

    .card-back p {
        font-size: 14px; /* Reduce paragraph font size */
        margin: 10px;
    }

    .article-image {
        display: block;
        min-width: 80%;
        max-width: 80%;
        margin: 20px auto;
        border-radius: 10px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    }
}

