/* ──────────── tokens ──────────── */
:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6f6f6f;
  --soft: #9a9a9a;
  --hair: #ececec;
  --hair-strong: #d8d8d8;
  --accent: #2f4a3a;

  --max: 1080px;
  --pad-x: 24px;
  --nav-h: 56px;

  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* shared rectangular tag */
.tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 3px 8px;
  border: 1px solid var(--hair-strong);
  border-radius: 2px;
  white-space: nowrap;
  line-height: 1.5;
}

/* ──────────── base ──────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
p { margin: 0 0 1em; }
a { color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s ease; }
a:hover { color: var(--accent); }

/* ──────────── nav ──────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--hair);
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav__brand {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: -.01em;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.nav__brand-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}
.nav__links {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13.5px;
}
.nav__links a {
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
  transition: color .2s ease;
}
.nav__links a:hover,
.nav__links a.is-active { color: var(--text); }

/* ──────────── layout ──────────── */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  scroll-margin-top: var(--nav-h);
}
section {
  padding: 18px 0 0;
  border-top: 1px solid var(--hair);
  scroll-margin-top: calc(var(--nav-h) + 12px);
}
section:first-of-type {
  border-top: 0;
  padding-top: 40px;
}

/* ──────────── headings ──────────── */
h1, h2, h3 { font-weight: 500; margin: 0; }
h1 { font-size: 22px; letter-spacing: -.01em; }
h2.section-title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
h3 { font-size: 15.5px; line-height: 1.45; }

/* ──────────── about / hero ──────────── */
.hero__top {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}
.hero__photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: #f3f3f3;
}
.hero__id { flex: 1 1 auto; min-width: 0; }
.hero__icons {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 17px;
}
.hero__icons a {
  color: var(--muted);
  text-decoration: none;
  border: 0;
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  transition: color .2s ease, transform .2s ease;
}
.hero__icons a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}
.hero__name {
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 2px;
  letter-spacing: -.01em;
}
.hero__alt {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}
.hero__title {
  margin: 0 0 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero__positions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hero__position {
  background: #3a3939;
  color: #f5f5f5;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .02em;
  padding: 4px 10px;
  border-radius: 3px;
  line-height: 1.5;
  white-space: nowrap;
}
.hero__position b { color: #ffffff; font-weight: 500; }
.hero__position a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .3);
  padding-bottom: 1px;
  transition: color .2s ease, border-color .2s ease;
}
.hero__position a:hover { color: #fff; border-color: #fff; }
@media (max-width: 600px) {
  .hero__position { white-space: normal; }
}
.hero__bio p {
  margin: 0 0 14px;
  font-size: 17px;
  color: var(--text);
}
.hero__interests {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 22px;
}
/* ──────────── publications ──────────── */
.pub {
  padding: 18px 0;
  background-image: linear-gradient(to right, var(--hair-strong) 1.5px, transparent 1.5px);
  background-position: top left;
  background-size: 6px 1px;
  background-repeat: repeat-x;
}
.pub:first-child { background-image: none; }
.pub.has-media {
  display: flex;
  flex-direction: row-reverse;
  gap: 18px;
  align-items: flex-start;
}
.pub__media {
  flex: 0 0 220px;
  aspect-ratio: 16 / 10;
  display: block;
  overflow: hidden;
  background: #f4f4f4;
  border: 1px solid var(--hair);
  border-radius: 6px;
  text-decoration: none;
}
.pub__media video,
.pub__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.pub__media:hover video,
.pub__media:hover img { transform: scale(1.02); }
.pub__body { flex: 1 1 auto; min-width: 0; }
.pub__meta {
  font-size: 12px;
  color: var(--soft);
  margin: 0 0 4px;
  letter-spacing: .02em;
}
.pub__meta a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--hair-strong);
  padding-bottom: 1px;
}
.pub__meta a:hover { color: var(--text); border-color: var(--text); }
.pub__star {
  color: var(--soft);
  font-size: 10px;
  margin-right: 6px;
  vertical-align: 1px;
}
.pub__title {
  font-size: 16.5px;
  font-weight: 500;
  margin: 0 0 4px;
  line-height: 1.4;
}
.pub__authors {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 4px;
  line-height: 1.55;
}
.pub__authors .me {
  color: var(--text);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.pub__authors .mark {
  color: var(--text);
}
.pub__desc {
  font-size: 15px;
  color: var(--text);
  margin: 6px 0 0;
  line-height: 1.6;
}
.pub__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

/* ──────────── experience ──────────── */
.exp {
  display: grid;
  grid-template-columns: 13ch 1fr auto;
  gap: 18px;
  padding: 14px 0;
  background-image: linear-gradient(to right, var(--hair-strong) 1.5px, transparent 1.5px);
  background-position: top left;
  background-size: 6px 1px;
  background-repeat: repeat-x;
  align-items: baseline;
}
.exp:first-child { background-image: none; }
.exp__when {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .02em;
  white-space: nowrap;
}
.exp__main { min-width: 0; }
.exp__role {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
}
.exp__org {
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.45;
}
.exp__org a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--hair-strong);
  padding-bottom: 1px;
}
.exp__org a:hover { color: var(--text); border-color: var(--text); }
.exp__detail {
  font-size: 12.5px;
  color: var(--soft);
  margin-top: 3px;
  line-height: 1.5;
}
.exp__where {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--soft);
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: right;
}

/* ──────────── honors ──────────── */
.honor {
  display: grid;
  grid-template-columns: 13ch 1fr;
  gap: 18px;
  padding: 14px 0;
  background-image: linear-gradient(to right, var(--hair-strong) 1.5px, transparent 1.5px);
  background-position: top left;
  background-size: 6px 1px;
  background-repeat: repeat-x;
  align-items: baseline;
}
.honor:first-child { background-image: none; }
.honor__when {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .02em;
  white-space: nowrap;
}
.honor__main { min-width: 0; }
.honor__title {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
}
.honor__venue {
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.45;
}
.honor__detail {
  font-size: 12.5px;
  color: var(--soft);
  margin-top: 3px;
  line-height: 1.5;
}

/* ──────────── footer ──────────── */
footer {
  border-top: 1px solid var(--hair);
  margin-top: 48px;
}
.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px var(--pad-x) 32px;
  font-size: 12.5px;
  color: var(--soft);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  text-align: center;
}
.footer__inner a,
.footer__inner a:hover { color: inherit; }
.footer__heart {
  color: var(--soft);
  margin-left: 2px;
  font-size: 11px;
  vertical-align: 1px;
}
.footer__visitors,
.footer__visitors:hover { text-decoration: none; }

/* ──────────── mobile ──────────── */
@media (max-width: 600px) {
  body { font-size: 16.5px; }
  .nav__inner { gap: 12px; }
  .nav__links { gap: 14px; font-size: 13px; }
  .hero__top { gap: 12px; }
  .hero__photo { width: 60px; height: 60px; }
  .hero__icons { gap: 12px; font-size: 16px; }
  .hero__icons a { width: 20px; height: 20px; }
  section:first-of-type { padding-top: 32px; }
  .exp { grid-template-columns: 1fr; gap: 4px; }
  .exp__where { text-align: left; }
  .honor { grid-template-columns: 1fr; gap: 4px; }
  .pub.has-media { flex-direction: column; gap: 12px; }
  .pub__media { flex: 0 0 auto; width: 100%; aspect-ratio: 16 / 9; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
