@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;
    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: #0D0D0D;
    color: white;
}

/* --- HEADER / NAVBAR --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background-color: rgba(13, 13, 13, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    font-size: 3rem;
    color: #CEC0B3;
    font-weight: 800;
    cursor: pointer;
    transition: 0.5s ease;
}

.logo:hover {
    transform: scale(1.1);
}

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: #CEC0B3;
    border-bottom: 3px solid #CEC0B3;
}

/* --- HOME SECTION --- */
section {
    min-height: 100vh;
    padding: 10rem 9% 5rem;
}

.home {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6rem;
    background-color: #0D0D0D;
}

.home-content {
    max-width: 60rem;
}

.home-content h1 {
    font-size: 5.5rem;
    font-weight: 700;
    line-height: 1.3;
}

span {
    color: #CEC0B3;
}

.home-content h3 {
    font-size: 3.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.home-content p {
    font-size: 1.6rem;
    line-height: 1.6;
    margin-top: 1rem;
    color: #B8ADA2;
}

/* --- GAMBAR PROFIL --- */
.home-img {
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-img img {
    width: 32vw;
    max-width: 400px;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #CEC0B3;
    box-shadow: 0 0 25px #CEC0B3;
    cursor: pointer;
    transition: 0.3s ease-in-out;
}

.home-img img:hover {
    transform: scale(1.03);
    box-shadow: 0 0 40px #CEC0B3;
}

/* --- SOSIAL MEDIA & BUTTON --- */
.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background-color: transparent;
    border: 0.2rem solid #CEC0B3;
    font-size: 2rem;
    border-radius: 50%;
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.3s ease;
    color: #CEC0B3;
}

.social-icons a:hover {
    color: #0D0D0D;
    transform: scale(1.2) translateY(-5px);
    background-color: #CEC0B3;
    box-shadow: 0 0 20px #CEC0B3;
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background-color: transparent;
    border-radius: 4rem;
    font-size: 1.6rem;
    color: #CEC0B3;
    letter-spacing: 0.1rem;
    font-weight: 600;
    border: 2px solid #CEC0B3;
    transition: 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    background-color: #CEC0B3;
    color: #0D0D0D;
    box-shadow: 0 0 25px #CEC0B3;
}

/* --- ANIMASI TYPING TEXT --- */
.typing-text {
    font-size: 3.2rem;
    font-weight: 600;
}

.typing-text span::before {
    content: "Software Engineer";
    color: #CEC0B3;
    animation: words 18s infinite;
}

@keyframes words {
    0%, 16% {
        content: "Software Engineer";
    }
    17%, 33% {
        content: "Robotics Engineer";
    }
    34%, 50% {
        content: "Web Developer";
    }
    51%, 66% {
        content: "Database Enthusiast";
    }
    67%, 83% {
        content: "Problem Solver";
    }
    84%, 100% {
        content: "Lifelong Learner";
    }
}

/* --- OTHER SECTIONS (same style as above) --- */
section:not(.home) {
    min-height: auto;
    padding: 8rem 9% 5rem;
}

.heading {
    font-size: 4.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 5rem;
}

.about-text {
    max-width: 90rem;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.7rem;
    line-height: 1.8;
    color: #B8ADA2;
    margin-bottom: 2rem;
    text-align: center;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
    gap: 2.5rem;
}

.card {
    background-color: #171717;
    border: 2px solid #2B2927;
    border-radius: 2rem;
    padding: 3rem 2.5rem;
    transition: 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    border-color: #CEC0B3;
    box-shadow: 0 0 25px #CEC0B3;
}

.card > i {
    font-size: 5rem;
    color: #CEC0B3;
}

.card h3 {
    font-size: 2.2rem;
    margin: 1rem 0 1.2rem;
}

.card li {
    list-style: none;
    font-size: 1.6rem;
    color: #B8ADA2;
    padding: 0.4rem 0;
}

.card p {
    font-size: 1.5rem;
    line-height: 1.6;
    color: #B8ADA2;
    margin-bottom: 1rem;
}

.card .stack {
    color: #CEC0B3;
    font-size: 1.3rem;
    font-weight: 500;
}

.small-btn {
    margin-top: 1rem;
    padding: 0.7rem 2.2rem;
    font-size: 1.4rem;
}

.edu {
    max-width: 45rem;
    margin: 4rem auto 0;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2.5rem 3rem;
    background-color: #171717;
    border: 2px solid #2B2927;
    border-radius: 2rem;
}

.edu > i {
    font-size: 5rem;
    color: #CEC0B3;
}

.edu h3 {
    font-size: 2rem;
    margin-bottom: 0.4rem;
}

.edu p {
    font-size: 1.6rem;
    color: #B8ADA2;
}

.edu .when {
    font-size: 1.4rem;
    color: #CEC0B3;
    margin-top: 0.3rem;
}

form {
    max-width: 70rem;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
}

input,
textarea {
    width: 100%;
    padding: 1.5rem 2rem;
    font-size: 1.6rem;
    color: white;
    background-color: #171717;
    border: 2px solid #2B2927;
    border-radius: 1.2rem;
    resize: none;
}

input::placeholder,
textarea::placeholder {
    color: #7D756D;
}

input:focus,
textarea:focus {
    border-color: #CEC0B3;
    box-shadow: 0 0 15px rgba(206, 192, 179, 0.35);
}

/* required-field error */
input.invalid,
textarea.invalid {
    border-color: #D98C8C;
}

form .btn {
    justify-self: start;
}

.note {
    font-size: 1.4rem;
    color: #CEC0B3;
    min-height: 2rem;
}

footer {
    text-align: center;
    padding: 3rem 9%;
    font-size: 1.4rem;
    color: #7D756D;
    border-top: 1px solid #2B2927;
}

footer b {
    font-weight: 400;
}

/* --- SUBTLE MOTION (minimal) --- */
header {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

header.scrolled {
    background-color: rgba(13, 13, 13, 0.95);
    box-shadow: 0 1px 0 rgba(206, 192, 179, 0.25);
}

nav a {
    border-bottom-color: transparent;
}

/* hero fades in on load */
@keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

.home-content > *,
.home-img {
    animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-content > *:nth-child(2) { animation-delay: 0.08s; }
.home-content > *:nth-child(3) { animation-delay: 0.16s; }
.home-content > *:nth-child(4) { animation-delay: 0.24s; }
.home-content > *:nth-child(5) { animation-delay: 0.32s; }
.home-content > *:nth-child(6) { animation-delay: 0.4s; }
.home-img { animation-delay: 0.2s; }

/* sections fade up as they scroll into view (only when JS is on) */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.js .reveal.in {
    opacity: 1;
    transform: none;
}

/* softer glow and hover so it stays low-key */
.home-img img {
    box-shadow: 0 0 18px rgba(206, 192, 179, 0.45);
}

.card {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.card:hover {
    box-shadow: 0 10px 30px rgba(206, 192, 179, 0.22);
}

.btn:hover {
    box-shadow: 0 0 18px rgba(206, 192, 179, 0.5);
}

input,
textarea {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* --- RESPONSIVE LAYOUT (Ponsel & Tablet) --- */
@media (max-width: 995px) {
    header {
        padding: 2rem 5%;
    }

    nav a {
        font-size: 1.6rem;
        margin-left: 2rem;
    }

    .home {
        flex-direction: column-reverse;
        justify-content: center;
        text-align: center;
        padding-top: 12rem;
        gap: 3rem;
    }

    .home-img img {
        width: 60vw;
        max-width: 280px;
    }

    .home-content h1 {
        font-size: 4rem;
    }

    .home-content h3 {
        font-size: 2.4rem;
    }

    .heading {
        font-size: 3.4rem;
    }
}

@media (max-width: 640px) {
    .logo {
        font-size: 2.2rem;
    }

    nav a {
        font-size: 1.3rem;
        margin-left: 1.1rem;
    }

    .home-content h1 {
        font-size: 3.2rem;
    }

    .typing-text {
        font-size: 2.4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; animation: none !important; }
    .js .reveal { opacity: 1; transform: none; }
}

/* hidden spam trap field and footer credit */
.hp {
    display: none;
}

.credit {
    margin-top: 0.8rem;
    font-size: 1.2rem;
}

.credit a {
    color: #B8ADA2;
    border-bottom: 1px solid #2B2927;
}

.credit a:hover {
    color: #CEC0B3;
}
