/* Responsive CSS for Portfolite Website */

/* Mobile First Approach */
/* Base styles are for mobile, then we scale up */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero-main-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
    
    .hero-main-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.75rem;
    }
    
    .hero-cta {
        flex-direction: row;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .hero-main-title {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
    
    .about-content {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-main {
        grid-template-columns: 2fr 1fr;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .stats-section {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile specific styles */
@media (max-width: 767px) {
    /* Header */
    .nav-menu {
        display: none;
    }
    
    .header-cta {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hero Section */
    .hero {
        padding: 6rem 0 3rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-main-title {
        font-size: 2.5rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-visual {
        order: -1;
    }
    
    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .profile-img {
        width: 250px;
        height: 250px;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-marker {
        left: 20px;
    }
    
    .timeline-content {
        width: calc(100% - 50px);
        left: 50px !important;
    }
    
    /* Services Section */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .additional-services {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Projects Section */
    .project-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Process Section */
    .process-steps {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Testimonials Section */
    .stats-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* FAQ Section */
    .faq-accordion {
        margin-bottom: 2rem;
    }
    
    /* Footer */
    .footer-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    /* CTA Sections */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Tablet specific styles */
@media (min-width: 768px) and (max-width: 991px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    .hero {
        padding: 4rem 0 2rem;
    }
    
    .hero-content {
        gap: 2rem;
    }
    
    .hero-main-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-image img,
    .service-img,
    .project-img,
    .work-img,
    .profile-img,
    .client-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .hero-cta,
    .cta-buttons,
    .mobile-menu-toggle,
    .mobile-menu-overlay {
        display: none !important;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .section {
        padding: 2rem 0;
        page-break-inside: avoid;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .btn {
        border: 1px solid #000;
        background: none !important;
        color: #000 !important;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-arrow {
        animation: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1f2937;
        --bg-secondary: #111827;
        --bg-accent: #374151;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-light: #9ca3af;
        --border-color: #4b5563;
    }
    
    .header {
        background: rgba(31, 41, 55, 0.95);
    }
    
    .service-card,
    .project-card,
    .testimonial-card,
    .faq-item {
        background: var(--bg-secondary);
    }
    
    .timeline-content {
        background: var(--bg-secondary);
    }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.nav-link:focus,
.filter-btn:focus,
.faq-question:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Hover effects for touch devices */
@media (hover: none) {
    .btn:hover,
    .nav-link:hover,
    .filter-btn:hover,
    .service-card:hover,
    .project-card:hover,
    .work-item:hover {
        transform: none;
    }
    
    .btn-primary:hover {
        transform: none;
    }
}

/* Custom scrollbar */
@media (min-width: 768px) {
    ::-webkit-scrollbar {
        width: 8px;
    }
    
    ::-webkit-scrollbar-track {
        background: var(--bg-secondary);
    }
    
    ::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 4px;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: var(--secondary-color);
    }
}
