@media screen and (max-width:768px) {
    /* Ensure shared background spans nav + hero on mobile */
    body{
        background-size: auto;
        background-position: center top;
        background-repeat: no-repeat;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Ensure main wrapper handles viewport changes properly */
    .nav_hero_wrapper {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    /* hero mini profile removed */
    .left_nav{
        /* background-color: red; */
        margin-left: 0;
        
    }
    
    /* Logo margin for mobile */
    .left_nav img {
        margin-left: 20px;
    }
    .right_nav ul>li {
        margin: 0px;
        text-align: left;
        font-size: var(--text-lg);
        font-weight: 500;
        font-family: var(--font-heading);
        padding: 0px;
        width: 100%;
        color: white;
        margin-top: 6px;
        margin-bottom: 6px;
        cursor: pointer;
        letter-spacing: -0.02em;
    }


    .right_nav ul>li:hover {
        transition: all 0.2s ease;
        background-color: var(--secondary-slate);
    }

    .right_nav ul>li:not(hover) {
        transition: 0.1s ease;
        transform: scale(1);
    }


    .right_nav ul a::before {
        display: none;
    }

    .right_nav ul a::after {
        display: none;
    }

    .right_nav ul {
        position: absolute;
        inset: 220px auto 64px 0;
        height: calc(100% - 284px);
        width: var(--drawer-width, 78%);
        max-width: var(--drawer-max, 380px);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 6px;
        padding: 8px 12px 16px 12px;
        background: linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
        border-right: 1px solid var(--border-secondary);
        transform: translateX(-102%);
        transition: transform .35s cubic-bezier(.22,.61,.36,1), opacity .3s ease;
        opacity: 0.98;
        box-shadow: 12px 0 30px rgba(0,0,0,0.35);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 1;
        scrollbar-width: thin;
        scrollbar-color: var(--border-secondary) var(--bg-card);
    }
    .right_nav ul::-webkit-scrollbar{ width: 8px; }
    .right_nav ul::-webkit-scrollbar-track{ background: var(--bg-card); border-radius: 10px; }
    .right_nav ul::-webkit-scrollbar-thumb{ background: var(--border-secondary); border-radius: 10px; }
    .right_nav ul::-webkit-scrollbar-thumb:hover{ background: var(--border-primary); }

    .right_nav {
        overflow-y: hidden;
        z-index: 10000;
        color: var(--white);
        position: fixed;
        top: 0px;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--bg-overlay);
        backdrop-filter: blur(3px);
        margin: 0px;
        display: none;
        opacity: 0;
        transition: opacity .3s ease;
    }
    .right_nav.open{
        display: block;
        opacity: 1;
    }
    .right_nav.open ul{
        transform: translateX(0);
        align-items: center;
    }

    .menu_header_profile{
        position: absolute;
        top: 0;
        left: 0;
        width: var(--drawer-width, 78%);
        max-width: var(--drawer-max, 380px);
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
        height: auto;
        background: linear-gradient(180deg, var(--bg-secondary), var(--bg-tertiary));
        border-right: 1px solid var(--border-secondary);
        border-bottom: 1px solid var(--border-secondary);
        border-radius: 0 0 14px 0;
        box-shadow: 0 6px 18px rgba(0,0,0,0.35);
        transform: translateX(-102%);
        transition: transform .35s cubic-bezier(.22,.61,.36,1);
        z-index: 2;
    }
    .menu_header_profile img{
        width: 56px;
        height: 56px;
        flex: 0 0 56px;
        border-radius: 999px;
        object-fit: cover;
        border: 2px solid var(--border-secondary);
        box-shadow: 0 2px 8px rgba(0,0,0,0.35);
    }
    .menu_header_profile .profile_meta{ display: flex; flex-direction: column; gap: 2px; min-width: 0; }
    .menu_header_profile .profile_meta h3{
        font-size: 18px;
        font-weight: 800;
        color: var(--white);
        line-height: 1.1;
        margin: 0;
    }
    .menu_header_profile .profile_meta p{
        font-size: 13px;
        color: var(--text-secondary);
    }
    /* Username line (first p) */
    .menu_header_profile .profile_meta p:first-of-type{
        color: var(--text-muted);
        font-weight: 600;
        letter-spacing: 0.2px;
    }
    .right_nav.open .menu_header_profile{
        transform: translateX(0);
    }
    .menu_cta{ margin-top: 8px; padding: 0 16px; }
    .cv_btn{
        display: block;
        width: 100%;
        text-align: center;
        border: 1px solid var(--border-secondary);
        background: var(--bg-card);
        color: var(--white);
        padding: 10px 12px;
        border-radius: 10px;
        font-weight: 700;
        font-size: 13px;
        text-decoration: none;
    }
    .profile_meta .profile_bio{ margin-top: 6px; color: var(--text-primary); font-size: 13px; line-height: 1.5; }

    .menu_social{
        position: absolute;
        bottom: 0;
        left: 0;
        width: var(--drawer-width, 78%);
        max-width: var(--drawer-max, 380px);
        padding: 12px 16px 18px 16px;
        transform: translateX(-102%);
        transition: transform .35s cubic-bezier(.22,.61,.36,1);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 8px;
        z-index: 2;
    }
    /* Bio as a separate bordered pill */
    .profile_meta .profile_bio{
        display: block;
        background: rgba(255,255,255,0.06);
        border: 1px solid rgba(255,255,255,0.14);
        padding: 8px 10px;
        border-radius: 10px;
        backdrop-filter: blur(4px);
    }

    /* expand button */
    .menu_expand_btn{
        margin-left: auto;
        border: 1px solid rgba(255,255,255,0.2);
        background: rgba(255,255,255,0.06);
        color: var(--white);
        width: 36px;
        height: 36px;
        border-radius: 10px;
        display: grid;
        place-items: center;
        cursor: pointer;
    }
    .right_nav.fullwidth{
        --drawer-width: 100%;
        --drawer-max: 100%;
        backdrop-filter: blur(5px);
    }
    /* Larger social buttons when expanded to full width */
    .right_nav.fullwidth .menu_social{ gap: 12px; justify-content: center; flex-wrap: nowrap; }
    .right_nav.fullwidth .menu_social a{ width: 42px; height: 42px; font-size: 18px; }
    .right_nav.fullwidth .menu_social a.cv_btn{ height: 42px; padding: 0 14px; font-size: 14px; gap: 8px; flex: 0 0 auto; min-width: max-content; }
    .right_nav.fullwidth .menu_social a.cv_btn span{ overflow: visible; }
    /* Hide close button when expanded to full width */
    .right_nav.fullwidth .close_icon{ display: none; }
    .menu_social a{
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        color: var(--white);
        border: 1px solid rgba(255,255,255,0.15);
        border-radius: 10px;
        background: rgba(255,255,255,0.05);
        backdrop-filter: blur(6px);
        font-size: 16px;
        flex: 0 0 auto;
    }
    .menu_social a.cv_btn{
        width: auto;
        height: 34px;
        padding: 0 10px;
        font-size: 12px;
        font-weight: 800;
        letter-spacing: .2px;
        border-radius: 10px;
        background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06));
        border: 1px solid rgba(255,255,255,0.22);
        box-shadow: 0 6px 16px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.2);
        display: inline-flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
        flex: 0 1 auto;
        min-width: 0;
    }
    .menu_social a.cv_btn:hover{ background: var(--primary-blue); transition: background .2s ease; }
    .menu_social a.cv_btn i{ font-size: 14px; }
    .menu_social a.cv_btn span{ display: inline-block; overflow: hidden; text-overflow: ellipsis; }
    .right_nav.open .menu_social{
        transform: translateX(0);
    }

    /* Short height adjustments */
    @media (max-height: 640px){
        .menu_header_profile{ padding: 12px; }
        .menu_header_profile img{ width: 44px; height: 44px; flex-basis: 44px; }
        .menu_header_profile .profile_meta{ 
        display: flex; 
        flex-direction: column; 
        gap: 2px; 
        min-width: 0; 
    }
        .menu_header_profile .profile_meta h3{ font-size: 16px; }
        .menu_header_profile .profile_meta p{ font-size: 12px; }
        .right_nav ul{ inset: 172px auto 52px 0; height: calc(100% - 224px); padding: 6px 10px 12px 10px; gap: 6px; }
        /* Shrink menu button height */
        .right_nav ul li{ min-height: 36px; }
        .right_nav ul li a{ padding: 0 10px; font-size: 14px; line-height: 1.1; }
        .profile_meta .profile_bio{ font-size: 12px; -webkit-line-clamp: 2; line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
        .cv_btn{ padding: 8px 10px; font-size: 12px; }
        .menu_quick_links{ bottom: 56px; padding: 0 12px; gap: 8px; }
        .menu_quick_links a{ padding: 10px; font-size: 13px; }
        .menu_social{ padding: 10px 12px 14px 12px; }
        .menu_social a{ width: 32px; height: 32px; font-size: 15px; }
        .menu_social a.cv_btn{ height: 32px; padding: 0 8px; font-size: 11px; }
    }

    /* Wider mobile: safely enlarge icons/buttons when no wrap risk */
    @media (min-width: 420px){
        .menu_social{ gap: 10px; }
        .menu_social a{ width: 38px; height: 38px; font-size: 17px; }
        .menu_social a.cv_btn{ height: 38px; padding: 0 12px; font-size: 13px; gap: 8px; }
        .menu_social a.cv_btn i{ font-size: 15px; }
    }

    /* Extra-narrow width: keep in one line with tighter spacing, keep text */
    @media (max-width: 360px){
        .menu_social{ gap: 6px; }
        .menu_social a{ width: 30px; height: 30px; font-size: 14px; }
        .menu_social a.cv_btn{ height: 30px; padding: 0 8px; font-size: 11px; max-width: 200px; }
        .menu_social a.cv_btn i{ font-size: 12px; }
    }
    /* Ultra-tight: shrink more but keep text if possible */
    @media (max-width: 340px){
        .menu_social{ gap: 4px; }
        .menu_social a{ width: 28px; height: 28px; font-size: 13px; }
        .menu_social a.cv_btn{ height: 28px; padding: 0 6px; font-size: 10px; }
        .menu_social a.cv_btn i{ font-size: 11px; }
    }
    /* Fallback for very tiny widths: keep on one line by showing icon-only */
    @media (max-width: 300px){
        .menu_social a.cv_btn span{ display: none; }
        .menu_social a.cv_btn{ padding: 0 6px; min-width: 0; }
    }
    .right_nav .close_icon{
        position: absolute;
        top: 16px;
        right: 16px;
        color: white;
        font-size: 24px;
        cursor: pointer;
        user-select: none;
        display: block;
        width: 40px;
        height: 40px;
        display: grid;
        place-items: center;
        background: rgba(255,255,255,0.08);
        border-radius: 999px;
        border: 1px solid rgba(255,255,255,0.15);
        box-shadow: 0 2px 10px rgba(0,0,0,0.35);
        backdrop-filter: blur(6px);
    }
    .right_nav::-webkit-scrollbar {
        display: none;
      }

    /* Link reveal animation */
    @keyframes revealItem {
        0% { opacity: 0; transform: translateY(14px); }
        100% { opacity: 1; transform: translateY(0); }
    }


    .bars_icon {
        display: block;
        margin-right: 20px;
        user-select: none;
        font-size: 26px;
        cursor: pointer;
        animation: ScaleUp .4s forwards;
        transition: transform .25s ease;
    }
    .bars_icon:active{
        transform: scale(0.96);
    }

    /* Card-like nav items */
    .right_nav ul li{
        width: 100%;
        max-width: 520px;
        border: 1px solid rgba(255,255,255,0.10);
        background: rgba(255,255,255,0.05);
        border-radius: 14px;
        backdrop-filter: blur(8px);
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        opacity: 0;
        transform: translateY(14px);
    }
    .right_nav ul li.menu_bio_item{
        display: block;
        border: none;
        background: transparent;
        backdrop-filter: none;
        padding: 6px 4px 10px 4px;
        max-width: 520px;
        margin: 0 auto;
        opacity: 1;
        transform: none;
        cursor: default;
    }
    .right_nav ul li.menu_bio_item:hover{ background: transparent; }
    .right_nav ul li.menu_bio_item p{
        margin: 0 12px;
        color: rgba(255,255,255,0.85);
        font-size: 13px;
        line-height: 1.5;
    }
    .right_nav.open ul li{
        animation: revealItem .45s ease forwards;
    }
    .right_nav.open ul li:nth-child(1){ animation-delay: .05s; }
    .right_nav.open ul li:nth-child(2){ animation-delay: .10s; }
    .right_nav.open ul li:nth-child(3){ animation-delay: .15s; }
    .right_nav.open ul li:nth-child(4){ animation-delay: .20s; }
    .right_nav.open ul li:nth-child(5){ animation-delay: .25s; }
    .right_nav.open ul li:nth-child(6){ animation-delay: .30s; }
    .right_nav ul li a{
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
        height: 100%;
        min-height: inherit;
        padding: 0 12px;
        color: var(--white);
        font-weight: 700;
        letter-spacing: 0.25px;
        line-height: 1.2;
        font-size: 16px;
    }
    .right_nav ul>li:hover{
        background: var(--bg-card);
    }

    .arrow_about {
        display: none;

    }

    .aboutus {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .right_about {
        display: none;
    }

    .right_about img {
        min-width: 250px;
        border-radius: 20px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 
                    0 0 0 1px rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        position: relative;
        overflow: hidden;
        animation: float 6s ease-in-out infinite;
    }

    .right_about img::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.1) 0%, 
            rgba(255, 255, 255, 0.05) 50%, 
            rgba(0, 0, 0, 0.1) 100%);
        border-radius: 20px;
        pointer-events: none;
    }

    .right_about img:hover {
        transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.05);
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 
                    0 0 0 1px rgba(255, 255, 255, 0.2);
    }


    @keyframes float {
        0%, 100% {
            transform: perspective(1000px) rotateY(-5deg) rotateX(5deg) translateY(0px);
        }
        50% {
            transform: perspective(1000px) rotateY(-5deg) rotateX(5deg) translateY(-10px);
        }
    }

    .intro_text {
        font-size: 16px;
        color: var(--text-secondary);
        margin-bottom: 8px;
        text-align: left;
        font-weight: 500;
    }


    .left_about h1::first-letter {
        color: inherit;
        font-size: inherit;
        font-weight: inherit;
        display: inherit;
        margin-right: inherit;
        background: inherit;
        -webkit-background-clip: inherit;
        -webkit-text-fill-color: inherit;
        background-clip: inherit;
        text-shadow: inherit;
        transform: inherit;
        transition: inherit;
    }

    .description {
        font-size: var(--text-base);
        line-height: 1.7;
        max-width: 100%;
        text-align: left;
        margin: 0 0 var(--space-6) 0;
        padding: 0;
        color: var(--text-secondary);
        font-weight: 400;
        letter-spacing: 0.01em;
    }

    .cta_button {
        width: 140px;
        height: 48px;
        font-size: 14px;
        margin: 0;
    }

    .secondary_button {
        width: 140px;
        height: 48px;
        font-size: 14px;
        margin: 0;
    }

    .hero_cta_row {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin: 0;
        width: 100%;
        max-width: 100%;
        flex-wrap: nowrap;
        box-sizing: border-box;
    }

    .social_icons_row {
        gap: 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        justify-content: flex-start;
    }
    
    /* Larger font size for mobile */
    .main_heading {
        font-size: clamp(3.5rem, 10vw, 6rem) !important;
    }

    /* Free Tools Mobile Responsive */
    .tools_title span {
        font-size: var(--text-2xl);
    }
    
    /* Show animation controls on mobile */
    .animation-controls {
        display: flex;
    }
    
    .tools_row {
        gap: var(--space-4);
        padding: var(--space-2) 0;
        justify-content: flex-start;
        animation: infiniteScroll 15s linear infinite;
        width: max-content;
        display: flex;
        overflow-x: hidden;
    }
    
    .tool-item {
        min-width: 120px;
        padding: var(--space-4);
        flex-shrink: 0;
    }
    
    .tool-icon {
        font-size: var(--text-2xl);
    }
    
    .tool-name {
        font-size: var(--text-xs);
        margin-bottom: var(--space-1);
    }
    
    .tool-desc {
        font-size: 10px;
        line-height: 1.2;
    }
    
    /* Show duplicate tools on mobile for infinite scroll */
    .tool-item:nth-child(n+6) {
        display: flex;
    }
    
    /* True infinite scroll animation */
    @keyframes infiniteScroll {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }
    
    /* Pause animation on hover */
    .tools_row:hover {
        animation-play-state: paused;
    }

    .social_icon {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    /* Mobile creative elements */
    .hero_creative_elements {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: 1;
        overflow: hidden;
    }

    .particle {
        width: 3px;
        height: 3px;
        background: rgba(255, 255, 255, 0.2);
    }

    .geometric_shape {
        top: 15%;
        right: 5%;
        width: 60px;
        height: 60px;
        background: linear-gradient(45deg, rgba(0, 217, 232, 0.08), rgba(255, 255, 255, 0.03));
    }

    .gradient_overlay {
        background: radial-gradient(circle at 20% 15%, rgba(0, 217, 232, 0.03) 0%, transparent 40%);
    }

    /* Mobile creative visual elements */
    .matrix_rain {
        opacity: 0.05; /* Even more subtle on mobile */
    }

    .matrix_column {
        width: 1px; /* Thinner on mobile */
    }

    .holo_shape {
        border: 0.5px solid rgba(0, 217, 232, 0.15);
        background: rgba(0, 217, 232, 0.03);
    }

    .holo-1 {
        width: 25px;
        height: 25px;
        top: 20%;
        left: 5%;
    }

    .holo-2 {
        width: 20px;
        height: 20px;
        top: 55%;
        right: 8%;
    }

    .holo-3 {
        width: 15px;
        height: 15px;
        top: 35%;
        left: 90%;
    }

    .neon_line {
        height: 0.5px; /* Thinner on mobile */
    }

    .neon-1 {
        width: 25%;
        top: 25%;
    }

    .neon-2 {
        width: 20%;
        top: 65%;
    }

    .neon_dot {
        width: 4px;
        height: 4px;
        top: 45%;
        left: 3%;
    }

    .left_about {
        margin: 0;
        padding: 30px 20px;
        width: 100%;
        max-width: 100vw;
        text-align: left;
        gap: 20px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
/*         min-height: 100vh; */
        position: relative;
        z-index: 2;
        margin-left: 0 !important;
        box-sizing: border-box;
    }

    .social_media_icons {
        position: relative;
        display: inline-block;
        gap: 40px;
        display: flex;
        left: 0px;
        flex-direction: row;
        /* background-color: red; */
        align-items: center;
        justify-content: center;
        margin-top: 35px;
        /* margin-left: auto; */
        min-width: 250px;
        
    }


    .social_media_icons {
        font-size: 20px;
    }
    /* Portfolio section mobile responsive */
    .portfolio_section {
        padding: 20px 10px;
    }
    
    .portfolio_grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 100%;
        padding: 10px 0;
    }
    
    .portfolio_card {
        margin: 0 auto;
        max-width: 350px;
        width: 100%;
    }
    
    .portfolio_thumbnail {
        height: 180px;
    }
    
    .website_preview {
        margin: 8px;
        width: calc(100% - 16px);
        height: calc(100% - 16px);
    }
    
    .browser_bar {
        padding: 6px 10px;
    }
    
    .browser_url {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .website_content {
        padding: 15px;
        height: calc(100% - 35px);
    }
    
    .preview_header {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .preview_text {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .feature {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .portfolio_info {
        padding: 20px;
    }
    
    .portfolio_info h3 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .portfolio_info p {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .tech_stack {
        gap: 6px;
        margin-bottom: 15px;
    }
    
    .tech {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .portfolio_actions {
        gap: 10px;
        flex-direction: column;
    }
    
    .btn_primary, .btn_secondary {
        padding: 12px 20px;
        font-size: 14px;
        justify-content: center;
        width: 100%;
    }

    /* journey part responsive - now portfolio */
    .left_about_journey{
display: none;
    }
    .right_about_journey{
        margin: 20px;
        animation:journey_animate 1s forwards;
        padding: 20px;
        background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.05) 0%, 
            rgba(255, 255, 255, 0.02) 100%);
        border-radius: 20px;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    }
    @keyframes journey_animate {
        0%{
            transform: translateY(100px);
            opacity: 0;
        }
        100%{
            transform: translate(0);
            opacity: 1;
        }
    }
    .timeline1{
        background: linear-gradient(135deg, 
            rgba(0, 217, 232, 0.1) 0%, 
            rgba(0, 217, 232, 0.05) 100%);
        border: 2px solid rgba(0, 217, 232, 0.3);
        border-radius: 15px;
        padding: 20px;
        margin-bottom: 15px;
        backdrop-filter: blur(5px);
        box-shadow: 0 4px 20px rgba(0, 217, 232, 0.1);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .timeline1::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, 
            transparent, 
            rgba(0, 217, 232, 0.1), 
            transparent);
        transition: left 0.5s ease;
    }

    .timeline1:hover::before {
        left: 100%;
    }

    .timeline1:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 30px rgba(0, 217, 232, 0.2);
        border-color: rgba(0, 217, 232, 0.5);
    }
    
    /* services part responsive ites already responsive */
    .portfolio_top_part{
/* background-color: red; */
height: 140px;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
    }
    .portfolio_top_part ul li{
        color: var(--primary-blue);
        background-color: var(--bg-card);
border-radius: 4px;
font-size: 100%;

    }
    .left_right_icon{
        display: flex;
        gap: 80%;
        font-size: 30px;
        user-select: none;
    }
    /* contact part responsive start from here */
 
    .contact_info{
        padding: 30px;
        padding-bottom: 20px;
        margin: 0px;
        width: 100%;
        border-radius: 10px;
        /* background-color: red; */
        height: auto;
    }
    .contact_info_details{
        margin: 0px;
        margin-top: 40px;
        animation: SlideLeft .7s forwards;
    }
    .contact_container{
        height: auto;
        padding: 0px;
        margin: 0px;
    }

    .contact_info h1{

        font-size: 20px;
    }

}
@media screen and (max-width:680px) {
    .contact_container{
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
    }
    .contact_form{
        width: 100%;
        margin-left: 1%;
    }
}

/* iPhone SE and similar small devices (375px and below) */
@media screen and (max-width: 375px) {
    /* Ensure content stays centered on iPhone SE */
    .nav_hero_wrapper {
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
        position: relative;
    }
    
    .aboutus {
        width: 100vw;
        max-width: 100vw;
        padding: 0;
        margin: 0;
        overflow-x: hidden;
    }
    
    .left_about {
        width: 100vw;
        max-width: 100vw;
        padding: 20px 15px;
        margin: 0;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    /* Ensure buttons don't cause overflow */
    .hero_cta_row {
        width: 100%;
        max-width: calc(100vw - 30px);
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .cta_button, .secondary_button {
        flex: 1;
        min-width: 120px;
        max-width: 140px;
    }
    
    /* Ensure social icons don't cause overflow */
    .social_icons_row {
        width: 100%;
        max-width: calc(100vw - 30px);
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    
    .social_icon {
        flex-shrink: 0;
    }
    
    /* Ensure text doesn't cause horizontal overflow */
    .description {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .main_heading {
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.1;
        font-size: clamp(3.2rem, 11vw, 5.5rem) !important;
    }
    
    /* Navigation fixes for iPhone SE */
    .left_nav {
        margin-left: 0;
        padding-left: 15px;
    }
    
    .left_nav img {
        margin-left: 0;
    }
    
    /* Ensure navigation doesn't cause horizontal overflow */
    .nav {
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    /* Ensure body and html don't cause overflow */
    body, html {
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }
}

/* Loading Animation Responsive Styles */
@media screen and (max-width: 768px) {
    /* Loading Animation Mobile Responsive */
    .loading-overlay {
        padding: var(--space-4);
    }

    .loading-logo {
        margin-bottom: var(--space-6);
    }

    .logo-container {
        width: 100px;
        height: 100px;
    }

    .logo-spin {
        width: 60px;
        height: 60px;
    }

    .logo-ring {
        width: 80px;
        height: 80px;
    }

    .logo-ring-2 {
        width: 100px;
        height: 100px;
    }

    .typing-container {
        margin-bottom: var(--space-6);
        min-height: 1.5em;
    }

    .typing-text {
        font-size: var(--text-lg);
        letter-spacing: 1px;
    }

    .typing-cursor {
        font-size: var(--text-lg);
    }

    .loading-progress {
        width: 250px;
        height: 5px;
        margin-bottom: var(--space-3);
    }

    .progress-text {
        font-size: var(--text-xs);
    }

    .particle-loading {
        width: 3px;
        height: 3px;
    }

    /* Adjust particle positions for mobile */
    .particle-loading:nth-child(1) {
        left: 15%;
    }

    .particle-loading:nth-child(2) {
        left: 35%;
    }

    .particle-loading:nth-child(3) {
        left: 55%;
    }

    .particle-loading:nth-child(4) {
        left: 75%;
    }

    .particle-loading:nth-child(5) {
        left: 10%;
    }
}

@media screen and (max-width: 480px) {
    /* Extra small mobile devices */
    .loading-overlay {
        padding: var(--space-3);
    }

    .loading-logo {
        margin-bottom: var(--space-4);
    }

    .logo-container {
        width: 80px;
        height: 80px;
    }

    .logo-spin {
        width: 50px;
        height: 50px;
    }

    .logo-ring {
        width: 65px;
        height: 65px;
    }

    .logo-ring-2 {
        width: 80px;
        height: 80px;
    }

    .typing-container {
        margin-bottom: var(--space-4);
        min-height: 1.2em;
    }

    .typing-text {
        font-size: var(--text-base);
        letter-spacing: 0.5px;
    }

    .typing-cursor {
        font-size: var(--text-base);
    }

    .loading-progress {
        width: 200px;
        height: 4px;
        margin-bottom: var(--space-2);
    }

    .progress-text {
        font-size: 10px;
    }

    .particle-loading {
        width: 2px;
        height: 2px;
    }
}

@media screen and (max-width: 360px) {
    /* Very small devices */
    .loading-overlay {
        padding: var(--space-2);
    }

    .loading-logo {
        margin-bottom: var(--space-3);
    }

    .logo-container {
        width: 70px;
        height: 70px;
    }

    .logo-spin {
        width: 45px;
        height: 45px;
    }

    .logo-ring {
        width: 55px;
        height: 55px;
    }

    .logo-ring-2 {
        width: 70px;
        height: 70px;
    }

    .typing-container {
        margin-bottom: var(--space-3);
    }

    .typing-text {
        font-size: var(--text-sm);
        letter-spacing: 0.3px;
    }

    .typing-cursor {
        font-size: var(--text-sm);
    }

    .loading-progress {
        width: 180px;
        height: 3px;
    }

    .progress-text {
        font-size: 9px;
    }
}

@media screen and (max-width: 320px) {
    /* Ultra small devices */
    .loading-overlay {
        padding: var(--space-1);
    }

    .loading-logo {
        margin-bottom: var(--space-2);
    }

    .logo-container {
        width: 60px;
        height: 60px;
    }

    .logo-spin {
        width: 40px;
        height: 40px;
    }

    .logo-ring {
        width: 50px;
        height: 50px;
    }

    .logo-ring-2 {
        width: 60px;
        height: 60px;
    }

    .typing-text {
        font-size: 11px;
        letter-spacing: 0.2px;
    }

    .typing-cursor {
        font-size: 11px;
    }

    .loading-progress {
        width: 150px;
        height: 3px;
    }

    .progress-text {
        font-size: 8px;
    }
}

/* Landscape orientation adjustments */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .loading-overlay {
        flex-direction: row;
        gap: var(--space-6);
        padding: var(--space-4);
    }

    .loading-logo {
        margin-bottom: 0;
        margin-right: var(--space-4);
    }

    .logo-container {
        width: 80px;
        height: 80px;
    }

    .logo-spin {
        width: 50px;
        height: 50px;
    }

    .logo-ring {
        width: 65px;
        height: 65px;
    }

    .logo-ring-2 {
        width: 80px;
        height: 80px;
    }

    .typing-container {
        margin-bottom: var(--space-2);
    }

    .loading-progress {
        width: 200px;
        margin-bottom: var(--space-2);
    }
}

/* High DPI displays */
@media screen and (-webkit-min-device-pixel-ratio: 2), 
       screen and (min-resolution: 192dpi) {
    .logo-spin {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .logo-spin,
    .logo-ring,
    .logo-ring-2,
    .particle-loading {
        animation-duration: 10s;
    }
    
    .typing-cursor {
        animation: none;
        opacity: 1;
    }
    
    .morphing-shape,
    .particle,
    .glitch::before,
    .glitch::after {
        animation: none;
    }
}

/* Mobile Responsive for New Features */
@media screen and (max-width: 768px) {
    /* Hide custom cursor on mobile */
    .custom-cursor {
        display: none !important;
    }
    
    /* Adjust FAB for mobile */
    .floating-action-menu {
        bottom: var(--space-4);
        left: var(--space-4);
    }
    
    .fab-main {
        width: 50px;
        height: 50px;
        font-size: var(--text-lg);
    }
    
    .fab-option {
        width: 40px;
        height: 40px;
        font-size: var(--text-base);
    }
    
    /* Adjust toast for mobile */
    .toast-container {
        top: var(--space-4);
        right: var(--space-4);
        left: var(--space-4);
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
    
    /* Reduce morphing shapes on mobile */
    .morphing-shape {
        opacity: 0.05;
    }
    
    /* Disable glitch effect on mobile for performance */
    .glitch::before,
    .glitch::after {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    /* Further mobile optimizations */
    .floating-action-menu {
        bottom: var(--space-3);
        left: var(--space-3);
    }
    
    .fab-main {
        width: 45px;
        height: 45px;
        font-size: var(--text-base);
    }
    
    .fab-option {
        width: 35px;
        height: 35px;
        font-size: var(--text-sm);
    }
    
    .toast-container {
        top: var(--space-3);
        right: var(--space-3);
        left: var(--space-3);
    }
}
