/* ==========================================================================
   RESPONSIVE DESIGN - ALFINA PORTFOLIO
   ========================================================================== */

/* ==========================================================================
   GLOBAL FIXES
   ========================================================================== */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    box-sizing: border-box;
}

.experience-card {
    overflow: hidden;
}

.menu-toggle {
    display: none;
}

/* ==========================================================================
   TABLET & MEDIUM SCREENS (max-width: 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    .emoji {
        display: none !important;
    }

    .navbar {
        padding: 20px 40px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-left {
        max-width: 100%;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-description {
        width: 100%;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .social-button {
        justify-content: center;
        flex-wrap: wrap;
        width: auto;
        max-width: 100%;
    }

    .hero-right {
        justify-content: center;
        align-items: center;
    }

    .hero-right img {
        width: 360px;
        max-width: 85%;
        margin: 0 auto;
    }

    /* About Section */
    .about-wrapper {
        flex-direction: column;
        gap: 50px;
        text-align: center;
    }

    .about-content {
        max-width: 100%;
    }

    .title-line {
        margin: 20px auto 30px;
    }

    .competency-list {
        justify-content: center;
    }

    /* Experience Wrapper */
    .experience-wrapper {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .experience-photo {
        position: relative;
        top: 0;
        text-align: center;
        margin-bottom: 20px;
    }

    .experience-photo img {
        max-width: 320px;
        margin: 0 auto;
    }

    /* Project items */
    .project-item {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-bottom: 80px;
    }

    /* Skills */
    .skills-wrapper {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   MOBILE & SMALL TABLETS (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
    /* General Section Padding */
    section {
        min-height: auto;
        padding-top: 80px;
        padding-bottom: 60px;
    }

    .about,
    .education,
    .organization,
    .experience,
    .experience-detail,
    .projects,
    .skills {
        padding: 60px 5%;
    }

    .section-title {
        font-size: 36px;
        line-height: 1.2;
    }

    .section-subtitle {
        font-size: 13px;
        letter-spacing: 3px;
    }

    /* Navbar Hamburger Menu */
    .navbar {
        padding: 16px 20px;
        position: relative;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        background: #f0f6ff;
        border-radius: 10px;
        color: #14213D;
        font-size: 20px;
        cursor: pointer;
        z-index: 10001;
        transition: 0.3s ease;
    }

    .menu-toggle:hover {
        background: #69B7F5;
        color: #fff;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: #ffffff;
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 28px;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10000;
        padding: 40px 20px;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu a {
        font-size: 18px;
        font-weight: 600;
    }

    /* Hero Section */
    .hero {
        min-height: auto;
        padding-top: 110px;
        padding-bottom: 50px;
    }

    .hero h1 {
        font-size: clamp(38px, 10vw, 52px);
        line-height: 1.15;
        margin: 14px 0 18px;
    }

    .portfolio-label {
        font-size: 13px;
        letter-spacing: 2px;
        margin-bottom: 10px;
    }

    .hero-description {
        width: 100%;
        max-width: 100%;
        font-size: 14px;
        line-height: 1.75;
        margin-bottom: 25px;
        padding: 0 5px;
    }

    .reach-text {
        font-size: 13px;
        letter-spacing: 2px;
        margin-bottom: 15px;
    }

    /* Social Buttons - 2x2 grid on mobile */
    .social-button {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        width: 100%;
        max-width: 360px;
        margin: 15px auto 35px;
    }

    .social-button a {
        min-width: unset;
        width: 100%;
        padding: 12px 14px;
        font-size: 13.5px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
        white-space: nowrap;
    }

    .hero-right img {
        width: 290px;
        max-width: 85%;
        margin: 0 auto;
    }

    /* About Section */
    .about-image {
        width: 100%;
        max-width: 310px;
        height: 480px;
        margin: 0 auto;
    }

    .bg-arch {
        width: 240px;
        height: 460px;
    }

    .about-image img {
        width: 270px;
        margin-top: 30px;
    }

    .circle-outline {
        width: 250px;
        height: 250px;
        right: -25px;
        top: 100px;
    }

    .circle-fill {
        width: 130px;
        height: 130px;
        left: -15px;
        bottom: 30px;
    }

    .about-content h2 {
        font-size: 32px;
    }

    .about-content p {
        font-size: 15px;
        line-height: 1.8;
        text-align: left;
    }

    .competency-list span {
        font-size: 13px;
        padding: 10px 18px;
    }

    /* Education Section */
    .education-heading h2 {
        font-size: 34px;
    }

    .edu-item {
        gap: 16px;
    }

    .edu-item h3 {
        font-size: 22px;
    }

    .edu-item h4 {
        font-size: 16px;
    }

    .edu-card {
        padding: 20px;
        border-radius: 16px;
    }

    /* Organization Section */
    .organization-heading h2 {
        font-size: 32px;
    }

    .organization-desc {
        font-size: 15px;
    }

    .organization-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin: 40px 0;
    }

    .stat-card {
        padding: 22px 14px;
        border-radius: 18px;
    }

    .stat-card h3 {
        font-size: 34px;
    }

    .stat-card p {
        font-size: 14px;
    }

    .organization-card {
        grid-template-columns: 1fr;
        padding: 25px 20px;
        gap: 20px;
        text-align: left;
        border-radius: 20px;
    }

    .org-logo {
        margin: 0;
    }

    .org-year {
        font-size: 24px;
    }

    .org-content h3 {
        font-size: 22px;
    }

    .position-item {
        flex-direction: column;
        gap: 8px;
    }

    .position-year {
        min-width: auto;
    }

    /* Experience Section */
    .experience-desc {
        font-size: 15px;
        margin-bottom: 50px;
    }

    .experience-item {
        padding-left: 20px;
    }

    .experience-item h3 {
        font-size: 22px;
    }

    .experience-item h4 {
        font-size: 18px;
    }

    /* Hide decorative emojis on mobile to prevent layout overflow */
    .emoji.rock,
    .emoji.folder,
    .emoji.megaphone,
    .emoji.eye,
    .emoji.kopral {
        display: none !important;
    }

    /* Experience Detail Cards */
    .experience-detail {
        padding: 40px 5%;
    }

    .experience-card {
        padding: 28px 20px;
        border-radius: 22px;
    }

    .experience-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }

    .experience-badge,
    .experience-type {
        font-size: 14px;
        padding: 8px 20px;
    }

    .experience-date {
        font-size: 18px;
    }

    .experience-title h2,
    .experience-detail h2,
    .experience-card h2 {
        font-size: 26px;
        line-height: 1.25;
    }

    .experience-title h4,
    .experience-detail h3,
    .experience-card h4 {
        font-size: 17px;
        margin-bottom: 20px;
    }

    .experience-description p,
    .experience-detail p {
        font-size: 15px;
        line-height: 1.75;
        text-align: left;
    }

    .experience-highlight span,
    .experience-skill span {
        font-size: 13px;
        padding: 8px 16px;
    }

    /* Achievement grids - Kompak 2 Kolom di Mobile */
    .achievement-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin: 20px 0 28px;
    }

    .achievement-grid-3 {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin: 20px 0 28px;
    }

    .achievement-card {
        padding: 16px 10px;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 85px;
        box-shadow: 0 4px 14px rgba(62, 45, 145, 0.05);
    }

    .achievement-card h3 {
        font-size: 26px;
        font-weight: 700;
        margin-bottom: 4px;
        line-height: 1.1;
    }

    .achievement-card p {
        font-size: 12.5px;
        font-weight: 600;
        line-height: 1.35;
        margin: 0;
        text-align: center;
    }

    /* Projects */
    .projects-desc {
        font-size: 15px;
        margin-bottom: 50px;
    }

    .project-info h3 {
        font-size: 28px;
    }

    .project-info p {
        font-size: 15px;
    }

    .project-info ul {
        font-size: 14px;
        margin-left: 18px;
    }

    .gallery-small {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    /* Skills */
    .skills-card {
        padding: 26px 18px;
        border-radius: 20px;
    }

    .skills-card h3 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .tool-item {
        padding: 12px 14px;
        gap: 14px;
    }

    .tool-item span {
        font-size: 16px;
    }

    .professional-list li {
        font-size: 15px;
        line-height: 1.6;
    }

    /* Close button on image modal */
    .close-image {
        top: 15px;
        right: 20px;
        font-size: 36px;
    }

    /* Footer */
    .footer {
        padding: 25px 20px;
    }

    .footer .container {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

/* ==========================================================================
   EXTRA SMALL MOBILE SCREENS (max-width: 480px)
   ========================================================================== */
@media (max-width: 480px) {
    .navbar {
        padding: 14px 16px;
    }

    .logo {
        font-size: 20px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .social-button {
        grid-template-columns: repeat(2, 1fr);
        max-width: 330px;
        gap: 10px;
        margin: 15px auto 30px;
    }

    .social-button a {
        padding: 11px 8px;
        font-size: 13px;
        gap: 6px;
    }

    .organization-stats {
        grid-template-columns: 1fr;
    }

    .achievement-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin: 18px 0 24px;
    }

    .achievement-grid-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin: 18px 0 24px;
    }

    .achievement-card {
        padding: 14px 8px;
        border-radius: 14px;
        min-height: 75px;
    }

    .achievement-card h3 {
        font-size: 24px;
        margin-bottom: 2px;
    }

    .achievement-card p {
        font-size: 11.5px;
        line-height: 1.3;
    }

    .experience-card {
        padding: 22px 16px;
    }

    .close-image {
        top: 10px;
        right: 15px;
        font-size: 32px;
    }
}
