/* =============================================
   DIRECTORY.CSS — Halaman Direktori & Profil Dosen
   Tema: Merah × Emas
   ============================================= */

/* =========================================
   HERO DIREKTORI VARIANT
   ========================================= */
/* Hero FULL SCREEN di desktop */
.hero-dir {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* konten di tengah secara vertikal */
.hero-dir .hero-content {
  padding: calc(var(--nav-height) + 60px) 0 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.hero-tagline {
  font-size: 15px;
  color: rgba(255,255,255,.9);
  margin-bottom: 28px;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0,0,0,.2);
}

/* Stats strip inside hero */
.dir-hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  padding: 18px 36px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.dir-stat { text-align: center; }
.dir-stat .stat-number {
  display: block;
  font-size: 1.9rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 6px rgba(0,0,0,.2);
}
.dir-stat .stat-label { font-size: 11px; color: rgba(255,255,255,.9); margin-top: 2px; letter-spacing: .5px; font-weight: 600; }

/* =========================================
   SEARCH & FILTER BAR
   ========================================= */
.dir-search-bar {
  background: rgba(250,249,247,.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 2px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: var(--nav-height); /* menempel tepat di bawah navbar */
  z-index: 90;
  box-shadow: 0 4px 16px rgba(229,62,62,.08);
}
.search-inner {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.search-input-wrap input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  background: var(--bg-card);
  color: var(--text-primary);
  transition: var(--transition);
}
.search-input-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(192,57,43,.1);
}
.filter-group { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-select {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-card);
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}
.filter-select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(192,57,43,.1); }
.search-result-info { margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--text-muted); letter-spacing: .3px; }

/* =========================================
   DOSEN GRID
   ========================================= */
.dosen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

/* =========================================
   DOSEN CARD
   ========================================= */
.dosen-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.dosen-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

/* Card Header */
.dosen-card-header {
  background: linear-gradient(135deg, #b91c1c 0%, #c2410c 60%, #d97706 100%);
  padding: 24px 20px 18px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
}
.dosen-card-header::before {
  content: '';
  position: absolute;
  top: -24px; right: -24px;
  width: 96px; height: 96px;
  border-radius: 50%;
  background: rgba(255,220,80,.18);
}
.dosen-card-header::after {
  content: '';
  position: absolute;
  bottom: -16px; left: 40%;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255,150,80,.2);
}

/* Avatar */
.dosen-card-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.2);
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
  color: var(--text-white);
  overflow: hidden;
}
.dosen-card-avatar img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.dosen-card-head-info { position: relative; z-index: 1; flex: 1; min-width: 0; }
.dosen-card-name {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
  line-height: 1.3;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dosen-card-jabatan {
  font-size: 11px;
  color: rgba(255,255,255,.9);
  margin-bottom: 7px;
  display: flex; align-items: center; gap: 4px;
  font-weight: 500;
}
.dosen-card-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px; font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(34,197,94,.18);
  color: #86efac;
  letter-spacing: .3px;
}
.dosen-card-status.inactive { background: rgba(239,68,68,.18); color: #fca5a5; }
.dosen-card-status::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 2s ease infinite;
}

/* Card Body */
.dosen-card-body { padding: 16px 20px; flex: 1; position: relative; z-index: 1; overflow: hidden; }
.dosen-card-body::after {
  content: '∑';
  position: absolute;
  bottom: 0px;
  right: 12px;
  font-size: 84px;
  font-weight: 800;
  color: rgba(246,173,85,0);
  font-family: var(--font-display);
  pointer-events: none;
  transition: color .35s var(--ease), transform .45s var(--ease);
  transform: scale(0.7) rotate(-15deg);
  z-index: -1;
}
.dosen-card:hover .dosen-card-body::after {
  color: rgba(246,173,85,0.06);
  transform: scale(1) rotate(-6deg);
}
body.dark-theme .dosen-card:hover .dosen-card-body::after {
  color: rgba(246,173,85,0.035);
}
.dosen-card-info { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.dosen-info-row { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; }
.info-icon-sm { color: var(--primary); flex-shrink: 0; margin-top: 1px; }
.info-text { color: var(--text-secondary); line-height: 1.4; }
.info-label-sm { font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }

/* Stats row */
.dosen-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.dosen-card-stat { text-align: center; }
.dosen-card-stat-num {
  display: block;
  font-size: 1.05rem; font-weight: 800;
  color: var(--primary);
}
.dosen-card-stat-label {
  font-size: 9.5px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
}

/* Tags */
.dosen-card-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 14px; }
.keahlian-tag {
  font-size: 10px; font-weight: 600;
  padding: 3px 9px;
  background: rgba(192,57,43,.07);
  color: var(--primary);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}

/* Card Footer */
.dosen-card-footer {
  padding: 12px 20px;
  background: var(--bg-soft);
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border);
}
.btn-profil-link {
  flex: 1;
  display: block;
  text-align: center;
  padding: 9px;
  background: var(--grad-primary);
  color: var(--text-white);
  font-size: 12.5px; font-weight: 700;
  border-radius: var(--radius);
  transition: var(--transition);
}
.btn-profil-link:hover { opacity: .88; transform: translateY(-1px); }
.btn-contact-link {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  transition: var(--transition);
  flex-shrink: 0;
}
.btn-contact-link:hover { border-color: var(--primary); color: var(--primary); background: rgba(192,57,43,.06); }

/* =========================================
   EMPTY STATE
   ========================================= */
.empty-state {
  text-align: center;
  padding: 72px 20px;
  grid-column: 1 / -1;
}
.empty-icon { font-size: 52px; display: block; margin-bottom: 14px; color: var(--border-hover); }
.empty-state h3 { font-size: 1.15rem; color: var(--text-primary); margin-bottom: 7px; }
.empty-state p { color: var(--text-muted); font-size: 14px; }

/* =========================================
   ABOUT GRID (directory variant)
   ========================================= */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}
.about-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  text-align: center;
  transition: var(--transition);
  display: flex; flex-direction: column; align-items: center;
}
.about-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-hover); }
.about-icon {
  width: 54px; height: 54px;
  border-radius: var(--radius-lg);
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  color: var(--text-white);
  font-size: 24px;
}
.about-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 9px; }
.about-card p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.65; }

/* =========================================
   PROFILE — Back Bar
   ========================================= */
.profile-back-bar {
  background: rgba(250,249,247,.97);
  backdrop-filter: blur(14px);
  border-bottom: 2px solid var(--border);
  padding: 12px 0;
  position: sticky;
  top: var(--nav-height); /* tepat di bawah navbar */
  z-index: 91; /* lebih tinggi dari tabs */
  box-shadow: 0 2px 12px rgba(229,62,62,.08);
  min-height: var(--back-bar-height);
}
.profile-back-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px; font-weight: 700;
  color: var(--text-secondary);
  transition: var(--transition);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}
.btn-back:hover { color: var(--primary); background: var(--grad-soft); }
.profile-breadcrumb { font-size: 12px; color: var(--text-muted); }
.profile-breadcrumb a { color: var(--primary); font-weight: 600; }
.profile-breadcrumb a:hover { text-decoration: underline; }

/* =========================================
   PROFILE HERO
   ========================================= */
.profile-hero {
  background: linear-gradient(135deg, #b91c1c 0%, #c2410c 40%, #d97706 100%);
  /* padding atas = navbar + back bar, tidak tertutup */
  padding: calc(var(--nav-height) + var(--back-bar-height) + 32px) 0 56px;
  position: relative;
  overflow: hidden;
}
.profile-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 65% 50% at 20% 25%, rgba(255,120,120,.3) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 75%, rgba(255,220,80,.2)  0%, transparent 60%),
    linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 36px 36px, 36px 36px;
}
.profile-hero-inner {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 36px;
}
.profile-hero-photo {
  width: 136px; height: 136px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,.2);
  box-shadow: 0 0 0 8px rgba(192,57,43,.22), var(--shadow-xl);
  flex-shrink: 0;
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; font-weight: 800;
  color: var(--text-white);
  overflow: hidden;
}
.profile-hero-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.profile-hero-text { flex: 1; }
.profile-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px; font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.88);
  margin-bottom: 12px;
  letter-spacing: .3px;
}
.profile-hero-name {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.profile-hero-jabatan {
  font-size: 14px;
  color: rgba(255,255,255,.92);
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.profile-hero-nidn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #fef08a;
  letter-spacing: 1.2px;
  margin-bottom: 18px;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.profile-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.profile-hero-stat-bar {
  display: flex;
  gap: 28px; flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.profile-stat-item { text-align: center; }
.profile-stat-item .n {
  display: block;
  font-size: 1.6rem; font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.profile-stat-item .l { font-size: 11px; color: rgba(255,255,255,.9); letter-spacing: .5px; font-weight: 600; }

/* =========================================
   PROFILE TABS
   ========================================= */
.profile-tabs-bar {
  background: rgba(250,249,247,.97);
  backdrop-filter: blur(14px);
  border-bottom: 2px solid var(--border);
  position: sticky;
  /* navbar (68) + back-bar (48) = 116px total di atas */
  top: calc(var(--nav-height) + var(--back-bar-height));
  z-index: 80;
  box-shadow: 0 2px 12px rgba(229,62,62,.06);
}
.profile-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 15px 20px;
  font-size: 13.5px; font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  background: none;
  border-left: none; border-right: none; border-top: none;
  font-family: var(--font-body);
}
.profile-tab:hover { color: var(--text-primary); }
.profile-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-count {
  font-size: 10px; font-weight: 800;
  background: rgba(192,57,43,.1);
  color: var(--primary);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}
.profile-tab.active .tab-count { background: var(--primary); color: var(--text-white); }

.profile-tab-content { 
  display: none; 
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.profile-tab-content.active { display: block; }
.profile-tab-content.show { opacity: 1; transform: translateY(0); }

/* =========================================
   ADMIN DOSEN LIST (directory context)
   ========================================= */
.dosen-list-admin { display: flex; flex-direction: column; gap: 10px; }
.dosen-admin-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  transition: var(--transition);
}
.dosen-admin-row:hover { box-shadow: var(--shadow-md); border-color: var(--border-hover); }
.dosen-admin-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800;
  color: var(--text-white);
  flex-shrink: 0; overflow: hidden;
}
.dosen-admin-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.dosen-admin-info { flex: 1; }
.dosen-admin-info h4 { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.dosen-admin-info p { font-size: 12px; color: var(--text-muted); }
.nidn-badge {
  font-size: 10px; font-weight: 700;
  background: rgba(192,57,43,.1);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-left: 6px;
}
.dosen-admin-stats { display: flex; gap: 14px; font-size: 12px; color: var(--text-muted); }
.dosen-admin-stats span strong { color: var(--text-primary); }
.dosen-admin-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
  /* Hero: tidak full 100vh di tablet/mobile */
  .hero-dir { min-height: 90vh; height: auto; }
  .hero-dir .hero-content { padding: calc(var(--nav-height) + 32px) 0 56px; }
  .dir-hero-stats { gap: 18px; padding: 14px 20px; }
  .dosen-grid { grid-template-columns: 1fr; }
  .profile-hero-inner { flex-direction: column; text-align: center; }
  .profile-hero-actions { justify-content: center; }
  .profile-hero-stat-bar { justify-content: center; }
  .search-inner { flex-direction: column; }
  .search-input-wrap { width: 100%; }
}
@media (max-width: 480px) {
  .hero-dir { min-height: 80vh; }
  .hero-dir .hero-content { padding: calc(var(--nav-height) + 20px) 0 40px; }
  .dir-hero-stats { flex-wrap: wrap; gap: 14px; }
  .dosen-card-header { flex-direction: column; text-align: center; gap: 10px; }
  .dosen-card-head-info { text-align: center; }
}

/* Desktop besar 1440px+ — hero tetap 100vh dengan konten tidak terlalu lebar */
@media (min-width: 1440px) {
  .hero-dir .hero-content { max-width: 900px; }
}
