/* ===================================
   RESPONSIVE DESIGN - Instant Coding Network
   =================================== */

/* ===== Breakpoints ===== */
/* 
   xs: < 480px (Mobile portrait)
   sm: 480px - 768px (Mobile landscape)
   md: 768px - 1024px (Tablet)
   lg: 1024px - 1280px (Desktop)
   xl: > 1280px (Large desktop)
*/

/* ===== Large Desktop (xl) ===== */
@media (min-width: 1536px) {
    .container {
        max-width: 1400px;
    }
}

/* ===== Desktop (lg) ===== */
@media (max-width: 1280px) {
    .hero-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

/* ===== Tablet (md) ===== */
@media (max-width: 1024px) {
    /* Navigation */
    .nav-menu {
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 0.875rem;
    }
    
    /* Hero */
    .hero {
        padding: 5rem 1.5rem 3rem;
    }
    
    .hero-title {
        font-size: clamp(2rem, 7vw, 4rem);
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .cta-buttons {
        margin-bottom: 3rem;
    }
    
    /* Sections */
    .section {
        padding: 4rem 1.5rem;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
    
    .section-title {
        font-size: clamp(1.75rem, 4vw, 2.5rem);
    }
    
    /* Grids */
    .features-grid,
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
    }
}

/* ===== Mobile Landscape & Small Tablet (sm-md) ===== */
@media (max-width: 768px) {
    /* Navigation Mobile */
    .nav-container {
        padding: 1rem 1.5rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 73px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 2rem;
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        width: 100%;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-link {
        display: block;
        width: 100%;
        font-size: 1.125rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Hero */
    .hero {
        padding: 4rem 1.25rem 2rem;
        min-height: auto;
    }
    
    .hero-badge {
        font-size: 0.8125rem;
        padding: 0.375rem 0.875rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-title {
        font-size: clamp(1.875rem, 6vw, 3rem);
        margin-bottom: 1.25rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin: 0 auto 2.5rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        max-width: 100%;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .scroll-indicator {
        bottom: 1rem;
    }
    
    /* Animated Background */
    .orb-1 {
        width: 400px;
        height: 400px;
        top: -100px;
        right: -100px;
    }
    
    .orb-2 {
        width: 350px;
        height: 350px;
        bottom: -100px;
        left: -100px;
    }
    
    .orb-3 {
        width: 300px;
        height: 300px;
    }
    
    /* Sections */
    .section {
        padding: 3rem 1.25rem;
    }
    
    .section-header {
        margin-bottom: 2.5rem;
    }
    
    .section-tag {
        font-size: 0.8125rem;
        padding: 0.375rem 0.875rem;
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
        margin-bottom: 0.875rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    /* Feature Cards */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }
    
    .feature-card h3 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .feature-card p {
        font-size: 0.9375rem;
    }
    
    /* Tech Grid */
    .tech-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .tech-card {
        padding: 1.5rem;
    }
    
    .tech-icon {
        font-size: 2.5rem;
    }
    
    .tech-card h3 {
        font-size: 1.125rem;
        margin-bottom: 1.25rem;
    }
    
    .tech-tags {
        gap: 0.375rem;
    }
    
    .tag {
        padding: 0.325rem 0.625rem;
        font-size: 0.75rem;
    }
    
    /* Team */
    .team-grid {
        gap: 1.25rem;
    }
    
    .team-member {
        padding: 1.5rem;
    }
    
    .member-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .member-avatar {
        width: 100px;
        height: 100px;
    }
    
    .member-text h3 {
        font-size: 1.375rem;
    }
    
    .member-role {
        font-size: 0.875rem;
    }
    
    .member-bio {
        font-size: 0.9375rem;
        margin-bottom: 1.25rem;
    }
    
    .member-skills {
        justify-content: center;
    }
    
    .skill-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .member-socials {
        justify-content: center;
    }
    
    /* Footer */
    .footer {
        padding: 2.5rem 1.25rem 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 2rem;
    }
    
    .footer-brand {
        text-align: center;
        max-width: 100%;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-bottom {
        padding-top: 1.5rem;
    }
    
    .footer-bottom p {
        font-size: 0.8125rem;
    }
}

/* ===== Mobile Portrait (xs) ===== */
@media (max-width: 480px) {
    /* Hero */
    .hero {
        padding: 3.5rem 1rem 2rem;
    }
    
    .hero-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
    
    .hero-subtitle {
        font-size: 0.9375rem;
        line-height: 1.6;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 200px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 0.8125rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
    
    /* Sections */
    .section {
        padding: 2.5rem 1rem;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    /* Cards */
    .feature-card,
    .tech-card,
    .team-member {
        padding: 1.25rem;
    }
    
    /* Team Members */
    .member-avatar {
        width: 80px;
        height: 80px;
    }
    
    .member-text h3 {
        font-size: 1.25rem;
    }
    
    .member-skills {
        gap: 0.375rem;
    }
    
    .skill-badge {
        font-size: 0.6875rem;
        padding: 0.3125rem 0.625rem;
    }
    
    .social-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 1rem 1.25rem;
    }
    
    .footer-logo {
        font-size: 1.125rem;
    }
}

/* ===== Extra Small Devices ===== */
@media (max-width: 360px) {
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.3125rem 0.75rem;
    }
    
    .hero-title {
        font-size: 1.625rem;
    }
    
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .section-tag {
        font-size: 0.75rem;
    }
}

/* ===== Landscape Orientation ===== */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 5rem 2rem 3rem;
    }
    
    .hero-stats {
        margin-bottom: 2rem;
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* ===== Reduced Motion Preference ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .gradient-orb {
        animation: none;
    }
    
    .scroll-line {
        animation: none;
    }
}

/* ===== Print Styles ===== */
@media print {
    .navbar,
    .scroll-indicator,
    .animated-bg {
        display: none;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ===== High Resolution Displays ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .member-avatar img {
        image-rendering: -webkit-optimize-contrast;
    }
}
