:root {
  --bg: #ffffff;
  --ink: #202020;
  --muted: #5d6460;
  --link: #1d5b87;
  --line: #dedbd2;
  --soft: #f7f6f2;
  --max: 860px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.72;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #123f60;
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.header-inner {
  position: relative;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 20px;
  text-align: center;
}

.site-title {
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.header-inner p {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 1.05rem;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.96rem;
  font-weight: 600;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--link);
}

.nav-toggle {
  display: none;
  position: absolute;
  right: 0;
  top: 38px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.page {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.home {
  padding: 42px 0 34px;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  line-height: 1.22;
}

h1,
h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 700;
}

h1 {
  margin: 0 0 24px;
  font-size: 2.15rem;
}

h2 {
  margin: 0 0 22px;
  font-size: 1.95rem;
}

h3 {
  margin: 30px 0 16px;
  font-size: 1.22rem;
}

h4 {
  margin: 0 0 6px;
  font-size: 1.04rem;
}

p {
  margin: 0 0 17px;
}

ul {
  margin: 0 0 18px 1.15rem;
  padding: 0;
}

li + li {
  margin-top: 8px;
}

.main-photo {
  width: min(430px, 92%);
  margin: 0 auto 32px;
}

.main-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 38% center;
  border-radius: 2px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.12);
}

.welcome-text {
  max-width: 760px;
  margin: 0 auto;
}

.section {
  padding: 36px 0;
  border-top: 1px solid var(--line);
}

.research-block + .research-block {
  margin-top: 42px;
}

.paper {
  padding: 18px 0;
  border-top: 1px solid #ece9df;
}

.paper:first-of-type {
  border-top: 0;
}

.paper p {
  color: var(--muted);
}

.paper .paper-citation {
  margin-bottom: 10px;
}

.paper .paper-abstract {
  color: var(--ink);
}

.paper .paper-coauthors {
  margin: 8px 0 12px;
  color: var(--ink);
  font-weight: 600;
}

.paper-coauthors span {
  margin-right: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
}

.paper-result {
  margin: 20px 0;
}

.paper-result img {
  width: 100%;
  height: auto;
}

.paper-result figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.result-table-wrap {
  overflow-x: auto;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.45;
}

.result-table caption {
  padding-bottom: 8px;
  color: var(--ink);
  font-weight: 600;
  text-align: left;
}

.result-table th,
.result-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.result-table thead th {
  border-top: 1px solid var(--line);
  background: var(--soft);
}

.result-table tbody th {
  font-weight: 500;
}

.result-table .key-row {
  font-weight: 700;
}

.links {
  margin-bottom: 0;
}

.links a {
  display: inline-block;
  margin-right: 18px;
  font-weight: 600;
}

.cv-section {
  background: var(--soft);
  margin-right: calc((100vw - min(var(--max), calc(100vw - 40px))) / -2);
  margin-left: calc((100vw - min(var(--max), calc(100vw - 40px))) / -2);
  padding-right: calc((100vw - min(var(--max), calc(100vw - 40px))) / 2);
  padding-left: calc((100vw - min(var(--max), calc(100vw - 40px))) / 2);
}

.cv-link {
  font-weight: 700;
}

.profile-list {
  columns: 2;
  column-gap: 42px;
}

.contact p {
  font-size: 1.02rem;
}

.site-footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 42px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .header-inner {
    padding-top: 24px;
    text-align: left;
  }

  .header-inner p {
    margin-bottom: 14px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    padding: 8px 0 0;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .main-photo {
    width: min(340px, 100%);
  }

  .profile-list {
    columns: 1;
  }

  .links a {
    display: block;
    margin: 6px 0 0;
  }
}
