/*===== GOOGLE FONTS =====*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/*===== VARIABLES CSS =====*/
:root {
    --header-height: 3rem;

    /*========== Colors ==========*/
    --primary-color: #6d5dfc;
    --primary-dark: #5142d9;
    --accent-color: #21d4fd;
    --text-color: #f7f8ff;
    --text-color-light: #c7c9e3;
    --body-color: #101a49;
    --container-color: rgba(255, 255, 255, 0.13);
    --glass-bg: rgba(20, 32, 86, 0.54);
    --border-color: rgba(255, 255, 255, 0.24);
    --glass-shadow: 0 18px 45px rgba(4, 10, 45, 0.24);
    --text-gradient: linear-gradient(100deg, #ffffff 0%, #bfeaff 42%, #d6b8ff 100%);

    /*========== Font and typography ==========*/
    --body-font: 'Poppins', sans-serif;
    --big-font-size: 2.5rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;

    /*========== Font weight ==========*/
    --font-medium: 500;
    --font-semi-bold: 600;
    --font-bold: 700;

    /*========== z index ==========*/
    --z-tooltip: 10;
    --z-fixed: 100;
}

/*========== Variables Dark theme ==========*/
body.dark-theme {
    --text-color: #f7f8ff;
    --text-color-light: #c7c9e3;
    --body-color: #090e2b;
    --container-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(8, 15, 49, 0.62);
    --border-color: rgba(255, 255, 255, 0.2);
}

body.dark-theme .skills__img {
    filter: brightness(0) invert(1);
}

/*========== BASE ==========*/
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    background-image:
        radial-gradient(circle at 12% 12%, rgba(33, 212, 253, 0.3), transparent 30%),
        radial-gradient(circle at 88% 20%, rgba(109, 93, 252, 0.4), transparent 32%),
        radial-gradient(circle at 55% 92%, rgba(186, 117, 255, 0.28), transparent 35%),
        linear-gradient(135deg, #101a49 0%, #253d91 52%, #17245e 100%);
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 38%, rgba(116, 220, 255, 0.08));
    z-index: -1;
}

h1, h2, h3, h4 {
    color: var(--text-color);
    font-weight: var(--font-semi-bold);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

/*========== REUSABLE CSS CLASSES ==========*/
.section {
    padding: 5rem 1rem; /* Jarak atas-bawah dikurangi */
}
.section__title {
    font-size: var(--h1-font-size);
    text-align: center;
    margin-bottom: 3rem;
}
.home__title,
.section__title,
.footer__title {
    background-image: var(--text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/*========== BUTTONS ==========*/
.button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), #8d6bff);
    color: #fff;
    padding: .75rem 1rem;
    border-radius: .5rem;
    font-weight: var(--font-medium);
    box-shadow: 0 10px 24px rgba(109, 93, 252, 0.28);
    transition: transform .3s, box-shadow .3s, background .3s;
}
.button:hover {
    background: linear-gradient(135deg, var(--primary-dark), #7656ee);
    box-shadow: 0 14px 30px rgba(109, 93, 252, 0.4);
    transform: translateY(-2px);
}
.button--flex {
    display: inline-flex;
    align-items: center;
    column-gap: .5rem;
}

/*========== LAYOUT ==========*/
.main {
    padding-left: 5rem;
}

/*========== NAV ==========*/
.header {
    width: 5rem;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--glass-bg);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
    border-right: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    z-index: var(--z-fixed);
    transition: .5s;
}

.nav {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nav__list {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 1.5rem;
}

.nav__link {
    display: flex;
    font-size: 1.5rem;
    color: var(--text-color-light);
    padding: .4rem;
    border-radius: 50%;
    transition: .3s;
    border: 1px solid transparent;
}
.nav__link i {
    background-image: var(--text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.nav__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    border-color: var(--border-color);
    transform: translateY(-2px);
}

.active-link {
    background: linear-gradient(135deg, var(--primary-color), #8d6bff);
    color: #fff;
    box-shadow: 0 8px 20px rgba(109, 93, 252, 0.38);
}

.nav__toggle {
    display: none;
}

/*========== HOME ==========*/
.home { 
    min-height: 100vh; /* Hanya home yang full height */
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
.home__container { text-align: center; }
.home__title { font-size: var(--big-font-size); font-weight: var(--font-bold); }
.home__subtitle { font-size: var(--h2-font-size); font-weight: var(--font-medium); margin-bottom: 1.5rem; }
.home__subtitle .typing { color: var(--primary-color); }
.typed-cursor { font-size: var(--h2-font-size); color: var(--primary-color); animation: blink .7s infinite; }
@keyframes blink { 50% { opacity: 0; } }
.home__social { display: flex; justify-content: center; column-gap: 1.5rem; margin-bottom: 2rem; }
.home__social-icon { font-size: 1.5rem; color: var(--text-color); transition: .3s; }
.home__social-icon:hover { color: var(--primary-color); }
.scroll-down { display: inline-flex; align-items: center; color: var(--primary-color); border: 2px solid var(--primary-color); border-radius: 50px; padding: .5rem 1rem; font-size: 2rem; animation: bounce 2s ease-in-out infinite; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-20px); } 60% { transform: translateY(-10px); } }

/*========== ABOUT ==========*/
.about__container { max-width: 700px; margin-left: auto; margin-right: auto; text-align: center; padding: 1.75rem 2rem; background: var(--container-color); border: 1px solid var(--border-color); border-radius: 1rem; box-shadow: var(--glass-shadow); backdrop-filter: blur(16px) saturate(135%); -webkit-backdrop-filter: blur(16px) saturate(135%); }
.about__description { font-size: var(--normal-font-size); line-height: 1.7; color: var(--text-color-light); }

/*========== SKILLS ==========*/
.skills__container { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1.5rem; max-width: 800px; margin-left: auto; margin-right: auto; padding: 0 1rem; }
.skills__box { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem 1rem; background: var(--container-color); border: 1px solid var(--border-color); border-radius: .75rem; box-shadow: var(--glass-shadow); backdrop-filter: blur(14px) saturate(135%); -webkit-backdrop-filter: blur(14px) saturate(135%); transition: transform 0.3s, border-color .3s, background .3s; }
.skills__box:hover { transform: translateY(-5px); border-color: rgba(125, 231, 255, 0.72); background: rgba(255, 255, 255, 0.19); }
.skills__img { height: 50px; width: 50px; object-fit: contain; margin-bottom: 1rem; }
.skills__name { font-size: var(--small-font-size); font-weight: var(--font-medium); }

/*========== RESUME ==========*/
.resume__container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 3rem; max-width: 900px; margin-left: auto; margin-right: auto; padding: 0 1rem; }
.resume__column-title { font-size: var(--h3-font-size); margin-bottom: 2rem; display: flex; align-items: center; gap: .5rem; color: var(--primary-color); }
.resume__item { position: relative; padding: 1.2rem 1.25rem 2rem 2.5rem; border-left: 2px solid var(--border-color); background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent); border-radius: 0 .75rem .75rem 0; }
.resume__item:last-child { border-left: 2px solid transparent; padding-bottom: 0; }
.resume__item::before { content: ''; position: absolute; left: -0.5rem; top: 0; width: 1rem; height: 1rem; background-color: var(--primary-color); border-radius: 50%; }
.resume__item-title { font-size: var(--normal-font-size); margin-bottom: .25rem; }
.resume__item-subtitle { font-size: var(--small-font-size); color: var(--text-color-light); margin-bottom: .5rem; }
.resume__item-date { font-size: var(--small-font-size); color: var(--text-color-light); display: flex; align-items: center; gap: .4rem; margin-bottom: 1rem; }
.resume__item-details { padding-left: 1rem; }
.resume__item-details li { font-size: var(--small-font-size); color: var(--text-color-light); margin-bottom: .5rem; list-style: disc; }

/*========== PORTFOLIO ==========*/
.portfolio__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}
.portfolio__card {
    background: var(--container-color);
    border-radius: .75rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(16px) saturate(135%);
    -webkit-backdrop-filter: blur(16px) saturate(135%);
    overflow: hidden;
    transition: transform 0.3s;
}
.portfolio__card:hover {
    transform: translateY(-8px);
    border-color: rgba(125, 231, 255, 0.72);
}
.portfolio__img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform .4s;
}
.portfolio__card:hover .portfolio__img {
    transform: scale(1.05);
}
.portfolio__content {
    padding: 1.5rem;
}
.portfolio__title {
    font-size: var(--h3-font-size);
    margin-bottom: .75rem;
}
.portfolio__description {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.portfolio__buttons {
    display: flex;
    gap: 1rem;
}
.portfolio__button {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1.2rem;
    border-radius: .5rem;
    background: linear-gradient(135deg, var(--primary-color), #8d6bff);
    color: #fff;
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
    transition: background-color .3s;
}
.portfolio__button:hover {
    background: linear-gradient(135deg, var(--primary-dark), #7656ee);
}


/*========== BREAKPOINTS (RESPONSIVE) ==========*/
@media screen and (max-width: 768px) {
    .main { padding-left: 0; }
    .header { width: 100%; height: var(--header-height); bottom: 0; top: auto; border-right: none; border-top: 1px solid var(--border-color); }
    .nav { flex-direction: row; justify-content: space-around; }
    .nav__list { flex-direction: row; column-gap: 1.5rem; }
    .nav__link { font-size: 1.2rem; }
    .home__title { font-size: var(--h1-font-size); }
    .home__subtitle, .typed-cursor { font-size: var(--h3-font-size); }
    .scroll-down { display: none; }
    .resume__container { grid-template-columns: 1fr; gap: 2.5rem 0; }
    .portfolio__container { grid-template-columns: 1fr; }
}

@media screen and (max-width: 576px) {
    .nav__toggle { display: block; position: fixed; right: 1.5rem; top: 1.5rem; font-size: 1.5rem; cursor: pointer; z-index: var(--z-fixed); color: var(--primary-color); }
    .header { left: -100%; top: 0; width: 150px; height: 100vh; border-right: 1px solid var(--border-color); border-top: none; transition: .5s; }
    .show-menu { left: 0; }
    .nav { flex-direction: column; justify-content: center; }
    .nav__list { flex-direction: column; row-gap: 2rem; }
    .skills__container { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
}

/*========== CONTACT ==========*/
.contact__container {
    row-gap: 3rem;
    max-width: 600px; /* Lebar form dibatasi */
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}
.contact__input {
    width: 100%;
    padding: 1rem;
    border-radius: .5rem;
    border: 1px solid var(--border-color);
    outline: none;
    margin-bottom: 1rem;
    font-size: var(--normal-font-size);
    background: var(--container-color);
    color: var(--text-color);
    backdrop-filter: blur(14px) saturate(135%);
    -webkit-backdrop-filter: blur(14px) saturate(135%);
}
.contact__button {
    display: block;
    width: 100%; /* Tombol full width */
    padding: 1rem;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), #8d6bff);
    color: #fff;
    font-size: var(--normal-font-size);
    border-radius: .5rem;
    cursor: pointer;
    transition: .3s;
}
.contact__button:hover {
    background: linear-gradient(135deg, var(--primary-dark), #7656ee);
}

/*========== FOOTER ==========*/
.footer {
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: none;
    padding: 1rem 0;
}
.footer__container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: center;
    row-gap: 0;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}
.footer__title {
    font-size: var(--h2-font-size);
    color: var(--text-color);
    margin-bottom: 1rem;
}
.footer__list {
    display: flex;
    column-gap: 2rem;
}
.footer__link {
    color: var(--text-color);
    transition: .3s;
}
.footer__link:hover {
    color: var(--primary-color);
}
.footer__social {
    display: flex;
    column-gap: 1.5rem;
}
.footer__social-link {
    font-size: 1.5rem;
    color: var(--text-color);
    transition: .3s;
}
.footer__social-link:hover {
    color: var(--primary-color);
}
.footer__copy {
    font-size: var(--small-font-size);
    margin: 0;
    text-align: right;
    background-image: var(--text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
