/* ============================================
   ROOT VARIABLES & RESET
   ============================================ */
:root {
  /* Light mode colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --card-bg: #ffffff;
  --card-shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);

  /* Brand colors — Orange & Blue */
  --brand-blue: #1a56db;
  --brand-blue-light: #3b82f6;
  --brand-blue-dark: #1e3a8a;
  --brand-orange: #f97316;
  --brand-orange-light: #fb923c;
  --brand-orange-dark: #ea580c;

  /* Navbar */
  --nav-bg: rgba(255,255,255,0.95);
  --nav-text: #0f172a;
  --nav-border: rgba(0,0,0,0.08);

  /* Hero */
  --hero-bg: linear-gradient(135deg, #eff6ff 0%, #fff7ed 60%, #eff6ff 100%);
  --hero-grid-color: rgba(26,86,219,0.04);

  /* Sections */
  --section-alt-bg: #f8fafc;
  --inaugural-bg: linear-gradient(135deg, #1a56db 0%, #f97316 100%);

  /* Inputs */
  --input-bg: #f8fafc;
  --input-border: #cbd5e1;
  --input-focus: #1a56db;
  --input-text: #0f172a;
  --input-placeholder: #94a3b8;

  /* Transitions */
  --transition: all 0.3s ease;
}

/* Dark mode */
body.dark-mode {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --border-color: #334155;
  --card-bg: #1e293b;
  --card-shadow: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -1px rgba(0,0,0,0.2);
  --card-shadow-hover: 0 20px 25px -5px rgba(0,0,0,0.4);
  --nav-bg: rgba(15,23,42,0.95);
  --nav-text: #f1f5f9;
  --nav-border: rgba(255,255,255,0.08);
  --hero-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1c1007 100%);
  --hero-grid-color: rgba(255,255,255,0.03);
  --section-alt-bg: #1e293b;
  --input-bg: #1e293b;
  --input-border: #334155;
  --input-text: #f1f5f9;
  --input-placeholder: #64748b;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
}

.btn-primary {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
}
.btn-primary:hover {
  background: var(--brand-blue-dark);
  border-color: var(--brand-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26,86,219,0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--brand-orange);
  border-color: var(--brand-orange);
}
.btn-secondary:hover {
  background: var(--brand-orange);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(249,115,22,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}
.btn-outline:hover {
  background: var(--bg-tertiary);
  transform: translateY(-1px);
}

.btn-outline-light {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255,255,255,0.5);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,0.15);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
  font-size: 0.85rem;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}
.btn-danger:hover { background: #dc2626; }

.btn-full { width: 100%; justify-content: center; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 68px;
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.nav-brand a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav-brand-main {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--brand-blue);
  letter-spacing: -0.01em;
}

.nav-brand-sub {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-logo {
  height: 40px;
  width: auto;
  border-radius: 8px;
  object-fit: contain;
}

.nav-logo-fallback {
  font-weight: 700;
  color: var(--brand-blue);
  font-size: 1.05rem;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand-blue);
  background: rgba(26,86,219,0.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 1rem;
}
.theme-toggle:hover {
  background: var(--brand-orange);
  color: #fff;
  border-color: var(--brand-orange);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-badge {
  display: inline-block;
  background: rgba(26,86,219,0.08);
  color: var(--brand-blue);
  border: 1px solid rgba(26,86,219,0.2);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.section-cta {
  text-align: center;
  margin-top: 48px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  background: var(--hero-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 60px;
  position: relative;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hero-grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid-color) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  max-width: 1200px;
  width: 100%;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(249,115,22,0.1);
  color: var(--brand-orange);
  border: 1px solid rgba(249,115,22,0.25);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-title .highlight {
  color: var(--brand-blue);
  position: relative;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-subtitle strong {
  color: var(--brand-orange);
  font-weight: 700;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-blue);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Profile Card */
.profile-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--card-shadow);
  width: 280px;
  flex-shrink: 0;
}

.profile-img-wrapper {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 20px;
  border: 4px solid var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(26,86,219,0.12);
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info {
  text-align: center;
}

.profile-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.profile-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  line-height: 1.5;
}

.profile-affiliation {
  font-size: 0.75rem !important;
  color: var(--text-muted) !important;
  margin-top: 4px !important;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 16px;
}

.tag {
  background: rgba(249,115,22,0.08);
  color: var(--brand-orange-dark);
  border: 1px solid rgba(249,115,22,0.2);
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
}

/* Scroll Indicator */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 40px;
}

.bounce {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ============================================
   BIO SECTION
   ============================================ */
.bio-section {
  padding: 100px 0;
  background: var(--bg-primary);
}

.bio-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: start;
}

.bio-img-wrapper {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  aspect-ratio: 3/4;
  background: var(--bg-tertiary);
}

.bio-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.colleague-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  margin-top: 20px;
  box-shadow: var(--card-shadow);
}

.colleague-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-tertiary);
}

.colleague-card strong {
  display: block;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.9rem;
}

.colleague-card p {
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.colleague-card small {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.bio-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.bio-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
}

.bio-meta-item i {
  color: var(--brand-orange);
  font-size: 1.1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.bio-meta-item strong {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  font-weight: 700;
}

.bio-meta-item p {
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 500;
}

.bio-text p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.bio-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.bio-stat {
  text-align: center;
}

.bio-stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--brand-blue);
  line-height: 1;
}

.bio-stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ============================================
   TEAM / UNIT MEMBERS SECTION
   ============================================ */
.team-section {
  padding: 100px 0;
  background: var(--section-alt-bg);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px;
}

.team-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 28px 20px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.team-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-orange));
}

.team-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-5px);
}

.team-card.director::before {
  height: 5px;
}

.team-img-wrapper {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 16px;
  border: 3px solid var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}

.team-card.director .team-img-wrapper {
  width: 110px;
  height: 110px;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}

.team-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-role-badge {
  display: inline-block;
  background: rgba(26,86,219,0.08);
  color: var(--brand-blue);
  border: 1px solid rgba(26,86,219,0.2);
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.team-card.director .team-role-badge {
  background: rgba(249,115,22,0.08);
  color: var(--brand-orange-dark);
  border-color: rgba(249,115,22,0.2);
}

.team-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}

.team-card p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================
   RESEARCH PREVIEW SECTION
   ============================================ */
.research-preview {
  padding: 100px 0;
  background: var(--bg-primary);
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.research-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.research-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-orange));
  transform: scaleX(0);
  transition: var(--transition);
  transform-origin: left;
}

.research-card:hover::after {
  transform: scaleX(1);
}

.research-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-4px);
  border-color: rgba(26,86,219,0.2);
}

.research-card-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(26,86,219,0.1), rgba(249,115,22,0.08));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--brand-blue);
  font-size: 1.3rem;
}

.research-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.research-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.research-tags span {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
}

/* ============================================
   INAUGURAL SECTION
   ============================================ */
.inaugural-section {
  padding: 100px 0;
  background: var(--inaugural-bg);
  position: relative;
  overflow: hidden;
}

.inaugural-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

.light-header h2,
.light-header p {
  color: #ffffff;
}

.badge-light {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.95);
  border-color: rgba(255,255,255,0.25);
}

.lecture-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 24px;
  padding: 48px;
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

.lecture-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.lecture-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  font-weight: 500;
}

.lecture-info h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  line-height: 1.4;
}

.lecture-info p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 28px;
  line-height: 1.7;
}

.lecture-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.lecture-img-wrapper {
  width: 300px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.lecture-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-section {
  padding: 100px 0;
  background: var(--bg-primary);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: start;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.contact-item i {
  width: 44px;
  height: 44px;
  background: rgba(26,86,219,0.08);
  color: var(--brand-blue);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-item strong {
  display: block;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 4px;
}

.contact-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.contact-form {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 36px;
  box-shadow: var(--card-shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--input-text);
  font-family: 'Montserrat', sans-serif;
  transition: var(--transition);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--input-placeholder);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
  background: var(--bg-primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  display: none;
}

.form-status.success {
  background: rgba(16,185,129,0.1);
  color: #065f46;
  border: 1px solid rgba(16,185,129,0.2);
  display: block;
}

.form-status.error {
  background: rgba(239,68,68,0.1);
  color: #991b1b;
  border: 1px solid rgba(239,68,68,0.2);
  display: block;
}

body.dark-mode .form-status.success { color: #6ee7b7; }
body.dark-mode .form-status.error { color: #fca5a5; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--brand-blue-dark);
  color: rgba(255,255,255,0.85);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand h3 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.footer-brand h4 {
  color: var(--brand-orange-light);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 14px;
  opacity: 0.9;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
}

.footer-links h4,
.footer-research h4 {
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-links ul li,
.footer-research ul li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--brand-orange-light);
}

.footer-research ul li {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}

/* ============================================
   PAGE HERO (Research Page)
   ============================================ */
.page-hero {
  padding: 140px 24px 80px;
  background: var(--hero-bg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hero-grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid-color) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.page-hero-content {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--text-primary);
  margin: 16px 0;
}

.page-hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ============================================
   RESEARCH FILTERS
   ============================================ */
.research-filters-section {
  padding: 20px 0;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 68px;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 100px;
  border: 1.5px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.02em;
}

.filter-btn:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
}

.filter-btn.active {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
}

/* ============================================
   RESEARCH DETAIL SECTION (research.html cards)
   ============================================ */
.research-detail-section {
  padding: 80px 0;
  background: var(--bg-primary);
}

.research-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 32px;
}

.research-detail-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
}

.research-detail-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-4px);
  border-color: rgba(26,86,219,0.2);
}

.research-detail-card-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.rdc-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(26,86,219,0.1), rgba(249,115,22,0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-blue);
  font-size: 1.4rem;
  flex-shrink: 0;
}

.rdc-header-text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.rdc-category {
  font-size: 0.72rem;
  color: var(--brand-orange);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.research-detail-card-body {
  padding: 24px 28px;
}

.research-detail-card-body p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
  font-size: 0.92rem;
}

.rdc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.rdc-study-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.rdc-read-more {
  font-size: 0.8rem;
  color: var(--brand-blue);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================
   RESEARCH DETAIL PAGE (research-detail.html)
   ============================================ */
.research-detail-hero {
  padding: 120px 24px 60px;
  position: relative;
  overflow: hidden;
}

.research-detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-bg);
}

.research-detail-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hero-grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid-color) 1px, transparent 1px);
  background-size: 40px 40px;
}

.research-detail-hero .container {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 0.82rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--brand-blue);
  font-weight: 600;
  transition: var(--transition);
}

.breadcrumb a:hover { color: var(--brand-orange); }

.breadcrumb span {
  color: var(--text-muted);
}

.breadcrumb i {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.detail-hero-content {
  max-width: 860px;
}

.detail-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(249,115,22,0.1);
  color: var(--brand-orange-dark);
  border: 1px solid rgba(249,115,22,0.25);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 20px;
}

.detail-hero-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 20px;
}

.detail-hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 700px;
}

.detail-hero-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.detail-meta-item i {
  color: var(--brand-blue);
  font-size: 0.9rem;
}

/* Detail body layout */
.research-detail-body {
  padding: 80px 0;
  background: var(--bg-primary);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

.detail-main h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
}

.detail-main h2 span {
  color: var(--brand-orange);
}

/* Studies list */
.studies-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 60px;
}

.study-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.study-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-orange));
  border-radius: 4px 0 0 4px;
}

.study-card:hover {
  box-shadow: var(--card-shadow-hover);
}

.study-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.study-number {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-orange);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(249,115,22,0.08);
  border: 1px solid rgba(249,115,22,0.2);
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

.study-year {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-blue);
  white-space: nowrap;
}

.study-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.5;
}

.study-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 16px;
}

.study-impact {
  background: rgba(26,86,219,0.04);
  border: 1px solid rgba(26,86,219,0.12);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.study-impact-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--brand-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.study-impact p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  font-style: italic;
}

.study-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.study-journal {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  flex: 1;
}

.study-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.study-tags span {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* Contributors sidebar */
.detail-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
}

.sidebar-card-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
  color: #fff;
}

.sidebar-card-header h3 {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.contributors-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contributor-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  transition: var(--transition);
  cursor: default;
}

.contributor-item:hover {
  background: var(--bg-secondary);
}

.contributor-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
}

.contributor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contributor-info h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.contributor-info p {
  font-size: 0.72rem;
  color: var(--brand-orange);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-tags-list {
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sidebar-tag {
  background: rgba(26,86,219,0.07);
  color: var(--brand-blue);
  border: 1px solid rgba(26,86,219,0.15);
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-blue);
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
  margin-bottom: 40px;
}

.back-link:hover {
  color: var(--brand-orange);
  gap: 12px;
}

/* ============================================
   PUBLICATIONS SECTION
   ============================================ */
.publications-section {
  padding: 80px 0;
  background: var(--section-alt-bg);
}

.publications-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.publication-item {
  display: flex;
  gap: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  transition: var(--transition);
}

.publication-item:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateX(4px);
  border-left: 3px solid var(--brand-orange);
}

.pub-year {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand-blue);
  min-width: 60px;
  flex-shrink: 0;
}

.pub-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.5;
}

.pub-journal {
  font-size: 0.83rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 12px;
}

.pub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pub-tags span {
  background: rgba(26,86,219,0.07);
  color: var(--brand-blue);
  border: 1px solid rgba(26,86,219,0.15);
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.loading-spinner {
  text-align: center;
  padding: 60px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.loading-spinner i {
  margin-right: 8px;
  color: var(--brand-blue);
}

/* ============================================
   CHATBOT
   ============================================ */
.chatbot-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
}

.chatbot-toggle {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-orange));
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(26,86,219,0.4);
  transition: var(--transition);
  font-size: 1.3rem;
}

.chatbot-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(26,86,219,0.5);
}

.chatbot-window {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 360px;
  height: 500px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chatbot-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
  color: #ffffff;
}

.chatbot-avatar {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.chatbot-header h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.chatbot-status {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
}

.chatbot-close {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  border-radius: 6px;
  transition: var(--transition);
}

.chatbot-close:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.1);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.chat-message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.87rem;
  line-height: 1.6;
}

.bot-message {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  border: 1px solid var(--border-color);
}

.user-message {
  background: var(--brand-blue);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.chat-message.loading {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  align-self: flex-start;
}

.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px 0;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.chatbot-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.chatbot-input-area input {
  flex: 1;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.87rem;
  color: var(--input-text);
  font-family: 'Montserrat', sans-serif;
  outline: none;
  transition: var(--transition);
}

.chatbot-input-area input::placeholder { color: var(--input-placeholder); }

.chatbot-input-area input:focus {
  border-color: var(--brand-blue);
}

.chatbot-input-area button {
  width: 42px;
  height: 42px;
  background: var(--brand-blue);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.chatbot-input-area button:hover {
  background: var(--brand-orange);
}

/* ============================================
   ADMIN STYLES
   ============================================ */
.admin-body { overflow: hidden; }

.admin-login-overlay {
  position: fixed;
  inset: 0;
  background: var(--hero-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}

.login-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 48px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--card-shadow-hover);
}

.login-header {
  text-align: center;
  margin-bottom: 36px;
}

.login-header i {
  font-size: 2.5rem;
  color: var(--brand-blue);
  margin-bottom: 16px;
  display: block;
}

.login-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.login-header p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.password-input-wrapper { position: relative; }
.password-input-wrapper input { padding-right: 44px; }

.toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
}

.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(239,68,68,0.1);
  color: #dc2626;
  border: 1px solid rgba(239,68,68,0.2);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

body.dark-mode .login-error { color: #fca5a5; }

.admin-dashboard {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.admin-sidebar {
  width: 260px;
  background: var(--brand-blue-dark);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  transition: var(--transition);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  font-size: 1rem;
  font-weight: 800;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-brand i { font-size: 1.3rem; color: var(--brand-orange-light); }

.admin-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: rgba(255,255,255,0.65);
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.admin-nav-item:hover,
.admin-nav-item.active {
  background: rgba(255,255,255,0.12);
  color: #ffffff;
}

.admin-nav-item i { width: 20px; text-align: center; }

.badge-count {
  margin-left: auto;
  background: var(--brand-orange);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  min-width: 20px;
  text-align: center;
}

.admin-sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-sidebar-footer .btn {
  font-size: 0.85rem;
  padding: 10px 16px;
  color: rgba(255,255,255,0.75);
  border-color: rgba(255,255,255,0.2);
}

.admin-sidebar-footer .btn:hover {
  background: rgba(255,255,255,0.1);
  color: #ffffff;
}

.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-secondary);
}

.admin-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 32px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.sidebar-toggle {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.sidebar-toggle:hover { background: var(--bg-tertiary); }

.admin-topbar h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(26,86,219,0.08);
  color: var(--brand-blue);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-panel {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.panel-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  flex: 1;
}

.panel-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  width: 100%;
}

.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.admin-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--card-shadow);
}

.admin-stat-card i {
  width: 48px;
  height: 48px;
  background: rgba(26,86,219,0.1);
  color: var(--brand-blue);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.admin-stat-card h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.admin-stat-card p {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.chart-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.chart-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--card-shadow);
}

.chart-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.recent-activity {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--card-shadow);
}

.recent-activity h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child { border-bottom: none; }

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.activity-icon.visit { background: rgba(26,86,219,0.1); color: var(--brand-blue); }
.activity-icon.message { background: rgba(16,185,129,0.1); color: #059669; }
.activity-icon.chat { background: rgba(249,115,22,0.1); color: var(--brand-orange); }

.activity-text { flex: 1; }
.activity-text p { font-size: 0.87rem; color: var(--text-primary); font-weight: 500; }
.activity-text small { font-size: 0.77rem; color: var(--text-muted); }

.research-admin-list { display: flex; flex-direction: column; gap: 16px; }

.research-admin-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--card-shadow);
}

.research-admin-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(26,86,219,0.1);
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.research-admin-item-content { flex: 1; }
.research-admin-item-content h4 { font-size: 0.93rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.research-admin-item-content p { font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 500px; }
.research-admin-item-actions { display: flex; gap: 8px; flex-shrink: 0; }

.messages-list { display: flex; flex-direction: column; gap: 12px; }

.message-list-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px 24px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.message-list-item:hover { box-shadow: var(--card-shadow-hover); border-color: rgba(26,86,219,0.2); }
.message-list-item.unread { border-left: 4px solid var(--brand-blue); }

.msg-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem; flex-shrink: 0;
}

.msg-content { flex: 1; }
.msg-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.msg-name { font-weight: 700; color: var(--text-primary); font-size: 0.93rem; }
.msg-time { font-size: 0.77rem; color: var(--text-muted); }
.msg-subject { font-size: 0.83rem; color: var(--text-secondary); font-weight: 600; margin-bottom: 4px; }
.msg-preview { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-unread-dot { width: 10px; height: 10px; background: var(--brand-blue); border-radius: 50%; flex-shrink: 0; margin-top: 6px; }

.message-detail { padding: 8px 0; }
.message-detail .detail-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-color); font-size: 0.88rem; }
.message-detail .detail-row:last-child { border-bottom: none; }
.detail-label { font-weight: 700; color: var(--text-secondary); min-width: 80px; }
.detail-value { color: var(--text-primary); flex: 1; }
.message-body { margin-top: 20px; padding: 16px; background: var(--bg-secondary); border-radius: 12px; color: var(--text-primary); font-size: 0.88rem; line-height: 1.7; white-space: pre-wrap; }

.kb-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.kb-editor .form-group textarea { min-height: 400px; font-family: 'Courier New', monospace; font-size: 0.85rem; }
.kb-sections h3 { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin-bottom: 16px; }
.kb-section-item { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 12px; }
.kb-section-item span { flex: 1; font-size: 0.88rem; color: var(--text-primary); font-weight: 500; }

.publications-admin-list { display: flex; flex-direction: column; gap: 12px; }
.pub-admin-item { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 14px; padding: 20px 24px; display: flex; align-items: flex-start; gap: 16px; box-shadow: var(--card-shadow); }
.pub-admin-year { font-size: 1.1rem; font-weight: 800; color: var(--brand-blue); min-width: 50px; flex-shrink: 0; }
.pub-admin-content { flex: 1; }
.pub-admin-content h4 { font-size: 0.93rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.pub-admin-content p { font-size: 0.8rem; color: var(--text-muted); font-style: italic; }
.pub-admin-actions { display: flex; gap: 8px; flex-shrink: 0; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 20px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; padding: 32px; box-shadow: 0 25px 50px rgba(0,0,0,0.2); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border-color); }
.modal-header h3 { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); }
.modal-close { background: none; border: 1px solid var(--border-color); color: var(--text-muted); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.modal-close:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border-color); }

.empty-state { text-align: center; padding: 48px; color: var(--text-muted); font-size: 0.93rem; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; gap: 40px; }
  .hero-card { display: flex; justify-content: center; }
  .bio-grid { grid-template-columns: 1fr; gap: 40px; }
  .bio-img-wrapper { max-width: 400px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .lecture-card { grid-template-columns: 1fr; }
  .lecture-img-wrapper { width: 100%; max-width: 400px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
  .kb-editor { grid-template-columns: 1fr; }
  .bio-stats { grid-template-columns: repeat(2, 1fr); }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
}

@media (max-width: 768px) {
  .navbar { padding: 0 20px; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--nav-bg); border-bottom: 1px solid var(--nav-border); padding: 16px; gap: 4px; }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .hero { padding: 100px 20px 60px; }
  .research-grid { grid-template-columns: 1fr; }
  .research-detail-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .bio-meta-grid { grid-template-columns: 1fr; }
  .bio-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-sidebar { position: fixed; left: -260px; top: 0; bottom: 0; z-index: 1000; }
  .admin-sidebar.open { left: 0; }
  .admin-dashboard { overflow: auto; }
  .admin-main { overflow: auto; }
  .admin-panel { padding: 20px; }
  .admin-topbar { padding: 16px 20px; }
  .chatbot-window { width: calc(100vw - 56px); right: 0; }
  .modal-card { padding: 24px; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .hero-stats { gap: 20px; }
  .hero-cta { flex-direction: column; }
  .lecture-actions { flex-direction: column; }
  .profile-card { width: 100%; max-width: 320px; }
  .admin-stats-row { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
}