@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: black;
    color: white;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    font-size: 3rem;
    color: #b74b4b;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s ease;
}

.logo:hover {
    transform: scale(1.08);
}

#menu-icon {
    font-size: 2.8rem;
    color: #b74b4b;
    cursor: pointer;
    display: none;
}

nav a {
    font-size: 1.8rem;
    color: white;
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
}

nav a:hover,
nav a.active {
    color: #b74b4b;
    border-bottom: 3px solid #b74b4b;
}

section {
    min-height: 100vh;
    padding: 10rem 9% 5rem;
}

.home {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
    background-color: black;
}

.home-content h1 {
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.2;
}

span {
    color: #b74b4b;
}

.home-content h3 {
    font-size: 3.6rem;
    margin: 1rem 0 1.5rem;
    font-weight: 700;
}

.home-content p {
    font-size: 1.6rem;
    line-height: 1.6;
    color: #e0e0e0;
}

.home-img {
    border-radius: 50%;
    flex-shrink: 0;
}

.home-img img {
    width: 32vw;
    max-width: 380px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 0 25px #b74b4b;
    cursor: pointer;
    transition: 0.3s ease;
}

.home-img img:hover {
    transform: scale(1.03);
    box-shadow: 0 0 35px #b74b4b;
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background-color: transparent;
    border: 0.2rem solid #b74b4b;
    font-size: 2rem;
    border-radius: 50%;
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.3s ease;
    color: #b74b4b;
}

.social-icons a:hover {
    color: black;
    transform: scale(1.2) translateY(-5px);
    background-color: #b74b4b;
    box-shadow: 0 0 25px #b74b4b;
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background-color: black;
    border-radius: 4rem;
    font-size: 1.6rem;
    color: #b74b4b;
    letter-spacing: 0.3rem;
    font-weight: 600;
    border: 2px solid #b74b4b;
    transition: 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    transform: scale(1.03);
    background-color: #b74b4b;
    color: black;
    box-shadow: 0 0 25px #b74b4b;
}

.typing-text {
    font-weight: 600;
}

.typing-text span {
    position: relative;
    display: inline-block;
    vertical-align: bottom;
}

.typing-text span::before {
    content: "Game Developer";
    color: #b74b4b;
    animation: words 20s infinite;
}

.typing-text span::after {
    content: "";
    background-color: black;
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px solid #b74b4b;
    right: -8px;
    animation: cursor 0.6s infinite, typing 20s steps(21) infinite;
}

@keyframes cursor {
    50% {
        border-left-color: transparent;
    }
}

@keyframes typing {
    0%, 20%, 40%, 60%, 80%, 100% {
        width: calc(100% + 8px);
    }
    7%, 15%, 27%, 35%, 47%, 55%, 67%, 75%, 87%, 95% {
        width: 0;
    }
}

@keyframes words {
    0%, 20% {
        content: "Game Developer";
    }
    20.01%, 40% {
        content: "Software Developer";
    }
    40.01%, 60% {
        content: "Systems Programmer";
    }
    60.01%, 80% {
        content: "Creative Technologist";
    }
    80.01%, 100% {
        content: "Informatics Student";
    }
}

/* Tablet & Layar Menengah */
@media (max-width: 995px) {
    header {
        padding: 1.5rem 5%;
    }

    #menu-icon {
        display: block;
    }

    nav {
        position: absolute;
        top: 100%;
        right: 0;
        width: 22rem;
        display: none;
        padding: 1rem 2.5rem;
        background-color: #161616;
        border-left: 3px solid #b74b4b;
        border-bottom: 3px solid #b74b4b;
        border-bottom-left-radius: 2rem;
    }

    nav.active {
        display: block;
    }

    nav a {
        display: block;
        font-size: 1.8rem;
        margin: 2rem 0;
    }

    nav a:hover,
    nav a.active {
        padding-left: 1rem;
        border-bottom: none;
        border-left: 3px solid #b74b4b;
    }

    section {
        padding: 10rem 5% 5rem;
    }

    .home {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }

    .home-img img {
        width: 26rem;
        max-width: 65vw;
    }

    .home-content h1 {
        font-size: 4.8rem;
    }

    .home-content h3 {
        font-size: 2.8rem;
    }

    .social-icons a {
        margin: 2.5rem 0.8rem;
    }
}

/* Layar HP Kecil */
@media (max-width: 480px) {
    html {
        font-size: 55%;
    }

    .home-content h1 {
        font-size: 4.2rem;
    }

    .home-content h3 {
        font-size: 2.4rem;
    }
}