/* --- 1. RESET & VARIABLES --- */
:root {
    --bg-dark: #0f0f11;       /* Hitam Pekat */
    --card-dark: #18181b;     /* Abu Gelap */
    --text-white: #ffffff;
    --text-grey: #a1a1aa;
    --accent: #d4ff00;        /* Neon Lime */
    --border: #27272a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Space Grotesk', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    min-height: 100vh;
    padding-bottom: 3rem;
}

/* --- 2. NAVBAR --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    border-bottom: 1px solid var(--border);
    background: rgba(15, 15, 17, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo { font-weight: 700; font-size: 1.2rem; letter-spacing: 1px; }
.dot { color: var(--accent); }
.semester-tag {
    font-size: 0.8rem; padding: 5px 12px;
    border: 1px solid var(--border); border-radius: 4px; color: var(--text-grey);
}

/* --- 3. HERO --- */
.hero { padding: 4rem 5%; max-width: 800px; }
.hero h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 1rem; }
.highlight { color: var(--text-grey); }
.hero p { color: var(--text-grey); font-size: 1.1rem; }

/* --- 4. BENTO GRID LAYOUT --- */
.grid-container {
    display: grid;
    /* Grid Responsif */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 0 5%;
    /* Align items ke start supaya kartu yang pendek tidak ikut memanjang */
    align-items: start; 
}

/* --- STYLING KARTU (MODIFIED) --- */
.bento-card {
    background-color: var(--card-dark);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    /* Tinggi tidak lagi di-set fix, biar bisa melar */
    min-height: 200px; 
}

.bento-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

/* Header Kartu */
.card-top .week {
    font-size: 0.75rem; text-transform: uppercase;
    color: var(--text-grey); margin-bottom: 0.5rem; display: block;
}

.card-top h3 {
    font-size: 1.4rem; font-weight: 600; line-height: 1.3; margin-bottom: 1rem;
    color: var(--text-white);
}

/* Tombol Baca */
.card-action {
    display: flex; justify-content: flex-end; margin-top: auto;
}

.read-btn {
    background: transparent; border: 1px solid var(--border); color: var(--text-white);
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: 0.3s;
}

/* --- KONTEN YANG DISEMBUNYIKAN (EXPANDABLE) --- */
.card-content {
    /* Sembunyikan secara default */
    display: none; 
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    animation: slideDown 0.4s ease forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Isi Materi Formatting */
.card-content p { margin-bottom: 1rem; color: #d4d4d8; line-height: 1.6; }
.card-content ul, .card-content ol { padding-left: 1.2rem; margin-bottom: 1rem; color: #d4d4d8; }
.card-content li { margin-bottom: 0.5rem; }

.note-box {
    background: rgba(212, 255, 0, 0.05);
    border-left: 3px solid var(--accent);
    padding: 1rem; margin: 1rem 0; color: var(--text-white);
    font-size: 0.95rem;
}

/* --- STATE: ACTIVE (SAAT DIKLIK) --- */
.bento-card.active {
    border-color: var(--accent);
    background-color: #202024; /* Sedikit lebih terang */
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 10;
}

.bento-card.active .card-content {
    display: block; /* Munculkan konten */
}

.bento-card.active .read-btn {
    background: var(--accent);
    color: black;
    transform: rotate(45deg); /* Icon berubah jadi silang (X) */
}

/* --- FOOTER --- */
.footer {
    text-align: center; margin-top: 4rem;
    color: white; font-size: 0.9rem;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .hero h1 { font-size: 2.5rem; }
    .grid-container { grid-template-columns: 1fr; }
}
