/* ============================================================
   Dr. Arulmurugan Ramu — Academic Website
   Design: Meridian — dark hero / warm ivory body / amber + teal
   Fonts: Fraunces (serif) + Outfit (sans-serif) via Google Fonts
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,300;1,9..144,400;1,9..144,500;1,9..144,600&family=Outfit:wght@300;400;500;600;700&display=swap');

/* --- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* --- Design Tokens ---------------------------------------- */
:root {
  /* Dark / hero palette */
  --void:          #080e1c;
  --hero-bg:       #0b1629;
  --deep:          #0e2d52;
  --mid:           #1a4d72;

  /* Accent colours */
  --teal:          #0e7490;
  --teal-light:    #0ea5c4;
  --amber:         #c06a18;
  --amber-mid:     #d97c1e;
  --amber-light:   #f0a840;
  --amber-pale:    #fde8c4;

  /* Light / body backgrounds */
  --cream:         #faf7f1;
  --paper:         #f0ead9;
  --surface:       #ffffff;

  /* Text */
  --ink:           #0f1825;
  --text-1:        #1a2840;
  --text-2:        #374a63;
  --text-3:        #6b7e97;

  /* Borders */
  --border:        #ddd5c6;
  --border-2:      #c8beaf;

  /* Shadows */
  --sh-sm: 0 1px 3px rgba(8,14,28,.08), 0 1px 2px rgba(8,14,28,.05);
  --sh:    0 4px 14px rgba(8,14,28,.10), 0 2px 6px rgba(8,14,28,.06);
  --sh-lg: 0 12px 40px rgba(8,14,28,.14), 0 4px 16px rgba(8,14,28,.08);

  /* Typography */
  --font:       'Outfit', system-ui, -apple-system, sans-serif;
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;

  /* Layout */
  --nav-h:  66px;
  --max-w:  1120px;
  --r-sm:   6px;
  --r:      12px;
  --r-lg:   20px;

  /* Transitions */
  --t:      200ms ease;
  --t-md:   330ms ease;
}

/* --- Base ------------------------------------------------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--teal-light); }
h1, h2, h3, h4 { line-height: 1.25; color: var(--text-1); font-weight: 600; }
p { color: var(--text-2); }
ul { list-style: none; }

/* --- Layout ----------------------------------------------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

.section { padding: 88px 0; }
.section-alt { background: var(--paper); }

/* --- Section Headers -------------------------------------- */
.section-header {
  text-align: center;
  margin-bottom: 52px;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.9rem, 3.5vw, 2.55rem);
  font-weight: 500;
  color: var(--text-1);
  display: inline-block;
  position: relative;
  letter-spacing: -0.01em;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 36px;
  height: 2px;
  background: var(--amber-mid);
  border-radius: 1px;
  margin: 14px auto 0;
}

.section-header p {
  max-width: 580px;
  margin: 18px auto 0;
  font-size: 1.02rem;
  color: var(--text-2);
  line-height: 1.75;
}
.section-header p a { color: var(--teal); font-weight: 500; }
.section-header p a:hover { color: var(--teal-light); }

/* --- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: all var(--t);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.btn-primary {
  background: var(--deep);
  color: #fff;
  border-color: var(--deep);
}
.btn-primary:hover {
  background: var(--void);
  border-color: var(--void);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--deep);
  border-color: var(--border-2);
}
.btn-outline:hover {
  border-color: var(--deep);
  color: var(--deep);
  background: rgba(14,45,82,.05);
}

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

/* --- Navigation ------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(250,247,241,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--t-md);
}
.site-header.scrolled {
  box-shadow: var(--sh);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 20px;
}

.nav-brand {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.18rem;
  font-weight: 500;
  color: var(--text-1);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}
.nav-brand:hover { color: var(--teal); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}

.nav-links li a {
  padding: 6px 11px;
  border-radius: var(--r-sm);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  transition: all var(--t);
}
.nav-links li a:hover,
.nav-links li a.active {
  color: var(--text-1);
  background: rgba(14,45,82,.07);
}

.nav-links li a.btn-nav {
  background: var(--deep);
  color: #fff;
  padding: 7px 17px;
  margin-left: 6px;
  border-radius: var(--r-sm);
}
.nav-links li a.btn-nav:hover {
  background: var(--void);
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--r-sm);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-1);
  border-radius: 2px;
  transition: all var(--t);
}

/* --- Hero ------------------------------------------------- */
.hero {
  background: var(--hero-bg);
  padding: 96px 0 92px;
  position: relative;
  overflow: hidden;
}

/* Subtle dot-grid overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

/* Warm amber radial glow */
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: 10%;
  width: 560px;
  height: 560px;
  background: radial-gradient(ellipse at center,
    rgba(192,106,24,.13) 0%,
    rgba(192,106,24,.04) 40%,
    transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 64px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.hero-photo-wrap {
  display: flex;
  justify-content: center;
  position: relative;
  padding-top: 18px;
}

/* Decorative concentric rings around photo */
.hero-photo-wrap::before {
  content: '';
  position: absolute;
  width: 218px;
  height: 218px;
  border-radius: 50%;
  border: 1px solid rgba(192,106,24,.45);
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}
.hero-photo-wrap::after {
  content: '';
  position: absolute;
  width: 244px;
  height: 244px;
  border-radius: 50%;
  border: 1px solid rgba(192,106,24,.15);
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
}

.hero-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid rgba(217,124,30,.8);
  box-shadow:
    0 0 0 7px rgba(217,124,30,.09),
    0 20px 60px rgba(8,14,28,.5);
  display: block;
  flex-shrink: 0;
}

.hero-photo-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mid) 0%, var(--teal) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(217,124,30,.8);
  box-shadow: 0 0 0 7px rgba(217,124,30,.09), var(--sh-lg);
  flex-shrink: 0;
}
.hero-photo-placeholder .initials {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 2px;
}

/* Hero text */
.hero-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--amber-light);
  margin-bottom: 12px;
}

.hero-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  font-weight: 600;
  color: #f0ebe2;
  margin-bottom: 10px;
  line-height: 1.13;
  letter-spacing: -0.025em;
}

.hero-affiliation {
  font-size: 0.97rem;
  color: rgba(240,235,226,.58);
  margin-bottom: 22px;
  line-height: 1.65;
}

.hero-bio {
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(240,235,226,.72);
  margin-bottom: 26px;
  max-width: 650px;
}
.hero-bio strong {
  color: rgba(240,235,226,.95);
  font-weight: 600;
}

.hero-interests {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.tag {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(255,255,255,.07);
  color: rgba(240,235,226,.8);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,.11);
  transition: all var(--t);
}
.tag:hover {
  background: rgba(255,255,255,.12);
  color: rgba(240,235,226,.95);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Hero-specific button overrides */
.hero .btn-primary {
  background: var(--amber-mid);
  border-color: var(--amber-mid);
  color: #fff;
}
.hero .btn-primary:hover {
  background: var(--amber-light);
  border-color: var(--amber-light);
  color: #fff;
}
.hero .btn-outline {
  border-color: rgba(255,255,255,.22);
  color: rgba(240,235,226,.82);
  background: transparent;
}
.hero .btn-outline:hover {
  border-color: rgba(255,255,255,.46);
  color: #f0ebe2;
  background: rgba(255,255,255,.07);
}

/* --- Research Grid ---------------------------------------- */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
}

.research-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 30px 28px 26px;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--t-md), transform var(--t-md), border-color var(--t-md);
}

/* Top-border reveal on hover */
.research-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal) 0%, var(--teal-light) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 360ms ease;
}

.research-card:hover {
  box-shadow: var(--sh);
  transform: translateY(-3px);
  border-color: var(--border-2);
}
.research-card:hover::before { transform: scaleX(1); }

.research-icon {
  width: 50px;
  height: 50px;
  background: rgba(14,116,144,.09);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--teal);
  transition: background var(--t);
}
.research-card:hover .research-icon { background: rgba(14,116,144,.14); }

.research-card h3 {
  font-size: 1.06rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-1);
}

.research-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 18px;
}

.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-sm {
  display: inline-block;
  padding: 3px 10px;
  background: var(--paper);
  color: var(--text-2);
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border);
  letter-spacing: 0.02em;
}

/* --- Publications ----------------------------------------- */
.pub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
  justify-content: center;
}

.pub-filter {
  padding: 7px 20px;
  border: 1.5px solid var(--border);
  border-radius: 30px;
  background: transparent;
  color: var(--text-2);
  font-size: 0.86rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--t);
}
.pub-filter:hover {
  border-color: var(--text-1);
  color: var(--text-1);
}
.pub-filter.active {
  background: var(--text-1);
  border-color: var(--text-1);
  color: #fff;
}

.pub-list { display: flex; flex-direction: column; }

.pub-item {
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity var(--t);
  animation: fadeIn 200ms ease;
}
.pub-item:first-child { border-top: 1px solid var(--border); }
.pub-item.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: none; }
}

.pub-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pub-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.pub-badge.journal    { background: rgba(14,116,144,.1);   color: #0a6578; }
.pub-badge.conference { background: rgba(192,106,24,.12);  color: #8a4c0c; }
.pub-badge.book       { background: rgba(30,110,60,.1);    color: #1a6038; }
.pub-badge.chapter    { background: rgba(100,50,160,.1);   color: #5a2a90; }

.pub-indexed {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.3px;
}

.pub-year {
  font-size: 0.82rem;
  color: var(--text-3);
  font-weight: 500;
}

.pub-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-1);
  line-height: 1.44;
}
.pub-title a { color: inherit; }
.pub-title a:hover { color: var(--teal); }

.pub-authors {
  font-size: 0.88rem;
  color: var(--text-2);
  margin-bottom: 4px;
}
.pub-venue {
  font-size: 0.86rem;
  color: var(--text-3);
  margin-bottom: 10px;
}

.pub-links { display: flex; gap: 14px; }
.pub-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px dashed currentColor;
  padding-bottom: 1px;
}
.pub-link:hover { color: var(--teal-light); border-bottom-style: solid; }

/* Year group heading (All view) */
.pub-year-heading {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.65rem;
  font-weight: 400;
  color: var(--text-1);
  border-left: 3px solid var(--amber-mid);
  padding: 4px 18px;
  margin: 48px 0 8px;
  letter-spacing: -0.015em;
  background: rgba(217,124,30,.04);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}


.pub-more { text-align: center; margin-top: 48px; }

/* --- Teaching --------------------------------------------- */
.teaching-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 16px;
}

.course-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px 24px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  transition: box-shadow var(--t), border-color var(--t);
}
.course-card:hover {
  box-shadow: var(--sh-sm);
  border-color: var(--border-2);
}

.course-level {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  margin-top: 2px;
}
.course-level.ug { background: rgba(14,116,144,.1);  color: var(--teal); }
.course-level.pg { background: rgba(192,106,24,.12); color: var(--amber); }

.course-info h3 {
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 4px;
}
.course-info p { font-size: 0.88rem; color: var(--text-2); line-height: 1.6; }
.course-semester {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
}

/* --- Team ------------------------------------------------- */
.team-subheading {
  font-size: 1.04rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 20px;
  margin-top: 48px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.team-subheading:first-of-type { margin-top: 0; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.team-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--deep), var(--teal));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}
.team-avatar.teal { background: linear-gradient(135deg, var(--teal), var(--teal-light)); }

.team-info h4 { font-size: 0.95rem; margin-bottom: 4px; color: var(--text-1); }
.team-info p  { font-size: 0.84rem; color: var(--text-2); line-height: 1.5; margin-bottom: 4px; }
.team-year    { font-size: 0.78rem; color: var(--text-3); font-weight: 500; }

/* Alumni */
.alumni-section { margin-top: 52px; }
.alumni-intro   { margin-bottom: 20px; color: var(--text-2); }

.alumni-list { display: flex; flex-direction: column; gap: 10px; }

.alumni-list li {
  font-size: 0.93rem;
  color: var(--text-2);
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber-mid);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  line-height: 1.65;
}
.alumni-list li strong { color: var(--text-1); }
.alumni-list li a { color: var(--teal); }
.alumni-list li a:hover { color: var(--teal-light); }

/* Join Lab card */
.join-lab { margin-top: 52px; }

.join-card {
  background: linear-gradient(135deg, var(--deep) 0%, var(--mid) 100%);
  border-radius: var(--r-lg);
  padding: 40px 44px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.join-card::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255,255,255,.05) 0%, transparent 65%);
  pointer-events: none;
}
.join-card::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -40px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(217,124,30,.08) 0%, transparent 70%);
  pointer-events: none;
}

.join-card h3 {
  color: #fff;
  font-size: 1.45rem;
  margin-bottom: 14px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}
.join-card p {
  color: rgba(255,255,255,.78);
  margin-bottom: 26px;
  max-width: 620px;
  line-height: 1.75;
  position: relative;
  z-index: 1;
}
.join-card a:not(.btn) { color: var(--amber-light); }
.join-card a:not(.btn):hover { color: #fff; }

.join-card .btn-primary {
  background: var(--amber-mid);
  border-color: var(--amber-mid);
  color: #fff;
  position: relative;
  z-index: 1;
}
.join-card .btn-primary:hover {
  background: var(--amber-light);
  border-color: var(--amber-light);
  color: #fff;
}

/* --- News ------------------------------------------------- */
.news-list { display: flex; flex-direction: column; }

.news-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 26px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.news-item:first-child { border-top: 1px solid var(--border); }

.news-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--amber);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.news-body p { font-size: 0.95rem; color: var(--text-2); }
.news-body strong { color: var(--text-1); }
.news-body a { color: var(--teal); }
.news-body a:hover { color: var(--teal-light); }

/* --- Contact ---------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 60px;
  align-items: start;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.contact-item:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.contact-item svg { flex-shrink: 0; color: var(--teal); margin-top: 2px; }
.contact-item > div { display: flex; flex-direction: column; gap: 3px; }
.contact-item strong {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-3);
  font-weight: 700;
}
.contact-item a,
.contact-item span { font-size: 0.96rem; color: var(--text-2); }
.contact-item a:hover { color: var(--teal); }

.social-links { display: flex; gap: 10px; margin-top: 10px; }

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--paper);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: all var(--t);
}
.social-btn:hover {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

/* --- Form ------------------------------------------------- */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 34px;
  box-shadow: var(--sh-sm);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.form-group label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-1);
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--cream);
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text-1);
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(14,116,144,.12);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236b7e97' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='m1 1 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 12px;
}

/* --- Footer ----------------------------------------------- */
.site-footer {
  background: var(--void);
  color: rgba(255,255,255,.55);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-inner p { color: rgba(255,255,255,.45); font-size: 0.86rem; }

.footer-links a {
  color: rgba(255,255,255,.45);
  font-size: 0.86rem;
  transition: color var(--t);
}
.footer-links a:hover { color: var(--amber-light); }

/* --- Responsive ------------------------------------------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-photo-wrap { justify-content: center; }
  .hero-interests { justify-content: center; }
  .hero-links { justify-content: center; }
  .hero::after { display: none; }
  .contact-grid { grid-template-columns: 1fr; gap: 44px; }
  .teaching-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(250,247,241,.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px 20px;
    gap: 4px;
    box-shadow: var(--sh);
  }
  .nav-links.open  { display: flex; }
  .nav-links li    { width: 100%; }
  .nav-links li a  { display: block; padding: 10px 14px; width: 100%; }
  .nav-links li a.btn-nav { text-align: center; margin-top: 6px; margin-left: 0; }

  .section { padding: 60px 0; }
  .hero { padding: 64px 0 58px; }

  .research-grid { grid-template-columns: 1fr; }
  .team-grid     { grid-template-columns: 1fr; }
  .news-item     { grid-template-columns: 1fr; gap: 4px; }
  .join-card     { padding: 28px 26px; }
  .footer-inner  { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .hero-photo { width: 170px; height: 170px; }
  .hero-photo-placeholder { width: 170px; height: 170px; }
  .hero-photo-placeholder .initials { font-size: 2.5rem; }
  .hero-photo-wrap::before { width: 186px; height: 186px; }
  .hero-photo-wrap::after  { width: 210px; height: 210px; }
  .hero-links { flex-direction: column; align-items: center; }
  .contact-form { padding: 22px; }
  .join-card { padding: 24px 20px; }
}

/* --- Utility ---------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--amber-mid); }

/* === FEATURES 1-15 ======================================== */

/* --- #6 Dark mode ----------------------------------------- */
[data-theme="dark"] {
  --cream:   #0d1520;
  --paper:   #101c2e;
  --surface: #13243a;
  --ink:     #e8dfd0;
  --text-1:  #d8cfc0;
  --text-2:  #9faec0;
  --text-3:  #607080;
  --border:  #1e3450;
  --border-2:#254060;
}
[data-theme="dark"] .section-alt  { background: var(--paper); }
[data-theme="dark"] .section      { background: var(--cream); }
[data-theme="dark"] .research-card,
[data-theme="dark"] .course-card,
[data-theme="dark"] .team-card,
[data-theme="dark"] .pub-item,
[data-theme="dark"] .talk-card,
[data-theme="dark"] .contact-form { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .pub-search   { background: var(--surface); color: var(--text-1); border-color: var(--border); }
[data-theme="dark"] .join-card    { background: var(--surface); }
[data-theme="dark"] .pub-year-heading { color: var(--text-3); }

/* Dark mode toggle button */
.dark-toggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,.8);
  transition: background 200ms, border-color 200ms;
  margin-left: auto;
  margin-right: 8px;
  flex-shrink: 0;
}
.dark-toggle:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.4); }
.dark-toggle .icon-moon { display: none; }
[data-theme="dark"] .dark-toggle .icon-sun  { display: none; }
[data-theme="dark"] .dark-toggle .icon-moon { display: block; }
.scrolled .dark-toggle { color: var(--text-2); border-color: var(--border); }
.scrolled .dark-toggle:hover { background: var(--paper); }

/* --- #3 Back-to-top --------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 28px; right: 24px;
  width: 42px; height: 42px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 280ms ease, transform 280ms ease, background 200ms;
  pointer-events: none;
  z-index: 900;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover   { background: var(--teal-light); }

/* --- #4 Wave divider -------------------------------------- */
.wave-divider {
  background: var(--cream);
  line-height: 0;
  margin: 0;
}
.wave-divider svg { display: block; width: 100%; height: 56px; }

/* --- #7 Publication search -------------------------------- */
.pub-search-wrap { margin-bottom: 16px; }
.pub-search {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .92rem;
  font-family: var(--font);
  color: var(--text-1);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7e97' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 14px center;
  transition: border-color 200ms, box-shadow 200ms;
}
.pub-search:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,116,144,.12); }
.pub-search::placeholder { color: var(--text-3); }

/* --- #1 BibTeX copy button -------------------------------- */
.bib-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .6px;
  color: var(--text-3);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 9px;
  cursor: pointer;
  transition: color 180ms, border-color 180ms, background 180ms;
  font-family: var(--font);
}
.bib-btn:hover  { color: var(--teal); border-color: var(--teal); background: rgba(14,116,144,.06); }
.bib-btn.copied { color: #0a6b50; border-color: #0a6b50; background: rgba(10,107,80,.08); }

/* --- #9 Typewriter ---------------------------------------- */
.typewriter-cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
  margin-left: 1px;
  font-weight: 300;
  opacity: .7;
}
@keyframes blink { 0%,100% { opacity: .7; } 50% { opacity: 0; } }

/* --- #10 Badge colouring enhancements --------------------- */
.pub-indexed { font-size: .7rem; font-weight: 700; padding: 1px 6px; border-radius: 3px; margin-left: 4px; text-transform: uppercase; letter-spacing: .4px; }
.pub-indexed { color: #5b6f85; background: rgba(91,111,133,.1); border: 1px solid rgba(91,111,133,.2); }
.pub-item[data-type="journal"] .pub-venue em { color: var(--teal); font-style: normal; font-weight: 600; }

/* --- #5 PhD callout --------------------------------------- */
.phd-open-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-mid) 100%);
  color: #fff;
  font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(192,106,24,.25);
}

/* --- #11 BibTeX download link ----------------------------- */
.bib-dl-link {
  margin-left: 10px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  border: 1px solid var(--teal);
  border-radius: 4px;
  padding: 2px 10px;
  white-space: nowrap;
  transition: background 180ms, color 180ms;
}
.bib-dl-link:hover { background: var(--teal); color: #fff; }

/* --- #8 Live citation stat -------------------------------- */
.stat-number.live-loading { opacity: .4; }

/* --- Talks & Keynotes ------------------------------------- */
.talks-list { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }

.talk-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  padding: 20px 24px;
  transition: box-shadow 200ms ease, border-color 200ms ease;
}
.talk-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.07);
  border-left-color: var(--amber-mid);
}

.talk-type-badge {
  flex-shrink: 0;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--teal);
  background: rgba(14,116,144,.08);
  border: 1px solid rgba(14,116,144,.2);
  padding: 4px 10px;
  border-radius: 4px;
  margin-top: 2px;
  white-space: nowrap;
}

.talk-body { flex: 1; }
.talk-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.talk-event {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
}
.talk-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--text-3);
}
.talk-date {
  font-weight: 600;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.talk-sep { color: var(--border-2); }

@media (max-width: 480px) {
  .talk-card { flex-direction: column; gap: 10px; }
}

/* --- Stats Bar -------------------------------------------- */
.stats-bar {
  background: var(--deep);
  padding: 28px 0;
  border-top: 1px solid rgba(255,255,255,.07);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-item { display: flex; flex-direction: column; gap: 5px; }
.stat-number {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--amber-light);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat-label {
  font-size: .72rem;
  font-weight: 500;
  color: rgba(255,255,255,.48);
  text-transform: uppercase;
  letter-spacing: 1.3px;
}
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 16px; }
}

/* --- Featured Badge --------------------------------------- */
.pub-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--amber);
  background: var(--amber-pale);
  border: 1px solid #f0c88a;
  padding: 2px 8px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 6px;
}

/* --- Hamburger → × animation ------------------------------ */
.nav-toggle span {
  transition: transform 240ms ease, opacity 240ms ease;
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================================
   VISUAL EFFECTS — 7 enhancements
   ============================================================ */

/* --- #1 Hero particle canvas ------------------------------ */
#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: .55;
}

/* --- #2 Staggered scroll reveal --------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 600ms cubic-bezier(.22,1,.36,1),
              transform 600ms cubic-bezier(.22,1,.36,1);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
/* Stagger siblings */
.reveal:nth-child(1) { transition-delay: 0ms; }
.reveal:nth-child(2) { transition-delay: 80ms; }
.reveal:nth-child(3) { transition-delay: 160ms; }
.reveal:nth-child(4) { transition-delay: 240ms; }
.reveal:nth-child(5) { transition-delay: 320ms; }
.reveal:nth-child(6) { transition-delay: 400ms; }

/* --- #3 Glassmorphism nav upgrade ------------------------- */
.site-header {
  background: rgba(250,247,241,.72) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: 1px solid rgba(221,213,198,.5) !important;
}
.site-header.scrolled {
  background: rgba(250,247,241,.88) !important;
  box-shadow: 0 2px 24px rgba(8,14,28,.08), 0 1px 0 rgba(221,213,198,.6) !important;
}
[data-theme="dark"] .site-header {
  background: rgba(13,21,32,.72) !important;
  border-bottom: 1px solid rgba(30,52,80,.5) !important;
}
[data-theme="dark"] .site-header.scrolled {
  background: rgba(13,21,32,.88) !important;
}

/* --- #4 Ambient glow on stat numbers ---------------------- */
@keyframes statPulse {
  0%, 100% { text-shadow: 0 0 0 transparent; }
  50%       { text-shadow: 0 0 28px rgba(240,168,64,.45), 0 0 60px rgba(240,168,64,.18); }
}
.stat-number {
  animation: statPulse 3.6s ease-in-out infinite;
}
.stat-item:nth-child(2) .stat-number { animation-delay: .9s; }
.stat-item:nth-child(3) .stat-number { animation-delay: 1.8s; }
.stat-item:nth-child(4) .stat-number { animation-delay: 2.7s; }

/* --- #5 Counter animation (JS driven, just styling) ------- */
.stat-number.counting {
  transition: none;
}

/* --- #6 Gradient text headings ---------------------------- */
.section-header h2 {
  background: linear-gradient(135deg, var(--text-1) 0%, var(--teal) 60%, var(--amber-mid) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent !important;
}
/* Keep the amber underline visible */
.section-header h2::after {
  background: linear-gradient(90deg, var(--teal), var(--amber-mid));
}
[data-theme="dark"] .section-header h2 {
  background: linear-gradient(135deg, var(--text-1) 0%, #22d3ee 55%, var(--amber-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- #7 Custom cursor ------------------------------------- */
#cursorDot {
  position: fixed;
  top: 0; left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 200ms ease, height 200ms ease, background 200ms ease, opacity 200ms ease;
  opacity: 0;
  mix-blend-mode: multiply;
}
#cursorDot.hovering {
  width: 20px;
  height: 20px;
  background: var(--amber-mid);
  opacity: .55;
}
body:hover #cursorDot { opacity: .75; }

@media (pointer: coarse) {
  #cursorDot { display: none; }
}

/* ============================================================
   FEATURES 8–12
   ============================================================ */

/* --- #12 Reading progress bar ----------------------------- */
#readingProgress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--amber-mid));
  z-index: 10000;
  transition: width 80ms linear;
  border-radius: 0 2px 2px 0;
  pointer-events: none;
}

/* --- #8 Hero tag filter buttons --------------------------- */
.tag-filter-btn {
  background: none;
  border: none;
  font-family: var(--font);
  cursor: pointer;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.tag-filter-btn:hover,
.tag-filter-btn.active-tag {
  background: var(--amber-mid);
  color: #fff;
  border-color: var(--amber-mid);
}
.tag-filter-btn.active-tag {
  box-shadow: 0 0 0 2px rgba(192,106,24,.35);
}

/* --- #9 Publications toolbar ------------------------------ */
.pub-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 0;
}

.pub-view-toggle {
  display: flex;
  gap: 4px;
  background: var(--paper);
  padding: 3px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}
[data-theme="dark"] .pub-view-toggle {
  background: var(--surface);
  border-color: var(--border);
}

.view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-3);
  transition: all var(--t);
}
.view-btn.active,
.view-btn:hover {
  background: var(--surface);
  color: var(--teal);
  box-shadow: var(--sh-sm);
}
[data-theme="dark"] .view-btn.active {
  background: var(--deep);
}

/* --- #9 Timeline view ------------------------------------- */
#pubList.timeline-view {
  position: relative;
  padding-left: 48px;
}
#pubList.timeline-view::before {
  content: '';
  position: absolute;
  left: 18px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--teal), var(--amber-mid), transparent);
  border-radius: 1px;
}
#pubList.timeline-view .pub-year-heading {
  position: relative;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--cream);
  padding: 2px 10px 2px 0;
  margin: 32px 0 12px -48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
[data-theme="dark"] #pubList.timeline-view .pub-year-heading {
  background: var(--cream);
}
#pubList.timeline-view .pub-year-heading::before {
  content: '';
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--teal);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--teal);
  flex-shrink: 0;
}
#pubList.timeline-view .pub-item {
  position: relative;
  margin-bottom: 14px;
  border-left: 2px solid var(--border);
  border-radius: 0 var(--r) var(--r) 0;
  padding-left: 18px;
}
#pubList.timeline-view .pub-item::before {
  content: '';
  position: absolute;
  left: -7px; top: 20px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--amber-mid);
  border: 2px solid var(--surface);
}

/* --- #10 Co-author network -------------------------------- */
.coauthor-network-wrap {
  display: flex;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--sh);
}
[data-theme="dark"] .coauthor-network-wrap {
  background: var(--surface);
  border-color: var(--border);
}
.coauthor-svg {
  width: 100%;
  max-width: 700px;
  height: auto;
  display: block;
}
.node-label {
  font-family: var(--font);
  font-size: 11px;
  fill: var(--text-2);
  pointer-events: none;
  text-anchor: middle;
}
.node-circle {
  cursor: default;
  transition: r 200ms ease;
}
.node-circle.center-node {
  fill: var(--teal);
}
.coauthor-edge {
  stroke: var(--border-2);
  stroke-width: 1.2;
  opacity: .6;
}

/* --- #11 Citation copy button ----------------------------- */
.cite-btn {
  position: relative;
}
.cite-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-lg);
  z-index: 50;
  min-width: 130px;
  overflow: hidden;
}
.cite-btn.open .cite-menu { display: block; }
.cite-menu button {
  display: block;
  width: 100%;
  padding: 9px 14px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: .8rem;
  color: var(--text-2);
  text-align: left;
  transition: background var(--t);
}
.cite-menu button:hover {
  background: var(--paper);
  color: var(--text-1);
}
[data-theme="dark"] .cite-menu button:hover {
  background: var(--deep);
}

/* ============================================================
   INNOVATIVE FEATURES 1, 5, 6, 7, 8, 9, 10
   ============================================================ */

/* --- #1 AI Chatbot Widget ---------------------------------- */
.chat-widget {
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.chat-fab {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--teal), var(--deep));
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 13px 20px 13px 16px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(14,116,144,.45);
  font-family: var(--font);
  font-size: .88rem;
  font-weight: 600;
  transition: all 300ms ease;
}
.chat-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(14,116,144,.5);
}
.chat-fab-label { white-space: nowrap; }

.chat-panel[hidden] { display: none !important; }
.chat-panel {
  width: 360px;
  max-width: calc(100vw - 48px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(8,14,28,.18), 0 4px 20px rgba(8,14,28,.10);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
[data-theme="dark"] .chat-panel {
  background: var(--surface);
  border-color: var(--border);
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, var(--deep), var(--teal));
  color: #fff;
}
.chat-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  flex-shrink: 0;
}
.chat-title { font-weight: 600; font-size: .9rem; }
.chat-subtitle { font-size: .72rem; opacity: .75; }
.chat-close {
  margin-left: auto;
  background: none; border: none;
  color: rgba(255,255,255,.8);
  cursor: pointer; font-size: 1rem;
  padding: 4px; border-radius: 4px;
  transition: color var(--t);
}
.chat-close:hover { color: #fff; }

.chat-messages {
  flex: 1;
  padding: 16px;
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: .83rem;
  line-height: 1.55;
}
.chat-msg.bot {
  background: var(--paper);
  color: var(--text-1);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
[data-theme="dark"] .chat-msg.bot { background: var(--deep); }
.chat-msg.user {
  background: var(--teal);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-suggestions {
  padding: 4px 12px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chat-suggest {
  font-family: var(--font);
  font-size: .73rem;
  padding: 5px 10px;
  border: 1px solid var(--teal);
  color: var(--teal);
  border-radius: 20px;
  background: none;
  cursor: pointer;
  transition: all var(--t);
}
.chat-suggest:hover { background: var(--teal); color: #fff; }
.chat-input-row {
  display: flex;
  padding: 10px 12px 12px;
  gap: 8px;
  border-top: 1px solid var(--border);
}
.chat-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: var(--font);
  font-size: .84rem;
  background: var(--paper);
  color: var(--ink);
  outline: none;
  transition: border-color var(--t);
}
.chat-input:focus { border-color: var(--teal); }
[data-theme="dark"] .chat-input { background: var(--deep); color: var(--text-1); }
.chat-send {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--teal);
  border: none; cursor: pointer;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--t);
}
.chat-send:hover { background: var(--teal-light); }

/* --- #5 Research Story Timeline --------------------------- */
.story-timeline {
  position: relative;
  padding-left: 140px;
  max-width: 760px;
  margin: 0 auto;
}
/* Vertical line at 100px from container left → -40px in item coords */
.story-timeline::before {
  content: '';
  position: absolute;
  left: 100px; top: 10px; bottom: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--teal), var(--amber-mid), transparent);
  border-radius: 1px;
}
.story-item {
  position: relative;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.story-item.visible {
  opacity: 1;
  transform: none;
}
.story-item:nth-child(1) { transition-delay: 0ms; }
.story-item:nth-child(2) { transition-delay: 100ms; }
.story-item:nth-child(3) { transition-delay: 200ms; }
.story-item:nth-child(4) { transition-delay: 300ms; }
.story-item:nth-child(5) { transition-delay: 400ms; }
.story-item:nth-child(6) { transition-delay: 500ms; }
/* Year: right edge at -52px, dot left at -46px → 6px clear gap */
.story-year {
  position: absolute;
  left: -140px;
  width: 88px;
  text-align: right;
  top: 6px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: .04em;
  white-space: nowrap;
}
/* Dot centred on line: line at -40px in item coords, dot 12px wide → left: -46px */
.story-dot {
  position: absolute;
  left: -46px;
  top: 8px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--amber-mid);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--amber-mid);
}
.story-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 18px 22px;
  box-shadow: var(--sh-sm);
}
.story-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 6px;
}
.story-content p { font-size: .88rem; color: var(--text-2); margin: 0; }

/* --- #6 Collaboration Cards ------------------------------- */
.collab-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 800px) { .collab-grid { grid-template-columns: 1fr; } }
.collab-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--sh);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: transform var(--t-md), box-shadow var(--t-md);
}
.collab-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
}
.collab-icon { font-size: 2.4rem; line-height: 1; }
.collab-card h3 { font-size: 1.1rem; color: var(--text-1); }
.collab-card p { font-size: .88rem; color: var(--text-2); flex: 1; }
.collab-btn { margin-top: 6px; }

/* --- #7 Topic Wheel --------------------------------------- */
.topic-wheel-wrap {
  display: flex;
  justify-content: center;
}
.topic-wheel-svg {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
  cursor: default;
}
.wheel-slice { transition: opacity 200ms ease; }
.wheel-slice:hover { opacity: .88; cursor: pointer; }
.wheel-label {
  font-family: var(--font);
  font-size: 11.5px;
  fill: #fff;
  font-weight: 600;
  pointer-events: none;
  text-anchor: middle;
}
.wheel-count {
  font-family: var(--font);
  font-size: 9px;
  fill: rgba(255,255,255,.8);
  pointer-events: none;
  text-anchor: middle;
}
.wheel-center {
  font-family: var(--font);
  font-size: 13px;
  fill: var(--text-1);
  font-weight: 700;
  text-anchor: middle;
}

/* --- #8 Paper Spotlight ----------------------------------- */
.spotlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 36px 40px;
  box-shadow: var(--sh-lg);
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  border-left: 4px solid var(--amber-mid);
}
@media (max-width: 640px) { .spotlight-card { padding: 24px 20px; } }
.spotlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--amber);
  background: var(--amber-pale);
  border: 1px solid #f0c88a;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.spotlight-title {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.4;
  margin-bottom: 18px;
}
.spotlight-plain {
  font-size: .92rem;
  color: var(--text-2);
  background: var(--paper);
  border-radius: var(--r);
  padding: 14px 18px;
  margin-bottom: 20px;
  border-left: 3px solid var(--teal);
}
[data-theme="dark"] .spotlight-plain { background: var(--deep); }
.spotlight-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: .82rem;
  color: var(--text-3);
  margin-bottom: 20px;
}
.spotlight-meta a { color: var(--teal); }
.spotlight-stats {
  display: flex;
  gap: 28px;
}
.spotlight-stat { display: flex; flex-direction: column; gap: 2px; }
.spotlight-stat-n {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--teal);
}
.spotlight-stat span:last-child { font-size: .74rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }

/* --- #9 Student Wall -------------------------------------- */
.students-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.student-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--sh-sm);
  transition: transform var(--t), box-shadow var(--t);
}
.student-card:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.student-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--deep));
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.student-avatar.open {
  background: linear-gradient(135deg, var(--amber-mid), var(--amber));
}
.student-info h4 { font-size: .92rem; font-weight: 600; color: var(--text-1); margin-bottom: 3px; }
.student-thesis { font-size: .78rem; color: var(--text-2); margin-bottom: 4px; }
.student-year {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--teal);
  background: rgba(14,116,144,.1);
  padding: 2px 7px;
  border-radius: 10px;
  margin-bottom: 4px;
}
.student-now { font-size: .76rem; color: var(--text-3); margin: 0; }
.student-now a { color: var(--teal); }

/* ============================================================
   VISUAL POLISH — 11 features
   ============================================================ */

/* --- #1 Animated gradient on hero name -------------------- */
@keyframes nameGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero-content h1 {
  background: linear-gradient(270deg, var(--teal), var(--amber-mid), var(--deep), var(--teal-light));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: nameGradient 6s ease infinite;
}
[data-theme="dark"] .hero-content h1 {
  background: linear-gradient(270deg, #22d3ee, var(--amber-light), #93c5fd, #22d3ee);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: nameGradient 6s ease infinite;
}

/* --- #2 Drop cap on bio ----------------------------------- */
.hero-bio::first-letter {
  font-family: var(--font-serif);
  font-size: 3.2em;
  font-weight: 700;
  color: var(--amber-mid);
  float: left;
  line-height: .75;
  margin: 4px 8px 0 0;
}

/* --- #3 Profile photo pulsing glow ring ------------------- */
@keyframes ringPulse {
  0%, 100% { transform: translateX(-50%) scale(1);   opacity: .45; }
  50%       { transform: translateX(-50%) scale(1.06); opacity: .75; }
}
.hero-photo-wrap::before {
  animation: ringPulse 3s ease-in-out infinite;
}
.hero-photo-wrap::after {
  animation: ringPulse 3s ease-in-out infinite .5s;
}

/* --- #4 Diagonal section dividers ------------------------- */
.section-alt {
  clip-path: polygon(0 20px, 100% 0, 100% calc(100% - 20px), 0 100%);
  padding: 108px 0;
  margin: -20px 0;
  position: relative;
  z-index: 1;
}
.section {
  position: relative;
  z-index: 2;
}

/* --- #5 Stat card tilt on hover --------------------------- */
.stat-item {
  transition: transform 250ms ease, box-shadow 250ms ease;
  transform-style: preserve-3d;
  perspective: 600px;
}
.stat-item:hover {
  transform: perspective(600px) rotate3d(1, 1, 0, 6deg) translateY(-4px);
  box-shadow: 0 12px 32px rgba(8,14,28,.14);
  z-index: 2;
}

/* --- #6 Grain texture on hero ----------------------------- */
.hero::before {
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E"),
    radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 200px 200px, 30px 30px;
}

/* --- #7 Nav brand amber underline draw -------------------- */
.nav-brand {
  position: relative;
  display: inline-block;
}
.nav-brand::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--amber-mid);
  border-radius: 1px;
  transition: width 280ms cubic-bezier(.22,1,.36,1);
}
.nav-brand:hover::after { width: 100%; }

/* --- #8 Section alt diagonal stripe tint ------------------ */
.section-alt {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 18px,
    rgba(192,106,24,.025) 18px,
    rgba(192,106,24,.025) 19px
  );
}
[data-theme="dark"] .section-alt {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 18px,
    rgba(14,116,144,.04) 18px,
    rgba(14,116,144,.04) 19px
  );
}

/* --- #9 Publication card hover lift + border flash -------- */
.pub-item {
  transition: transform 220ms ease, box-shadow 220ms ease, border-left-color 220ms ease;
  border-left: 3px solid transparent;
}
.pub-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(8,14,28,.1);
  border-left-color: var(--teal);
}

/* --- #10 Button shimmer ----------------------------------- */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.22) 50%, transparent 100%);
  transform: skewX(-20deg);
  transition: none;
}
.btn-primary:hover::after {
  animation: shimmer 520ms ease forwards;
}
@keyframes shimmer {
  0%   { left: -75%; }
  100% { left: 125%; }
}

/* --- #11 Nav link underline draw -------------------------- */
.nav-links li a:not(.btn-nav) {
  position: relative;
  background: none !important;
}
.nav-links li a:not(.btn-nav)::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  width: 0; height: 2px;
  background: var(--teal);
  border-radius: 1px;
  transform: translateX(-50%);
  transition: width 220ms cubic-bezier(.22,1,.36,1);
}
.nav-links li a:not(.btn-nav):hover::after,
.nav-links li a.active:not(.btn-nav)::after {
  width: calc(100% - 22px);
}

/* ============================================================
   FEATURES 15 — New batch
   ============================================================ */

/* --- #1 H-index badge on stat ----------------------------- */
.stat-badge {
  display: inline-block;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--amber-mid);
  background: rgba(192,106,24,.12);
  border: 1px solid rgba(192,106,24,.3);
  border-radius: 10px;
  padding: 1px 7px;
  margin-top: 3px;
  vertical-align: middle;
}

/* --- #2 Journal IF badges ---------------------------------- */
.if-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .67rem;
  font-weight: 700;
  color: #0e7490;
  background: rgba(14,116,144,.09);
  border: 1px solid rgba(14,116,144,.2);
  border-radius: 8px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}
[data-theme="dark"] .if-badge {
  color: #22d3ee;
  background: rgba(34,211,238,.08);
  border-color: rgba(34,211,238,.18);
}
.if-badge::before { content: 'IF '; opacity: .7; }

/* --- #4 Grants & Funding section -------------------------- */
.grants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.grant-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px 24px;
  box-shadow: var(--sh-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--t), box-shadow var(--t);
}
.grant-card:hover { transform: translateY(-3px); box-shadow: var(--sh); }
.grant-logo {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.grant-funder {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal);
}
.grant-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.4;
}
.grant-meta {
  font-size: .78rem;
  color: var(--text-3);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.grant-status {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  border-radius: 8px;
  padding: 2px 8px;
  margin-top: 2px;
}
.grant-status.active {
  color: #059669;
  background: rgba(5,150,105,.1);
  border: 1px solid rgba(5,150,105,.2);
}
.grant-status.completed {
  color: var(--text-3);
  background: var(--paper);
  border: 1px solid var(--border);
}

/* --- #5 Keyboard shortcut palette ------------------------- */
.kb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,14,28,.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.kb-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.kb-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: min(520px, 92vw);
  max-height: 82vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(8,14,28,.35);
  padding: 28px;
}
.kb-panel h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.kb-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  border-radius: 6px;
  transition: color var(--t);
}
.kb-close:hover { color: var(--text-1); }
.kb-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--r);
  transition: background var(--t);
}
.kb-row:hover { background: var(--paper); }
[data-theme="dark"] .kb-row:hover { background: var(--deep); }
.kb-desc { font-size: .88rem; color: var(--text-2); }
.kb-keys { display: flex; gap: 4px; }
.kb-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  padding: 0 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--paper);
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-2);
  font-family: var(--font-mono, monospace);
  box-shadow: 0 1px 0 var(--border);
}
[data-theme="dark"] .kb-key { background: var(--deep); }

/* --- #6 Sticky year navigator ----------------------------- */
.year-nav {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}
.year-nav.visible {
  opacity: 1;
  pointer-events: all;
}
.year-nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  justify-content: flex-end;
}
.year-nav-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--border);
  transition: all 200ms ease;
  flex-shrink: 0;
}
.year-nav-label {
  font-size: .68rem;
  font-weight: 600;
  color: var(--text-3);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  transition: all 200ms ease;
}
.year-nav-item:hover .year-nav-label,
.year-nav-item.active .year-nav-label {
  opacity: 1;
  transform: none;
}
.year-nav-item.active .year-nav-dot {
  background: var(--teal);
  width: 9px; height: 9px;
  box-shadow: 0 0 0 3px rgba(14,116,144,.2);
}
.year-nav-item:hover .year-nav-dot { background: var(--amber-mid); }
@media (max-width: 1080px) { .year-nav { display: none; } }

/* --- #7 Share button -------------------------------------- */
.share-fab {
  position: fixed;
  bottom: 172px;
  right: 26px;
  z-index: 300;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(8,14,28,.12);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  transition: all 200ms ease;
}
.share-fab:hover {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(14,116,144,.3);
}
.share-fab svg { pointer-events: none; }

/* --- #8 Print CV button + media ------------------- */
.print-fab {
  position: fixed;
  bottom: 224px;
  right: 26px;
  z-index: 300;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(8,14,28,.12);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  transition: all 200ms ease;
}
.print-fab:hover {
  background: var(--amber-mid);
  color: #fff;
  border-color: var(--amber-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(192,106,24,.3);
}
@media print {
  .nav-bar, .back-to-top, .chat-widget, .share-fab, .print-fab,
  .year-nav, .kb-overlay, .cursor-dot, #readingProgress,
  .hero-links, .pub-toolbar, .section-alt.section:not(#publications),
  #coauthors, #spotlight, #collaborate, #students, #story, #topics,
  #grants, #preprints, #video, #impact-map, #ss-feed,
  .wave-divider, canvas { display: none !important; }
  body { font-size: 11pt; color: #000; background: #fff; }
  .hero { background: none !important; color: #000; padding: 24pt 0 16pt; }
  .hero-content h1 { background: none; -webkit-text-fill-color: #000; color: #000; font-size: 22pt; }
  .hero-bio, .hero-tags { color: #333; }
  .site-footer { display: block !important; }
  a { color: #000 !important; text-decoration: underline; }
  .pub-item { border: 1px solid #ccc; margin-bottom: 8pt; padding: 8pt; }
  .stats-bar { display: none !important; }
  section { padding: 12pt 0 !important; }
  @page { margin: 2cm; }
}

/* --- #9 Research Vision text block ------------------------ */
.research-vision-block {
  max-width: 820px;
  margin: 0 auto;
}
.vision-quote {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: var(--r-lg);
  padding: 40px 48px;
  box-shadow: var(--sh-lg);
}
.vision-quote p {
  color: var(--text-2);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.25em;
}
.vision-quote p:last-child { margin-bottom: 0; }
.vision-quote em { color: var(--text-1); font-style: italic; }
.vision-quote strong { color: var(--text-1); }
.vision-meta {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .vision-quote { padding: 28px 24px; }
}

/* --- #10 Research impact map ------------------------------ */
.impact-map-wrap {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}
.impact-map-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r-lg);
  overflow: visible;
}
.map-ocean { fill: #0a1929; }
[data-theme="light"] .map-ocean { fill: #dbeafe; }
.map-land { fill: #1e3a5f; stroke: rgba(255,255,255,.08); stroke-width: .5; }
[data-theme="light"] .map-land { fill: #bfdbfe; stroke: rgba(30,58,95,.12); }
@keyframes mapPulse {
  0%, 100% { r: 6; opacity: 1; }
  50%       { r: 9; opacity: .7; }
}
.map-dot { fill: var(--amber-mid); }
@keyframes ripple {
  0%   { r: 7;  opacity: .8; }
  100% { r: 20; opacity: 0; }
}
.map-ripple { fill: none; stroke: var(--amber-mid); stroke-width: 1.5; }
.map-dot-home { fill: var(--teal); }
.map-ripple-home { stroke: var(--teal); }
.map-label {
  font-family: var(--font);
  font-size: 9px;
  fill: rgba(255,255,255,.8);
  text-anchor: middle;
  pointer-events: none;
}
[data-theme="light"] .map-label { fill: #1e3a5f; }
.map-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
  font-size: .82rem;
  color: var(--text-3);
}
.map-legend-item { display: flex; align-items: center; gap: 6px; }
.map-legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* --- #11 Semantic Scholar feed ---------------------------- */
.ss-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ss-paper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--sh-sm);
  transition: transform var(--t), box-shadow var(--t);
}
.ss-paper:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.ss-rank {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  flex-shrink: 0;
  min-width: 28px;
  text-align: right;
}
.ss-body { flex: 1; min-width: 0; }
.ss-title {
  font-size: .92rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 5px;
  line-height: 1.4;
}
.ss-title a { color: inherit; }
.ss-title a:hover { color: var(--teal); }
.ss-venue {
  font-size: .78rem;
  color: var(--text-3);
  margin-bottom: 5px;
}
.ss-cite {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .75rem;
  color: var(--teal);
  font-weight: 600;
}
.ss-skeleton {
  background: var(--paper);
  border-radius: 4px;
  animation: shimmerBg 1.5s ease infinite;
}
@keyframes shimmerBg {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}

/* --- #12 Preprints section -------------------------------- */
.preprint-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.preprint-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber-mid);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 18px 22px;
  box-shadow: var(--sh-sm);
  transition: transform var(--t), box-shadow var(--t);
}
.preprint-item:hover { transform: translateX(3px); }
.preprint-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(192,106,24,.1);
  border: 1px solid rgba(192,106,24,.25);
  border-radius: 8px;
  padding: 2px 8px;
  margin-bottom: 8px;
}
.preprint-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 5px;
  line-height: 1.45;
}
.preprint-authors { font-size: .8rem; color: var(--text-3); margin-bottom: 5px; }
.preprint-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: .77rem;
  color: var(--text-3);
  align-items: center;
}
.preprint-meta a { color: var(--teal); }

/* --- #13 Aurora / mesh gradient hero ---------------------- */
.aurora-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
@keyframes auroraA {
  0%,100% { transform: translate(-10%, -15%) scale(1.1) rotate(0deg); }
  50%      { transform: translate(10%, 5%)   scale(1.3) rotate(30deg); }
}
@keyframes auroraB {
  0%,100% { transform: translate(20%, -10%) scale(1.2) rotate(10deg); }
  50%      { transform: translate(-15%, 15%) scale(1)   rotate(-20deg); }
}
@keyframes auroraC {
  0%,100% { transform: translate(-5%, 20%)  scale(1)   rotate(0deg); }
  50%      { transform: translate(15%, -5%) scale(1.2) rotate(15deg); }
}
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 800ms ease;
}
.aurora-blob-a {
  width: 600px; height: 400px;
  top: -100px; left: -100px;
  background: radial-gradient(ellipse at center, rgba(14,116,144,.55), transparent 70%);
  animation: auroraA 14s ease-in-out infinite;
}
.aurora-blob-b {
  width: 500px; height: 500px;
  top: -50px; right: -80px;
  background: radial-gradient(ellipse at center, rgba(192,106,24,.35), transparent 70%);
  animation: auroraB 18s ease-in-out infinite;
}
.aurora-blob-c {
  width: 400px; height: 300px;
  bottom: 0; left: 40%;
  background: radial-gradient(ellipse at center, rgba(99,102,241,.3), transparent 70%);
  animation: auroraC 12s ease-in-out infinite;
}
.aurora-loaded .aurora-blob { opacity: 1; }
/* Keep canvas above aurora blobs */
#heroCanvas { position: absolute; z-index: 1; opacity: .35; }

/* --- #14 Scroll-snap toggle ------------------------------- */
/* Applied only when .snap-mode class is on <html> */
html.snap-mode {
  scroll-snap-type: y proximity;
}
html.snap-mode .section,
html.snap-mode .section-alt,
html.snap-mode .stats-bar {
  scroll-snap-align: start;
}
.snap-fab {
  position: fixed;
  bottom: 276px;
  right: 26px;
  z-index: 300;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(8,14,28,.12);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  transition: all 200ms ease;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .04em;
  flex-direction: column;
  gap: 2px;
}
.snap-fab:hover, .snap-fab.active {
  background: #6366f1;
  color: #fff;
  border-color: #6366f1;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99,102,241,.3);
}
.snap-fab svg { pointer-events: none; }

/* --- #15 Dark/light mode transition flash ----------------- */
html.theme-transitioning * {
  transition:
    background-color 350ms ease,
    border-color 350ms ease,
    color 200ms ease,
    fill 200ms ease,
    box-shadow 200ms ease !important;
}

/* --- Publications collapsed preview mode ------------------ */
.pub-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}
.pub-show-more-btn {
  min-width: 220px;
}
.pub-list.pub-preview .pub-item.pub-extra {
  display: none !important;
}

/* --- Live citation badge ---------------------------------- */
.live-badge {
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: #22c55e;
  vertical-align: middle;
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}
