/* <----- Base Responsive -----> */
img {
    max-width: 100%;
    height: auto;
}

/* <----- 1200px (Large Desktop) -----> */
@media (max-width: 1200px) {
    .container {
        max-width: 1100px;
        padding: 0 32px;
    }
    
    .work-grid {
        gap: 28px;
    }
    
    .hero-content {
        gap: 50px;
    }
}

/* <----- 1024px (Tablet Landscape) -----> */
@media (max-width: 1024px) {
    .container {
        padding: 0 28px;
    }
    
    /* <----- Hero Section -----> */
    .hero-content {
        gap: 40px;
    }
    
    .hero-text h1 {
        font-size: 3rem;
    }
    
    .hero-tagline {
        font-size: 1rem;
    }
    
    .profile-image-placeholder {
        max-width: 280px;
    }
    
    /* <----- Work Section -----> */
    .work-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    /* <----- Skills Section -----> */
    .skills-grid {
        gap: 32px;
    }
    
    /* <----- Contact Section -----> */
    .contact-wrapper {
        padding: 40px;
        gap: 48px;
    }
}

/* <----- 900px (Small Tablet) -----> */
@media (max-width: 900px) {
    /* <----- About Section -----> */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-img-placeholder {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .stats-row {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* <----- 768px (Tablet Portrait) -----> */
@media (max-width: 768px) {
    .container {
        padding: 0 24px;
    }
    /* Hide about section image on mobile */
    .about-image {
        display: none;
    }

    
    /* <----- Navigation -----> */
    .nav-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 73px;
        left: -100%;
        width: 100%;
        background: var(--primary);
        flex-direction: column;
        align-items: center;
        padding: 32px 24px;
        gap: 24px;
        transition: left 0.3s ease;
        border-bottom: 1px solid var(--border-light);
        z-index: 999;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    /* <----- Hero Section -----> */
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
        padding: 0 20px;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-tagline {
        font-size: 1rem;
    }
    
    .hero-description {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .profile-image-placeholder {
        margin: 0 auto;
        max-width: 250px;
    }
    
    /* <----- About Section -----> */
    .about {
        padding: 64px 0;
    }
    
    .about-content h2 {
        font-size: 2rem;
        text-align: center;
    }
    
    .about-lead {
        text-align: center;
    }
    
    .about-text {
        text-align: center;
    }
    
    .stat {
        text-align: center;
    }
    
    /* <----- Work Section -----> */
    .work {
        padding: 64px 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .section-header p {
        font-size: 0.95rem;
        padding: 0 16px;
    }
    
    .work-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .filter-buttons {
        gap: 0.75rem;
        margin-bottom: 32px;
    }
    
    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
    
    /* <----- Skills Section -----> */
    .skills {
        padding: 64px 0;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .skill-category {
        padding: 24px;
    }
    
    .skill-category h3 {
        font-size: 1.125rem;
        flex-wrap: wrap;
    }
    
    .service-badge {
        margin-left: 0;
        margin-top: 8px;
    }
    
    .skill-list {
        gap: 10px;
    }
    
    .skill-tag {
        padding: 5px 12px;
        font-size: 0.75rem;
    }
    
    /* <----- Contact Section -----> */
    .contact {
        padding: 64px 0;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 32px 24px;
        gap: 40px;
    }
    
    .contact-info h2 {
        font-size: 2rem;
    }
    
    .contact-info > p {
        font-size: 0.9rem;
    }
    
    .contact-methods {
        gap: 20px;
    }
    
    .contact-method i {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 0.85rem;
    }
    
    .submit-btn {
        padding: 12px 20px;
        font-size: 0.85rem;
    }
    
    /* <----- Footer -----> */
    .footer {
        padding: 48px 0 28px;
    }
    
    .footer-brand h3 {
        font-size: 1.25rem;
    }
    
    .footer-brand p {
        font-size: 0.75rem;
    }
    
    .footer-nav {
        margin: 24px 0;
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .footer-nav a {
        font-size: 0.8rem;
    }
}

/* <----- 640px (Mobile Landscape) -----> */
@media (max-width: 640px) {
    .container {
        padding: 0 20px;
    }
    
    /* <----- Hero Section -----> */
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-tagline {
        font-size: 0.9rem;
    }
    
    .hero-description {
        font-size: 0.85rem;
    }
    
    .cta-button, .cta-button-secondary {
        padding: 0.7rem 1.5rem;
        font-size: 0.85rem;
    }
    
    /* <----- About Section -----> */
    .about-content h2 {
        font-size: 1.75rem;
    }
    
    .about-lead {
        font-size: 1rem;
    }
    
    .about-text {
        font-size: 0.85rem;
    }
    
    .stat-num {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* <----- Work Section -----> */
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .work-info {
        padding: 16px;
    }
    
    .work-info h3 {
        font-size: 1rem;
    }
    
    .work-description {
        font-size: 0.8rem;
    }
    
    /* <----- Contact Section -----> */
    .contact-wrapper {
        padding: 24px 20px;
    }
    
    .contact-info h2 {
        font-size: 1.75rem;
    }
    
    .contact-method {
        gap: 12px;
    }
    
    .contact-method i {
        width: 36px;
        height: 36px;
    }
    
    .contact-method strong {
        font-size: 0.75rem;
    }
    
    .contact-method a,
    .contact-method span {
        font-size: 0.85rem;
    }
}

/* <----- 480px (Mobile Portrait) -----> */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    /* <----- Hero Section -----> */
    .hero {
        padding: 100px 0 40px;
    }
    
    .hero-text h1 {
        font-size: 1.75rem;
    }
    
    .hero-tagline {
        font-size: 0.85rem;
    }
    
    .hero-description {
        font-size: 0.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .cta-button, .cta-button-secondary {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }
    
    .profile-image-placeholder {
        max-width: 200px;
    }
    
    /* <----- About Section -----> */
    .about {
        padding: 48px 0;
    }
    
    .about-content h2 {
        font-size: 1.5rem;
    }
    
    .stats-row {
        flex-direction: column;
        gap: 16px;
    }
    
    /* <----- Work Section -----> */
    .work {
        padding: 48px 0;
    }
    
    .section-header {
        margin-bottom: 32px;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .section-header p {
        font-size: 0.85rem;
    }
    
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.35rem 0.85rem;
        font-size: 0.75rem;
    }
    
    /* <----- Skills Section -----> */
    .skills {
        padding: 48px 0;
    }
    
    .skill-category {
        padding: 20px;
    }
    
    .skill-category h3 {
        font-size: 1rem;
    }
    
    .skill-tag {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
    
    /* <----- Contact Section -----> */
    .contact {
        padding: 48px 0;
    }
    
    .contact-wrapper {
        padding: 20px 16px;
    }
    
    .contact-info h2 {
        font-size: 1.5rem;
    }
    
    .contact-method i {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
    
    .social a {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    
    .submit-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
    
    /* <----- Footer -----> */
    .footer {
        padding: 32px 0 20px;
    }
    
    .footer-brand h3 {
        font-size: 1rem;
    }
    
    .footer-nav {
        gap: 16px;
    }
    
    .footer-nav a {
        font-size: 0.7rem;
    }
}

/* <----- 375px (Small Mobile) -----> */
@media (max-width: 375px) {
    .container {
        padding: 0 12px;
    }
    
    .hero-text h1 {
        font-size: 1.5rem;
    }
    
    .hero-tagline {
        font-size: 0.75rem;
    }
    
    .profile-image-placeholder {
        max-width: 180px;
    }
    
    .about-content h2 {
        font-size: 1.35rem;
    }
    
    .section-header h2 {
        font-size: 1.35rem;
    }
    
    .contact-info h2 {
        font-size: 1.35rem;
    }
}

/* <----- 320px (Very Small Mobile) -----> */
@media (max-width: 320px) {
    .hero-text h1 {
        font-size: 1.35rem;
    }
    
    .cta-button, .cta-button-secondary {
        padding: 0.6rem 1.25rem;
        font-size: 0.75rem;
    }
    
    .filter-btn {
        padding: 0.3rem 0.7rem;
        font-size: 0.7rem;
    }
    
    .contact-method a,
    .contact-method span {
        font-size: 0.75rem;
        word-break: break-word;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 12px;
    }
}

/* <----- Image Handling -----> */
@media (max-width: 768px) {
    .work-image {
        padding-top: 66.67%;
    }
    
    .image-placeholder-label {
        font-size: 0.6rem;
        padding: 3px 6px;
    }
    
    .image-label, .image-label-sm {
        font-size: 0.6rem;
        white-space: nowrap;
    }
}

/* <----- Touch Device Optimizations -----> */
@media (hover: none) and (pointer: coarse) {
    .work-item:hover {
        transform: none;
    }
    
    .work-item:hover .work-image img {
        transform: none;
    }
    
    .skill-tag:hover {
        transform: none;
    }
    
    .cta-button:active,
    .submit-btn:active,
    .filter-btn:active {
        transform: scale(0.98);
    }
}

/* <----- Print Styles -----> */
@media print {
    .navbar,
    .hero-buttons,
    .contact-form,
    .social,
    .nav-toggle,
    .filter-buttons,
    .work-link {
        display: none;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    body {
        color: black;
        background: white;
    }
    
    .work-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* <----- Process Section Responsive -----> */
@media (max-width: 1024px) {
    .process-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .process {
        padding: 64px 0;
    }
    
    .process-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .process-step {
        padding: 28px 20px;
        text-align: center;
    }
    
    .step-number {
        top: -12px;
        left: 50%;
        transform: translateX(-50%);
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .step-icon i {
        font-size: 2rem;
    }
    
    .process-step h3 {
        font-size: 1.1rem;
    }
    
    .process-step p {
        font-size: 0.85rem;
    }
    
    .process-footer p {
        font-size: 1rem;
    }
}