/* ── Root Tokens ───────────────────────────────────────────── */
:root {
  --navy: #0d2b55;
  --blue: #1a4a8a;
  --sky: #2b7de9;
  --gold: #c8922a;
  --light: #f4f7fc;
  --white: #ffffff;
  --text: #1e2a3b;
  --muted: #5a6a7e;
  --border: #dce6f5;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(13, 43, 85, 0.1);
  --shadow-hover: 0 12px 36px rgba(13, 43, 85, 0.18);
}

/* ── Base ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  font-family: "DM Sans", sans-serif;
  background: var(--light);
  color: var(--text);
  margin: 0;
}

/* ── Header Banner ─────────────────────────────────────────── */
.site-header {
  background: linear-gradient(
    135deg,
    var(--navy) 0%,
    var(--blue) 60%,
    #1e5fa8 100%
  );
  padding: 0;
  position: relative;
  overflow: hidden;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 40px;
  position: relative;
  z-index: 1;
}
.header-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
}
.header-text h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
  letter-spacing: 0.3px;
}
.header-text p {
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.5px;
}
.header-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── Navbar ────────────────────────────────────────────────── 
.main-nav {
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
}
.main-nav .navbar-brand {
  font-family: "Playfair Display", serif;
  color: var(--gold) !important;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.main-nav .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 12px 14px !important;
  transition: color 0.2s;
}
.main-nav .nav-link:hover,
.main-nav .nav-link.active {
  color: var(--gold) !important;
}
.main-nav .dropdown-menu {
  background: var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  min-width: 200px;
  padding: 6px 0;
}
.main-nav .dropdown-item {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.845rem;
  padding: 8px 18px;
  transition: background 0.15s;
}
.main-nav .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
}
.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3);
}
.navbar-toggler-icon {
  filter: invert(1);
}

/* Nested submenus */
.dropdown-submenu {
  position: relative;
}
.dropdown-submenu .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -6px;
}
@media (max-width: 991px) {
  .dropdown-submenu .dropdown-menu {
    position: static;
    left: 0;
    box-shadow: none;
    border: none;
    margin-left: 12px;
  }
}

/* ── Page Hero ─────────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(180deg, #e8f0fb 0%, var(--light) 100%);
  border-bottom: 1px solid var(--border);
  padding: 40px 0 32px;
}
.page-hero h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 6px;
}
.page-hero p {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}
.dept-tag {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ── Controls bar ──────────────────────────────────────────── */
.controls-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.search-wrap {
  position: relative;
  flex: 1;
  max-width: 360px;
}
.search-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.85rem;
}
.search-wrap input {
  padding-left: 34px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  font-size: 0.875rem;
  height: 40px;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}
.search-wrap input:focus {
  border-color: var(--sky);
}
.count-badge {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.83rem;
  color: var(--muted);
  font-weight: 500;
}
.count-badge span {
  color: var(--navy);
  font-weight: 700;
}

/* ── Section headings ──────────────────────────────────────── */
.view-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.view-heading .vh-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.view-heading h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
  color: var(--navy);
  font-weight: 700;
  margin: 0;
}
.view-heading .vh-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--border) 0%, transparent 100%);
  border-radius: 2px;
}
.section-divider {
  height: 1px;
  background: var(--border);
  margin: 48px 0;
  position: relative;
}
.section-divider::before {
  content: "◆";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--light);
  color: var(--gold);
  padding: 0 14px;
  font-size: 0.7rem;
}

/* ── Section Divider ───────────────────────────────────────── */
.section-wrap {
  padding: 40px 0 60px;
}

/* ── TABLE VIEW ────────────────────────────────────────────── */
#tableView {
  display: block;
}
.staff-table-wrap {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.staff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8 rem;
}
.staff-table td {
  padding: 10px 12px;
  border-color: #dee2e6;
  background: #6a92e2;
  transition: all 0.25s ease;
}
.staff-table tbody tr:nth-child(even) td {
  background: #eef5ff;
}
.staff-table tbody tr:hover td {
  background: #e7c971 !important;
  color: #000;
  font-weight: 500;
  transform: scale(1.002);
}

.staff-table thead {
  background: var(--navy);
  color: #fff;
}
.staff-table thead th {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
}
.staff-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.staff-table tbody tr:hover {
  background: #f0f6ff;
}
.staff-table tbody tr:last-child {
  border-bottom: none;
}
.staff-table td {
  padding: 13px 16px;
  vertical-align: middle;
  color: var(--text);
}
.staff-table td:first-child {
  font-weight: 700;
  color: var(--muted);
  width: 48px;
  text-align: center;
}
.staff-name {
  font-weight: 600;
  color: var(--navy);
}
.desig-pill {
  display: inline-block;
  background: #e8f0fb;
  color: var(--blue);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}
.desig-pill.head {
  background: #fff3e0;
  color: #b46a00;
}
.exp-text {
  color: var(--muted);
  font-size: 0.85rem;
}
.tbl-link {
  color: var(--sky);
  text-decoration: none;
  font-size: 0.84rem;
}
.tbl-link:hover {
  text-decoration: underline;
}
.no-results {
  text-align: center;
  padding: 48px;
  color: var(--muted);
  display: none;
}

/* ── CARDS VIEW ────────────────────────────────────────────── */
#cardsView {
  display: block;
}
.profile-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 20px 22px;
  text-align: center;
  transition:
    transform 0.25s,
    box-shadow 0.25s;
  border-top: 3px solid transparent;
  height: 100%;
}
.profile-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-top-color: var(--gold);
}
.profile-img-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 14px;
}
.profile-img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--navy);
}
.emp-id-chip {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.4px;
}
.profile-card h5 {
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  color: var(--navy);
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
}
.profile-card .designation {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.profile-info {
  text-align: left;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 4px;
}
.info-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}
.info-row i {
  color: var(--sky);
  width: 14px;
  margin-top: 2px;
  flex-shrink: 0;
}
.info-label {
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  flex-shrink: 0;
}
.info-row a {
  color: var(--sky);
  text-decoration: none;
  word-break: break-all;
}
.info-row a:hover {
  text-decoration: underline;
}
.profile-actions {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.btn-profile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
  letter-spacing: 0.3px;
}
.btn-profile:hover {
  background: var(--blue);
  color: #fff;
}

/* ── Faculty count stat bar ────────────────────────────────── */
.stat-bar {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.stat-item {
  background: #fff;
  border-radius: 10px;
  padding: 14px 22px;
  box-shadow: 0 2px 10px rgba(13, 43, 85, 0.07);
  border-left: 4px solid var(--sky);
  min-width: 120px;
}
.stat-item .stat-num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.stat-item .stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
}
.stat-item:nth-child(2) {
  border-left-color: var(--gold);
}
.stat-item:nth-child(3) {
  border-left-color: #27ae60;
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.75);
  padding: 48px 0 0;
  margin-top: 0;
}
.footer-title {
  color: var(--gold);
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.4px;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer ul li {
  margin-bottom: 8px;
}
.site-footer ul a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.855rem;
  transition: color 0.2s;
}
.site-footer ul a:hover {
  color: var(--gold);
}
.site-footer address {
  font-size: 0.855rem;
  line-height: 1.8;
  font-style: normal;
  color: rgba(255, 255, 255, 0.65);
}
.site-footer address a {
  color: var(--gold);
  text-decoration: none;
}
.footer-map iframe {
  border-radius: 10px;
  width: 100%;
  height: 180px;
  border: none;
}
.footer-bottom {
  margin-top: 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

/* ── Animations ────────────────────────────────────────────── */
.fade-in {
  animation: fadeUp 0.45s ease both;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.card-col {
  animation: fadeUp 0.45s ease both;
}
.card-col:nth-child(1) {
  animation-delay: 0.05s;
}
.card-col:nth-child(2) {
  animation-delay: 0.1s;
}
.card-col:nth-child(3) {
  animation-delay: 0.15s;
}
.card-col:nth-child(4) {
  animation-delay: 0.2s;
}
.card-col:nth-child(5) {
  animation-delay: 0.25s;
}
.card-col:nth-child(6) {
  animation-delay: 0.3s;
}
.card-col:nth-child(7) {
  animation-delay: 0.35s;
}
.card-col:nth-child(8) {
  animation-delay: 0.4s;
}
.card-col:nth-child(9) {
  animation-delay: 0.45s;
}
.card-col:nth-child(10) {
  animation-delay: 0.5s;
}
.card-col:nth-child(11) {
  animation-delay: 0.55s;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner {
    padding: 20px;
    gap: 14px;
  }
  .header-badge {
    display: none;
  }
  .stat-bar {
    gap: 12px;
  }
}
