/* ==========================================================================
   RESPONSIVE DESIGN SYSTEM - AHMAD PARIDI
   Breakpoints:
   - Large Desktop / Laptop (1200px - 992px)
   - Tablet (991px - 768px)
   - Mobile Landscape / Large Phone (767px - 576px)
   - Mobile Portrait (575px and below)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. LAPTOP & SMALL DESKTOP (max-width: 1100px)
   -------------------------------------------------------------------------- */
@media screen and (max-width: 1100px) {
    .hero-wrapper {
        gap: 36px;
    }

    .profile-card-wrapper {
        width: 340px;
        height: 400px;
    }

    .about-grid {
        gap: 40px;
    }

    .contact-grid {
        gap: 40px;
    }
}

/* --------------------------------------------------------------------------
   2. TABLET (max-width: 991px)
   -------------------------------------------------------------------------- */
@media screen and (max-width: 991px) {
    section {
        padding: 80px 0;
    }

    /* Hero */
    .hero {
        padding-top: 120px;
        padding-bottom: 60px;
        min-height: auto;
    }

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

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

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

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

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

    .hero-visual {
        order: -1;
    }

    .profile-card-wrapper {
        width: 320px;
        height: 380px;
    }

    /* About Section */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .about-image-card {
        max-width: 360px;
        height: 380px;
        margin: 0 auto;
    }

    .about-content {
        text-align: center;
    }

    .about-info-grid {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .about-highlights {
        justify-content: center;
    }

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

    /* Contact Grid */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .contact-info-col {
        text-align: center;
        align-items: center;
    }

    .contact-details {
        width: 100%;
        max-width: 520px;
    }

    .contact-social-row {
        justify-content: center;
    }

    .contact-form-wrapper {
        max-width: 650px;
        margin: 0 auto;
        width: 100%;
    }
}

/* --------------------------------------------------------------------------
   3. MOBILE DEVICES (max-width: 768px)
   -------------------------------------------------------------------------- */
@media screen and (max-width: 768px) {
    html, body {
        overflow-x: hidden;
    }

    .container {
        padding: 0 20px;
    }

    section {
        padding: 70px 0;
    }

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

    /* Navbar Hamburger & Mobile Drawer */
    .hamburger {
        display: flex;
    }

    .nav-actions .btn-nav {
        display: none;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(8, 11, 20, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 28px;
        list-style: none;
        transition: right 0.4s var(--ease-smooth);
        z-index: 998;
        padding: 40px 24px;
        border-left: 1px solid var(--border-subtle);
    }

    .nav-menu.is-open {
        right: 0;
    }

    .nav-link {
        font-size: 1.35rem;
        font-weight: 600;
        color: var(--text-primary);
        padding: 8px 16px;
    }

    .nav-link.active {
        color: var(--accent-secondary);
    }

    /* Hero Adjustments */
    .hero {
        padding-top: 110px;
        padding-bottom: 50px;
    }

    .hero-greeting {
        font-size: 1.05rem;
    }

    .hero-roles {
        font-size: 1.25rem;
        min-height: 2em;
    }

    .hero-scroll-indicator {
        display: none;
    }

    .profile-card-wrapper {
        width: 280px;
        height: 330px;
    }

    .floating-chip-1 {
        left: -15px;
        top: 10px;
        padding: 8px 14px;
        font-size: 0.78rem;
    }

    .floating-chip-2 {
        right: -10px;
        bottom: 10px;
        padding: 8px 14px;
        font-size: 0.78rem;
    }

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

    .skill-card {
        padding: 24px 16px;
    }

    .skill-icon-wrap {
        width: 60px;
        height: 60px;
        margin-bottom: 14px;
    }

    .skill-icon-wrap i {
        font-size: 1.8rem;
    }

    .skill-name {
        font-size: 1.05rem;
    }

    .skill-desc {
        font-size: 0.82rem;
    }

    /* Projects Grid */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .project-media {
        height: 210px;
    }

    .project-body {
        padding: 22px;
    }

    /* Contact Form */
    .contact-form-wrapper {
        padding: 28px 20px;
        border-radius: var(--radius-lg);
    }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

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

    .floating-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}

/* --------------------------------------------------------------------------
   4. SMALL MOBILE SCREENS (max-width: 480px)
   -------------------------------------------------------------------------- */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

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

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

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

    .hero-buttons {
        width: 100%;
        flex-direction: column;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
    }

    .profile-card-wrapper {
        width: 250px;
        height: 290px;
    }

    .floating-chip {
        display: none; /* Hide decorative floating chips on ultra-small screens to avoid clipping */
    }

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

    .info-card {
        padding: 14px 16px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .project-actions {
        flex-direction: column;
    }

    .btn-project-details, .btn-project-github {
        width: 100%;
    }

    .modal-container {
        padding: 0;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-actions {
        flex-direction: column;
    }
}
