/* Mobile Styles */
@media screen and (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 1rem 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Hero Section */
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-img {
        max-width: 350px;
    }

    /* Typography */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Portfolio Grid */
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    /* Contact Section */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* Buttons */
    .btn {
        width: 100%;
        max-width: 300px;
    }

    /* Logo adjustments for mobile */
    .logo-img {
        height: 60px;
        max-width: 60px;
    }
    
    .nav-logo a {
        font-size: 2.4rem;
    }

    /* Container padding */
    .container {
        padding: 0 15px;
    }

    /* Section padding */
    .hero,
    .about,
    .services,
    .portfolio,
    .contact {
        padding: 60px 0;
    }
}

/* Tablet Styles */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .hero-container {
        gap: 2rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-placeholder {
        width: 350px;
        height: 250px;
    }

    .about-content {
        gap: 2rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-content {
        gap: 2rem;
    }
}

/* Large Desktop Styles */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }

    .nav-container {
        max-width: 1400px;
    }

    .hero-container {
        max-width: 1400px;
    }

    .hero-title {
        font-size: 4rem;
    }

    .hero-placeholder {
        width: 500px;
        height: 400px;
        font-size: 5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .nav-toggle,
    .hero-buttons,
    .contact-form,
    .social-links {
        display: none;
    }

    body {
        color: black;
        background: white;
    }

    .hero {
        background: white;
        min-height: auto;
        padding: 20px 0;
    }

    .services,
    .portfolio,
    .contact {
        background: white;
        padding: 20px 0;
    }

    .footer {
        background: white;
        color: black;
        border-top: 1px solid #ccc;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        border: 2px solid #000;
    }

    .btn-secondary {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }

    .service-icon,
    .contact-item i,
    .social-links a {
        background: #000;
    }

    .hero-placeholder,
    .portfolio-placeholder {
        background: #000;
    }
}

/* Focus Styles for Better Accessibility */
.nav-link:focus,
.btn:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a1a1a;
        --bg-secondary: #2d2d2d;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
    }

    body {
        background: var(--bg-primary);
        color: var(--text-primary);
    }

    .navbar {
        background: rgba(42, 42, 42, 0.95);
    }

    .nav-logo a,
    .nav-link {
        color: var(--text-primary);
    }

    .hero {
        background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    }

    .hero-title {
        color: var(--text-primary);
    }

    .about,
    .portfolio {
        background: var(--bg-secondary);
    }

    .services,
    .contact {
        background: var(--bg-primary);
    }

    .service-card,
    .portfolio-item,
    .contact-form {
        background: var(--bg-secondary);
        color: var(--text-primary);
    }

    .section-header h2,
    .about-text h3,
    .service-card h3,
    .portfolio-content h3,
    .contact-item h4 {
        color: var(--text-primary);
    }

    .section-header p,
    .about-text p,
    .service-card p,
    .portfolio-content p,
    .contact-item p {
        color: var(--text-secondary);
    }

    .stat {
        background: var(--bg-primary);
    }

    .form-group input,
    .form-group textarea {
        background: var(--bg-primary);
        color: var(--text-primary);
        border-color: #555;
    }
}