@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

a {
    color: white;
    text-decoration: none;
}

/* // NAVBAR //======================================= */
.navbar {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    padding: 25px 9%;
    /* background: slateblue; */
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    visibility: hidden;
    opacity: 0;
    animation: show-content 1.5s linear forwards;
    animation-delay: 1.2s;
}

@keyframes show-content {
    100% {
        visibility: visible;
        opacity: 1;
    }
}

.navbar .logo {
    font-size: 30px;
    font-weight: 700;
}

.navbar ul {
    display: flex;
}

.navbar ul li {
    list-style: none;
    margin-left: 35px;
}

.navbar ul li a {
    font-size: 20px;
    font-weight: 500;
    transition: .5s;
}

.navbar ul li:hover a,
.navbar ul li.active a {
    color: rgb(0, 243, 41);
    text-shadow: 0px 0px 14px rgb(0, 255, 42);
}

/* // CONTENT //================================================== */
.home {
    display: flex;
    align-items: center;
    gap: 50px;
    height: 100vh;
    padding: 60px 9% 0;
    color: white;
    visibility: hidden;
    opacity: 0;
    animation: show-content 1.5s linear forwards;
    animation-delay: 1.6s;
}

.home-info h1 {
    font-size: 55px;
}

.home-info h2 {
    display: inline-block;
    font-size: 32px;
    margin-top: -10px;
    /* background: slateblue; */
}

.home-info h2 span {
    position: relative;
    display: inline-block;
    color: transparent;
    -webkit-text-stroke: .7px yellow;
    animation: display-text 16s linear infinite;
    animation-delay: calc(-4s * var(--i));
}

@keyframes display-text {
    25%,
    100% {
        display: none;
    }
}

.home-info h2 span:before {
    content: attr(data-text);
    position: absolute;
    width: 0;
    border-right: 2px solid yellow;
    color: yellow;
    white-space: nowrap;
    overflow: hidden;
    animation: fill-text 4s linear infinite;
}

@keyframes fill-text {
    10%, 100% {
        width: 0;
    }

    70%, 90% {
        width: 100%;
    }
}

.home-info p {
    font-size: 16px;
    margin: 10px 40px 25px 0;
}

.home-info .btn-sci {
    display: flex;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 10px 30px;
    background: yellow;
    border: 2px solid yellow;
    border-radius: 40px;
    box-shadow: 0 0 15px yellow;
    font-size: 16px;
    color: black;
    font-weight: 600;
    transition: .5s;
}

.btn:hover {
    background: transparent;
    color: yellow;
    box-shadow: none;
}

.home-info .btn-sci .sci {
    margin-left: 20px;
}

.home-info .btn-sci .sci a {
    display: inline-flex;
    padding: 8px;
    border: 2px solid yellow;
    border-radius: 50%;
    font-size: 20px;
    color: yellow;
    margin: 0 8px;
    transition: .5s;
}

.home-info .btn-sci .sci a:hover {
    background: yellow;
    color: black;
    box-shadow: 0 0 15px yellow;
} 

.home-img .img-box {
    position: relative;
    max-width: 25vw;
    aspect-ratio: 1/1;
    height: 25vw;
    border-radius: 50%;
    padding: 6px;   
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.home-img .img-box::before,
.home-img .img-box::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: conic-gradient(transparent, transparent, transparent, rgb(2, 206, 2));
    transform: rotate(0deg);
    animation: rotate-border 7s linear infinite;
}

.home-img .img-box::after {
    animation-delay: -3.5s;
}

@keyframes rotate-border {
    100% {
        transform: rotate(360deg);
    }
}

.home-img .img-box .img-item {
    position: relative;
    width: 100%;
    height: 100%;
    background: black;
    border-radius: 50%;
    border: .1px solid black;
    display: flex;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
}

.home-img .img-box .img-item img {
    position: absolute;
    top: 5px;
    display: block;
    width: 100%;
    object-fit: cover;
    mix-blend-mode: lighten;
    transition: transform 0.4s ease;
}

.home-img .img-box .img-item img:hover {
    position: absolute;
    top: 5px;
    display: block;
    width: 100%;
    object-fit: cover;
    mix-blend-mode: lighten;
    transform: scale(1.1);
}

.bars-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: -1;
}

.bars-animation .bar {
    width: 100%;
    height: 100%;
    background: black;
    /* border: 2px solid red; */
    transform: translateY(-100%);
    animation: show-bars .5s ease-in-out forwards;
    animation-delay: calc(.1s * var(--i));
}

@keyframes show-bars {
    100% {
        transform: translateY(0%);
    }
}


/* ========================= */
/* RESPONSIVE DESIGN SECTION */
/* ========================= */

/* Tombol hamburger default tersembunyi di desktop */
.menu-toggle {
    display: none;
    font-size: 32px;
    color: white;
    cursor: pointer;
}

/* --- Tablet (lebar ≤ 992px) --- */
@media (max-width: 992px) {

    /* Navbar padding sedikit dikurangi */
    .navbar {
        padding: 20px 6%;
    }

    .navbar .logo {
        font-size: 26px;
    }

    .navbar ul li a {
        font-size: 18px;
    }

    /* Home section: sedikit rapat */
    .home {
        gap: 35px;
        padding: 80px 6% 0;
    }

    .home-info h1 {
        font-size: 45px;
    }

    .home-info h2 {
        font-size: 28px;
    }

    .home-img .img-box {
        max-width: 35vw;
        height: 35vw;
    }
}

/* Saat layar kecil */
@media (max-width: 768px) {

    .navbar {
        justify-content: space-between;
    }

    /* Sembunyikan menu utama */
    .navbar ul {
        position: absolute;
        top: 80px;
        right: -100%;
        width: 60%;
        height: 300px;
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(10px);
        border-left: 3px solid rgb(0, 243, 41);
        border-radius: 8px 0 0 8px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 20px;
        transition: right 0.4s ease;
        z-index: 99;
    }

    /* Munculkan menu saat aktif */
    .navbar ul.active {
        right: 0;
    }

    .navbar ul li {
        margin: 0;
    }

    .navbar ul li a {
        font-size: 18px;
    }

    /* Tampilkan tombol hamburger */
    .menu-toggle {
        display: block;
    }
}

/* --- HP kecil (lebar ≤ 480px) --- */
@media (max-width: 480px) {

    .navbar {
        padding: 15px 4%;
    }

    .navbar .logo {
        font-size: 22px;
    }

    .navbar ul li {
        margin-left: 20px;
    }

    .navbar ul li a {
        font-size: 16px;
    }

    .home-info h1 {
        font-size: 30px;
    }

    .home-info h2 {
        font-size: 20px;
    }

    .btn {
        font-size: 14px;
        padding: 8px 20px;
    }

    .home-img .img-box {
        max-width: 70vw;
        height: 70vw;
    }

    .home-info p {
        font-size: 14px;
    }
}
