/* ===== VARIABLES ===== */
:root {
  --accent: #2563eb;
  --text: #111827;
  --muted: #4b5563;
  --border: rgba(17, 24, 39, 0.10);
  --page: #f6f7fb;
  --card: #ffffff;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #eef2ff 0%, var(--page) 240px, var(--page) 100%);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 500;
}

a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2rem 1rem 2rem;
}

/* ===== CARDS / SECTIONS ===== */
.section {
  padding: 1.5rem 1.5rem;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
}

.section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #e5e7eb;
  letter-spacing: -0.01em;
}

/* ===== HERO / BIO ===== */
.hero {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding: 2rem 1.5rem;
  margin-bottom: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.bio {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
  line-height: 1.7;
}

.affiliation {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.75rem;
  margin-bottom: 0.4rem;
}

.links {
  margin-top: 0.5rem;
  font-size: 0.925rem;
}

.links a {
  font-weight: 500;
}

.sep {
  margin: 0 0.4rem;
  color: #94a3b8;
}

.hero-image {
  flex-shrink: 0;
}

.hero-image img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 6px 24px rgba(17, 24, 39, 0.08);
  border: 1px solid var(--border);
}

/* ===== RESEARCH INTERESTS ===== */
#research p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.interest-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.interest-list li {
  background: #f1f5f9;
  color: #334155;
  font-size: 0.85rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
}

/* ===== PUBLICATIONS ===== */
.pub-entry {
  display: flex;
  gap: 1.25rem;
  padding: 1.1rem 0.5rem;
  border-radius: 10px;
  transition: background 0.15s;
}

.pub-entry:not(:last-child) {
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
}

.pub-entry:hover {
  background: #f8fafc;
}

.pub-thumb {
  flex-shrink: 0;
  width: 200px;
  height: 140px;
  overflow: hidden;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  box-shadow: 0 6px 22px rgba(17, 24, 39, 0.06);
}

.pub-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.pub-details {
  flex: 1;
}

.pub-title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
  display: block;
  margin-bottom: 0.2rem;
  color: var(--text);
}

.pub-title:hover {
  color: var(--accent);
}

.pub-venue {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  display: block;
  margin-bottom: 0.15rem;
}

.pub-authors {
  font-size: 0.82rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.35rem;
}

.pub-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
}

.pub-legend {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: -0.6rem;
  margin-bottom: 0.5rem;
  font-style: italic;
}

.pub-footnote {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

/* ===== AWARDS ===== */
.award-list {
  list-style: none;
  padding: 0;
}

.award-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
  font-size: 0.92rem;
}

.award-list li:last-child {
  border-bottom: none;
}

.award-org {
  font-size: 0.82rem;
  color: var(--muted);
  margin-left: 0.25rem;
}

/* ===== EXPERIENCE TIMELINE ===== */
.timeline {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 130px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline li {
  display: grid;
  grid-template-columns: 115px 1fr;
  column-gap: 32px;
  align-items: start;
  padding: 14px 0;
  position: relative;
  margin: 0;
}

.timeline li:not(:last-child) {
  border-bottom: 1px solid rgba(17,24,39,.04);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 130px;
  top: 20px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  transform: translateX(-50%);
  z-index: 1;
}

.timeline li:first-child::before {
  background: var(--accent);
}

.timeline .when {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
  line-height: 1.5;
  padding-top: 2px;
}

.timeline .what {
  font-size: 0.92rem;
}

.timeline .role {
  font-weight: 700;
  color: var(--text);
}

.timeline .org {
  font-weight: 500;
  color: var(--text);
}

.timeline .org a {
  font-weight: 500;
}

.timeline .meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 1px;
}

.timeline .desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

/* -- Concurrent roles -- */
.concurrent-group .what {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.concurrent-item {
  padding: 8px 0;
  position: relative;
}

.concurrent-item:first-child {
  padding-top: 0;
}

.concurrent-item:not(:last-child) {
  border-bottom: 1px dashed rgba(37, 99, 235, 0.2);
  padding-bottom: 10px;
  margin-bottom: 2px;
}

.concurrent-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: #eff6ff;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ===== EDUCATION ===== */
.edu-entry {
  display: grid;
  grid-template-columns: 115px 1fr;
  column-gap: 32px;
  padding: 12px 0;
}

.edu-entry:not(:last-child) {
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
}

.edu-date {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
  padding-top: 2px;
}

.edu-details {
  font-size: 0.92rem;
}

.edu-details strong {
  color: var(--text);
  font-weight: 600;
}

.edu-details p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ===== FOOTER ===== */
footer {
  text-align: right;
  padding: 1.25rem 0 1.75rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 760px) {
  .container {
    padding: 1.5rem 0.75rem 1.25rem;
  }

  .section {
    padding: 1.25rem 1rem;
  }

  .hero {
    flex-direction: column-reverse;
    gap: 1.25rem;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
  }

  .hero-image img {
    width: 120px;
    height: 120px;
  }

  .hero-text h1 {
    font-size: 1.8rem;
  }

  .links {
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
  }

  .interest-list {
    justify-content: center;
  }

  .pub-entry {
    flex-direction: column;
    gap: 0.75rem;
  }

  .pub-thumb {
    width: 100%;
    height: 200px;
  }

  .timeline::before {
    left: 10px;
  }

  .timeline li {
    grid-template-columns: 1fr;
    padding-left: 30px;
  }

  .timeline li::before {
    left: 10px;
    top: 18px;
  }

  .timeline .when {
    text-align: left;
    font-size: 0.78rem;
  }

  .edu-entry {
    grid-template-columns: 1fr;
  }

  .edu-date {
    text-align: left;
    font-size: 0.78rem;
  }
}
