/* ── Design Tokens ── */
:root {
  --purple:       #4B2E83;
  --purple-dark:  #321d5c;
  --purple-mid:   #5e3a9e;
  --gold:         #C8921A;
  --gold-light:   #e8b84b;
  --white:        #ffffff;
  --bg:           #f8f9fc;
  --bg-alt:       #eef0f8;
  --text:         #1a1a2e;
  --text-muted:   #5a5a78;
  --border:       #dde0ef;
  --radius:       10px;
  --shadow:       0 2px 16px rgba(75,46,131,0.09);
  --shadow-lg:    0 6px 32px rgba(75,46,131,0.16);
  --ease:         0.22s ease;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}
a { color: var(--purple); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--gold); }

/* ── Layout Helpers ── */
.container { max-width: 960px; margin: 0 auto; padding: 0 28px; }
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }

/* ── Navbar ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--purple);
  transition: box-shadow var(--ease);
}
.navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.28); }
.nav-inner {
  width: 100%; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  height: 58px;
}
.nav-brand { color: #fff; font-weight: 600; font-size: 1rem; flex-shrink: 0; }
.nav-links {
  list-style: none; display: flex; gap: 2px;
}
.nav-links a {
  color: rgba(255,255,255,0.82);
  font-size: 0.875rem; font-weight: 500;
  padding: 6px 13px; border-radius: 6px;
  transition: background var(--ease), color var(--ease);
}
.nav-links a:hover { background: rgba(255,255,255,0.14); color: #fff; }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.2rem; cursor: pointer; }

/* ── Hero ── */
.hero {
  background: linear-gradient(140deg, var(--purple-dark) 0%, var(--purple) 55%, var(--purple-mid) 100%);
  padding: 110px 28px 72px;
  color: #fff;
}
.hero-inner {
  max-width: 960px; margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px;
  align-items: start;
}

/* Photo */
.hero-photo-col { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.photo-frame {
  width: 190px; height: 190px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--gold-light);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
  flex-shrink: 0;
}
.profile-img {
  width: 190px;
  height: 190px;
  object-fit: cover;
  object-position: center;
  transform: rotate(-10deg);
  display: block;
}

/* Buttons under photo */
.hero-links { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: 8px;
  font-size: 0.875rem; font-weight: 600;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease), border-color var(--ease);
  cursor: pointer; border: 2px solid transparent; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); color: #fff; box-shadow: 0 4px 14px rgba(200,146,26,0.4); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.1); color: #fff; }

/* Metrics */
.metrics { display: flex; gap: 20px; }
.metric { display: flex; flex-direction: column; align-items: center; }
.metric-n { font-size: 1.5rem; font-weight: 700; color: var(--gold-light); line-height: 1; }
.metric-l { font-size: 0.7rem; color: rgba(255,255,255,0.6); margin-top: 2px; text-align: center; }

/* Hero text */
.hero-text-col h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: 2.1rem; font-weight: 600; line-height: 1.2;
  margin-bottom: 6px;
}
.hero-role  { font-size: 1rem; font-weight: 500; color: var(--gold-light); margin-bottom: 3px; }
.hero-dept  { font-size: 0.88rem; color: rgba(255,255,255,0.72); margin-bottom: 18px; }
.tag-row    { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tag {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  color: #fff; padding: 3px 12px;
  border-radius: 20px; font-size: 0.78rem; font-weight: 500;
}
.hero-bio {
  font-size: 0.9rem; color: rgba(255,255,255,0.82);
  line-height: 1.65; margin-bottom: 20px;
}
.edu-list { display: flex; flex-direction: column; gap: 8px; }
.edu-item { display: flex; align-items: flex-start; gap: 10px; font-size: 0.83rem; color: rgba(255,255,255,0.75); }
.edu-icon { color: var(--gold-light); font-size: 0.8rem; margin-top: 3px; flex-shrink: 0; }

/* ── Section Titles ── */
.sec-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.65rem; font-weight: 600;
  color: var(--purple-dark);
  padding-bottom: 12px; margin-bottom: 8px;
  position: relative;
}
.sec-title::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; width: 44px; height: 3px;
  background: var(--gold); border-radius: 2px;
}
.subsec-title {
  font-size: 1.1rem; font-weight: 600;
  color: var(--purple-dark); margin: 40px 0 16px;
}
.sec-sub { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 32px; margin-top: 6px; }

/* ── News ── */
.news-list { margin-top: 28px; display: flex; flex-direction: column; }
.news-item {
  display: flex; gap: 20px; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.news-item:last-child { border-bottom: none; }
.news-date {
  flex-shrink: 0; width: 44px;
  font-size: 0.78rem; font-weight: 700;
  color: var(--purple); padding-top: 1px;
}
.news-item p { color: var(--text-muted); line-height: 1.6; }
.news-item strong { color: var(--text); }

/* ── Research Cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px; margin-top: 32px;
}
.res-card {
  background: var(--white);
  border-radius: var(--radius); padding: 26px 22px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: transform var(--ease), box-shadow var(--ease);
}
.res-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.res-icon {
  width: 46px; height: 46px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; margin-bottom: 14px;
}
.res-icon.purple { background: rgba(75,46,131,0.1); color: var(--purple); }
.res-icon.gold   { background: rgba(200,146,26,0.12); color: var(--gold); }
.res-card h3  { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.res-card p   { font-size: 0.86rem; color: var(--text-muted); line-height: 1.6; }
.res-card-media {
  height: 230px; overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  margin: -26px -22px 18px;
  display: flex; flex-direction: column;
}
.res-card-media img {
  width: 100%; flex: 1; min-height: 0; object-fit: cover; display: block;
}

/* ── People ── */
.people-group-title {
  font-size: 1rem; font-weight: 600; color: var(--purple);
  margin: 32px 0 16px; padding-bottom: 6px;
  border-bottom: 2px solid var(--border);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.people-grid-pi {
  grid-template-columns: 1fr;
  max-width: 520px;
}
.person-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  transition: transform var(--ease), box-shadow var(--ease);
}
.person-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.person-card-pi { padding: 20px; }

/* PI photo (reuses the rotated-image technique) */
.person-photo {
  width: 80px; height: 80px;
  border-radius: 50%; overflow: hidden;
  border: 3px solid var(--gold-light);
  flex-shrink: 0;
}
.person-img-rotated {
  width: 80px; height: 80px;
  object-fit: cover; object-position: center;
  transform: rotate(-10deg);
  display: block;
}

/* Initials avatar for students */
.person-avatar {
  width: 62px; height: 62px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}
.person-name  { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.person-role  { font-size: 0.82rem; font-weight: 500; color: var(--gold); margin-bottom: 2px; }
.person-dept  { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; margin-bottom: 6px; }
.person-email {
  font-size: 0.8rem; color: var(--purple);
  display: inline-flex; align-items: center; gap: 5px;
}
.person-email:hover { color: var(--gold); }

/* ── Publications ── */
.pub-group-title {
  font-size: 1.05rem; font-weight: 600; color: var(--purple);
  margin: 32px 0 16px; padding-bottom: 6px;
  border-bottom: 2px solid var(--border);
}
.pub-ol { list-style: decimal; padding-left: 28px; }
.pub-entry {
  padding: 10px 0; border-bottom: 1px dashed var(--border);
}
.pub-entry:last-child { border-bottom: none; }
.pub-cite {
  font-size: 0.88rem; color: var(--text-muted);
  line-height: 1.6;
}
.pub-cite em   { color: var(--text); font-style: italic; }
.pub-cite strong { color: var(--text); }
.pub-chip {
  display: inline-block;
  background: rgba(75,46,131,0.08); color: var(--purple);
  font-size: 0.73rem; font-weight: 600;
  padding: 1px 9px; border-radius: 10px;
  margin-left: 4px; white-space: nowrap;
}

/* ── Teaching / Experience ── */
.exp-list { display: flex; flex-direction: column; margin-top: 24px; }
.exp-item {
  display: flex; gap: 24px; align-items: baseline;
  padding: 13px 0; border-bottom: 1px solid var(--border);
}
.exp-item:last-child { border-bottom: none; }
.exp-left { flex-shrink: 0; width: 100px; }
.exp-period { font-size: 0.8rem; font-weight: 600; color: var(--gold); }
.exp-title  { font-size: 0.93rem; font-weight: 500; color: var(--text); margin-bottom: 1px; }
.exp-org    { font-size: 0.83rem; color: var(--text-muted); }

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px; margin-top: 32px;
}
.contact-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 18px;
  font-size: 0.875rem; color: var(--text-muted); line-height: 1.6;
}
.contact-icon { font-size: 1rem; color: var(--purple); margin-top: 3px; flex-shrink: 0; }
.contact-card strong { display: block; color: var(--text); margin-bottom: 2px; }

/* ── Footer ── */
.footer {
  background: var(--purple-dark);
  color: rgba(255,255,255,0.5);
  padding: 22px; text-align: center;
  font-size: 0.8rem;
}

/* ── Responsive ── */
@media (max-width: 760px) {
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-photo-col { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 16px; }
  .photo-frame { width: 130px; height: 130px; }
  .profile-img { width: 130px; height: 130px; }
  .hero-links { flex-direction: row; width: auto; }
  .metrics { gap: 14px; }
  .metric-n { font-size: 1.2rem; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 58px; left: 0; right: 0; background: var(--purple-dark); padding: 12px 0; }
  .nav-links.open { display: flex; }
  .nav-links li a { padding: 10px 24px; border-radius: 0; }
  .nav-toggle { display: block; }
}
@media (max-width: 480px) {
  .hero { padding: 90px 20px 56px; }
  .section { padding: 60px 0; }
  .hero-text-col h1 { font-size: 1.65rem; }
  .sec-title { font-size: 1.35rem; }
  .exp-left { width: 70px; }
}
