/* ===================================
   Responsive Design Styles
   Mobile-First Approach
   =================================== */

/* Tablet and Below (max-width: 1024px) */
@media screen and (max-width: 1024px) {
    .navbar {
        padding: 1rem 3%;
    }

    .hero {
        gap: 2rem;
    }

    .about {
        gap: 2rem;
    }

    .my-row {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .project-card {
        gap: 2rem;
    }

    .contact-content {
        gap: 2rem;
    }
    
    /* Employer Section - Tablet */
    .employer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .employer-info .section-title {
        font-size: 2rem;
    }
}

/* Tablet Portrait and Below (max-width: 768px) */
@media screen and (max-width: 768px) {
    :root {
        --section-padding: 3rem 1.5rem;
    }

    html {
        font-size: 15px;
    }

    .my-heading {
        font-size: 2rem;
    }

    .greet-heading {
        font-size: 1.2rem;
    }

    /* Header and Navigation */
    .navbar {
        padding: 1rem 5%;
    }

    .menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(10, 14, 39, 0.98);
        backdrop-filter: blur(10px);
        transition: left 0.3s ease;
        border-top: 1px solid var(--border-color);
    }

    .menu.active {
        left: 0;
    }

    .menu-list {
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding-top: 3rem;
    }

    .menu-list-items {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }

    .links {
        display: block;
        padding: 1.5rem;
        font-size: 1.1rem;
    }

    .links::after {
        display: none;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hamburger.active .hamburger-icon {
        display: none;
    }

    .hamburger.active .cross-icon {
        display: block;
    }

    /* Hero Section */
    .hero {
        flex-direction: column;
        padding-top: 6rem;
        min-height: auto;
        text-align: center;
    }

    .intro {
        width: 100%;
    }

    .intro-buttons {
        justify-content: center;
    }

    .hero-image {
        width: 100%;
        max-width: 400px;
    }

    /* About Section */
    .about {
        flex-direction: column;
        text-align: center;
    }

    .about-image {
        max-width: 400px;
        width: 100%;
    }

    /* Projects Section */
    .project-card,
    .project-card.reverse {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .project-card.reverse .project-image {
        order: 1;
    }

    .project-card.reverse .project-info {
        order: 2;
    }

    .project-image {
        min-height: 250px;
    }

    .project-info {
        padding: 1.5rem;
    }

    .project-title {
        font-size: 1.5rem;
    }
    
    /* Metrics Summary - Stack on tablet */
    .metrics-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

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

    .contact-form-container,
    .contact-details {
        padding: 2rem;
    }

    /* Footer */
    .footer-menu-list {
        gap: 1.5rem;
    }

    .footer-links {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .footer-links-section {
        font-size: 0.9rem;
    }
}

/* Mobile (max-width: 480px) */
@media screen and (max-width: 480px) {
    :root {
        --section-padding: 2.5rem 1rem;
    }

    html {
        font-size: 14px;
    }

    .my-heading {
        font-size: 1.8rem;
    }

    .greet-heading {
        font-size: 1.1rem;
    }

    .sub-heading {
        font-size: 1rem;
    }
    
    /* Employer Section - Mobile */
    .employer-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .employer-info .section-title {
        font-size: 1.5rem;
        flex-direction: column;
    }
    
    .employer-card {
        padding: 1.5rem;
    }
    
    .quick-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-item {
        width: 100%;
    }
    
    .stat-number {
        font-size: 2rem;
    }

    /* Header */
    .logo-heading {
        font-size: 1.2rem;
    }

    .logo-heading i {
        font-size: 1.4rem;
    }

    /* Buttons */
    .btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

    .intro-buttons {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .intro-buttons .btn {
        width: 100%;
    }

    /* Hero Section */
    .hero {
        padding-top: 5rem;
    }

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

    /* Cards */
    .my-card {
        padding: 1.5rem;
    }

    .my-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Skills Section */
    .skill-card .icon {
        font-size: 2.5rem;
    }

    /* Projects Section */
    .project-image {
        min-height: 200px;
    }

    .project-info {
        padding: 1.2rem;
    }

    .project-title {
        font-size: 1.3rem;
    }

    .project-tags {
        gap: 0.4rem;
    }

    .tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }

    .project-links {
        flex-direction: column;
    }
    
    /* Metrics Summary - Single column on mobile */
    .metrics-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .metric-value {
        font-size: 1rem;
    }
    
    .metric-label {
        font-size: 0.7rem;
    }

    .btn-small {
        width: 100%;
        justify-content: center;
    }

    /* Experience Section */
    .experience .icon {
        font-size: 2.5rem;
    }

    /* Contact Section */
    .contact-form-container,
    .contact-details {
        padding: 1.5rem;
    }

    .form-controls {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    textarea.form-controls {
        min-height: 120px;
    }

    /* Footer */
    .footer {
        padding: 2rem 1rem 1rem;
    }

    .footer-logo h2 {
        font-size: 1.5rem;
    }

    .footer-menu-list {
        gap: 1rem;
    }

    .footer-links {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .footer-links-section {
        font-size: 0.85rem;
        gap: 0.5rem;
    }

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

/* Extra Small Mobile (max-width: 360px) */
@media screen and (max-width: 360px) {
    html {
        font-size: 13px;
    }

    .my-heading {
        font-size: 1.6rem;
    }

    .logo-heading {
        font-size: 1.1rem;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .my-card {
        padding: 1.2rem;
    }

    .project-info {
        padding: 1rem;
    }

    .contact-form-container,
    .contact-details {
        padding: 1.2rem;
    }
}

/* Landscape Mode for Mobile Devices */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding-top: 5rem;
        padding-bottom: 3rem;
    }

    .menu {
        height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .menu-list {
        padding-top: 1rem;
    }

    .links {
        padding: 1rem;
    }
}

/* Large Desktop (min-width: 1440px) */
@media screen and (min-width: 1440px) {
    .navbar,
    .hero,
    .about,
    .skills-content,
    .projects-content,
    .experience-content,
    .footer-content {
        max-width: 1600px;
    }

    .my-heading {
        font-size: 3rem;
    }

    .greet-heading {
        font-size: 1.4rem;
    }

    .sub-heading {
        font-size: 1.3rem;
    }

    .lead-para {
        font-size: 1.2rem;
    }
}

/* Extra Large Desktop (min-width: 1920px) */
@media screen and (min-width: 1920px) {
    html {
        font-size: 18px;
    }

    .navbar,
    .hero,
    .about,
    .skills-content,
    .projects-content,
    .experience-content,
    .footer-content {
        max-width: 1800px;
    }
}

/* Print Styles */
@media print {
    .header,
    .hamburger,
    .intro-buttons,
    .footer,
    .contact-form-container {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .hero,
    .about,
    .skills,
    .projects,
    .experience,
    .contact {
        padding: 2rem 1rem;
        page-break-inside: avoid;
    }
}

/* Project Detail Overlay - Mobile Responsive */
@media screen and (max-width: 768px) {
    .overlay-content {
        width: 100%;
        max-width: 100%;
    }
    
    .overlay-scroll {
        padding: 2rem 1.5rem;
    }
    
    .overlay-close {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .project-card::after {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }
}

@media screen and (max-width: 480px) {
    .overlay-scroll {
        padding: 1.5rem 1rem;
    }
    
    .overlay-close {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .project-card::after {
        display: none; /* Hide the tooltip on very small screens */
    }
    
    /* Make hover effect less dramatic on mobile */
    .project-card:hover {
        transform: translateY(-5px) scale(1.01);
    }
}

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

    html {
        scroll-behavior: auto;
    }
    
    .project-detail-overlay,
    .overlay-content {
        transition: none !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #ffffff;
        --card-bg: #000000;
    }

    .my-card {
        border-width: 2px;
    }

    .btn {
        border-width: 3px;
    }
}

/* Dark Mode Support (if system preferences change) */
@media (prefers-color-scheme: light) {
    /* The design is already dark-themed for embedded systems aesthetic
       But you can add light mode overrides here if needed */
}
