:root {
  --primary: #002288;
  --primary-dark: #00154f;
  --primary-light: #4466aa;
  --accent: #ff6600;
  --accent-hover: #e55c00;
  --accent-glow: rgba(255,102,0,0.2);
  --bg: #f4f6f8;
  --bg-card: #ffffff;
  --text: #222244;
  --text-muted: #4a5568;
  --border: #e1e4e6;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 12px 32px rgba(0,0,0,0.15);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --max-width: 1280px;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }
::selection { background: var(--accent); color: #fff; }
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== NAVIGATION ===== */
#scroll-progress {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 9999;
  transition: width 0.1s linear;
}
nav {
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 74px;
}
nav .brand {
  font-weight: 800;
  font-size: 1.6rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
nav ul { list-style: none; display: flex; gap: 22px; }
nav ul li a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  transition: color .3s;
}
nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .3s;
}
nav ul li a:hover { color: var(--primary); }
nav ul li a:hover::after { width: 100%; }
.nav-brand-group { display: flex; align-items: center; gap: 14px; }
.nav-avatar-wrap {
  width: 56px; height: 56px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  flex-shrink: 0;
  transition: transform .2s, box-shadow .2s;
}
.nav-avatar-wrap:hover {
  transform: scale(1.08);
  box-shadow: 0 3px 12px rgba(0,0,0,0.2);
}
.nav-avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  display: block;
  background: #fff;
}
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.hamburger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }
.hamburger.is-open span { background: var(--primary); }

/* ===== PROFILE MODAL ===== */
.profile-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.profile-modal.open { display: flex; }
.profile-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  cursor: pointer;
}
.profile-modal-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: modalIn .3s ease;
}
@keyframes modalIn { from { opacity:0; transform:scale(.9); } to { opacity:1; transform:scale(1); } }
.profile-modal-content img {
  width: 100%;
  max-width: 320px;
  border-radius: 0;
  display: block;
}
.profile-modal-close {
  position: absolute;
  top: 12px; right: 16px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 2;
}
.profile-modal-close:hover { background: rgba(0,0,0,0.8); }

/* ===== HERO ===== */
.hero {
  position: relative;
  height: calc(100svh - 74px);
  display: flex;
  color: white;
  padding: 0;
  overflow: hidden;
  margin-bottom: 0;
}
.hero-carousel-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  padding: 0;
}
.hero-carousel-bg .carousel {
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
  opacity: 1;
  margin: 0;
  padding: 0;
}
.hero-carousel-bg .carousel-track {
  width: 100%;
  height: 100%;
}
.hero-carousel-bg .carousel-slide {
  min-width: 100%;
  height: 100%;
  padding: 0;
  gap: 0;
  aspect-ratio: unset;
}
.hero-carousel-bg .carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Overlays intentionally removed for cleaner carousel images */
.hero-overlay { display: none; }

/* ===== CAROUSEL SLIDE TEXT ===== */
.carousel-slide-text {
  position: absolute;
  bottom: 40px;
  left: 40px;
  z-index: 2;
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
  max-width: 520px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s ease, transform .5s ease;
}
.carousel-slide.active .carousel-slide-text {
  opacity: 1;
  transform: translateY(0);
}
.carousel-slide { position: relative; }


/* ===== SECTIONS ===== */
section { padding: 60px 0; background: #fff; }
/* Prevent double spacing between adjacent sections */
section + section { padding-top: 0; }
#biography, #education { padding-top: 40px !important; }
.section-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  display: block;
  width: 97px; height: 6px;
  background: var(--accent);
  border-radius: 3px;
  margin-bottom: 3px;
  transition: width 0.6s;
}
.section-title:hover::after { width: 80px; }
.section-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.section-divider {
  width: 60px; height: 4px;
  background: var(--accent);
  border: 0;
  margin: 0 0 32px 0;
  border-radius: 2px;
}

/* ===== ABOUT ===== */
#about { padding-top: 20px; padding-bottom: 40px; }
.carousel--wide {
  width: 100%;
  aspect-ratio: 16 / 9;
}
.carousel--wide .carousel-slide {
  min-width: 100%;
  aspect-ratio: auto;
}

/* ===== CAROUSEL ===== */
.carousel {
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}
.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}
.carousel-slide {
  min-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 24px;
  color: var(--text-muted);
  font-size: 13px;
  aspect-ratio: 4/3;
}
.carousel-slide svg { opacity: .4; }
.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 14px;
  z-index: 5;
}
.carousel-dot {
  width: 10px; height: 10px;
  border-radius: 5px;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: all .35s ease;
  border: none;
  padding: 0;
}
.carousel-dot:hover { background: rgba(255,255,255,0.7); }
.carousel-dot.active {
  width: 28px;
  background: var(--accent);
}

/* ===== STATS ===== */
.stats-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 60px 0;
  text-align: center;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat-item { color: white; }
.stat-number {
  font-size: 42px;
  font-weight: 800;
  display: block;
  line-height: 1.2;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: .8;
  margin-top: 4px;
}

/* ===== SKILLS / RESEARCH INTERESTS ===== */
.interests-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.interest-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all .3s;
}
.interest-chip:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,34,136,0.2);
}

/* timeline removed */

/* ===== CARDS (shared) ===== */
.glass-card {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .4s, box-shadow .4s;
}
.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* ===== RESEARCH PROJECTS ===== */
.research-grid { display: flex; flex-direction: column; gap: 10px; }
.research-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: border-color .2s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.research-card:hover { border-color: var(--primary-light); }
.research-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
}
.research-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}
.research-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.research-meta .proj-date { font-weight: 600; color: var(--primary); }
.research-card .proj-team,
.research-card .proj-team.authors {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.research-card .proj-team .team-member { white-space: normal; }
.research-card .proj-team .team-role {
  color: var(--text-muted);
  font-weight: 400;
}
.research-card .proj-team .fac-name {
  color: var(--accent);
  font-weight: 700;
}
/* Institute / venue line — same language as publication venue */
.research-card .proj-venue,
.research-card .venue {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}
.research-card .proj-venue .venue-year,
.research-card .venue .venue-year {
  font-weight: 700;
  color: var(--primary);
}
.research-card .proj-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ===== AWARDS ===== */
.awards-grid { display: grid; gap: 10px; }
.award-item {
  display: flex;
  align-items: flex-start;
  gap: 0;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform .3s, box-shadow .3s, border-color .2s;
}
.award-item:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}
.award-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.award-text h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.4;
}
.award-text .gold-text {
  color: var(--primary);
  font-weight: 700;
}
.award-text .award-role {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
/* Venue + year — same as publication / training venue line */
.award-text .award-venue,
.award-text .venue {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.award-text .venue-year {
  font-weight: 700;
  color: var(--primary);
}

/* ===== TRAININGS ===== */
.trainings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.training-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: border-color .2s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.training-card:hover { border-color: var(--primary-light); }
.training-card h4 { margin: 0; font-size: 17px; font-weight: 600; color: var(--primary); line-height: 1.5; }
/* Venue line — same as publication venue (journal + year + citations) */
.training-card .training-venue,
.training-card .venue {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.training-card .venue-year {
  font-weight: 700;
  color: var(--primary);
}
.training-card .venue-citations {
  font-weight: 400;
  color: var(--primary);
}
.training-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}
.training-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.training-meta .training-date { font-weight: 600; color: var(--primary); }
.training-role {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(255,102,0,0.1);
  border-radius: 4px;
}
.training-role-row {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== PUBLICATIONS ===== */
.pub-toolbar {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.pub-toolbar-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.pub-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
}
.pub-search-icon {
  position: absolute;
  left: 0.85rem;
  display: flex;
  align-items: center;
  color: var(--text-muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  height: 2.75rem;
  padding: 0 2.6rem 0 2.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:hover { border-color: #999; }
.search-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,34,136,0.12); }
.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  height: 1rem; width: 1rem;
  margin-left: 0.25rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") no-repeat center / contain;
  cursor: pointer;
}
.pub-toolbar-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}
.field-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.select {
  appearance: none;
  height: 2.25rem;
  padding: 0 2.3rem 0 0.85rem;
  border: 1px solid var(--border);
  background-color: var(--bg-card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23002288' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s;
}
.select:hover { border-color: #999; }
.select:focus { outline: none; border-color: var(--primary); }
.spacer { flex: 1 1 auto; }
.pub-count {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pub-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  transition: border-color .2s;
}
@media (min-width: 768px) {
  .pub-card {
    padding: 22px 24px;
  }
}
.pub-card:hover {
  border-color: var(--primary-light);
}
.pub-card h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary);
  text-align: justify;
  margin: 0;
}
@media (min-width: 768px) { .pub-card h3 { font-size: 18px; } }
.pub-card h3 a { color: inherit; text-decoration: none; }
.pub-card h3 a:hover { color: var(--accent); }
.pub-card .authors {
  margin-top: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.pub-card .authors .fac-name {
  color: var(--accent);
  font-weight: 700;
}
.fac-name {
  color: var(--accent);
  font-weight: 700;
}
.pub-card .venue {
  margin-top: 0;
  font-size: 13px;
  color: var(--text-muted);
}
.pub-card .venue .venue-year {
  font-weight: 700;
  color: var(--primary);
}
.pub-card .venue .venue-citations {
  font-weight: 400;
  color: var(--primary);
}
.pub-card .view-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  align-self: flex-end;
  margin-top: auto;
}
.pub-card .view-link:hover { color: var(--accent); }
.pub-empty {
  padding: 32px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.pub-load-more {
  margin-top: 36px;
  text-align: center;
}
.pub-updated {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== COURSES ===== */
.course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.course-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color .2s, transform .2s;
}
.course-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
}
.course-card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.4;
}
.course-card .course-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.course-card .course-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.course-card .course-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 2px 0 0;
}
.course-empty {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .3s;
  align-self: flex-start;
}
.btn:active { transform: scale(0.97); }
/* Load More / accent outline — matches contact card style */
.btn-accent {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.btn-accent:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  color: var(--primary);
  border-color: var(--primary-light);
}
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,34,136,0.3);
}

/* ===== CONTACT ===== */
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: stretch;
}
.contact-item.office-hours-item {
  cursor: default;
}
.contact-item.office-hours-item:hover {
  color: var(--text);
  background: var(--bg-card);
  transform: translateY(-3px);
}
.contact-item.office-hours-item:hover svg {
  color: var(--primary);
}
.contact-item.office-hours-item strong {
  font-weight: 600;
}
.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  padding: 10px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
  transition: all .3s;
  position: relative;
  overflow: hidden;
}
.contact-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  background: var(--primary);
  color: white;
}
.contact-item:hover svg { color: white; }
.contact-item .ci { font-size: 18px; line-height: 1; }

/* ===== FOOTER ===== */
footer {
  background: var(--primary);
  color: rgba(255,255,255,0.85);
  padding: 48px 24px 36px;
  font-size: 15px;
}
.footer-main {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 80px;
}
.footer-brand { display: flex; align-items: flex-start; gap: 18px; min-width: 260px; }
.footer-logo {
  height: 90px;
  opacity: .85;
  flex-shrink: 0;
  margin-top: -2px;
}
.footer-text p { margin: 2px 0; opacity: .8; line-height: 1.7; font-size: 15px; }
.footer-text .footer-name {
  font-weight: 700;
  opacity: 1;
  font-size: 17px;
  color: #fff;
}
.footer-divider { margin: 0 6px; color: rgba(255,255,255,0.4); }
.footer-contact h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.footer-contact a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  margin-bottom: 6px;
  transition: color .25s;
  font-size: 15px;
}
.footer-contact a:hover { color: #fff; }
.footer-contact a svg { flex-shrink: 0; opacity: .7; }
.footer-contact a:hover svg { opacity: 1; }
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: disc;
  padding-left: 20px;
}
/* Reset inherited nav styles on footer quicklinks nav element */
footer nav.footer-links,
.footer-links {
  position: static;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: none !important;
  border-radius: 0;
  z-index: auto;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  gap: 0;
}
.footer-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 15px;
  padding: 0;
  transition: color .25s;
  display: list-item;
  line-height: 1.3;
}
.footer-links a:hover { color: #fff; }

/* ===== LOADING / EMPTY ===== */
.loading, .empty-state {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 14px;
}
.loading::after {
  content: '';
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== AOS overrides ===== */
[data-aos] { pointer-events: none; }
[data-aos].aos-animate { pointer-events: auto; }

/* ===== NO-JS fallback ===== */
.no-js .hero-tagline { border-right: none; white-space: normal; }

/* ===== BIOGRAPHY / ABOUT ===== */
.about-container {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  margin-top: 16px;
}
.about-container p:last-child { margin-bottom: 0; }
.about-container p { text-align: justify; }

/* ===== OFFICE HOURS (match contact cards) ===== */
.office-hours-card {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  padding: 16px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
  transition: all .3s;
  position: relative;
  overflow: hidden;
}
.office-hours-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}
.office-hours-card .oh-icon {
  color: var(--primary);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.office-hours-card .oh-text {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.office-hours-card .oh-text h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.office-hours-card .oh-text p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== EDUCATION ===== */
.education-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.edu-card {
  display: flex;
  gap: 0;
  align-items: flex-start;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: border-color .2s, transform .2s;
}
.edu-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
}
.edu-details h3 svg {
  color: var(--primary);
  vertical-align: -2px;
  margin-right: 4px;
}
.edu-details { flex: 1; }
.edu-details h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.edu-details .edu-inst {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}
.edu-details .edu-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
  justify-content: flex-start;
}
.edu-details .edu-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.edu-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(255,102,0,0.1);
  border-radius: 6px;
  margin-top: 8px;
}

/* ===== SKILLS TABS ===== */
.skills-tabs {
  margin-top: 16px;
}
.skills-tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.skills-tab-btn {
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  background: var(--bg-card);
  border: 1px solid rgba(0, 34, 136, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all .25s;
}
.skills-tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0, 34, 136, 0.04);
}
.skills-tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 600;
}
.skills-tab-content {
  display: none;
}
.skills-tab-content.active {
  display: block;
}
.skills-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.skills-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.skills-chip:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .hero { animation: none; }
  .hs, .hero-shape-square { animation: none !important; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .course-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .carousel-dots { gap: 12px; bottom: 12px; }
  .carousel-dot { width: 7px; height: 7px; }
  .carousel-dot.active { width: 18px; }

  nav { backdrop-filter: none; -webkit-backdrop-filter: none; }
  nav ul { display: none; position: fixed; top: 74px; left: 0; right: 0; bottom: 0; background: #fff; flex-direction: column; padding: 12px 24px; gap: 4px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-hover); z-index: 1001; }
  nav ul.open { display: flex; }
  nav ul li { padding: 0; }
  nav ul li a {
    display: block;
    padding: 14px 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    border-radius: var(--radius-sm);
    transition: background .2s, color .2s;
    border-bottom: 1px solid var(--border);
  }
  nav ul li a::after { display: none; }
  nav ul li a:hover {
    background: rgba(0,34,136,0.08);
    color: var(--primary);
  }
  .hamburger { display: flex; }
  .hero { height: calc(60svh - 74px); }
  .section-title { font-size: 26px; }
  section { padding: 50px 0; }
  section + section { padding-top: 0; }
  .interests-grid { gap: 10px; }
  .interest-chip { padding: 4px 14px; font-size: 13px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .stat-number { font-size: 32px; }
  .contact-grid { flex-direction: column; }
  .award-item { text-align: left; }
  .training-meta { justify-content: flex-start; }
  .research-card { padding: 18px; }
  .course-grid { grid-template-columns: 1fr; }
  .trainings-grid { grid-template-columns: 1fr; }
  .footer-main { flex-direction: column; gap: 32px; }
  .footer-brand { flex-direction: column; align-items: flex-start; text-align: left; }
  .pub-toolbar-controls { flex-direction: column; align-items: stretch; }
  .pub-toolbar-controls .field-label { flex-direction: column; align-items: stretch; width: 100%; }
  .pub-toolbar-controls .select { width: 100%; }
  .pub-toolbar-row { flex-direction: column; align-items: stretch; }
  .pub-toolbar-row .pub-count { margin-left: 0; }
  .spacer { display: none; }
  .pub-card { padding: 16px 18px; }
  .pub-card h3 { font-size: 14px; }
  .edu-card { text-align: left; }
  .edu-details .edu-meta { justify-content: flex-start; }
  .office-hours-card { flex-direction: column; text-align: center; }
  .skills-tab-buttons { justify-content: center; }
  .bio-section { padding: 20px 22px; }
  .carousel-slide-text { bottom: 24px; left: 20px; font-size: 16px; max-width: 70vw; }
}

/* ===== ABOUT LAYOUT WITH PROFILE PHOTO ===== */
.about-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-top: 12px;
}
.about-photo-wrap {
  flex-shrink: 0;
}
.about-photo-frame {
  width: 200px;
  height: 200px;
  border-radius: 16px;
  padding: 4px;
  /* Brand (primary) top-left & bottom-right; accent on remaining corners with soft merge */
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--accent) 35%,
    var(--accent) 65%,
    var(--primary) 100%
  );
  box-shadow: 0 4px 20px rgba(0, 34, 136, 0.18);
}
.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  background: #fff;
}
.about-container {
  flex: 1;
  min-width: 0;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.about-container p:last-child { margin-bottom: 0; }
.about-container p { text-align: justify; }

/* Section counts (right-aligned like publications) */
.section-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
  min-height: 1.2em;
}
.section-count,
.pub-count {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}
.pub-toolbar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pub-toolbar-controls .spacer { flex: 1; }
.pub-count { margin-left: auto; }

/* Ensure footer quicklinks never white-on-white */
.footer-links a {
  color: rgba(255, 255, 255, 0.8) !important;
  background: transparent !important;
}
.footer-links a:hover {
  color: #ffffff !important;
}

/* Nav brand without avatar spacing */
.nav-brand-group { display: flex; align-items: center; gap: 14px; }

/* Card consistency */
.research-card,
.course-card,
.training-card,
.edu-card,
.award-item {
  border: 1px solid var(--border);
}

/* Carousel text — no overlay background */
.carousel-slide-text span {
  display: inline-block;
}

.venue-sep {
  color: var(--text-muted);
  font-weight: 400;
  margin: 0 0.15em;
}
.edu-awards {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
}
.edu-awards .venue-citations {
  font-weight: 400;
  color: var(--primary);
}
.award-text .award-desc.venue-citations,
.award-text .venue-citations {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.5;
}

footer,
footer .container,
footer .footer-main {
  background: var(--primary) !important;
}
.footer-links a,
.footer-contact a,
footer a {
  color: rgba(255, 255, 255, 0.85) !important;
  background: transparent !important;
  background-color: transparent !important;
}
.footer-links a:hover,
.footer-contact a:hover,
footer a:hover {
  color: #ffffff !important;
}

.section-toolbar:empty,
.section-count:empty,
.pub-count:empty { display: none; }
.section-toolbar { min-height: 0; margin-bottom: 0; }
