/* ==========================================
   1. SISTEM TOKEN WARNA & TIPOGRAFI GLOBAL
   ========================================== */
:root {
  --color-slate-navy: #11192c;
  --color-alabaster: #F8FAFC;
  --color-kinetic-cyan: #0284C7;
  --color-terracotta: #D97706;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
  background-color: var(--color-alabaster); 
  color: #334155; 
  font-family: 'Inter', sans-serif; 
  overflow-x: hidden; 
}

h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
p, .job-desc, .acc-content-inner { font-weight: 400; line-height: 1.7; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ==========================================
   2. ARSITEKTUR SPA (Transisi Antar Ruang)
   ========================================== */
.spa-section {
  display: none; /* Sembunyikan semua ruangan */
  animation: fadeInSection 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
.spa-section.active-section {
  display: block; /* Munculkan hanya yang aktif */
}
@keyframes fadeInSection {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   3. FASAD: NAVIGASI & HERO BANNER
   ========================================== */
.nav-social-bar { 
  position: absolute; top: 0; left: 50%; transform: translateX(-50%); 
  width: 100%; max-width: 1200px; display: flex; justify-content: space-between; 
  align-items: flex-start; padding: 24px 30px; z-index: 10; 
}
.nav-menu { display: flex; gap: 24px; }
.nav-link { 
  text-decoration: none; color: #cbd5e1; font-weight: 600; font-size: 0.95rem; 
  padding: 6px 0; transition: all 0.3s ease; position: relative; cursor: pointer;
}
.nav-link:hover, .nav-link.active { color: #ffffff; }
.nav-link.active::after { 
  content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; 
  background: #00E5FF; border-radius: 2px; box-shadow: 0 0 8px rgba(0, 229, 255, 0.5); 
}

.social-icons { display: flex; gap: 12px; }
.social-icons a { 
  display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; 
  background: #ffffff; border-radius: 50%; color: var(--color-slate-navy); font-size: 1.15rem; 
  transition: all 0.3s ease; text-decoration: none; box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.social-icons a:hover { 
  transform: translateY(-4px); background: var(--color-slate-navy); color: #ffffff; 
}

.hero-section {
  position: relative; width: 100%; 
  min-height: 340px; /* Dipangkas lebih drastis untuk menaikkan batas bawah */
  background-image: linear-gradient(to top right, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.5) 40%, transparent 65%), url('https://res.cloudinary.com/qcjlrnpj/image/upload/v1791663941/Header_Cover.jpg'); 
  background-size: cover; background-position: right center; 
  display: flex; 
  align-items: flex-start; 
  padding-top: 110px; 
  padding-bottom: 15px; /* Bantalan bawah ditipiskan agar tidak ada sisa ruang */
  margin-bottom: 40px;
  transition: min-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); 
}

.hero-section.compact-hero { min-height: 280px; } /* Tetap biarkan baris ini */

.hero-container { max-width: 1200px; margin: 0 auto; width: 100%; padding: 0 30px; } 
/* (Tulisan padding-top: 100px sudah dihapus dari sini karena sudah diatur di hero-section) */
.hero-content { max-width: 550px; display: flex; flex-direction: column; gap: 12px; }
.hero-eyebrow { font-size: 0.8rem; font-weight: 700; color: #00E5FF; text-transform: uppercase; letter-spacing: 1px; }
.hero-title { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700; color: #FFFFFF; line-height: 1.1; margin: 0; }
.hero-description { font-size: 1rem; color: #e2e8f0; font-weight: 400; border-left: 2px solid #00E5FF; padding-left: 12px; }
.hero-story-btn {
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.2); 
  color: #00E5FF; padding: 12px 20px; border-radius: 50px; font-weight: 600; font-size: 0.9rem; 
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: all 0.3s;
  backdrop-filter: blur(8px); margin-top: 10px;
}
.hero-story-btn:hover { background: #00E5FF; color: var(--color-slate-navy); transform: translateY(-2px); }

/* ==========================================
   4. RUANG 1: HALAMAN UTAMA (CV & RIWAYAT)
   ========================================== */
.unified-dossier-card { background: #ffffff; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.05); margin-bottom: 64px; }
.dossier-viewfinder { background-color: var(--color-slate-navy); padding: 30px 20px 10px 20px; }
.slider-container { display: flex; align-items: center; justify-content: center; gap: 15px; }
.slider-wrapper { display: flex; gap: 12px; overflow: hidden; justify-content: center; align-items: center; min-height: 150px; flex: 1; }
.slide-item { width: 240px; height: 140px; object-fit: cover; border-radius: 6px; cursor: pointer; transition: 0.3s; border: 1px solid rgba(255,255,255,0.1); }
.slide-item:hover { transform: scale(1.05); border-color: #ffffff; }
.nav-arrow { font-size: 24px; cursor: pointer; color: #64748b; transition: color 0.2s; }
.nav-arrow:hover { color: #ffffff; }

.dossier-audio-console { display: flex; align-items: center; gap: 15px; background: var(--color-alabaster); padding: 18px 30px; border-bottom: 1px solid rgba(15,23,42,0.08); }
.dossier-audio-console i { font-size: 22px; cursor: pointer; color: #334155; transition: 0.2s; }
.dossier-audio-console i:hover { color: var(--color-kinetic-cyan); transform: scale(1.1); }
#seekSlider { flex: 1; cursor: pointer; accent-color: #B45309; }
.audio-time { font-size: 13px; color: #64748b; font-weight: 600; min-width: 85px; text-align: right; }
.dossier-narrative { padding: 30px 40px; font-size: 1.05rem; color: #475569; text-align: justify; }

.bento-grid-layout { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 50px; }
.bento-card { background: #ffffff; border: 1px solid rgba(15,23,42,0.08); border-radius: 16px; padding: 28px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); transition: 0.3s; display: flex; flex-direction: column; }
.bento-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.06); }
.bento-title { font-size: 1.1rem; color: var(--color-slate-navy); margin-bottom: 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #f1f5f9; padding-bottom: 12px; }
.bento-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.bento-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: #94a3b8; font-weight: 700; display: block; }
.bento-value { font-size: 0.95rem; color: var(--color-slate-navy); font-weight: 700; }

.edu-timeline { display: flex; flex-direction: column; gap: 20px; position: relative; padding-left: 12px; margin-bottom: 20px;}
.edu-timeline::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: #e2e8f0; }
.timeline-item { position: relative; padding-left: 20px; }
.timeline-dot { position: absolute; left: -16px; top: 6px; width: 12px; height: 12px; background: var(--color-slate-navy); border: 2px solid #ffffff; border-radius: 50%; box-shadow: 0 0 0 2px #e2e8f0; }
.timeline-content strong { font-size: 0.95rem; color: var(--color-slate-navy); display: block; }
.timeline-content span { font-size: 0.85rem; color: #94a3b8; font-weight: 600; }

.riwayat-pekerjaan-section { margin-bottom: 50px; }
.section-title-line { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 12px; margin-bottom: 24px; position: relative; }
.section-title-line::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 1.5px; background: linear-gradient(to right, #0F172A 0%, rgba(15, 23, 42, 0.05) 100%); }
.job-item { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 24px; margin-bottom: 20px; transition: 0.3s; }
.job-item:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.06); }
.job-title-link { display: inline-block; font-weight: 700; font-size: 1.15rem; margin-bottom: 8px; color: var(--color-slate-navy); text-decoration: none; }
.job-desc { font-size: 0.95rem; color: #475569; margin-bottom: 16px; text-align: justify; }
.job-highlights { font-size: 0.8rem; color: #334155; background: #f8fafc; padding: 10px 16px; border-radius: 8px; border-left: 3px solid var(--color-slate-navy); font-weight: 600; }

/* ==========================================
   5. RUANG 2 & 4: KARTU PORTOFOLIO & E-PUSTAKA
   ========================================== */
.filter-wrapper { margin-bottom: 40px; }
.primary-tabs { display: flex; gap: 20px; border-bottom: 1px solid #E2E8F0; padding-bottom: 15px; margin-bottom: 20px; overflow-x: auto; }
.tab-btn { background: none; border: none; font-size: 1.05rem; font-weight: 600; color: #64748B; cursor: pointer; padding: 8px 4px; position: relative; transition: 0.3s; white-space: nowrap; }
.tab-btn.active { color: var(--color-kinetic-cyan); }
.tab-btn.active::after { content: ''; position: absolute; bottom: -16px; left: 0; width: 100%; height: 3px; background: var(--color-kinetic-cyan); border-radius: 3px 3px 0 0; }
.secondary-filters { display: flex; gap: 12px; overflow-x: auto; padding: 5px 0; }
.pill-btn { background: #ffffff; border: 1px solid #e2e8f0; padding: 8px 20px; border-radius: 50px; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: 0.3s; }
.pill-btn.active { background: var(--color-slate-navy); color: #ffffff; border-color: var(--color-slate-navy); }
.hide-item { display: none !important; }

/* Grid Portofolio & Rak Buku */
.premium-grid, .bookshelf-grid { display: grid; gap: 30px; margin-bottom: 60px; }
.premium-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.bookshelf-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.premium-card, .epustaka-card { 
  background: #ffffff; border-radius: 16px; border: 1px solid #e2e8f0; 
  overflow: hidden; display: flex; flex-direction: column; transition: 0.4s; 
}
.premium-card:hover, .epustaka-card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px -10px rgba(15,23,42,0.1); }

.card-thumb { position: relative; height: 200px; overflow: hidden; background: #e2e8f0; }
.card-img-wrapper { position: relative; height: 320px; overflow: hidden; }
.card-thumb img, .card-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.premium-card:hover img, .epustaka-card:hover img { transform: scale(1.05); }

.card-badge, .category-badge { 
  position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,0.9); 
  font-size: 0.7rem; font-weight: 700; padding: 6px 14px; border-radius: 50px; 
  text-transform: uppercase; z-index: 2; 
}
.category-badge { right: 12px; left: auto; background: var(--color-slate-navy); color: #fff; }

.card-content { padding: 25px; flex: 1; display: flex; flex-direction: column; }
.card-title, .book-title { font-size: 1.15rem; color: var(--color-slate-navy); margin-bottom: 12px; }
.card-desc { font-size: 0.9rem; color: #475569; flex: 1; margin-bottom: 20px; }

.card-action, .btn-action { 
  font-size: 0.85rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: 0.3s; border: none; 
}
.card-action { color: var(--color-kinetic-cyan); }
.card-action:hover { color: var(--color-slate-navy); }
.action-buttons { display: flex; gap: 8px; margin-bottom: 10px; }
.btn-action { flex: 1; text-align: center; padding: 10px; border-radius: 8px; }
.btn-read { background: var(--color-slate-navy); color: #fff; }
.btn-podcast { background: #f1f5f9; color: var(--color-slate-navy); border: 1px solid #cbd5e1; }
.btn-read:hover { background: var(--color-kinetic-cyan); }

/* Header Rak E-pustaka */
.shelf-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #e2e8f0; padding-bottom: 10px; margin-bottom: 25px; }
.shelf-title { font-size: 1.25rem; color: var(--color-slate-navy); }
.see-more-btn { font-size: 0.85rem; font-weight: 700; color: var(--color-kinetic-cyan); text-decoration: none; }

/* ==========================================
   6. FLOATING AI WIDGET (OMNIPRESENT)
   ========================================== */
.floating-ai {
  position: fixed; bottom: 25px; right: 25px; z-index: 99990;
  background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50px; 
  padding: 8px 8px 8px 20px; display: flex; align-items: center; 
  width: 340px; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.floating-ai:hover { background: rgba(15, 23, 42, 0.95); transform: translateY(-3px); }

/* Mode Fullscreen saat diklik */
.floating-ai.fullscreen-mode {
  bottom: 50%; right: 50%; transform: translate(50%, 50%);
  width: 90vw; max-width: 800px; height: 85vh; border-radius: 16px;
  background: #ffffff; padding: 0; flex-direction: column; border: none;
}
.floating-ai.fullscreen-mode:hover { transform: translate(50%, 50%); }

/* Sembunyikan elemen chat saat mode kapsul */
.floating-ai:not(.fullscreen-mode) .ai-header,
.floating-ai:not(.fullscreen-mode) .ai-chat-area,
.floating-ai:not(.fullscreen-mode) .close-ai-btn { display: none; }

/* Input Bar AI */
.floating-ai:not(.fullscreen-mode) .ai-input-wrapper { display: flex; width: 100%; align-items: center; gap: 10px; cursor: pointer; }
.floating-ai:not(.fullscreen-mode) .ai-input { width: 100%; height: 36px; background: transparent; border: none; color: #fff; font-size: 0.9rem; resize: none; overflow: hidden; cursor: pointer; }
.floating-ai:not(.fullscreen-mode) .ai-input::placeholder { color: #cbd5e1; }
.floating-ai:not(.fullscreen-mode) .ai-input:focus { outline: none; }

/* Avatar Robot (Tombol Kirim) */
.floating-ai:not(.fullscreen-mode) .send-ai-btn {
  background-image: url('https://res.cloudinary.com/qcjlrnpj/image/upload/v1791663721/Robot_AI.png'); 
  background-size: cover; background-position: center;
  width: 42px; height: 42px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.3); background-color: transparent;
  flex-shrink: 0; cursor: pointer; transition: 0.3s;
}
.floating-ai:not(.fullscreen-mode) .send-ai-btn i { display: none; }
.floating-ai:not(.fullscreen-mode) .send-ai-btn:hover { border-color: #00E5FF; box-shadow: 0 0 15px rgba(0,229,255,0.5); }

/* Styling Dalam Mode Fullscreen (Sama seperti web lama) */
.fullscreen-mode .close-ai-btn { display: block; position: absolute; top: 12px; right: 20px; font-size: 32px; color: #94a3b8; background: none; border: none; cursor: pointer; }
.fullscreen-mode .ai-header { display: flex; align-items: center; padding: 16px 24px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; border-radius: 16px 16px 0 0; }
.fullscreen-mode .ai-mascot { width: 45px; height: 45px; border-radius: 50%; margin-right: 12px; }
.fullscreen-mode .ai-chat-area { display: flex; flex-direction: column; gap: 15px; padding: 24px; flex: 1; background: #f8fafc; overflow-y: auto; }
.fullscreen-mode .ai-input-wrapper { 
  display: flex; 
  gap: 15px; 
  padding: 20px 24px; 
  background: #ffffff; 
  border-top: 1px solid #e2e8f0; 
  border-radius: 0 0 16px 16px; 
  align-items: center; 
  width: 100% !important; /* Memaksa kotak membentang penuh */
}

.fullscreen-mode .ai-input { 
  flex: 1 !important; 
  width: 100% !important; 
  height: 70px; 
  padding: 16px 20px; 
  border: 1px solid #cbd5e1; 
  border-radius: 12px; 
  resize: none; 
  font-size: 1rem; 
  font-family: inherit; 
  line-height: 1.5; 
}
.fullscreen-mode .send-ai-btn { background: #f1f5f9; width: 50px; height: 50px; border-radius: 8px; border: none; cursor: pointer; font-size: 18px; color: var(--color-slate-navy); }
.fullscreen-mode .send-ai-btn i { display: block; }
.fullscreen-mode .send-ai-btn:hover { background: var(--color-slate-navy); color: #fff; }

.chat-message { max-width: 85%; padding: 14px 18px; border-radius: 12px; font-size: 0.95rem; }
.ai-msg { background: #ffffff; color: #334155; align-self: flex-start; border-bottom-left-radius: 4px; border: 1px solid #e2e8f0; }
.user-msg { background: var(--color-slate-navy); color: #ffffff; align-self: flex-end; border-bottom-right-radius: 4px; }
.ai-backdrop { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,23,42,0.8); backdrop-filter: blur(4px); z-index: 99980; }
.ai-backdrop.active { display: block; }

/* ==========================================
   7. MODAL & LIGHTBOX GLOBAL
   ========================================== */
.btn-outline-modal { padding: 12px 16px; background: transparent; color: var(--color-kinetic-cyan); border: 1.5px solid var(--color-kinetic-cyan); border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: 0.3s; margin-top: 10px; font-weight: 600;}
.btn-outline-modal:hover { background: var(--color-kinetic-cyan); color: #fff; }

.competency-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,23,42,0.7); z-index: 99990; opacity: 0; visibility: hidden; transition: 0.3s; }
.competency-overlay.active { opacity: 1; visibility: visible; }
.competency-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -45%); width: 95vw; max-width: 1300px; max-height: 95vh; background: #fff; border-radius: 16px; z-index: 99999; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transition: 0.3s; }
.competency-modal.active { transform: translate(-50%, -50%); opacity: 1; visibility: visible; }
.modal-header { padding: 24px 30px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(15,23,42,0.08); }
.close-modal-btn { background: none; border: none; font-size: 28px; cursor: pointer; color: #94a3b8; }
.modal-tabs { display: flex; gap: 20px; padding: 0 30px; border-bottom: 2px solid rgba(15,23,42,0.05); overflow-x: auto; }
.modal-tabs .tab-btn { margin-bottom: -2px; }
.modal-body { padding: 30px; overflow-y: auto; flex: 1; /* Memaksa isi kotak mengikuti tinggi layar yang baru */}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeInTab 0.3s ease; }

.modern-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.9rem; }
.modern-table th { background: var(--color-alabaster); padding: 14px 16px; border-bottom: 2px solid rgba(15,23,42,0.08); }
.modern-table td { padding: 16px; border-bottom: 1px solid rgba(15,23,42,0.04); }

.accordion-item { border: 1px solid rgba(15,23,42,0.08); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.accordion-header { width: 100%; text-align: left; padding: 18px 24px; background: #fff; border: none; display: flex; justify-content: space-between; cursor: pointer; font-weight: 700; color: var(--color-slate-navy); }
.accordion-header.active { background: var(--color-alabaster); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; background: #fff; }
.acc-content-inner { padding: 24px; }

.lightbox { display: none; position: fixed; z-index: 99999; left: 0; top: 0; width: 100%; height: 100%; background: rgba(15,23,42,0.9); justify-content: center; align-items: center; }
.lightbox.active { display: flex; }
.close-lightbox { position: absolute; top: 20px; right: 35px; color: #fff; font-size: 40px; cursor: pointer; z-index: 100000; }
.lightbox-media { max-width: 85vw; max-height: 80vh; border-radius: 12px; object-fit: contain; box-shadow: 0 15px 40px rgba(0,0,0,0.4); }

.pdf-viewer { width: 90vw; max-width: 1000px; height: 85vh; border-radius: 12px; border: none; }

/* ==========================================
   8. RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================== */
@media (max-width: 768px) {
  .hero-section { min-height: auto; align-items: flex-start; padding-bottom: 30px; }
  .hero-container { padding-top: 40px; } /* Jarak diturunkan dari 150px agar di HP juga proporsional */
  .nav-social-bar { flex-direction: column; align-items: center; padding: 15px; }
  .nav-menu { flex-wrap: wrap; justify-content: center; gap: 10px; }
  
  /* Memaksa Bento Grid tetap 2 kolom di HP dengan jarak rapat */
  .bento-grid-layout { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; 
  }
  
  /* Memperkecil bantalan (padding) dalam kartu */
  .bento-card { 
    padding: 16px; 
  }
  
  /* Memperkecil teks judul kartu */
  .bento-title { 
    font-size: 0.85rem; 
    margin-bottom: 12px; 
  }
  .bento-title i { font-size: 0.9rem; }
  
  /* Memperkecil teks Identitas */
  .bento-label { font-size: 0.6rem; }
  .bento-value { font-size: 0.75rem; }
  .bento-list { gap: 10px; }
  
  /* Memperkecil teks Pendidikan & jarak linimasa */
  .edu-timeline { gap: 12px; margin-bottom: 12px; }
  .timeline-content strong { font-size: 0.75rem; }
  .timeline-content span { font-size: 0.65rem; }
  .timeline-dot { width: 10px; height: 10px; left: -15px; top: 4px; }
  
  /* Memperkecil tombol Matriks Kompetensi */
  .btn-outline-modal { 
    font-size: 0.7rem; 
    padding: 8px 10px; 
  }
  .slider-wrapper { overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; }
  .slide-item { width: 260px; height: 160px; flex-shrink: 0; }
  .nav-arrow { display: none; }
  
  .floating-ai { width: 60px; height: 60px; padding: 0; justify-content: center; border-radius: 50%; bottom: 20px; right: 20px; }
  .floating-ai:not(.fullscreen-mode) .ai-input-wrapper { display: none; }
  .floating-ai:not(.fullscreen-mode) .send-ai-btn { width: 100%; height: 100%; border: none; }
}
