* {
    box-sizing: border-box;
}

/* Mereset margin dan padding bawaan browser */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    /* overflow: hidden; /* Menghilangkan scrollbar */
    overflow-x: hidden; /* Mencegah geser ke samping */
    overflow-y: auto;   /* Mengaktifkan scroll ke bawah */
    background: radial-gradient(circle, #1a2a6c, #112 80%); /* Efek gradasi biru gelap */
}

/* Memastikan wadah canvas mengambil seluruh layar */
#canvas-container {
    width: 100vw;
    height: 100vh;
    display: block;
    position: fixed;
    top: 0;
    left: 0;
}

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

/* Container utama supaya semuanya di tengah layar */
.portfolio-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 50px;
    /* SOLUSI AGAR BISA DIKLIK */
    position: relative; 
    z-index: 10;        /* Nilainya harus lebih besar dari canvas-container */
}

/* Judul dengan font futuristik (Orbitron) */
.portfolio-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-style: italic;
    letter-spacing: 10px;
    color: #79bff2;
    margin-bottom: 50px;
    text-align: center;
}

/* Layout Grid agar sejajar horizontal */
.portfolio-grid {
    display: flex;
    flex-direction: row; /* Memastikan gambar berjejer ke samping */
    gap: 60px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.portfolio-item {
    text-align: center;
    text-decoration: none;
    width: 300px;
}

.portfolio-item a {
    text-decoration: none;
}

/* Frame Gambar */
.img-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    background: #000; /* Warna dasar jika gambar gagal load */
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: all 0.4s ease;
}

/* EFEK HOVER: Bayangan Terang (Glow) */
.portfolio-item:hover .img-wrapper {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.6), 0 0 60px rgba(0, 100, 255, 0.4);
}

.portfolio-item:hover img {
    opacity: 1;
    filter: brightness(1.2);
}

/* Link Teks di bawah gambar */
.project-link {
    display: block;
    margin-top: 15px;
    font-family: 'Orbitron', sans-serif;
    font-style: italic;
    color: #9ab9eb;
    letter-spacing: 2px;
    font-size: 0.9rem;
    transition: 0.3s;
}

.portfolio-item:hover .project-link {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Navigasi Atas (Fixed di pojok) */
.top-nav {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 50px;
    z-index: 100; /* Supaya selalu di atas background plexus */
}

.nav-link {
    font-family: 'Orbitron', sans-serif; /* Menggunakan font futuristik */
    font-style: italic;
    font-size: 1rem;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 3px;
    opacity: 0.6;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.nav-link:hover {
    opacity: 1;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

/* --- RESPONSIVE DESIGN FOR TABLET / SMALL LAPTOP --- */
@media (max-width: 768px) {
    .top-nav {
        padding: 0 20px;
        top: 15px;
    }
    .nav-link {
        font-size: 1rem;
        letter-spacing: 1px;
    }
    .portfolio-container {
        margin-top: 80px;
        padding: 0 15px;
    }
    .portfolio-title {
        font-size: 1.5rem;
        letter-spacing: 4px;
        margin-bottom: 30px;
    }
    .portfolio-grid {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    .portfolio-item {
        width: 100%;
        max-width: 280px;
    }
}

/* --- RESPONSIVE DESIGN FOR MOBILE --- */
@media (max-width: 600px) {
    .top-nav {
        padding: 0 20px;
        top: 20px;
    }
    .nav-link {
        font-size: 0.7rem; /* Sekarang font ini akan benar-benar berfungsi di HP */
        letter-spacing: 1px;
    }
}