/* -------------------- */
/* --- GLOBAL RESET --- */
/* -------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-heading);
    line-height: 1.2;
    font-weight: 700;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-accent-hover);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* -------------------- */
/* --- CSS VARIABLES -- */
/* -------------------- */
:root {
    /* Fonts */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Colors (Light Mode) */
    --color-bg: #f8f9fa;
    --color-bg-secondary: #ffffff;
    --color-text: #495057;
    --color-heading: #212529;
    --color-accent: #007bff;
    --color-accent-hover: #0056b3;
    --color-border: #dee2e6;
    --color-shadow: rgba(0, 0, 0, 0.05);

    /* Spacing & Sizes */
    --header-height: 70px;
    --container-width: 1140px;
    --container-padding: 1.5rem;
    --border-radius: 8px;
}

/* Dark Mode Variables */
body.dark-mode {
    --color-bg: #121212;
    --color-bg-secondary: #1e1e1e;
    --color-text: #adb5bd;
    --color-heading: #e9ecef;
    --color-accent: #4dabf7;
    --color-accent-hover: #74c0fc;
    --color-border: #343a40;
    --color-shadow: rgba(0, 0, 0, 0.2);
}

/* -------------------- */
/* --- UTILITIES --- */
/* -------------------- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn--primary {
    background-color: var(--color-accent);
    color: #fff;
}

.btn--primary:hover {
    background-color: var(--color-accent-hover);
    color: #fff;
    transform: translateY(-2px);
}

.btn--secondary {
    background-color: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn--secondary:hover {
    background-color: var(--color-accent);
    color: #fff;
}

.section {
    padding: 6rem 0;
}

.section__title {
    font-size: clamp(2rem, 5vw, 2.75rem);
    text-align: center;
    margin-bottom: 1rem;
}

.section__subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
    color: var(--color-text);
}

/* Scroll Animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* -------------------- */
/* --- HEADER --- */
/* -------------------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: color-mix(in srgb, var(--color-bg) 85%, transparent);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 2px 10px var(--color-shadow);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.header__logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-heading);
}

.nav__list {
    display: flex;
    gap: 2rem;
}

.nav__link {
    font-weight: 500;
    color: var(--color-text);
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle, .menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    width: 24px;
    height: 24px;
}

.theme-toggle svg, .menu-toggle svg {
    width: 100%;
    height: 100%;
}

.theme-toggle .moon, .menu-toggle .close-icon { display: none; }
.dark-mode .theme-toggle .sun, .menu-toggle .menu-icon { display: none; }
.dark-mode .theme-toggle .moon, .menu-toggle.active .close-icon { display: block; }
.menu-toggle.active .menu-icon { display: none; }

.menu-toggle {
    display: none;
}

/* -------------------- */
/* --- HERO SECTION --- */
/* -------------------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
}

.hero__title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1rem;
}

.hero__tagline {
    font-size: 1.5rem;
    color: var(--color-heading);
    margin-bottom: 1.5rem;
}

.hero__intro {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.hero__cta {
    display: flex;
    gap: 1rem;
}

.hero__image-wrapper {
    position: relative;
    justify-self: center;
}

.hero__image {
    width: clamp(250px, 30vw, 400px);
    height: clamp(250px, 30vw, 400px);
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    border: 5px solid var(--color-bg-secondary);
}

.hero__image-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: var(--color-accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.4; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
}

/* -------------------- */
/* --- ABOUT SECTION --- */
/* -------------------- */
.about__container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about__content p {
    margin-bottom: 1.5rem;
}

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

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-chip {
    background-color: color-mix(in srgb, var(--color-accent) 15%, transparent);
    color: var(--color-accent);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* -------------------- */
/* --- EXPERIENCE SECTION --- */
/* -------------------- */
.experience__timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.experience__timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background-color: var(--color-border);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--color-accent);
    border: 3px solid var(--color-bg);
}

.timeline-item__role {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.timeline-item__meta {
    margin-bottom: 0.5rem;
}
.timeline-item__company { font-weight: 500; color: var(--color-heading); }
.timeline-item__duration { font-size: 0.9rem; color: var(--color-text); }
.timeline-item__content ul { margin-top: 1rem; padding-left: 1.2rem; }
.timeline-item__content li { list-style: disc; margin-bottom: 0.5rem; }

/* -------------------- */
/* --- PROJECTS SECTION --- */
/* -------------------- */
.projects__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--color-bg-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px var(--color-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--color-shadow);
}

.project-card__image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid var(--color-border);
}

.project-card__content {
    padding: 1.5rem;
}

.project-card__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.project-card__tag {
    font-size: 0.8rem;
    background-color: color-mix(in srgb, var(--color-text) 10%, transparent);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

/* -------------------- */
/* --- CONTACT SECTION --- */
/* -------------------- */
.contact__container {
    text-align: center;
    max-width: 700px;
}
.contact__email {
    display: inline-block;
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 500;
    color: var(--color-heading);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
    transition: all 0.3s ease;
}
.contact__email:hover {
    border-color: var(--color-accent);
}

.contact__socials {
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: center;
}
.contact__socials a {
    color: var(--color-text);
}
.contact__socials a:hover {
    color: var(--color-accent);
}
.contact__socials svg {
    width: 32px;
    height: 32px;
}

/* ...dengan kode ini */
.contact__socials .fa-behance {
    font-size: 32px;     /* Atur ukuran ikon di sini */
    line-height: 1;
    position: relative;
    top: -3px;           /* Sesuaikan ini untuk menaikkan/menurunkan ikon */
    color: var(--color-text); /* Ganti warna jika perlu */
}

/* Aturan hover khusus untuk Behance */
.contact__socials a:hover .fa-behance {
    color: var(--color-accent);
}

/* -------------------- */
/* --- FOOTER --- */
/* -------------------- */
.footer {
    padding: 2rem 0;
    background-color: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
}

.footer__container {
    text-align: center;
    font-size: 0.9rem;
}

/* -------------------- */
/* --- MODAL --- */
/* -------------------- */
.modal {
    display: none;
}
.modal.is-open {
    display: block;
}
.modal__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal__container {
    background-color: var(--color-bg);
    border-radius: var(--border-radius);
    max-height: 90vh;
    max-width: 800px;
    width: 95%;
    overflow-y: auto;
    animation: slide-in 0.3s ease-out;
}

@keyframes slide-in {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}
.modal__title { font-size: 1.75rem; }
.modal__close {
    background: none;
    border: none;
    cursor: pointer;
    width: 24px;
    height: 24px;
    position: relative;
}
.modal__close::before, .modal__close::after {
    content: '';
    position: absolute;
    top: 11px;
    left: 2px;
    width: 20px;
    height: 2px;
    background: var(--color-text);
}
.modal__close::before { transform: rotate(45deg); }
.modal__close::after { transform: rotate(-45deg); }

.modal__content { padding: 1.5rem; }
.modal__content img {
    width: 100%;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}
.modal__content h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.modal__content p, .modal__content li {
    margin-bottom: 1rem;
}
.modal__content ul { padding-left: 1.2rem; }
.modal__links { margin-top: 2rem; display: flex; gap: 1rem; }

.modal__content { padding: 1.5rem; }

/* ADD THIS CODE BELOW */
.modal__image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal__image-gallery img {
    width: 100%;
    border-radius: var(--border-radius);
    object-fit: cover;
}
/* ADD THIS CODE ABOVE */

.modal__content h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}


/* -------------------- */
/* --- RESPONSIVE --- */
/* -------------------- */
@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--color-bg);
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        padding-top: 2rem;
    }
    .nav.active {
        transform: translateX(0);
    }
    .nav__list {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
    }
    .nav__link {
        font-size: 1.5rem;
    }
    .menu-toggle {
        display: block;
        z-index: 1001;
    }
    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero__image-wrapper {
        grid-row: 1;
        margin-bottom: 2rem;
    }
    .hero__cta {
        justify-content: center;
    }
    .about__container {
        grid-template-columns: 1fr;
    }
    .experience__timeline::before {
        left: 10px;
    }
    .timeline-item {
        padding-left: 40px;
    }
    .timeline-item::before {
        left: 1px;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.about__content p {
  text-align: justify;
}

.skills__subheading {
    text-align: center;
    font-size: 1.75rem;
    font-family: var(--font-heading);
    color: var(--color-heading);
    margin-top: 4rem;
    margin-bottom: 2rem;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.tech-item {
    background-color: var(--color-bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 120px;
    height: 120px;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 10px var(--color-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px var(--color-shadow);
}

.tech-item img {
    height: 40px;
    width: 40px;
}

.tech-item span {
    font-weight: 500;
    color: var(--color-text);
}

/* ----------------------- */
/* --- EDUCATION SECTION --- */
/* ----------------------- */
.education__item {
    display: flex;
    gap: 2rem;
    max-width: 800px;
    margin: 2rem auto 0 auto;
    padding: 2rem;
    background-color: var(--color-bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px var(--color-shadow);
    border-left: 5px solid var(--color-accent);
    align-items: center;
}

.education__meta {
    flex-basis: 200px;
    flex-shrink: 0;
}

.education__duration {
    font-weight: 500;
    color: var(--color-heading);
    font-size: 1.1rem;
}

.education__university {
    font-size: 1rem;
    color: var(--color-text);
}

.education__degree {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: var(--color-heading);
    font-weight: 600;
}

.education__gpa {
    color: var(--color-text);
    font-size: 1rem;
}

/* Membuatnya responsif di mobile */
@media (max-width: 768px) {
    .education__item {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
        padding: 1.5rem;
    }
    .education__degree {
        font-size: 1.25rem;
    }
}