/* ===================================
   RESPONSIVE DESIGN SYSTEM
   Complete responsive layout for all devices
   Mobile-first approach
   =================================== */

/* === BASE RESPONSIVE ADJUSTMENTS === */
img {
    max-width: 100%;
    height: auto;
}

/* === EXTRA SMALL DEVICES (Smartphones 320px - 480px) === */
@media (max-width: 480px) {
    :root {
        --font-size-5xl: 1.75rem;
        --font-size-4xl: 1.5rem;
        --font-size-3xl: 1.25rem;
        --font-size-2xl: 1.125rem;
        --font-size-xl: 1rem;
        --spacing-3xl: 3rem;
        --spacing-2xl: 2rem;
        --spacing-xl: 1.5rem;
    }

    .container {
        padding: 0 1rem;
    }

    /* Hero Section */
    .hero {
        min-height: auto;
        padding: 3rem 0 2rem;
    }

    .hero-image {
        width: 120px;
        height: 120px;
        border-width: 3px;
    }

    .hero-name {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .hero-title {
        font-size: 0.9rem;
        padding: 0.4rem 1rem;
        margin-bottom: 1.5rem;
    }

    /* Language Toggle */
    .language-toggle {
        top: 0.75rem;
        right: 0.75rem;
    }

    .lang-btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.7rem;
    }

    .lang-flag {
        font-size: 0.9rem;
    }

    /* Freelance Section */
    .freelance {
        padding: 2rem 0;
    }

    .freelance-card {
        padding: 1.25rem;
        margin-top: 0.75rem;
        border-radius: 0.75rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .freelance-text {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .freelance-list {
        grid-template-columns: 1fr;
        gap: 0.625rem;
        margin-bottom: 1.5rem;
    }

    .freelance-list li {
        padding: 0.625rem 0.875rem;
        font-size: 0.8rem;
        justify-content: flex-start;
        text-align: left;
    }

    .freelance-list i {
        font-size: 1.125rem;
        flex-shrink: 0;
    }

    .hero-cta {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        max-width: 280px;
    }

    /* Technologies Section */
    .technologies {
        padding: 2.5rem 0;
    }

    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.625rem;
    }

    .tech-item {
        padding: 0.75rem;
        border-radius: 0.625rem;
    }

    .tech-item i {
        font-size: 2rem;
    }

    /* About Section */
    .about {
        padding: 2.5rem 0;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .about-image {
        max-width: 250px;
        margin: 0 auto;
        border-radius: 0.75rem;
    }

    .about-text h2 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .about-text h3 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .about-text p {
        font-size: 0.875rem;
        line-height: 1.6;
        margin-bottom: 0.875rem;
    }

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

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

    .project-image {
        height: 180px;
    }

    .project-content {
        padding: 1rem;
    }

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

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

    .project-link {
        font-size: 0.8125rem;
    }

    /* Testimonials Section */
    .testimonials {
        padding: 2.5rem 0;
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    .testimonial-image {
        width: 80px;
        height: 80px;
        border-width: 3px;
    }

    .testimonial-name {
        font-size: 1.125rem;
    }

    .testimonial-text {
        font-size: 0.875rem;
        line-height: 1.65;
    }

    /* Services Section */
    .services {
        padding: 2.5rem 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .service-card {
        padding: 1.25rem;
    }

    .service-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 0.875rem;
    }

    .service-icon i {
        font-size: 1.75rem;
    }

    .service-title {
        font-size: 1.125rem;
        margin-bottom: 0.625rem;
    }

    .service-description {
        font-size: 0.8125rem;
        line-height: 1.5;
    }

    /* CTA Section */
    .cta {
        padding: 2.5rem 0;
    }

    .cta-title {
        font-size: 1.375rem;
        margin-bottom: 0.875rem;
        line-height: 1.3;
    }

    .cta-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .social-links {
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .social-link {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    /* Footer */
    .footer {
        padding: 1.25rem 0;
    }

    .footer-text {
        font-size: 0.75rem;
    }
}

/* === SMALL DEVICES (Large Smartphones 481px - 767px) === */
@media (min-width: 481px) and (max-width: 767px) {
    :root {
        --font-size-5xl: 2.25rem;
        --font-size-4xl: 1.875rem;
        --font-size-3xl: 1.5rem;
        --font-size-2xl: 1.25rem;
        --spacing-3xl: 4rem;
        --spacing-2xl: 2.5rem;
    }

    .container {
        padding: 0 1.25rem;
    }

    /* Hero Section */
    .hero {
        min-height: auto;
        padding: 3.5rem 0 2.5rem;
    }

    .hero-image {
        width: 160px;
        height: 160px;
    }

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

    .hero-title {
        font-size: 1.125rem;
        padding: 0.5rem 1.25rem;
    }

    /* Freelance Section */
    .freelance-card {
        padding: 1.75rem;
    }

    .freelance-list {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .hero-cta {
        width: auto;
        max-width: 320px;
    }

    /* Technologies */
    .tech-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.875rem;
    }

    .tech-item i {
        font-size: 2.75rem;
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .about-image {
        max-width: 300px;
        margin: 0 auto;
    }

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

    .project-image {
        height: 220px;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* === MEDIUM DEVICES (Tablets 768px - 1023px) === */
@media (min-width: 768px) and (max-width: 1023px) {
    :root {
        --font-size-5xl: 2.5rem;
        --font-size-4xl: 2rem;
        --font-size-3xl: 1.75rem;
        --spacing-3xl: 5rem;
        --spacing-2xl: 3rem;
    }

    .container {
        padding: 0 2rem;
        max-width: 720px;
    }

    /* Hero Section */
    .hero {
        padding: 4rem 0;
    }

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

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

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

    /* Freelance Section */
    .freelance-card {
        padding: 2rem;
        max-width: 600px;
    }

    .freelance-list {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    /* Technologies */
    .tech-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1rem;
        max-width: 650px;
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .about-image {
        max-width: 350px;
        margin: 0 auto;
    }

    .about-text {
        max-width: 650px;
        margin: 0 auto;
    }

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

    .project-image {
        height: 200px;
    }

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

    /* Social Links */
    .social-link {
        width: 56px;
        height: 56px;
        font-size: 1.75rem;
    }
}

/* === LARGE DEVICES (Notebooks/Small Desktops 1024px - 1439px) === */
@media (min-width: 1024px) and (max-width: 1439px) {
    .container {
        padding: 0 2.5rem;
        max-width: 1000px;
    }

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

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

    /* Freelance Section */
    .freelance-card {
        max-width: 700px;
        padding: 2.25rem;
    }

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

    /* Technologies */
    .tech-grid {
        grid-template-columns: repeat(5, 1fr);
        max-width: 750px;
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr 2fr;
        gap: 3rem;
        text-align: left;
    }

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

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

    .project-image {
        height: 240px;
    }

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

/* === EXTRA LARGE DEVICES (Large Desktops 1440px+) === */
@media (min-width: 1440px) {
    .container {
        padding: 0 3rem;
        max-width: 1200px;
    }

    /* Hero Section */
    .hero {
        padding: 6rem 0;
    }

    /* Freelance Section */
    .freelance-card {
        max-width: 800px;
        padding: 2.5rem;
    }

    .freelance-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    /* Technologies */
    .tech-grid {
        grid-template-columns: repeat(5, 1fr);
        max-width: 850px;
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr 2fr;
        gap: 4rem;
    }

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

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

    .project-image {
        height: 250px;
    }

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

    /* Add max-width to specific sections for ultra-wide screens */
    .tech-grid,
    .projects-grid,
    .services-grid,
    .testimonials-carousel {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* === ULTRA WIDE SCREENS (1920px+) === */
@media (min-width: 1920px) {
    .container {
        max-width: 1400px;
    }

    .tech-grid {
        max-width: 1000px;
    }

    .projects-grid,
    .services-grid {
        max-width: 1400px;
    }
}

/* === HORIZONTAL ORIENTATION ADJUSTMENTS === */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }

    .hero-image {
        width: 100px;
        height: 100px;
    }

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

    .section {
        padding: 2rem 0;
    }
}
