:root {
  --background: #ffffff;
  --surface: #f6f8fa;
  --text: #24292f;
  --muted: #57606a;
  --border: #d8dee4;
  --accent: #0969da;
  --content-width: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 3px solid rgba(9, 105, 218, .3); outline-offset: 3px; border-radius: 2px; }

.site-header {
  min-height: 56px;
  border-top: 5px solid #424242;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .96);
}

.nav-container {
  max-width: var(--content-width);
  min-height: 56px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}

.site-title { color: #424242; font-size: 26px; font-weight: 400; letter-spacing: -1px; }
.site-title:hover { text-decoration: none; }
.site-nav { display: flex; gap: 28px; }
.site-nav a { color: #424242; line-height: 56px; }
.site-nav a[aria-current='page'] { color: var(--accent); font-weight: 600; }

.page-shell {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 52px 24px 72px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 72px;
}

.profile { align-self: start; position: sticky; top: 36px; }
.profile-photo {
  display: block;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  border: 1px solid var(--border);
}
.profile h1 { margin: 20px 0 0; font-size: 26px; line-height: 1.2; letter-spacing: -.4px; }
.profile-role { margin: 5px 0 14px; color: var(--muted); font-size: 17px; }
.profile-bio { margin: 0 0 18px; color: var(--muted); }
.profile-links { display: flex; align-items: center; gap: 13px; margin-top: 20px; }
.profile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #57606a;
  font-size: 25px;
  line-height: 1;
  transition: color .15s ease, transform .15s ease;
}
.profile-icon i { display: block; }
.profile-icon:hover { color: var(--accent); transform: translateY(-1px); text-decoration: none; }

.page-content { min-width: 0; }
.page-content > :first-child, .prose > :first-child { margin-top: 0; }
h1, h2, h3 { line-height: 1.25; color: #1f2328; }
h1 { margin: 0 0 24px; font-size: 34px; letter-spacing: -.7px; }
h2 { margin: 42px 0 14px; font-size: 25px; }
h3 { margin: 30px 0 10px; font-size: 20px; }
p, ul, ol { margin: 0 0 20px; }
img { max-width: 100%; }

blockquote { margin: 24px 0; padding-left: 18px; color: var(--muted); border-left: 4px solid var(--border); }
code { padding: .15em .35em; background: var(--surface); border-radius: 4px; font-size: .9em; }
pre { overflow-x: auto; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; }
pre code { padding: 0; }

.publication-list {
  display: grid;
  gap: 30px;
  margin-top: 24px;
}

.publication {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

.publication:last-child { border-bottom: 0; }

.publication-thumbnail {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.publication-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.publication-thumbnail-placeholder {
  color: #8c959f;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.publication-info { min-width: 0; }
.publication-title {
  margin: 0 0 5px;
  font-size: 18px;
  line-height: 1.35;
}
.publication-authors,
.publication-venue {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.45;
}
.publication-authors { color: var(--text); }
.publication-venue { color: var(--muted); font-style: italic; }

.publication-links {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
}

.publication-links a,
.bibtex-disclosure summary {
  cursor: pointer;
  color: var(--accent);
  list-style: none;
}
.bibtex-disclosure { position: static; }
.bibtex-disclosure summary::-webkit-details-marker { display: none; }
.bibtex-disclosure summary:hover { text-decoration: underline; }
.bibtex-disclosure summary:focus-visible {
  outline: 3px solid rgba(9, 105, 218, .3);
  outline-offset: 3px;
  border-radius: 2px;
}

.bibtex-dropdown {
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  left: 0;
  width: min(520px, 100%);
  padding: 10px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 7px;
  box-shadow: 0 8px 24px rgba(31, 35, 40, .14);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: normal;
}
.bibtex-dropdown pre {
  max-height: 260px;
  margin: 0;
  white-space: pre;
}

.project-grid, .project-list { display: grid; gap: 18px; }
.project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-card { overflow: hidden; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.project-card-image { display: block; aspect-ratio: 16 / 9; background: var(--surface); }
.project-card-image img { width: 100%; height: 100%; object-fit: contain; }
.project-card-body { padding: 20px; }
.project-card h2 { margin: 0 0 8px; font-size: 21px; }
.project-card p { margin-bottom: 14px; color: var(--muted); }

.tag-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.tag-list li { padding: 2px 9px; color: #0550ae; background: #ddf4ff; border-radius: 999px; font-size: 13px; }

.empty-state { margin-top: 28px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; }
.empty-state h2 { margin-top: 0; }
.empty-state p { margin-bottom: 0; }

.back-link { display: inline-block; margin-bottom: 28px; }
.project-header { padding-bottom: 28px; margin-bottom: 32px; border-bottom: 1px solid var(--border); }
.project-header h1 { margin-bottom: 10px; }
.project-summary { color: var(--muted); font-size: 19px; }
.project-links { display: flex; gap: 18px; margin-top: 20px; }

.project-video {
  display: block;
  width: 100%;
  height: auto;
  margin: 24px 0;
  border-radius: 7px;
  background: #000;
}

.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.footer-content { max-width: var(--content-width); margin: 0 auto; padding: 22px 24px; }

@media (max-width: 760px) {
  .nav-container { padding: 0 18px; }
  .site-title { font-size: 22px; }
  .site-nav { gap: 18px; }
  .page-shell { padding: 34px 18px 56px; grid-template-columns: 1fr; gap: 40px; }
  .profile { position: static; display: grid; grid-template-columns: 112px 1fr; column-gap: 20px; }
  .profile-photo { width: 112px; height: 112px; grid-row: 1 / span 4; }
  .profile h1 { margin-top: 4px; }
  .profile-role, .profile-bio { margin-bottom: 8px; }
  .profile-links { flex-wrap: wrap; }
  .publication { grid-template-columns: 125px minmax(0, 1fr); gap: 17px; }
  .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .nav-container { align-items: center; flex-direction: row; gap: 0; padding-top: 0; }
  .site-nav a { line-height: 44px; }
  .profile { display: block; }
  .profile-photo { width: 104px; height: 104px; }
  .publication { grid-template-columns: 92px minmax(0, 1fr); gap: 13px; }
  .publication-title { font-size: 16px; }
}

@media print {
  .site-nav, .site-footer { display: none; }
  .page-shell { display: block; padding: 24px 0; }
  .profile { position: static; margin-bottom: 30px; }
  .bibtex-dropdown { position: static; width: 100%; margin-top: 8px; box-shadow: none; }
}
