/* Responsive Design */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .section-title h2 {
        font-size: 3rem;
    }
}

/* Desktop (992px to 1199px) */
@media (max-width: 1199px) {
    .hero-container {
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-img-container {
        width: 300px;
        height: 300px;
    }
}

/* Tablet (768px to 991px) */
@media (max-width: 991px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(26, 26, 26, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(10px);
        padding: 2rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

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

    .nav-menu .nav-link {
        color: #e5e5e5;
        padding: 1rem;
        display: block;
        margin: 0.5rem 0;
        font-size: 1.1rem;
    }

    .nav-menu .nav-link:hover {
        color: #FF4500;
        background: rgba(255, 69, 0, 0.1);
        border-radius: 8px;
    }

    .hamburger {
        display: flex;
    }

    .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-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

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

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0;
        padding-left: 4rem;
        padding-right: 0;
    }

    .timeline-item:nth-child(even) {
        left: 0;
        padding-left: 4rem;
        padding-right: 0;
    }

    .timeline-dot {
        left: 10px !important;
        right: auto !important;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}

/* Mobile (576px to 767px) */
@media (max-width: 767px) {
    .container {
        padding: 0 15px;
    }

    .nav-container {
        padding: 0 15px;
    }

    .hero {
        padding: 80px 0 30px;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

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

    .btn {
        padding: 10px 25px;
        font-size: 14px;
        width: 200px;
    }

    .hero-img-container {
        width: 250px;
        height: 250px;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .section-title p {
        font-size: 1rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stat {
        padding: 1.5rem;
    }

    .stat h4 {
        font-size: 2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skill-category {
        padding: 2rem;
    }

    .skill-items {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-content {
        padding: 1.5rem;
    }

    .timeline-item {
        padding-left: 3rem;
    }

    .timeline-content {
        padding: 1.5rem;
    }

    .contact-info h3 {
        font-size: 1.5rem;
    }

    .contact-info p {
        font-size: 1rem;
    }

    .contact-form {
        padding: 2rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-left h3 {
        font-size: 1.3rem;
    }
}

/* Small Mobile (up to 575px) */
@media (max-width: 575px) {
    .nav-container {
        height: 60px;
    }

    .nav-logo a {
        font-size: 1.3rem;
    }

    .nav-menu {
        top: 60px;
    }

    .hero {
        padding: 70px 0 20px;
        min-height: 90vh;
    }

    .hero-container {
        gap: 2rem;
    }

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

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .hero-buttons {
        gap: 0.8rem;
    }

    .btn {
        padding: 8px 20px;
        font-size: 13px;
        width: 180px;
    }

    .hero-img-container {
        width: 200px;
        height: 200px;
    }

    .hero-social {
        justify-content: center;
        gap: 0.8rem;
    }

    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .section-title {
        margin-bottom: 3rem;
    }

    .about-text h3 {
        font-size: 1.5rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    .skill-category {
        padding: 1.5rem;
    }

    .skill-category h3 {
        font-size: 1.3rem;
    }

    .skill-item {
        padding: 1rem;
    }

    .skill-item i {
        font-size: 2rem;
    }

    .project-card {
        border-radius: 15px;
    }

    .project-image {
        height: 200px;
    }

    .project-content {
        padding: 1.2rem;
    }

    .project-content h3 {
        font-size: 1.2rem;
    }

    .project-tech {
        gap: 0.3rem;
    }

    .project-tech span {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

    .timeline-item {
        padding-left: 2.5rem;
        margin-bottom: 2rem;
    }

    .timeline::before {
        left: 15px;
    }

    .timeline-dot {
        left: 5px !important;
        width: 15px;
        height: 15px;
    }

    .timeline-content h3 {
        font-size: 1.2rem;
    }

    .timeline-content h4 {
        font-size: 1rem;
    }

    .contact-item {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .contact-item i {
        font-size: 1.3rem;
    }

    .contact-form {
        padding: 1.5rem;
        border-radius: 15px;
    }

    .footer-social {
        gap: 0.8rem;
    }

    .footer-social a {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .footer-bottom p {
        font-size: 0.8rem;
    }
}

/* Extra Small Mobile (up to 400px) */
@media (max-width: 400px) {
    .container {
        padding: 0 10px;
    }

    .nav-container {
        padding: 0 10px;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-img-container {
        width: 180px;
        height: 180px;
    }

    .btn {
        width: 160px;
        padding: 7px 15px;
        font-size: 12px;
    }

    .section-title h2 {
        font-size: 1.6rem;
    }

    .skill-category,
    .project-card,
    .timeline-content,
    .contact-form {
        margin: 0 10px;
    }

    .about-stats {
        margin: 0 10px;
    }

    .stat {
        padding: 1rem;
    }

    .stat h4 {
        font-size: 1.8rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hamburger,
    .hero-social,
    .scroll-down,
    .project-overlay,
    .contact-form,
    .footer-social {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: 2rem 0;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
    }

    .section-title h2 {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
    }

    .highlight {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
    }

    .btn {
        border: 1px solid #000;
        color: #000;
        background: none;
    }
}

/* High DPI/Retina Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .profile-img,
    .about-image img,
    .project-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Landscape Orientation for Mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 60px 0 20px;
    }

    .hero-container {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        align-items: center;
    }

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

    .hero-img-container {
        width: 200px;
        height: 200px;
    }
}

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

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

    .navbar {
        background: rgba(26, 26, 26, 0.95);
        border-bottom-color: var(--border-color);
    }

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

    .skill-category,
    .project-card,
    .timeline-content,
    .about .container,
    .projects .container,
    .contact .container {
        background: var(--card-bg);
    }

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

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-img-container::before {
        animation: none;
    }

    .scroll-down {
        animation: none;
    }
}

/* Focus Styles for Accessibility */
@media (prefers-reduced-motion: no-preference) {
    .nav-link:focus,
    .btn:focus,
    .social-link:focus,
    .project-link:focus,
    .form-group input:focus,
    .form-group textarea:focus {
        outline: 3px solid rgba(102, 126, 234, 0.5);
        outline-offset: 2px;
    }
}
