:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --text: #222831;
  --muted: #5f6b76;
  --line: #e6e8eb;
  --accent: #155c8a;
  --accent-soft: #eef6fb;
  --heading: #073653;
  --link: #1e78ad;
  --tag-bg: #f4f7f9;
  --tag-border: #d9e3ea;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.65;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrapper {
  width: 980px;
  margin: 0 auto;
}

.sidebar {
  position: fixed;
  width: 250px;
  padding-top: 58px;
  text-align: center;
}

.avatar {
  width: 148px;
  height: 148px;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 50%;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(7, 54, 83, 0.12);
}

h1,
h2,
h3 {
  color: var(--heading);
  line-height: 1.25;
}

h1 {
  margin: 22px 0 2px;
  font-size: 30px;
  font-weight: 600;
}

.name-en {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 17px;
}

.role,
.affiliation,
.contact,
.motto {
  margin: 6px 0;
}

.role {
  font-weight: 600;
}

.affiliation,
.motto {
  color: var(--muted);
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 20px 0;
}

.profile-links a {
  min-width: 86px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
}

.cv-links,
.cv-links a {
  color: #c62828;
  font-weight: 600;
}

.content {
  width: 660px;
  float: right;
  padding: 54px 0 64px;
}

section {
  margin-bottom: 34px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

section:last-of-type {
  border-bottom: 0;
}

h2 {
  margin: 0 0 14px;
  font-size: 23px;
  font-weight: 600;
}

h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}

p,
ul,
ol {
  margin-top: 0;
}

ul,
ol {
  padding-left: 22px;
}

li {
  margin-bottom: 8px;
}

.timeline {
  list-style: none;
  padding-left: 0;
}

.timeline li {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
}

.timeline span,
.item-meta {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.news-text {
  min-width: 0;
}

.item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  margin-bottom: 16px;
}

.item p {
  margin-bottom: 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags span {
  padding: 5px 10px;
  border: 1px solid var(--tag-border);
  border-radius: 6px;
  background: var(--tag-bg);
  color: var(--heading);
}

.publications {
  padding-left: 21px;
}

.paper-title {
  margin-bottom: 2px;
  color: var(--heading);
  font-weight: 600;
}

.publications p:not(.paper-title) {
  color: var(--muted);
  margin-bottom: 12px;
}

footer {
  color: var(--muted);
  font-size: 13px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #20212b;
    --text: #dadbdf;
    --muted: #aeb7c0;
    --line: #3a3e4d;
    --accent: #6fc8f3;
    --accent-soft: #25313b;
    --heading: #72cdf8;
    --link: #72cdf8;
    --tag-bg: #262a35;
    --tag-border: #3c4350;
  }

  .avatar {
    box-shadow: none;
  }
}

@media print, screen and (max-width: 960px) {
  .wrapper {
    width: auto;
    margin: 0;
    padding: 22px;
  }

  .sidebar,
  .content {
    position: static;
    float: none;
    width: auto;
  }

  .sidebar {
    padding-top: 16px;
  }

  .content {
    padding: 26px 0 40px;
  }
}

@media screen and (max-width: 600px) {
  body {
    font-size: 14px;
  }

  .wrapper {
    padding: 16px;
  }

  .avatar {
    width: 118px;
    height: 118px;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 20px;
  }

  .timeline li,
  .item {
    display: block;
  }

  .timeline span,
  .item-meta {
    display: block;
    margin-bottom: 2px;
  }
}
