/* ---------- Shared site styles (tab navigation + sections) ---------- */
:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #2d3436;
  --muted: #636e72;
  --accent: #0984e3;
  --accent-dark: #0657a0;
  --nav-h: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ---------- Sticky tab navigation ---------- */
.tabs {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

.tabs .brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  margin-right: auto;
}

.tabs nav { display: flex; gap: 0.25rem; }

.tabs a.tab {
  display: block;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.tabs a.tab:hover {
  color: var(--accent);
  background: rgba(9, 132, 227, 0.08);
}

.tabs a.tab.active {
  color: #fff;
  background: var(--accent);
}

/* ---------- Layout ---------- */
main {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

section {
  scroll-margin-top: calc(var(--nav-h) + 16px);
  margin-bottom: 3.5rem;
}

h2 {
  font-size: 1.6rem;
  margin: 0 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

h3 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  margin-bottom: 3rem;
}

.hero img {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.hero h1 { font-size: 2.2rem; margin: 0.5rem 0 0; }

.btn-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.75rem;
}

.btn {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--accent);
  background: rgba(9, 132, 227, 0.08);
  padding: 0.35rem 1.1rem;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.btn:hover { background: rgba(9, 132, 227, 0.16); color: var(--accent-dark); }

.bio-text p { margin: 0 0 1rem; }

/* ---------- Generic cards ---------- */
.card {
  background: var(--card);
  border: 1px solid #e6e9ee;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.9rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.card p { margin: 0 0 0.4rem; }
.card p:last-child { margin-bottom: 0; }
.card em { color: var(--accent-dark); }

/* ---------- Experience ---------- */
.exp-line {
  margin: 0 0 0.9rem;
}

.exp-line .role { font-weight: 700; }
.exp-line .dates { color: var(--muted); }

/* ---------- Honors ---------- */
.honors-list {
  margin: 0;
  padding-left: 1.2rem;
}

.honors-list li { margin-bottom: 0.6rem; }

/* ---------- Publications ---------- */
.paper p { text-align: justify; }
.paper .links { margin-bottom: 0; font-size: 0.92rem; }

.note { font-size: 0.88rem; color: var(--muted); }

/* ---------- Presentations ---------- */
.talk .title { color: var(--accent-dark); font-weight: 600; }
.talk .photos {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.talk .photos img {
  width: 220px;
  border-radius: 8px;
  border: 1px solid #e6e9ee;
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .tabs { flex-direction: column; height: auto; padding: 0.75rem; gap: 0.5rem; }
  .tabs nav { flex-wrap: wrap; justify-content: center; }
  main { padding-top: 2rem; }
  .hero img { width: 140px; height: 140px; }
}
