:root {
  --bg: #f7f9f8;
  --bg-alt: #eef3f1;
  --ink: #1f2927;
  --ink-soft: #4b5b57;
  --muted: #71807c;
  --rule: #dbe4e0;
  --rule-strong: #c2d1ca;
  --accent: #1f6f64;
  --link: #3f746d;
  --selection: rgba(31, 111, 100, 0.14);
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', 'Microsoft YaHei', Arial, sans-serif;
}

* { box-sizing: border-box; }

::selection { background: var(--selection); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body, td, th, tr, p, a, strong {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

a { color: var(--link); text-decoration: none; transition: color .15s ease; }
a:focus, a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.marslab-link { color: #a94729; }
.marslab-link:focus, .marslab-link:hover { color: #7e301e; }

.site-shell {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border: 0;
  border-spacing: 0;
  border-collapse: separate;
}

.site-shell > tbody > tr > td { padding: 0; }

.profile { width: 100%; border: 0; border-spacing: 0; border-collapse: separate; }
.profile-copy { width: 72%; padding: 2.5%; vertical-align: middle; }
.profile-photo { width: 28%; max-width: 28%; padding: 2.5%; vertical-align: middle; transform: translateY(14px); }
.profile-photo img { width: 100%; max-width: 100%; display: block; object-fit: cover; border-radius: 50%; }
.photo-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.name {
  margin: 0 0 10px;
  padding-top: 16px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.12;
}

.profile-copy p:not(.name) { color: var(--ink-soft); }
.profile-copy p a { font-weight: 500; }
.profile-copy p .advisor-link { color: var(--ink-soft); font-weight: 600; }
.profile-links {
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.contact-icon { display: block; }
.contact-link:nth-child(1) .contact-icon { width: 24px; height: 24px; }
.contact-link:nth-child(2) .contact-icon { width: 22px; height: 22px; }
.contact-link:nth-child(3) .contact-icon { width: 22px; height: 22px; }
.contact-link:nth-child(4) .contact-icon { width: 20px; height: 20px; }
.contact-link:nth-child(5) .contact-icon { width: 18px; height: 18px; }

section { margin: 8px 16px 34px; }

h2 {
  position: relative;
  margin: 0 0 18px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
}

h2 > span {
  position: relative;
  display: inline-block;
}

h2 > span::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.news-list { margin: 8px 0 0; padding-left: 22px; }
.news-list li { margin-bottom: 5px; }

.publication-table, .experience-table { width: 100%; border: 0; border-collapse: separate; }
.publication-table { border-spacing: 0 10px; }
.experience-table { border-spacing: 0; }

.publications-section {
  margin-left: 0;
  margin-right: 0;
}

.publications-section > h2 {
  margin-left: 16px;
  margin-right: 16px;
}

.publications-note {
  margin: 0 16px 4px;
}

.highlight {
  background: #ffffd0;
  padding: 0 2px;
}

.publication-table,
.publication-table td,
.publication-table p,
.publication-table a,
.publication-table strong {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.25;
}

.publication-table .papertitle {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.publication-table em {
  color: var(--ink);
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
  font-style: italic;
}

.publication-table p {
  margin: 0.6em 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 14px;
  line-height: 1.25;
}

.publication-title { margin: 0 0 0.5em; }
.publication-authors { margin: 0 0 0.15em; }
.publication-venue { margin: 0 0 0.15em; }
.publication-links { margin: 0; }

.project-item {
  display: grid;
  grid-template-columns: minmax(220px, 270px) 1fr;
  gap: 18px 28px;
  align-items: center;
  padding: 24px 0;
}

.project-item > td { width: auto !important; padding: 0 !important; vertical-align: top !important; }
.project-item > td:nth-child(2) { line-height: 1.36; }

.project-visual { width: 100%; max-width: 270px; line-height: 0; }
.project-visual img { width: 100%; aspect-ratio: 16 / 9; display: block; object-fit: fill; border: 1px solid var(--rule); border-radius: 8px; }

.publication-item.selected { background: #ffffd0; }

.publication-thumbnail {
  width: 270px;
  height: 151.875px;
  overflow: hidden;
}

.publication-thumbnail img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
}

.papertitle { color: var(--ink); font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.35; }
em { color: var(--muted); font-size: 15px; font-style: normal; }

.project-item p {
  margin: 11px 0 0;
  padding: 8px 13px;
  color: var(--ink-soft);
  background: var(--bg-alt);
  border-left: 3px solid var(--rule-strong);
  border-radius: 0 6px 6px 0;
  font-size: 15px;
  line-height: 1.45;
}

.experience-logo {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.experience-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.experience-item { grid-template-columns: 120px 1fr; gap: 30px; min-height: 120px; }
.experience-item > td:nth-child(2) { align-self: center; }

.experience-focus,
.experience-lab {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14px;
}

footer { padding: 0 16px 24px; color: var(--muted); text-align: right; font-size: 13px; }
footer, footer a { font-size: 13px; }

@media (max-width: 640px) {
  .site-shell { max-width: 100%; }
  .profile-copy { width: 68%; }
  .profile-photo { width: 32%; max-width: 32%; }
  .name { font-size: 32px; }
  .project-item, .experience-item { display: block; }
  .project-item > td { display: block; width: 100% !important; }
  .project-item > td:first-child { margin-bottom: 14px; }
  .project-visual { max-width: none; }
  .experience-logo { margin: 0 auto; }
}
