:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --ink: #111111;
  --muted: #666666;
  --line: #e5e5e5;
  --accent: #b509ac;
  --accent-2: #b509ac;
  --soft: #f7f7f7;
  --paper: #f2f5f1;
  --max-width: 800px;
  --body-weight: 350;
  --sans: "Roboto Flex", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.8px;
  font-weight: var(--body-weight);
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
  font-synthesis: none;
  font-variation-settings: "wght" var(--body-weight), "opsz" 14;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  font-weight: var(--body-weight);
  font-variation-settings: "wght" var(--body-weight), "opsz" 14;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

strong {
  font-weight: 500;
  font-variation-settings: "wght" 500, "opsz" 14;
}

em {
  font-synthesis: style;
  font-style: oblique 10deg;
  font-variation-settings: "wght" var(--body-weight), "opsz" 14, "slnt" -10;
}

a:hover,
a:focus-visible {
  color: var(--accent-2);
  text-decoration: underline;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  padding: 15px max(22px, calc((100vw - var(--max-width)) / 2));
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 22px;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: var(--body-weight);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
}

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

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 30px;
  align-items: start;
  padding: 46px 0 32px;
}

.intro-copy {
  max-width: 690px;
}

.misc-page {
  padding-top: 46px;
}

.misc-hero {
  max-width: 680px;
  padding-bottom: 18px;
}

.misc-hero h1 {
  margin-bottom: 12px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.16;
}

h1 {
  color: var(--ink);
  margin-bottom: 16px;
  font-size: 2.5rem;
  font-weight: var(--body-weight);
  font-variation-settings: "wght" var(--body-weight), "opsz" 48;
}

h1 span {
  font-weight: 700;
  font-variation-settings: "wght" 700, "opsz" 48;
}

h2 {
  font-size: 1.45rem;
  font-weight: var(--body-weight);
  font-variation-settings: "wght" var(--body-weight), "opsz" 24;
}

h3 {
  font-size: 1.03rem;
  font-weight: 430;
  font-variation-settings: "wght" 430, "opsz" 16;
}

p {
  margin: 0 0 15px;
  font-weight: var(--body-weight);
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 18px;
}

.paper-links a {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: var(--body-weight);
  line-height: 1.2;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.paper-links a:hover,
.paper-links a:focus-visible {
  color: var(--accent-2);
  text-decoration: underline;
}

.profile-panel {
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portrait-frame {
  width: min(100%, 235px);
  aspect-ratio: 5 / 6;
  border: 1px solid color-mix(in srgb, var(--line) 75%, #ffffff);
  border-radius: 50%;
  background: var(--paper);
  overflow: hidden;
}

.portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 52%;
  transform: scale(1.22);
  transform-origin: center;
}

.profile-info {
  margin-top: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;
}

.profile-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: var(--body-weight);
  line-height: 1.45;
  white-space: nowrap;
}

.section {
  scroll-margin-top: 96px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.compact-section {
  max-width: 760px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.small-link {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: var(--body-weight);
  text-decoration: none;
}

.news-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 18px;
  align-items: baseline;
}

.news-list time {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: var(--body-weight);
  white-space: nowrap;
}

.paper {
  padding: 24px 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
}

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

.paper-body h3 {
  margin-bottom: 6px;
  font-size: 1.12rem;
  font-weight: 430;
}

.authors {
  color: var(--ink);
  font-size: 1rem;
  font-weight: var(--body-weight);
  margin-bottom: 4px;
}

.paper-periodical {
  color: var(--ink);
  font-size: 1rem;
  font-weight: var(--body-weight);
  margin-bottom: 14px;
}

.paper-summary {
  font-size: 0.92rem;
  color: var(--ink);
  font-weight: var(--body-weight);
  margin-bottom: 14px;
}

.paper-links {
  gap: 10px;
  margin-top: 0;
}

.bibtex {
  overflow-x: auto;
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f3;
  color: #30383d;
  font-size: 0.85rem;
  line-height: 1.5;
}

.placeholder-paper {
  color: color-mix(in srgb, var(--ink) 72%, white);
}

.profile-links-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 26px 0 2px;
  border-top: 1px solid var(--line);
}

.paper-links a,
.profile-links-section a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: 0.32rem 0.78rem;
  border: 1px solid #7f7f7f;
  border-radius: 4px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: var(--body-weight);
  line-height: 1;
  text-decoration: none;
  background: transparent;
}

.paper-links a {
  font-size: 0.8rem;
}

.paper-links a:hover,
.paper-links a:focus-visible,
.profile-links-section a:hover,
.profile-links-section a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  width: min(var(--max-width), calc(100% - 44px));
  margin: 34px auto 0;
  padding: 24px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: var(--body-weight);
}

@media (max-width: 820px) {
  .site-header {
    justify-content: flex-start;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .intro-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .profile-panel {
    max-width: 340px;
  }

  .profile-info p {
    white-space: normal;
  }
}

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

  .page-shell,
  .site-footer {
    width: min(100% - 32px, var(--max-width));
  }

  .site-header {
    padding: 14px 16px;
  }

  .site-nav {
    gap: 6px 14px;
  }

  .intro-grid {
    padding-top: 46px;
  }

  h1 {
    font-size: 2.15rem;
  }

  .news-list li,
  .paper {
    gap: 6px;
  }

  .paper {
    padding: 22px 0;
  }
}
