:root {
  --bg: #fcfcfd;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #5b6472;
  --line: #e5e7eb;
  --accent: #1d4ed8;
  --accent-soft: #eff6ff;
  --maxw: 980px;
}
* { box-sizing: border-box; }
html {
  font-size: 15px; /* base scale: change this one value to resize the whole site */
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 28px 20px 56px; }
header {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 28px;
  align-items: start;
  padding-top: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
h1 {
  margin: 0 0 6px;
  font-size: 2.1rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.tagline {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 14px;
}
.intro p { margin: 0 0 12px; }
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
  font-size: 0.98rem;
}
.photo {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 8px;
}
.photo img {
  width: 220px;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: block;
}
nav {
  position: sticky;
  top: 0;
  background: rgba(252,252,253,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 0.95rem;
}
section { padding-top: 26px; scroll-margin-top: 56px; }
header { scroll-margin-top: 56px; }
h2 {
  font-size: 1.15rem;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.01em;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 14px;
  margin-bottom: 14px;
}
.item-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.role { font-weight: 700; }
.meta { color: var(--muted); }
ul { margin: 8px 0 0 20px; padding: 0; }
li { margin-bottom: 6px; }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.chip {
  padding: 6px 10px;
  border: 1px solid #dbe3f0;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 0.92rem;
  color: #234;
}
/* ── Service & Leadership list ── */
.service-list { display: flex; flex-direction: column; gap: 12px; }
.service-item { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.service-item:last-child { border-bottom: none; padding-bottom: 0; }
.service-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.97rem;
  line-height: 1.5;
}
.service-role { font-weight: 700; color: var(--text); }
.service-sep { margin-right: 2px; }

/* ── Self-study course list ── */
.course-list { display: flex; flex-direction: column; gap: 10px; }
.course-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.course-name {
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.course-name:hover { text-decoration: underline; }
.course-org {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
}

/* ── Certification cards ── */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.cert-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cert-issuer {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cert-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-top: 2px;
}
.cert-platform {
  font-size: 0.84rem;
  color: var(--accent);
  font-weight: 500;
}
.cert-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.84rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  width: 100%;
}
.cert-link:hover { text-decoration: underline; }
.cert-courses {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.cert-courses a {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  background: var(--accent-soft);
  border: 1px solid #c1d4f0;
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.cert-courses a:hover { text-decoration: underline; }

footer {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.8;
}

/* ── Inline link (code/paper inside role line) ── */
.inline-link {
  font-weight: 400;
  font-size: 0.9rem;
}

/* ── Section heading sub-link ── */
.section-link {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--accent);
}

/* ── News section ── */
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.news-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.96rem;
  line-height: 1.5;
}
.news-list li:last-child { border-bottom: none; }
.news-hidden { display: none; }
.news-text { flex: 1; min-width: 0; }
.news-date {
  flex-shrink: 0;
  min-width: 72px;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.news-tag {
  flex-shrink: 0;
  display: inline-block;
  width: 100px;
  text-align: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.6;
  margin-top: 1px;
}
.tag-paper  { background: #dbeafe; color: #1e40af; }
.tag-award  { background: #fef9c3; color: #854d0e; }
.tag-project { background: #dcfce7; color: #166534; }
.tag-cert   { background: #ede9fe; color: #5b21b6; }
.tag-talk   { background: #fee2e2; color: #991b1b; }
.tag-misc   { background: #f3f4f6; color: #374151; }
.tag-industry { background: #ffedd5; color: #9a3412; }
.news-toggle {
  margin-top: 10px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 0.88rem;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s;
}
.news-toggle:hover { background: var(--accent-soft); }

/* ── Publication cards ── */
.pub-card {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.pub-card:first-of-type { padding-top: 8px; }
.pub-card:last-of-type { border-bottom: none; }
.pub-thumb {
  flex-shrink: 0;
  width: 150px;
}
.pub-thumb img {
  width: 150px;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
  background: #f3f4f6;
}
.pub-body { flex: 1; min-width: 0; }
.pub-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.4;
}
.pub-title a { color: var(--text); }
.pub-title a:hover { color: var(--accent); text-decoration: underline; }
.pub-authors {
  font-size: 0.93rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.pub-venue { margin-bottom: 8px; }
.venue-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.venue-conf {
  background: #dbeafe;
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
}
.venue-preprint {
  background: #fef3c7;
  color: #78350f;
  border: 1px solid #fde68a;
}
.pub-desc {
  font-size: 0.94rem;
  color: var(--muted);
  margin: 0 0 8px;
  line-height: 1.55;
}
.pub-links {
  display: flex;
  gap: 12px;
  font-size: 0.9rem;
}
.pub-links a { color: var(--accent); }
.pub-links a:hover { text-decoration: underline; }

/* ── Project cards ── */
.proj-card {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.proj-card:last-of-type { border-bottom: none; }
.proj-thumb {
  flex-shrink: 0;
  width: 150px;
}
.proj-thumb img {
  width: 150px;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
  background: #f3f4f6;
}
.proj-body { flex: 1; min-width: 0; }
.proj-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.proj-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}
.proj-date { font-size: 0.9rem; }
.proj-chips { margin-top: 10px; }
.proj-chips .chip {
  padding: 3px 8px;
  font-size: 0.82rem;
}

@media (max-width: 760px) {
  header { grid-template-columns: 1fr; }
  .photo { justify-content: flex-start; }
  h1 { font-size: 1.8rem; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .nav-inner { padding-left: 16px; padding-right: 16px; }
  .news-list li { flex-wrap: wrap; gap: 4px; }
  .news-date { min-width: unset; }
  .pub-card { flex-direction: column; }
  .pub-thumb { width: 100%; }
  .pub-thumb img { width: 100%; height: 180px; }
  .proj-card { flex-direction: column; }
  .proj-thumb { width: 100%; }
  .proj-thumb img { width: 100%; height: 160px; }
}
