/* Core Design System for EISL Lab Website */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* Color Variables & Themes */
:root {
  /* Default: Dark Theme (Tech/Smart Grid/Sustainability Vibe) */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --accent: #10b981; /* Emerald/Sustainability Green */
  --accent-secondary: #06b6d4; /* Clean Cyan */
  --accent-gradient: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --accent-gradient-hover: linear-gradient(135deg, #059669 0%, #0891b2 100%);
  --accent-light: rgba(16, 185, 129, 0.15);
  
  --sidebar-bg: rgba(17, 24, 39, 0.7);
  --glass-bg: rgba(17, 24, 39, 0.55);
  --glass-border: rgba(255, 255, 255, 0.07);
  --border-color: rgba(255, 255, 255, 0.08);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s ease;
  
  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  --border-radius-full: 9999px;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --sidebar-width: 280px;
  --header-height: 240px;
}

/* Light Theme overrides */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --accent: #059669;
  --accent-secondary: #0891b2;
  --accent-gradient: linear-gradient(135deg, #059669 0%, #0891b2 100%);
  --accent-gradient-hover: linear-gradient(135deg, #047857 0%, #0e7490 100%);
  --accent-light: rgba(5, 150, 105, 0.1);
  
  --sidebar-bg: rgba(255, 255, 255, 0.7);
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(15, 23, 42, 0.06);
  --border-color: rgba(15, 23, 42, 0.08);
  
  --glass-shadow: 0 8px 32px 0 rgba(148, 163, 184, 0.12);
  --shadow-lg: 0 10px 15px -3px rgba(148, 163, 184, 0.1), 0 4px 6px -2px rgba(148, 163, 184, 0.05);
}

/* Base Resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--accent-secondary);
}

/* Layout Grid */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.app-sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--glass-border);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  transition: transform var(--transition-normal), background-color var(--transition-normal), border-right var(--transition-normal);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.logo-icon {
  background: var(--accent-gradient);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.nav-item {
  width: 100%;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--border-radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.nav-link svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: stroke var(--transition-fast);
  flex-shrink: 0;
}

.nav-link:hover {
  background-color: var(--accent-light);
  color: var(--accent);
}

.nav-link.active {
  background: var(--accent-gradient);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}
.theme-toggle-btn:hover {
  background-color: var(--border-color);
}
.theme-toggle-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Main Dashboard Panel */
.main-panel {
  flex-grow: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition-normal);
  min-width: 0; /* Prevent flex overflow */
}

/* Glassmorphic Header */
.dashboard-header {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 2.5rem 3rem;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: background-color var(--transition-normal), border-bottom var(--transition-normal);
}

.header-accent-glow {
  position: absolute;
  top: -10%;
  right: -5%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0) 70%);
  pointer-events: none;
}

.profile-avatar-wrapper {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
  flex-shrink: 0;
  transition: transform var(--transition-normal);
}
.profile-avatar-wrapper:hover {
  transform: scale(1.03);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info {
  flex-grow: 1;
  min-width: 0; /* Prevent flex child overflow */
}

.profile-name {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  letter-spacing: -0.03em;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.profile-rank {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: inline-block;
  background: var(--accent-light);
  padding: 0.25rem 0.75rem;
  border-radius: var(--border-radius-full);
}

.profile-appointment {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  max-width: 800px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.badge-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.badge-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.badge-link:hover {
  background-color: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Mobile Toggle Header */
.mobile-top-bar {
  display: none;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 101;
}

.menu-toggle-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-toggle-btn svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

/* Main Content Area */
.content-area {
  padding: 3rem;
  flex-grow: 1;
  min-width: 0; /* Prevent overflow */
}

.view-section {
  display: none;
  animation: viewFadeIn var(--transition-slow) cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view-section.active {
  display: block;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
  letter-spacing: -0.03em;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 45px;
  height: 4px;
  background: var(--accent-gradient);
  border-radius: var(--border-radius-full);
}

/* Stats Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: var(--border-radius-md);
  text-align: center;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-heading);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Cards & Components */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.card:hover {
  border-color: var(--glass-border);
  box-shadow: var(--shadow-md);
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.card-title svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Bullet list override for sleek cards */
.custom-list {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.custom-list-item {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.custom-list-item::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* Research Area Grid */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.research-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 2rem;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}
.research-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-secondary);
  box-shadow: var(--shadow-lg);
}

.research-icon {
  background: var(--accent-light);
  color: var(--accent);
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.research-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.research-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.research-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Publication Filters & Interactive Tools */
.publications-controls {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: var(--border-radius-md);
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--border-radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast);
}
.search-input:focus {
  border-color: var(--accent);
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.filters-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.filter-btn:hover {
  background-color: var(--border-color);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #fff;
}

/* Publication Item styling */
.publication-item {
  background: var(--bg-secondary);
  border-left: 4px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem;
  margin-bottom: 1rem;
  border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.publication-item:hover {
  border-left-color: var(--accent);
  background-color: var(--bg-tertiary);
  transform: translateX(4px);
}

.pub-category-badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.15rem 0.5rem;
  border-radius: var(--border-radius-sm);
  align-self: flex-start;
  white-space: nowrap;
}

.pub-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.pub-journal {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-muted);
}

.pub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.pub-meta-item strong {
  color: var(--text-secondary);
}

.pub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.pub-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 0.1rem 0.4rem;
  border-radius: var(--border-radius-sm);
}

/* Supervision Tables */
.supervision-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.sup-tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.sup-tab-btn.active {
  color: var(--accent);
}

.sup-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  width: 80%;
  height: 3px;
  background: var(--accent);
  border-radius: var(--border-radius-full);
}

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
  background-color: var(--bg-secondary);
}

th, td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: var(--bg-tertiary);
}

/* Photo Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
}

.gallery-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}
.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.gallery-image-wrapper {
  height: 200px;
  overflow: hidden;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.gallery-card:hover .gallery-img {
  transform: scale(1.05);
}

.gallery-info {
  padding: 1.25rem;
}

.gallery-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.gallery-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Downloads section style */
.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 1.25rem 2rem;
  margin-bottom: 1rem;
  transition: all var(--transition-fast);
}
.download-item:hover {
  border-color: var(--accent);
  background-color: var(--bg-tertiary);
  transform: translateY(-2px);
}

.download-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0; /* Prevent flex child overflow */
  flex: 1;
}

.download-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.download-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.download-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.download-btn {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.15);
  white-space: nowrap;
  flex-shrink: 0;
}
.download-btn:hover {
  background: var(--accent-gradient-hover);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.download-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Contact Cards Layout */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
}

.contact-card.wide-card {
  grid-column: span 2;
}

.contact-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 2rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.contact-icon {
  background-color: var(--accent-light);
  color: var(--accent);
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.contact-card-info {
  min-width: 0; /* Prevent overflow */
}

.contact-card-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.contact-card-info p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Dashboard Footer */
.dashboard-footer {
  margin-top: auto;
  padding: 2rem 3rem;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: background-color var(--transition-normal), border-top var(--transition-normal);
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}
.sidebar-overlay.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   RESPONSIVE STYLES
   ============================================================ */

/* Large desktops & wide screens */
@media (max-width: 1200px) {
  .dashboard-header {
    padding: 2rem 2.5rem;
    gap: 2rem;
  }

  .content-area {
    padding: 2.5rem;
  }

  .dashboard-footer {
    padding: 1.75rem 2.5rem;
  }
}

/* Tablet landscape / small desktop — sidebar collapses */
@media (max-width: 992px) {
  .app-container {
    flex-direction: column;
  }

  .app-sidebar {
    transform: translateX(-100%);
    width: 280px;
    background-color: var(--bg-secondary);
  }
  
  .app-sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  }
  
  .main-panel {
    margin-left: 0;
    width: 100%;
  }
  
  .mobile-top-bar {
    display: flex;
  }
  
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem;
    gap: 1.5rem;
  }

  .profile-avatar-wrapper {
    width: 110px;
    height: 110px;
  }
  
  .content-area {
    padding: 2rem;
  }

  .dashboard-footer {
    padding: 1.5rem 2rem;
  }
}

/* Tablet portrait */
@media (max-width: 768px) {
  /* wide card collapses to span 1 column */
  .contact-card.wide-card {
    grid-column: span 1;
  }

  .dashboard-header {
    padding: 1.75rem 1.5rem;
    gap: 1.25rem;
  }

  .profile-name {
    font-size: 1.75rem;
  }

  .profile-rank {
    font-size: 0.9rem;
    padding: 0.2rem 0.6rem;
  }

  .profile-appointment {
    font-size: 0.9rem;
  }

  .content-area {
    padding: 1.5rem;
  }

  .card {
    padding: 1.5rem;
  }

  .section-title {
    font-size: 1.9rem;
  }

  /* Supervision tabs wrap nicely */
  .sup-tab-btn {
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
  }

  /* Filter buttons */
  .filter-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  /* Stats grid: 2 columns minimum */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  /* Responsive Stacked Tables */
  .table-wrapper {
    border: none;
    box-shadow: none;
    border-radius: 0;
  }
  
  .table-wrapper table, 
  .table-wrapper thead, 
  .table-wrapper tbody, 
  .table-wrapper th, 
  .table-wrapper td, 
  .table-wrapper tr {
    display: block;
    width: 100%;
  }
  
  .table-wrapper thead {
    display: none; /* Hide standard headers */
  }
  
  .table-wrapper tr {
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background-color: var(--bg-secondary);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
  }
  
  .table-wrapper td {
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border-color);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .table-wrapper td:last-child {
    border-bottom: none;
  }
  
  /* Bold prefix data label */
  .table-wrapper td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--accent);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  /* Download items stack vertically */
  .download-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
  }

  .download-btn {
    width: 100%;
    justify-content: center;
  }

  /* Publication items tighter padding */
  .publication-item {
    padding: 1.25rem;
  }

  .pub-title {
    font-size: 1rem;
  }

  .pub-meta {
    gap: 0.5rem;
  }

  /* Gallery images shorter on tablet */
  .gallery-image-wrapper {
    height: 180px;
  }

  /* Research grid */
  .research-card {
    padding: 1.5rem;
  }

  /* Contact card */
  .contact-card {
    padding: 1.5rem;
  }

  .dashboard-footer {
    padding: 1.5rem;
  }
}

/* Mobile phones */
@media (max-width: 576px) {
  .dashboard-header {
    padding: 1.5rem 1.25rem;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .profile-info {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .quick-links {
    justify-content: center;
  }
  
  .content-area {
    padding: 1.25rem;
  }
  
  .profile-avatar-wrapper {
    width: 100px;
    height: 100px;
  }
  
  .profile-name {
    font-size: 1.5rem;
  }

  .profile-rank {
    font-size: 0.85rem;
    text-align: center;
  }

  .profile-appointment {
    font-size: 0.85rem;
    text-align: center;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .card {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .card-title {
    font-size: 1.15rem;
  }

  /* Stats grid: 2 columns */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-number {
    font-size: 1.6rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  /* Supervision tabs: smaller, scrollable */
  .supervision-tabs {
    gap: 0.35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
  }
  .supervision-tabs::-webkit-scrollbar {
    display: none;
  }

  .sup-tab-btn {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
    flex-shrink: 0;
  }

  /* Filter buttons: scrollable row */
  .filters-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
  }
  .filters-wrapper::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex-shrink: 0;
    padding: 0.4rem 0.7rem;
    font-size: 0.78rem;
  }

  /* Publications controls */
  .publications-controls {
    padding: 1rem;
  }

  .search-input {
    font-size: 0.85rem;
    padding: 0.65rem 0.85rem 0.65rem 2.25rem;
  }

  /* Publication items */
  .publication-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
  }

  .pub-title {
    font-size: 0.95rem;
  }

  .pub-authors,
  .pub-journal {
    font-size: 0.82rem;
  }

  .pub-meta {
    font-size: 0.75rem;
    gap: 0.4rem;
  }

  .pub-tag {
    font-size: 0.7rem;
  }

  /* Research cards */
  .research-card {
    padding: 1.25rem;
  }

  .research-card-title {
    font-size: 1.1rem;
  }

  .research-description {
    font-size: 0.85rem;
  }

  .research-icon {
    width: 40px;
    height: 40px;
  }

  .research-icon svg {
    width: 20px;
    height: 20px;
  }

  /* Contact cards */
  .contact-card {
    padding: 1.25rem;
    gap: 1rem;
  }

  .contact-icon {
    width: 40px;
    height: 40px;
  }

  .contact-icon svg {
    width: 20px;
    height: 20px;
  }

  .contact-card-info h4 {
    font-size: 1rem;
  }

  .contact-card-info p {
    font-size: 0.85rem;
  }

  /* Gallery */
  .gallery-image-wrapper {
    height: 160px;
  }

  .gallery-info {
    padding: 1rem;
  }

  .gallery-title {
    font-size: 1rem;
  }

  .gallery-desc {
    font-size: 0.8rem;
  }

  /* Download items */
  .download-item {
    padding: 1rem 1.25rem;
  }

  .download-title {
    font-size: 0.95rem;
  }

  .download-desc {
    font-size: 0.8rem;
  }

  .download-meta {
    gap: 0.5rem;
    font-size: 0.75rem;
  }

  /* Badge links */
  .badge-link {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    gap: 0.35rem;
  }

  .badge-link svg {
    width: 12px;
    height: 12px;
  }

  /* Footer */
  .dashboard-footer {
    padding: 1.25rem;
    font-size: 0.8rem;
  }

  /* Custom list items */
  .custom-list-item {
    font-size: 0.88rem;
  }

  /* Mobile top bar */
  .mobile-top-bar {
    padding: 0.75rem 1.25rem;
  }
}

/* Very small devices (320px–380px) */
@media (max-width: 380px) {
  .profile-name {
    font-size: 1.3rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .stat-number {
    font-size: 1.4rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .stats-grid {
    gap: 0.5rem;
  }

  .stat-card {
    padding: 0.75rem;
  }

  .content-area {
    padding: 1rem;
  }

  .card {
    padding: 1rem;
  }

  .dashboard-header {
    padding: 1.25rem 1rem;
  }

  .profile-avatar-wrapper {
    width: 80px;
    height: 80px;
  }

  .quick-links {
    gap: 0.5rem;
  }

  .badge-link {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }
}
