/* Responsive Design */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
    
    .hero-content {
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .about-content {
        gap: 3rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Tablets */
@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    /* Navigation */
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: var(--transition-medium);
        box-shadow: var(--shadow-medium);
        padding: 2rem 0;
        gap: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Hero Section */
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-image {
        order: -1;
    }
    
    .profile-img {
        height: 400px;
    }
    
    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .about-image {
        order: -1;
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    /* Skills */
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    .skill-item {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    /* Timeline */
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        padding-left: 60px;
    }
    
    .timeline-dot {
        left: 11px;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Blog */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        gap: 1rem;
    }
}

/* Mobile Devices */
@media (max-width: 480px) {
    :root {
        --section-padding: 60px 0;
        --container-padding: 0 1rem;
    }
    
    /* Typography */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Navigation */
    .nav-container {
        padding: 1rem;
    }
    
    .nav-logo a {
        font-size: 1.25rem;
    }
    
    /* Hero */
    .hero {
        padding-top: 80px;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .profile-img {
        height: 350px;
    }
    
    /* About */
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat {
        padding: 1rem;
    }
    
    /* Skills */
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .skill-category h3 {
        font-size: 1.25rem;
    }
    
    /* Timeline */
    .timeline::before {
        left: 15px;
    }
    
    .timeline-item {
        padding-left: 45px;
    }
    
    .timeline-dot {
        left: 6px;
        width: 16px;
        height: 16px;
    }
    
    .timeline-content {
        padding: 1rem;
    }
    
    /* Projects */
    .project-content {
        padding: 1.5rem;
    }
    
    .project-tech {
        gap: 0.25rem;
    }
    
    .project-tech span {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Blog */
    .blog-content {
        padding: 1.5rem;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Footer */
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Extra Small Devices */
@media (max-width: 320px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
        width: 100%;
        max-width: 280px;
    }
    
    .profile-img {
        height: 300px;
    }
    
    .skill-item {
        padding: 0.75rem;
    }
    
    .timeline-content {
        padding: 0.75rem;
    }
    
    .project-content,
    .blog-content {
        padding: 1rem;
    }
}

/* Landscape Orientation for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 120px 0 60px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        display: none;
    }
    
    .hero-buttons {
        margin-bottom: 1rem;
    }
    
    .hero-scroll {
        display: none;
    }
    
    .profile-img {
        height: 300px;
    }
}

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

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-indicator {
        animation: none;
    }
}

/* Dark Mode Support (if system prefers dark) */
@media (prefers-color-scheme: dark) {
    /* Already optimized for dark theme */
}

/* Print Styles */
@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .navbar,
    .hero-scroll,
    .contact-form,
    .social-links,
    .project-overlay,
    .hamburger {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    h1, h2, h3 {
        color: black !important;
    }
    
    .btn {
        border: 2px solid black !important;
        background: white !important;
        color: black !important;
    }
}

/* Focus Styles for Accessibility */
button:focus,
input:focus,
textarea:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-high-contrast: high) {
    :root {
        --primary-color: #00ffff;
        --bg-primary: #000000;
        --bg-secondary: #111111;
        --bg-tertiary: #222222;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
    }
}