/* ===== RESPONSIVE DESIGN - MOBILE STYLES ===== */

/* ===== MOBILE RESPONSIVE FOR HERO BUTTONS ===== */
@media (max-width: 768px) {
    .hero-buttons {
        gap: 20px;
        max-width: 100%;
    }

    .button-row {
        flex-direction: column;
        gap: 15px;
    }

    .button-row .btn,
    .button-row .pro_btn {
        width: 100%;
        min-width: unset;
        padding: 14px 20px;
    }

    .projects-btn {
        min-width: 200px;
        padding: 14px 30px;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        gap: 15px;
    }

    .button-row .btn,
    .button-row .pro_btn {
        padding: 12px 18px;
        font-size: 1rem;
    }

    .projects-btn {
        padding: 12px 25px;
        font-size: 1.1rem;
        min-width: 180px;
    }
}

/* ===== MOBILE RESPONSIVE FOR EDUCATION TIMELINE ===== */
@media (max-width: 768px) {
    .education-timeline::before {
        left: 25px;
    }

    .timeline-item {
        flex-direction: row;
        align-items: flex-start;
        margin-bottom: 2rem;
    }

    .timeline-marker {
        width: 50px;
        height: 50px;
        margin-right: 1.5rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .timeline-marker i {
        font-size: 1.2rem;
    }

    .timeline-content {
        margin-left: 0;
        padding: 1.5rem;
        flex-grow: 1;
        backdrop-filter: none;
    }

    .timeline-content h3 {
        font-size: 1.2rem;
    }

    .degree {
        font-size: 1rem;
    }

    .duration,
    .institution {
        font-size: 0.9rem;
    }

    .education-details p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .education-timeline::before {
        left: 20px;
    }

    .timeline-marker {
        width: 40px;
        height: 40px;
        margin-right: 1rem;
    }

    .timeline-marker i {
        font-size: 1rem;
    }

    .timeline-content {
        padding: 1.2rem;
        backdrop-filter: none;
    }

    .timeline-content h3 {
        font-size: 1.1rem;
    }

    .degree {
        font-size: 0.9rem;
    }

    .duration,
    .institution {
        font-size: 0.85rem;
    }

    .education-details p {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .status,
    .achievement {
        font-size: 0.7rem;
        padding: 0.2rem 0.8rem;
    }
}

/* ===== MOBILE RESPONSIVE FOR SKILLS SECTION ===== */
@media (max-width: 768px) {
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .skill-progress {
        padding: 1.2rem;
    }
}

/* ===== MOBILE RESPONSIVE FOR CONTACT FORM ===== */
@media (max-width: 768px) {
    .contact-form {
        padding: 2rem 1.5rem;
    }

    .form-group {
        margin-bottom: 1.5rem;
    }
}

/* ===== MOBILE RESPONSIVE FOR SUCCESS POPUP ===== */
@media (max-width: 768px) {
    .success-content {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .success-icon {
        font-size: 3rem;
    }

    .success-content h3 {
        font-size: 1.3rem;
    }
}

/* ===== MAIN RESPONSIVE BREAKPOINTS ===== */

/* Tablets (768px and down) */
@media (max-width: 768px) {

    /* Mobile navigation */
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        /* Hidden off-screen by default */
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        gap: 0;
    }

    .nav-menu.active {
        right: 0;
        /* Slides in when active */
    }

    .nav-menu li {
        padding: 1rem 0;
        border-bottom: 1px solid #e2e8f0;
    }

    /* Hero section adjustments */
    .hero {
        padding: 120px 0 80px;
        min-height: auto;
    }

    .hero-content h1 {
        font-size: 2.5rem;
        /* Smaller heading on mobile */
    }

    .hero h2 {
        font-size: 1.4rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    /* About section becomes single column */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Section padding reduction */
    section {
        padding: 60px 0;
    }

    section h2 {
        font-size: 2rem;
    }

    /* Contact buttons stack vertically */
    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }

    .contact-btn {
        width: 200px;
        justify-content: center;
    }
}

/* Small phones (480px and down) */
@media (max-width: 480px) {
    .container {
        width: 95%;
        /* More width usage on very small screens */
        padding: 0 15px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero h2 {
        font-size: 1.2rem;
    }

    .btn {
        padding: 10px 25px;
        font-size: 1rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        /* Single column on very small screens */
        gap: 1rem;
    }

    .skill-progress {
        padding: 1.2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        /* Single column on very small screens */
    }

    .project-card {
        padding: 1.5rem;
    }

    section h2 {
        font-size: 1.8rem;
    }
}

/* ===== FLOATING CTA RESPONSIVE FIXES ===== */
@media (max-width: 1024px) {
    .floating-cta {
        bottom: 1.5rem;
        left: 1rem;
        right: 1rem;
        transform: translateX(0) translateY(100px);
    }

    .floating-cta.active {
        transform: translateY(0);
    }

    .floating-cta-content {
        justify-content: space-between;
        gap: 0.8rem;
    }
}

@media (max-width: 768px) {
    .floating-cta {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        padding: 1rem;
    }

    .floating-cta-content span {
        font-size: 0.9rem;
        white-space: normal;
        flex: 1;
    }

    .floating-cta-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .floating-cta {
        bottom: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
        padding: 0.8rem;
    }

    .floating-cta-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .floating-cta-content span {
        font-size: 0.8rem;
        line-height: 1.3;
    }

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

    .floating-cta-close {
        position: absolute;
        top: 0.3rem;
        right: 0.3rem;
        background: rgba(0, 0, 0, 0.1);
    }
}

/* ===== BACK TO TOP BUTTON RESPONSIVE FIXES ===== */
@media (max-width: 1024px) {
    .back-to-top {
        right: 1.5rem;
        bottom: 1.5rem;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        position: fixed;
    }

}

@media (max-width: 768px) {
    .back-to-top {
        right: 1rem;
        bottom: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        right: 0.8rem;
        bottom: 0.8rem;
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
}

/* ===== SPECIFIC FIXES FOR EXTRA SMALL SCREENS ===== */
@media (max-width: 360px) {
    .floating-cta {
        left: 0.3rem;
        right: 0.3rem;
        padding: 0.7rem;
    }

    .floating-cta-content span {
        font-size: 0.75rem;
    }

    .floating-cta-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .back-to-top {
        right: 0.5rem;
        bottom: 0.5rem;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 768px) {

    /* Improve touch targets */
    .button-row .btn,
    .button-row .pro_btn {
        min-height: 44px;
        /* Apple's recommended minimum touch target */
        padding: 12px 20px;
    }

    .nav-menu li {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .social-links a {
        width: 44px;
        height: 44px;
    }

    /* Fix floating CTA touch target */
    .floating-cta-btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}