/* Mobile and Tablet Responsive Styles */

/* Large Tablets and Small Desktops */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .nav-container {
        padding: 0 1.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .profile-pic {
        width: 250px;
        height: 250px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    .contact-content {
        gap: 3rem;
    }
    
    .education-timeline .timeline-content {
        min-width: auto;
    }
}

/* Tablets */
@media screen and (max-width: 768px) {
    /* Navigation */
    .nav-links,
    .nav-cta {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .mobile-menu.active {
        display: block;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Sections */
    section {
        padding: 80px 0;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
        margin-bottom: 3rem;
    }
    
    /* Hero Section */
    #hero {
        padding-top: 100px;
    }
    
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .profile-pic {
        width: 200px;
        height: 200px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .social-links {
        gap: 1rem;
    }
    
    /* Skills Section */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .skill-category {
        padding: 1.5rem;
    }
    
    /* Projects Section */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .project-image {
        height: 200px;
    }
    
    .project-content {
        padding: 1.5rem;
    }
    
    /* Education Section */
    .education-timeline {
        padding-left: 0;
    }
    
    .education-timeline::before {
        left: 15px;
    }
    
    .education-timeline .timeline-item {
        padding-left: 50px;
    }
    
    .education-timeline .timeline-content {
        padding: 1.5rem;
        min-width: auto;
    }
    
    .education-period {
        float: none;
        display: block;
        margin-top: 0.5rem;
    }
    
    .education-timeline .timeline-item {
        padding-left: 40px;
        margin-bottom: 2rem;
    }
    
    .education-timeline .timeline-content {
        padding: 1rem;
    }
    
    .education-title {
        font-size: 1.1rem;
    }
    
    .education-institution {
        font-size: 1rem;
    }
    
    .education-description {
        font-size: 0.9rem;
    }
    
    .education-skills {
        gap: 0.25rem;
    }
    
    /* Experience Section */
    .experience-timeline {
        padding-left: 0;
    }
    
    .experience-timeline::before {
        left: 15px;
    }
    
    .timeline-item {
        padding-left: 50px;
    }
    
    .timeline-dot {
        left: 7px;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    .experience-period {
        float: none;
        display: block;
        margin-top: 0.5rem;
    }
    
    /* Contact Section */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-item {
        padding: 1rem;
        gap: 1rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Mobile Phones */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .nav-container {
        padding: 0 0.75rem;
    }
    
    /* Logo */
    .logo a {
        font-size: 1.5rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Sections */
    section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    /* Hero Section */
    .hero-container {
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .profile-pic {
        width: 150px;
        height: 150px;
    }
    
    .hero-buttons {
        padding: 0 1rem;
        width: 100%;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .social-links {
        gap: 0.75rem;
    }
    
    .social-link {
        padding: 0.6rem;
    }
    
    /* Skills Section */
    .skill-category {
        padding: 1rem;
    }
    
    .category-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .skill-item {
        padding: 0.5rem 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .skill-level {
        align-self: flex-end;
    }
    
    /* Projects Section */
    .project-image {
        height: 180px;
    }
    
    .project-content {
        padding: 1rem;
    }
    
    .project-title {
        font-size: 1.3rem;
    }
    
    .project-description {
        font-size: 0.9rem;
    }
    
    .project-tech {
        gap: 0.25rem;
    }
    
    .tech-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
    
    /* Experience Section */
    .timeline-item {
        padding-left: 40px;
        margin-bottom: 2rem;
    }
    
    .timeline-content {
        padding: 1rem;
    }
    
    .experience-title {
        font-size: 1.1rem;
    }
    
    .experience-company {
        font-size: 1rem;
    }
    
    .experience-description {
        font-size: 0.9rem;
    }
    
    .experience-skills {
        gap: 0.25rem;
    }
    
    .skill-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
    
    /* Contact Section */
    .contact-item {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .contact-icon {
        margin-bottom: 0.5rem;
    }
    
    .contact-form {
        padding: 1rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    /* Footer */
    .footer-links {
        gap: 1rem;
    }
    
    .footer-links a {
        font-size: 0.9rem;
    }
}

/* Extra Small Phones */
@media screen and (max-width: 360px) {
    .hero-title {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .profile-pic {
        width: 120px;
        height: 120px;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .skill-category,
    .project-content,
    .timeline-content,
    .contact-form {
        padding: 0.75rem;
    }
    
    .project-title,
    .experience-title {
        font-size: 1.1rem;
    }
    
    .tech-tag,
    .skill-tag {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
    }
}

/* Landscape Orientation for Mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    #hero {
        min-height: auto;
        padding: 80px 0 40px;
    }
    
    .hero-container {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 2rem;
    }
    
    .profile-pic {
        width: 150px;
        height: 150px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    section {
        min-height: auto;
        padding: 60px 0;
    }
}

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

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

/* Print Styles */
@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    #navbar,
    .hamburger,
    .mobile-menu,
    .hero-buttons,
    .social-links,
    .project-overlay,
    .contact-form,
    footer {
        display: none !important;
    }
    
    section {
        page-break-inside: avoid;
        padding: 1rem 0;
    }
    
    .section-title {
        color: black !important;
        -webkit-text-fill-color: black !important;
    }
    
    .profile-pic {
        max-width: 200px;
        max-height: 200px;
    }
    
    /* Ensure all sections print with white background */
    .section-light,
    .section-dark {
        background-color: white !important;
        color: black !important;
    }
    
    /* Reset all card backgrounds for printing */
    .skill-category,
    .project-card,
    .timeline-content,
    .contact-item {
        background-color: white !important;
        border: 1px solid #ccc !important;
        color: black !important;
    }
}