/* =========================================
   SHASHWAT JAIN PORTFOLIO - RESPONSIVE STYLES
   ========================================= */

/* === TABLET STYLES (max-width: 1024px) === */
@media screen and (max-width: 1024px) {
    :root {
        --section-padding: 80px 0;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-socials {
        justify-content: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .image-wrapper {
        width: 300px;
        height: 300px;
    }

    .floating-card {
        display: none;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-stats {
        order: -1;
        grid-template-columns: repeat(4, 1fr);
    }

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

    .cert-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .project-card:last-child:nth-child(odd) {
        max-width: 100%;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer-brand {
        grid-column: span 2;
    }
}

/* === TABLET SMALL (max-width: 768px) === */
@media screen and (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
        --nav-height: 70px;
    }

    /* Navigation */
    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--glass-bg);
        backdrop-filter: var(--glass-blur);
        -webkit-backdrop-filter: var(--glass-blur);
        flex-direction: column;
        padding: 20px;
        gap: 8px;
        border-bottom: 1px solid var(--glass-border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-base);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        padding: 14px 20px;
        text-align: center;
        border-radius: var(--radius-md);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

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

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Hero */
    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

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

    .hero-cta .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .image-wrapper {
        width: 250px;
        height: 250px;
    }

    /* About */
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card {
        padding: 24px;
    }

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

    /* Skills */
    .skills-grid {
        grid-template-columns: 1fr;
    }

    /* Certifications */
    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Timeline */
    .timeline {
        padding-left: 30px;
    }

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

    .timeline-marker {
        left: -30px;
        width: 12px;
        height: 12px;
    }

    .timeline-content {
        padding: 20px;
    }

    /* Contact */
    .contact-form {
        padding: 24px;
    }

    .social-links-large {
        flex-wrap: wrap;
    }

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

    .footer-brand {
        grid-column: auto;
    }

    .footer-tagline {
        margin: 0 auto;
    }

    .footer-social-icons {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* === MOBILE STYLES (max-width: 480px) === */
@media screen and (max-width: 480px) {
    :root {
        --section-padding: 50px 0;
    }

    .container {
        padding: 0 16px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-header {
        margin-bottom: 40px;
    }

    /* Hero */
    .hero {
        padding-top: calc(var(--nav-height) + 20px);
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

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

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

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

    .image-wrapper {
        width: 200px;
        height: 200px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .hero-socials {
        gap: 8px;
    }

    .social-link {
        width: 40px;
        height: 40px;
    }

    /* About */
    .about-intro {
        font-size: 1rem;
    }

    .about-point {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
    }

    .about-stats {
        gap: 12px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
    }

    /* Skills */
    .skill-category {
        padding: 20px;
    }

    .category-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    /* Certifications */
    .cert-grid {
        grid-template-columns: 1fr;
    }

    .cert-card {
        padding: 20px;
    }

    /* Projects */
    .project-image {
        height: 160px;
    }

    .project-content {
        padding: 20px;
    }

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

    .project-description {
        font-size: 0.9rem;
    }

    .project-links {
        flex-direction: column;
        gap: 12px;
    }

    /* Timeline */
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .timeline-role {
        font-size: 1.05rem;
    }

    .timeline-description {
        font-size: 0.9rem;
    }

    /* Contact */
    .contact-intro {
        font-size: 1rem;
    }

    .contact-method {
        padding: 16px;
        gap: 14px;
    }

    .method-icon {
        width: 44px;
        height: 44px;
    }

    .method-value {
        font-size: 0.9rem;
    }

    .social-link-lg {
        width: 44px;
        height: 44px;
    }

    .contact-form {
        padding: 20px;
    }

    .form-group input,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    /* Footer */
    .footer {
        padding: 40px 0 24px;
    }

    .footer-content {
        gap: 30px;
        margin-bottom: 30px;
    }

    .footer-links ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
}

/* === EXTRA SMALL (max-width: 360px) === */
@media screen and (max-width: 360px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .image-wrapper {
        width: 180px;
        height: 180px;
    }

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

    .stat-card {
        display: flex;
        align-items: center;
        gap: 16px;
        text-align: left;
        padding: 16px;
    }

    .stat-icon {
        margin: 0;
    }

    .stat-card>div:last-child {
        display: flex;
        flex-direction: column;
    }

    .stat-number {
        font-size: 1.5rem;
        margin-bottom: 0;
    }
}

/* === LANDSCAPE ORIENTATION === */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 120px 0 60px;
    }

    .hero-container {
        grid-template-columns: 1fr 1fr;
    }

    .hero-content {
        order: 1;
        text-align: left;
    }

    .hero-image {
        order: 2;
    }

    .hero-cta {
        justify-content: flex-start;
    }

    .hero-socials {
        justify-content: flex-start;
    }

    .image-wrapper {
        width: 200px;
        height: 200px;
    }

    .scroll-indicator {
        display: none;
    }
}

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

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .typing-text {
        animation: none;
    }

    .cursor {
        animation: none;
    }

    .floating-card {
        animation: none;
    }

    .image-glow {
        animation: none;
    }

    .scroll-indicator {
        animation: none;
    }
}

/* === PRINT STYLES === */
@media print {

    .navbar,
    .scroll-indicator,
    .floating-card,
    .hero-bg,
    .theme-toggle {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .hero {
        min-height: auto;
        padding: 40px 0;
    }

    section {
        page-break-inside: avoid;
    }

    a {
        text-decoration: underline;
    }
}