/* Responsive Design */

/* Prevent horizontal scroll */
html,
body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Large Desktop */
@media (max-width: 1400px) {
    .container {
        max-width: 1200px;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    .container {
        padding: 0 32px;
    }

    .hero-main {
        gap: 4rem;
    }

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

/* Tablet Landscape */
@media (max-width: 992px) {
    .container {
        padding: 0 24px;
    }

    /* Hero Section */
    .hero-main {
        display: flex !important;
        flex-direction: column !important;
        gap: 3rem;
        align-items: stretch;
        width: 100%;
    }

    .hero-content-left {
        order: 1;
        width: 100%;
    }

    .hero-stats-showcase {
        order: 2;
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.5rem;
        width: 100%;
    }

    .hero-name {
        font-size: clamp(2.5rem, 8vw, 4.5rem);
    }

    /* Navigation styles are handled in navigation.css */

    /* Skills */
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    /* Projects */
    .projects-wrapper {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    /* Challenges */
    .challenges-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    /* Contact & Footer styles are handled in their respective CSS files */

    /* Experience */
    .experience .experience-card {
        padding: 2.5rem 2rem 2.5rem 3.5rem;
    }
}

/* Tablet Portrait & Mobile Landscape */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    section {
        padding: 5rem 0;
    }

    .container {
        padding: 0 20px;
        width: 100%;
        max-width: 100%;
    }

    /* Navigation styles are handled in navigation.css */

    /* Hero Section */
    .hero {
        min-height: auto;
        padding: 3.5rem 0 4rem;
        padding-top: 70px;
    }

    .hero-wrapper {
        max-width: 100%;
    }

    .hero-main {
        display: flex !important;
        flex-direction: column !important;
        gap: 2.5rem;
        align-items: stretch;
    }

    .hero-content-left {
        order: 1;
        width: 100%;
        gap: 1.5rem;
        align-items: center;
        text-align: center;
    }

    .hero-stats-showcase {
        order: 2;
        width: 100%;
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem;
    }

    .hero-header-section {
        gap: 1rem;
        align-items: center;
        text-align: center;
    }

    .availability-badge {
        margin: 1.25rem auto 0.5rem;
        width: fit-content;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .hero-name {
        font-size: clamp(2.5rem, 9vw, 3.25rem);
        line-height: 1.1;
        margin: 0;
        text-align: center;
    }

    .hero-role {
        font-size: clamp(1.35rem, 4.5vw, 1.6rem);
        margin: 0;
        text-align: center;
    }

    .hero-specialization {
        margin-top: 0.5rem;
        justify-content: center;
    }

    .hero-summary {
        font-size: 1rem;
        line-height: 1.7;
        margin: 0.75rem 0 0;
        text-align: center;
    }

    .hero-actions-section {
        margin-top: 0.75rem;
        justify-content: center;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }

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

    .stat-label {
        font-size: 0.85rem;
    }

    .hero-actions-section {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.875rem;
    }

    .cta-primary {
        justify-content: center;
        padding: 14px 24px;
        font-size: 0.9rem;
        flex: 1;
        min-width: 160px;
    }

    .social-button {
        width: 48px;
        height: 48px;
    }

    .availability-badge {
        padding: 0.55rem 1.1rem;
    }

    .availability-badge .badge-text {
        font-size: 0.8rem;
    }

    .specialization-pill {
        padding: 0.45rem 1rem;
        font-size: 0.85rem;
    }

    .separator {
        margin: 0 0.5rem;
    }

    /* Section Headers */
    .section-header {
        margin-bottom: 3rem;
        width: 100%;
    }

    .section-header h2 {
        font-size: clamp(2rem, 6vw, 2.5rem);
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .section-header p {
        font-size: 1.05rem;
        margin-top: 0.75rem;
        word-wrap: break-word;
    }

    /* Skills Section */
    .skills {
        padding: 5rem 0;
    }

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

    .skill-category {
        padding: 2.25rem 2rem;
    }

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

    /* Projects Section */
    .projects {
        padding: 5rem 0;
    }

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

    .featured-project {
        padding: 2.25rem 2rem;
    }

    .featured-project-header h3 {
        font-size: 1.5rem;
    }

    .project-impact {
        font-size: 1rem;
    }

    .highlight-item {
        font-size: 0.9rem;
    }

    .highlight-item strong {
        min-width: 90px;
    }

    /* Experience Section */
    .experience {
        padding: 5rem 0;
    }

    .experience .experience-container {
        padding-left: 2.5rem;
    }

    .experience .experience-card {
        padding: 2.25rem 2rem 2.25rem 3rem;
        margin-left: 1.5rem;
    }

    .experience .experience-card::after {
        left: -2rem;
        width: 12px;
        height: 12px;
    }

    .experience .experience-card h3 {
        font-size: 1.5rem;
    }

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

    .achievement-item {
        font-size: 0.95rem;
        padding-left: 1.25rem;
    }

    /* Challenges Section */
    .challenges {
        padding: 5rem 0;
    }

    .challenges-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .challenge-card {
        padding: 2.25rem 2rem;
    }

    .challenge-title {
        font-size: 1.4rem;
    }

    .challenge-card p {
        font-size: 1rem;
    }

    /* Contact Section */
    .contact {
        padding: 5rem 0;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
        justify-items: center;
    }

    .contact-card {
        padding: 2.5rem 2rem;
        width: 100%;
        max-width: 450px;
        margin: 0 auto;
    }

    .contact-icon {
        margin: 0 auto 1.5rem;
    }

    .contact-card h3 {
        font-size: 1.35rem;
        text-align: center;
    }

    .contact-value {
        font-size: 0.95rem;
        text-align: center;
    }

    .contact-action {
        margin: 0 auto;
        width: fit-content;
    }

    .contact-location-info {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100%;
    }

    .location-badge,
    .availability-badge {
        margin: 0 auto;
        width: fit-content;
    }

    /* Footer */
    .footer {
        padding: 2.5rem 0;
        font-size: 0.9rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    section {
        padding: 4rem 0;
    }

    .container {
        padding: 0 16px;
        width: 100%;
        max-width: 100%;
    }

    /* Navigation */
    .nav {
        height: 60px;
        padding: 0 16px;
    }

    .nav-brand {
        font-size: 1.1rem;
    }

    .nav-links {
        top: 60px;
        height: calc(100vh - 60px);
        padding: 1.5rem 0;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 1.15rem 16px;
    }

    .nav-actions {
        margin-left: auto;
    }

    /* Hero Section */
    .hero {
        padding: 2.5rem 0 3rem;
        padding-top: 60px;
        min-height: auto;
    }

    .hero-wrapper {
        width: 100%;
        padding: 0;
    }

    .hero-main {
        display: flex !important;
        flex-direction: column !important;
        gap: 2.5rem;
        align-items: stretch;
        width: 100%;
    }

    .hero-content-left {
        order: 1;
        width: 100%;
        gap: 1.25rem;
        align-items: center;
        text-align: center;
    }

    .hero-stats-showcase {
        order: 2;
        width: 100%;
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.75rem;
    }

    .hero-header-section {
        gap: 1rem;
        align-items: center;
        text-align: center;
    }

    .availability-badge {
        margin: 1.5rem auto 0.5rem;
        width: fit-content;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .hero-name {
        font-size: clamp(2.25rem, 10vw, 3rem);
        line-height: 1.1;
        margin: 0;
        text-align: center;
    }

    .hero-role {
        font-size: clamp(1.15rem, 5vw, 1.35rem);
        margin: 0;
        text-align: center;
    }

    .hero-specialization {
        margin-top: 0.5rem;
    }

    .hero-summary {
        font-size: 0.9rem;
        line-height: 1.7;
        margin: 0.75rem 0 0;
        text-align: center;
    }

    .specialization-pill {
        display: inline-flex;
    }

    .hero-actions-section {
        margin-top: 1rem;
    }

    .stat-card {
        padding: 1.25rem 0.75rem;
    }

    .stat-value {
        font-size: 1.75rem;
        margin-bottom: 0.25rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .hero-actions-section {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
        align-items: center;
        justify-content: center;
        margin-top: 0.75rem;
        width: 100%;
    }

    .cta-primary {
        padding: 12px 20px;
        font-size: 0.875rem;
        flex: 0 1 auto;
        min-width: 140px;
        justify-content: center;
    }

    .social-button {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }

    .availability-badge {
        padding: 0.5rem 1rem;
    }

    .availability-badge .badge-text {
        font-size: 0.75rem;
    }

    .availability-badge .badge-dot {
        width: 8px;
        height: 8px;
    }

    .specialization-pill {
        padding: 0.35rem 0.75rem;
        font-size: 0.75rem;
    }

    .separator {
        margin: 0 0.4rem;
    }

    /* Section Headers */
    .section-header {
        margin-bottom: 2.5rem;
        width: 100%;
    }

    .section-header h2 {
        font-size: clamp(1.75rem, 8vw, 2rem);
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .section-header p {
        font-size: 0.95rem;
        word-wrap: break-word;
    }

    /* Skills */
    .skills {
        padding: 4rem 0;
    }

    .skill-category {
        padding: 2rem 1.5rem;
    }

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

    .skill-badges {
        gap: 0.5rem;
    }

    .skill-badge {
        padding: 0.4rem 0.875rem;
        font-size: 0.8rem;
    }

    /* Projects */
    .projects {
        padding: 4rem 0;
    }

    .featured-project {
        padding: 2rem 1.5rem;
    }

    .featured-project-header h3 {
        font-size: 1.35rem;
    }

    .project-impact {
        font-size: 0.95rem;
    }

    .highlight-item {
        font-size: 0.85rem;
    }

    .highlight-item strong {
        min-width: 80px;
        font-size: 0.85rem;
    }

    /* Experience */
    .experience {
        padding: 4rem 0;
    }

    .experience .experience-container {
        padding-left: 2rem;
    }

    .experience .experience-card {
        padding: 2rem 1.5rem 2rem 2.5rem;
        margin-left: 1.25rem;
    }

    .experience .experience-card::after {
        left: -1.75rem;
        width: 10px;
        height: 10px;
    }

    .experience .experience-card h3 {
        font-size: 1.35rem;
    }

    .experience-role {
        font-size: 0.95rem;
    }

    .experience-company {
        font-size: 1rem;
    }

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

    .achievement-item {
        font-size: 0.9rem;
        padding-left: 1rem;
    }

    /* Challenges */
    .challenges {
        padding: 4rem 0;
    }

    .challenge-card {
        padding: 2rem 1.5rem;
    }

    .challenge-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .challenge-card p {
        font-size: 0.95rem;
    }

    .project-badge {
        padding: 0.45rem 0.875rem;
        font-size: 0.8rem;
    }

    /* Contact & Footer styles are handled in their respective CSS files */
}

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

    .container {
        padding: 0 12px;
    }

    .hero-name {
        font-size: 2rem;
    }

    .hero-role {
        font-size: 1.25rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }

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

    .skill-category,
    .featured-project,
    .challenge-card {
        padding: 1.75rem 1.25rem;
    }

    .experience .experience-card {
        padding: 1.75rem 1.25rem 1.75rem 2.25rem;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 3rem 0 4rem;
    }

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

    .stat-card {
        padding: 1.5rem 1rem;
    }
}

/* Print Styles */
@media print {

    .nav,
    .footer,
    .hero-actions-section {
        display: none;
    }

    section {
        padding: 2rem 0;
        page-break-inside: avoid;
    }
}