/* Responsive Base Styles */
/*code by: Arif billah */
@media (max-width: 1200px) {
    .container {
        padding: 0 20px;
    }
    
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 992px) {
    /* Navigation */
    .nav-links {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background: rgba(10, 15, 30, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 80px 20px;
        transition: right 0.3s ease;
        z-index: 1000;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .menu-toggle {
        display: block;
        z-index: 1001;
    }
    
    /* Hero Section */
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-content h2 {
        font-size: 1.6rem;
    }
    
    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .about-img {
        max-width: 400px;
        margin: 0 auto;
    }
    
    /* Skills Grid */
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* General */
    .section-title {
        font-size: 2.2rem;
    }
    
    /* Hero Section */
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content h2 {
        font-size: 1.4rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    /* Skills Grid */
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .skill-category {
        margin-bottom: 30px;
    }
    
    /* Projects Grid */
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        margin-bottom: 30px;
    }
    
    /* Stats Container */
    .project-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .stat-item {
        width: 100%;
        max-width: 300px;
        margin-bottom: 20px;
    }
    
    /* Timeline */
    .timeline-item {
        flex-direction: column;
        text-align: center;
    }
    
    .timeline-icon {
        margin: 0 auto 20px;
    }
    
    .timeline-content {
        text-align: left;
    }
    
    /* Contact Section */
    .content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-form,
    .contact-info {
        padding: 25px;
    }
    
    /* Social Links */
    .social-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    /* General */
    .container {
        padding: 0 15px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    /* Hero Section */
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content h2 {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
    
    /* About Section */
    .about-img {
        max-width: 300px;
    }
    
    .skill-pill {
        font-size: 0.8rem;
        padding: 8px 15px;
    }
    
    /* Project Tags */
    .tag {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
    
    /* Button Row */
    .button-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .button-row .view-more-btn,
    .button-row .project-link {
        width: 100%;
        text-align: center;
    }
    
    /* Contact Form */
    .form-group input,
    .form-group textarea {
        padding: 15px;
    }
    
    /* Social Links */
    .social-links {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* Mobile Navigation Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #00f3ff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1001;
}

@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .project-card:hover {
        transform: none;
    }
    
    .view-more-btn:hover,
    .project-link:hover {
        transform: none;
    }
    
    .skill-pill:hover {
        transform: none;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .project-img img {
        filter: brightness(0.8) contrast(1.1);
    }
}

/* Print Styles */
@media print {
    .floating-shapes,
    .menu-toggle,
    .btn,
    .view-more-projects-btn,
    .back-to-top {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .project-features {
        display: block !important;
    }
}
/* Fluid Typography */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    h3 {
        font-size: 1.4rem;
    }
    
    p {
        font-size: 1rem;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
}
/* Responsive Utility Classes */
.hide-on-mobile {
    display: block;
}

.show-on-mobile {
    display: none;
}

@media (max-width: 768px) {
    .hide-on-mobile {
        display: none;
    }
    
    .show-on-mobile {
        display: block;
    }
}

/* Flexbox responsive helpers */
.flex-mobile-column {
    flex-direction: row;
}

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

/* Grid responsive helpers */
.grid-mobile-1 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

@media (max-width: 480px) {
    .grid-mobile-1 {
        grid-template-columns: 1fr;
    }
}
/* Mobile Navigation Styles */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background: #00f3ff;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Mobile styles */
@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
        position: absolute;
        right: 20px;
        top: 20px;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: rgba(10, 15, 30, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        margin: 0;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 20px 0;
        opacity: 0;
        transform: translateX(20px);
        transition: all 0.3s ease;
        list-style: none;
    }
    
    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }
    
    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.15s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.25s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.3s; }
    .nav-links.active li:nth-child(6) { transition-delay: 0.35s; }
    
    .nav-links a {
        color: white;
        text-decoration: none;
        font-size: 1.2rem;
        padding: 15px 20px;
        border-radius: 5px;
        transition: all 0.3s ease;
        display: block;
        background: rgba(255, 255, 255, 0.05);
    }
    
    .nav-links a:hover {
        background: rgba(0, 243, 255, 0.15);
        transform: translateX(10px);
        color: #00f3ff;
    }
}

/* Overlay when menu is open */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 999;
}

.menu-overlay.active {
    display: block;
}

/* Prevent body scroll when menu is open */
body.no-scroll {
    overflow: hidden;
}

/* Base navigation styles */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover {
    color: #00f3ff;
}

/* Desktop styles */
@media (min-width: 993px) {
    .nav-links {
        display: flex !important;
        position: static;
        flex-direction: row;
        width: auto;
        height: auto;
        background: transparent;
        padding: 0;
        box-shadow: none;
    }
    
    .nav-links li {
        opacity: 1 !important;
        transform: none !important;
        margin: 0 !important;
    }
    
    .nav-links a {
        background: transparent !important;
        padding: 10px 15px !important;
        font-size: 1rem !important;
    }
    
    .nav-links a:hover {
        transform: none !important;
    }
}
@media (max-width: 992px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: rgba(10, 15, 30, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        margin: 0;
        /* Ensure all links are visible */
        overflow-y: auto;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 20px 0;
        opacity: 0;
        transform: translateX(20px);
        transition: all 0.3s ease;
        list-style: none;
        /* Make sure all list items are displayed */
        display: block;
        width: 100%;
    }
    
    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }
    
    /* Add transition delays for ALL menu items including Contact */
    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.15s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.25s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.3s; }
    .nav-links.active li:nth-child(6) { transition-delay: 0.35s; }
    .nav-links.active li:nth-child(7) { transition-delay: 0.4s; } /* Add this for Contact */
    
    .nav-links a {
        color: white;
        text-decoration: none;
        font-size: 1.2rem;
        padding: 15px 20px;
        border-radius: 5px;
        transition: all 0.3s ease;
        display: block;
        background: rgba(255, 255, 255, 0.05);
        /* Ensure links are fully visible */
        width: 100%;
        box-sizing: border-box;
    }
}