/* ===== RESPONSIVE DESIGN ===== */

/* Large Tablets & Small Laptops */
@media (max-width: 1024px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.25rem;
    }
    
    .hero .container {
        gap: 3rem;
    }
    
    .about-grid,
    .contact-grid {
        gap: 3rem;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    /* Navigation */
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        margin: 10px 0;
    }
    
    /* Hero Section */
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 2rem;
    }
    
    /* About Section */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-content {
        padding-left: 0;
    }
    
    /* Contact Section */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Portfolio Grid */
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
	
	/* Resize logo text for mobile */
    .logo-main {
    }
    
    .logo-sub {
        font-size: 0.75rem; /* Scaled down subtitle */
    }
    
    .navbar {
        height: 65px; /* Slight increase to fit the taller font */
    }
    
    .nav-menu {
        top: 65px; /* Match navbar height */
        height: calc(100vh - 65px);
    }
}

/* Mobile Phones */
@media (max-width: 576px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    /* Hero */
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    /* Services & IoT Grid */
    .services-grid,
    .iot-grid {
        grid-template-columns: 1fr;
    }
    
    /* Portfolio Filter */
    .portfolio-filter {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 200px;
    }
    
    /* Portfolio Grid */
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    /* Skill Items */
    .skill-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .skill-name {
        flex: none;
        margin-bottom: 0.5rem;
    }
    
    .skill-bar {
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .skill-percent {
        flex: none;
        align-self: flex-end;
    }

    
    /* Footer */
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Theme Toggle */
    .theme-toggle {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
  .skill-item {
   flex-direction: column;
    align-items: flex-start;
  }
  
  .skill-row {
    width: 100%;
  }


  
  .skill-bar {
    flex: 1;
    min-height: 12px;
  }

  .skill-percent {
    flex: 0 0 auto;
  }
}


/* Small Mobile Phones */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== RESPONSIVE DESIGN - NAVBAR FIXES ===== */

/* Large Tablets & Small Laptops */
@media (max-width: 1024px) {
    /* Keep regular nav menu visible */
    .nav-menu {
        display: flex;
    }
    
    .menu-toggle {
        display: none;
    }
}

/* Tablets - Show hamburger menu */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex !important; /* Force show on mobile */
    }
    
    .nav-menu {
        display: none; /* Hide regular menu */
    }
    
    .nav-menu.active {
        display: flex; /* Show when active */
    }
    
    /* Adjust navbar container for mobile */
    .navbar .container {
        padding: 15px 20px;
    }
}

/* Mobile Phones */
@media (max-width: 576px) {
    .navbar .container {
        padding: 12px 15px;
    }
    
    .logo img {
        width: 60px; /* Adjust logo size for mobile */
    }
}

/* Small Mobile Phones */
@media (max-width: 375px) {
    .logo img {
        width: 60px; /* Further adjust for very small screens */
    }
}