:root {
  --text: #111111;
  --muted: #555555;
  --line: #dddddd;
  --paper: #ffffff;
  --link: #0645ad;
  --max-width: 900px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

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

a:hover {
  color: var(--text);
}

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

.nav {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.92rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--text);
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.language-toggle:hover {
  border-color: var(--muted);
  color: var(--text);
}

main {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
}

.intro-section {
  max-width: var(--max-width);
  padding: 44px 0 34px;
  border-bottom: 1px solid var(--line);
}

.kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 2.25rem;
  line-height: 1.15;
  font-weight: 600;
}

h2 {
  margin-bottom: 18px;
  font-size: 1.25rem;
  line-height: 1.2;
  font-weight: 600;
}

h3 {
  margin-bottom: 4px;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 600;
}

.lead {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.55;
}

.intro-section p:not(.kicker):not(.lead) {
  color: var(--muted);
}

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

.contact-links a,
.paper-links a {
  font-weight: 400;
}

.content-section {
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.content-section > p,
.manuscript p {
  color: var(--muted);
}

.compact-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.compact-list li + li {
  margin-top: 4px;
}

.manuscript {
  max-width: 860px;
}

.manuscript + .manuscript {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.manuscript .authors,
.manuscript .venue {
  margin-bottom: 8px;
}

.paper-figure {
  margin: 18px 0 0;
}

.paper-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.paper-figure figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 28px;
}

.time {
  color: var(--muted);
  font-size: 0.9rem;
}

.timeline-row p {
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 820px) {
  .nav {
    min-height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav-right {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav-links {
    width: 100%;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .language-toggle {
    align-self: flex-start;
  }

  .intro-section {
    padding-top: 32px;
  }

  h1 {
    font-size: 1.95rem;
  }

  .timeline-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .content-section {
    padding: 28px 0;
  }
}
