/* ===== Pengaturan dasar ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    line-height: 1.6;
}

a {
    text-decoration: none;
}

/* Canvas particle hanya di dalam area hero */
#particleCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px max(20px, calc((100% - 1000px) / 2));
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
    z-index: 10;
}

.logo {
    color: #5ea8d8;
    font-weight: bold;
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-links a {
    color: #e2e8f0;
}

.nav-links a:hover {
    color: #5ea8d8;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 90px 20px 40px;
}

.hero-wrap {
    position: relative;   /* supaya tampil di atas canvas */
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-photo img {
    width: 260px;
    height: 260px;
    object-fit: cover;      /* foto dipotong rapi, tidak gepeng */
    border-radius: 50%;
    border: 4px solid #5ea8d8;
    display: block;
}

.hero-small {
    color: #94a3b8;
}

.hero h1 {
    font-size: 2.8rem;
    margin: 10px 0;
}

.hero h2 {
    font-size: 1.6rem;
    font-weight: normal;
    margin-bottom: 25px;
}

/* Efek kursor berkedip (dari modul) */
.typing-text {
    color: #5ea8d8;
    border-right: 3px solid #5ea8d8;
    white-space: nowrap;
    animation: blink 0.75s step-end infinite;
}

@keyframes blink {
    50% { border-color: transparent; }
}

.btn {
    display: inline-block;
    background: #5ea8d8;
    color: #0f172a;
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: bold;
}

.btn:hover {
    background: #8cc3e8;
}

/* ===== Section umum ===== */
.section {
    padding: 80px 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #5ea8d8;
}

/* ===== About ===== */
.about-box, .contact-box {
    background: #1e293b;
    padding: 25px;
    border-radius: 8px;
}

.about-box p {
    margin-bottom: 10px;
}

/* ===== Skills ===== */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.skill-item {
    background: #1e293b;
    padding: 10px 25px;
    border-radius: 5px;
    border: 1px solid #334155;
}

/* ===== Projects ===== */
.project-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.project-card {
    background: #1e293b;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.project-card:hover {
    border-color: #5ea8d8;
}

.project-card h3 {
    margin-bottom: 8px;
}

/* ===== Contact ===== */
.email {
    color: #5ea8d8;
    font-weight: bold;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 20px;
    background: #0f172a;
    border-top: 1px solid #1e293b;
    color: #94a3b8;
}

/* ===== Scroll Reveal (dari modul) ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Tombol scroll ke atas ===== */
#topButton {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #5ea8d8;
    color: #0f172a;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    display: none; /* disembunyikan dulu, muncul saat di-scroll */
}

/* ===== Responsive sederhana ===== */
@media (max-width: 700px) {
    .navbar {
        padding: 12px 20px;
    }
    .nav-links {
        gap: 12px;
        font-size: 0.9rem;
    }
    .hero-wrap {
        flex-direction: column-reverse;  /* foto di atas, teks di bawah */
        text-align: center;
    }
    .hero-photo img {
        width: 180px;
        height: 180px;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero h2 {
        font-size: 1.2rem;
    }
    .section {
        padding: 60px 20px;
    }
    .project-list {
        grid-template-columns: 1fr;
    }
}
