/* Mobile-First Responsive Design */

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 767.98px) {
    /* Typography adjustments for mobile */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.375rem;
    }
    
    .lead {
        font-size: 1.125rem;
    }
    
    /* Container padding for mobile */
    .container {
        padding: 0 15px;
    }
    
    /* Navigation for mobile */
    .nav-container {
        padding: 1rem 15px;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--nav-bg);
        box-shadow: 0 4px 6px var(--nav-shadow);
        padding: 1rem;
        gap: 0;
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #eee;
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem;
        width: 100%;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    /* Theme switcher mobile adjustments */
    .theme-switcher {
        order: -1;
        margin-bottom: 1rem;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Hero section mobile */
    .hero {
        padding: 4rem 0;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-cta .btn {
        width: 100%;
        max-width: 280px;
    }
    
    /* Project card mobile layout */
    .project-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-image {
        order: -1;
    }
    
    .project-links {
        flex-direction: column;
    }
    
    .project-links .btn {
        width: 100%;
        text-align: center;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    /* Values grid mobile */
    .values-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Contact section mobile */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Footer mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    /* Button sizing for mobile */
    .btn {
        min-height: 48px;
        min-width: 48px;
        padding: 14px 24px;
    }
    
    /* Sections padding mobile */
    .projects, .about, .contact, .project-backlog {
        padding: 3rem 0;
    }
    
    /* Backlog section mobile */
    .backlog-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .backlog-item {
        padding: 2rem;
    }
    
    .backlog-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .backlog-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .platform-tags {
        text-align: center;
    }
    
    /* Download platforms mobile */
    .download-platforms {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .platform-option {
        padding: 1rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .project-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .project-image {
        text-align: center;
    }
    
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-cta {
        gap: 1.5rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    /* Larger hero text for desktop */
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.375rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .container {
        padding: 0 30px;
    }
}

/* Print styles */
@media print {
    .nav-toggle,
    .hero-cta,
    .project-links,
    .cta-section,
    footer {
        display: none;
    }
    
    .hero {
        background: none;
        color: #000;
    }
    
    .hero h1 {
        color: #000;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .project-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .container {
        max-width: none;
    }
}

/* Theme switching now handled by CSS variables in main stylesheet */

/* High contrast adjustments for small screens */
@media (max-width: 767.98px) and (prefers-contrast: high) {
    .btn {
        border-width: 4px;
        font-weight: 600;
    }
    
    .nav-menu a {
        font-weight: 600;
    }
    
    .project-card {
        border: 2px solid #333;
    }
}

/* Landscape orientation adjustments for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-cta {
        flex-direction: row;
        gap: 1rem;
    }
    
    .hero-cta .btn {
        width: auto;
    }
}