:root {
    /* Mode Gelap (Default) */
    --bg-main: #0f172a; 
    --bg-darker: #020617; 
    --emerald-primary: #10b981; 
    --emerald-glow: rgba(16, 185, 129, 0.2);
    --text-main: #f8fafc; 
    --text-muted: #94a3b8; 
    --glass-bg: rgba(30, 41, 59, 0.5);
    --glass-border: rgba(255, 255, 255, 0.05);
    --shadow-color: rgba(0,0,0,0.5);
}

body.light-theme {
    /* Mode Terang */
    --bg-main: #f8fafc; 
    --bg-darker: #e2e8f0; 
    --emerald-primary: #059669; 
    --emerald-glow: rgba(5, 150, 105, 0.15);
    --text-main: #0f172a; 
    --text-muted: #475569; 
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0,0,0,0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, var(--emerald-glow) 0px, transparent 50%),
        radial-gradient(at 100% 100%, var(--glass-bg) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Layout & Sidebar */
.layout-wrapper { display: grid; grid-template-columns: 350px 1fr; max-width: 1200px; margin: 0 auto; min-height: 100vh; }
@media (max-width: 992px) { .layout-wrapper { grid-template-columns: 1fr; } }

.sidebar { padding: 4rem 2rem; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--glass-border); transition: border-color 0.4s ease; }
@media (max-width: 992px) { .sidebar { position: relative; height: auto; border-right: none; border-bottom: 1px solid var(--glass-border); } }

.profile-img-container { width: 120px; height: 120px; border-radius: 20px; margin-bottom: 2rem; box-shadow: 0 10px 25px var(--emerald-glow); overflow: hidden; border: 2px solid rgba(16, 185, 129, 0.3); background-color: var(--glass-bg); }
.profile-img-container img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.profile-img-container img:hover { transform: scale(1.1); }

.sidebar h1 { font-size: 2.2rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 0.5rem; }
.sidebar h2 { font-size: 1.1rem; color: var(--emerald-primary); font-weight: 600; margin-bottom: 1.5rem; }
.sidebar p { color: var(--text-muted); margin-bottom: 2rem; font-size: 0.95rem; }

.info-list { list-style: none; margin-top: auto; }
.info-list li { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.8rem; display: flex; justify-content: space-between; border-bottom: 1px solid var(--glass-border); padding-bottom: 0.5rem; }

/* Konten Kanan */
.content { padding: 4rem 3rem; }
@media (max-width: 768px) { .content { padding: 2rem 1.5rem; } }
section { margin-bottom: 4rem; }
.section-title { font-size: 1.5rem; font-weight: 600; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ''; display: block; width: 30px; height: 2px; background-color: var(--emerald-primary); }

/* Glassmorphism Cards */
.glass-card { background: var(--glass-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: 16px; padding: 2rem; transition: all 0.4s ease; }
.glass-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px var(--shadow-color); border-color: rgba(16, 185, 129, 0.4); }

/* Tags & Hobi */
.tags-container { display: flex; flex-wrap: wrap; gap: 10px; }
.tech-tag { background: rgba(16, 185, 129, 0.1); color: var(--emerald-primary); padding: 6px 14px; border-radius: 8px; font-family: 'Fira Code', monospace; font-size: 0.85rem; border: 1px solid rgba(16, 185, 129, 0.2); }
.hobby-tag { background: transparent; color: var(--text-main); padding: 6px 14px; border-radius: 20px; font-size: 0.9rem; border: 1px solid var(--emerald-primary); transition: all 0.3s ease; }
.hobby-tag:hover { background: var(--emerald-primary); color: #fff; }

/* Project Grid */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.project-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--text-main); }
.project-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.5rem; }

/* Accordion Akademik */
.accordion-item { border-bottom: 1px solid var(--glass-border); }
.accordion-btn { width: 100%; background: none; border: none; color: var(--text-main); padding: 1.2rem 0; text-align: left; font-size: 1.05rem; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-family: 'Inter', sans-serif; transition: color 0.3s ease; }
.accordion-btn:hover, .accordion-btn.active { color: var(--emerald-primary); }
.accordion-icon { font-family: 'Fira Code', monospace; color: var(--emerald-primary); transition: transform 0.3s ease; }
.accordion-btn.active .accordion-icon { transform: rotate(45deg); }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; }
.accordion-content ul { list-style: none; padding: 0 0 1.5rem 0; }
.accordion-content li { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0.5rem; padding-left: 1.5rem; position: relative; }
.accordion-content li::before { content: '▹'; position: absolute; left: 0; color: var(--emerald-primary); }

/* Detail Jadwal */
.mk-details { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 1.5rem; padding-top: 0.5rem; }
.mk-badge { background: rgba(16, 185, 129, 0.1); color: var(--text-main); padding: 6px 12px; border-radius: 8px; font-size: 0.85rem; border: 1px solid rgba(16, 185, 129, 0.2); display: flex; align-items: center; gap: 6px; }
.mk-subtitle { font-size: 0.95rem; color: var(--emerald-primary); margin-bottom: 0.8rem; font-weight: 600; font-family: 'Fira Code', monospace; }

/* Area Tugas (Download & Upload) */
.task-section { background: rgba(0, 0, 0, 0.15); padding: 1.2rem; border-radius: 12px; margin-top: 1.5rem; margin-bottom: 0.5rem; border: 1px dashed var(--glass-border); }
body.light-theme .task-section { background: rgba(0, 0, 0, 0.03); }

.download-box { display: flex; justify-content: space-between; align-items: center; background: var(--bg-darker); padding: 12px 16px; border-radius: 8px; border: 1px solid var(--glass-border); margin-bottom: 1.5rem; }
body.light-theme .download-box { background: #ffffff; border-color: #cbd5e1; }

.file-info { display: flex; align-items: center; gap: 10px; font-family: 'Inter', sans-serif; color: var(--text-main); font-size: 0.95rem; font-weight: 500; }
.btn-download { background: var(--emerald-primary); color: #fff; text-decoration: none; padding: 8px 16px; border-radius: 6px; font-size: 0.9rem; font-weight: 600; transition: background 0.3s ease, transform 0.2s ease; }
.btn-download:hover { background: #059669; transform: translateY(-2px); color: #fff; }

.upload-form { display: flex; flex-direction: column; gap: 10px; background: var(--bg-darker); padding: 12px 16px; border-radius: 8px; border: 1px solid var(--glass-border); }
body.light-theme .upload-form { background: #ffffff; border-color: #cbd5e1; }

.upload-input { width: 100%; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--glass-border); background: transparent; color: var(--text-main); font-family: 'Inter', sans-serif; font-size: 0.9rem; }
body.light-theme .upload-input { border-color: #cbd5e1; }
.upload-input:focus { outline: none; border-color: var(--emerald-primary); }

.upload-input::file-selector-button { background: rgba(16, 185, 129, 0.2); color: var(--emerald-primary); border: none; padding: 6px 12px; border-radius: 4px; margin-right: 10px; cursor: pointer; font-weight: 600; transition: background 0.3s; }
.upload-input::file-selector-button:hover { background: rgba(16, 185, 129, 0.4); }

.btn-upload { background: transparent; color: var(--emerald-primary); border: 1px solid var(--emerald-primary); padding: 10px; border-radius: 6px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; text-align: center; margin-top: 5px; }
.btn-upload:hover { background: var(--emerald-primary); color: #fff; }

/* Timeline Berita */
.timeline { border-left: 2px solid var(--glass-border); padding-left: 1.5rem; margin-left: 0.5rem; }
.timeline-item { position: relative; margin-bottom: 1.5rem; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before { content: ''; position: absolute; left: -1.85rem; top: 0.3rem; width: 12px; height: 12px; border-radius: 50%; background: var(--emerald-primary); box-shadow: 0 0 10px var(--emerald-glow); }
.time-badge { font-family: 'Fira Code', monospace; font-size: 0.8rem; color: var(--emerald-primary); margin-bottom: 0.3rem; display: block; }
.news-link { color: var(--text-main); text-decoration: none; transition: color 0.3s ease; font-weight: 500; font-size: 0.95rem; }
.news-link:hover { color: var(--emerald-primary); text-decoration: underline; }

.timeline-img-container { margin-top: 0.8rem; overflow: hidden; border-radius: 12px; max-width: 100%; border: 1px solid var(--glass-border); display: block; }
.timeline-image { width: 100%; height: 180px; object-fit: cover; display: block; transition: transform 0.4s ease; }
.timeline-img-container:hover .timeline-image { transform: scale(1.05); }

/* Tombol Mode Gelap/Terang */
.theme-toggle-btn { position: fixed; bottom: 2rem; right: 2rem; background: var(--glass-bg); border: 1px solid var(--glass-border); backdrop-filter: blur(10px); color: var(--text-main); width: 50px; height: 50px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: 0 4px 15px rgba(0,0,0,0.2); transition: all 0.3s ease; z-index: 1000; }
.theme-toggle-btn:hover { transform: scale(1.1); background: var(--emerald-primary); color: #fff; }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-darker); }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--emerald-primary); }

/* Notifikasi Upload */
.alert {
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}
.alert.success { background: rgba(16, 185, 129, 0.2); color: var(--emerald-primary); border: 1px solid var(--emerald-primary); }
.alert.error { background: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid #ef4444; }

/* Daftar File Uploaded Dinamis */
.uploaded-list {
    margin-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
}
.uploaded-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}
body.light-theme .uploaded-item { background: rgba(0,0,0,0.05); }
.btn-download-small {
    background: transparent;
    color: var(--emerald-primary);
    border: 1px solid var(--emerald-primary);
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}
.btn-download-small:hover { background: var(--emerald-primary); color: #fff; }

/* Tombol Hapus Kecil */
.btn-delete-small {
    background: transparent;
    color: #ef4444; /* Warna merah */
    border: 1px solid #ef4444;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    font-family: 'Inter', sans-serif;
}
.btn-delete-small:hover { 
    background: #ef4444; 
    color: #fff; 
}
.uploaded-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}