:root {
  --text: #202428;
  --muted: #5f6870;
  --line: #d9dee3;
  --soft: #f6f7f8;
  --nav: #243b4a;
  --link: #245f73;
  --link-dark: #183f4c;
  --accent: #8b1e3f;
  --accent-soft: #f8eef2;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 20px;
  color: var(--text);
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

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

a:hover {
  color: var(--link-dark);
  text-decoration: underline;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--nav);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  padding: 0 18px;
  overflow-x: auto;
}

.nav a {
  display: block;
  padding: 12px 14px;
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
}

.nav a:hover {
  background: #2f4b58;
  text-decoration: none;
}

.page,
.footer {
  max-width: 1000px;
  margin: 0 auto;
  padding-left: 18px;
  padding-right: 18px;
}

.page {
  padding-top: 20px;
}

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

h1 {
  margin: 0 0 18px;
  padding-bottom: 10px;
  color: #223843;
  border-bottom: 2px solid var(--accent);
  font-size: 32px;
  line-height: 1.2;
}

h1 span {
  font-weight: 500;
}

.profile-table {
  width: 100%;
  border-collapse: collapse;
}

.profile-info {
  width: 78%;
  vertical-align: top;
  padding-right: 24px;
  overflow-wrap: anywhere;
}

.profile-photo {
  width: 180px;
  vertical-align: top;
  text-align: right;
}

.avatar {
  width: 150px;
  height: auto;
  border: 2px solid #ddd;
  border-radius: 6px;
}

p {
  margin-bottom: 8px;
}

section {
  padding: 0;
}

h2 {
  margin: 0 0 12px;
  padding-bottom: 5px;
  color: #223843;
  border-bottom: 1px solid var(--line);
  font-size: 24px;
  line-height: 1.25;
}

hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}

ul,
ol {
  margin-top: 0;
  padding-left: 21px;
}

li {
  margin-bottom: 5px;
}

.section-label {
  margin-bottom: 8px;
  color: var(--accent);
  font-weight: 700;
  font-style: italic;
}

.news-container {
  width: 100%;
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  background: #fbfdfd;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.02);
}

.news-item {
  display: flex;
  gap: 7px;
  margin-bottom: 4px;
  line-height: 1.45;
}

.news-icon {
  color: var(--accent);
  font-size: 13px;
  line-height: 1.8;
}

.news-item:last-child {
  margin-bottom: 0;
}

.year-block {
  margin-bottom: 14px;
  border: 0;
  border-radius: 0;
}

.year-block summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.year-block summary::-webkit-details-marker {
  display: none;
}

.year-block summary::after {
  content: "+";
  margin-left: 0;
  color: var(--link-dark);
  font-weight: 700;
}

.year-block[open] summary::after {
  content: "-";
}

.year-block summary em {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
}

.pub-list {
  margin: 12px 0 0;
  padding-left: 24px;
  padding-right: 0;
}

.pub-list li {
  margin: 14px 0;
  padding: 10px;
  border-left: 2px solid #bdc3c7;
  background: #f9f9f9;
}

.pub-list p {
  margin-bottom: 1px;
  color: #3f454a;
}

.pub-list .paper-title {
  color: var(--text);
  font-weight: 700;
}

.paper-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-left: 6px;
}

.paper-link {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.paper-link:hover {
  text-decoration: none;
}

.paper-link.pdf {
  color: #fff;
  background: #8b1e3f;
}

.paper-link.code {
  color: #fff;
  background: #243b4a;
}


.footer {
  text-align: center;
  padding-top: 4px;
  padding-bottom: 28px;
  color: var(--muted);
  font-size: 13px;
}

.footer p {
  margin: 0;
}

.note {
  color: var(--muted);
}

.footer-line {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  line-height: 1.4;
}

.footer-meta::after {
  content: "·";
  margin-left: 8px;
  color: #a9b0b7;
}

.footer-line img {
  display: inline-block;
  height: 20px;
  width: auto;
  opacity: 0.92;
  vertical-align: middle;
}

@media (max-width: 700px) {
  body {
    padding: 0;
  }

  .nav {
    padding: 0 10px;
  }

  .nav a {
    padding: 10px 11px;
  }

  .page,
  .footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .profile-table,
  .profile-table tbody,
  .profile-table tr,
  .profile-table td {
    display: block;
    width: 100%;
  }

  .profile-info {
    padding-right: 0;
  }

  .profile-photo {
    margin-top: 12px;
    text-align: left;
  }

  .avatar {
    width: 150px;
    height: auto;
  }

  h1 {
    font-size: 28px;
  }

  .profile-info {
    overflow-wrap: anywhere;
  }

  .news-container {
    max-height: 220px;
  }

  .footer-meta::after {
    content: "";
    margin-left: 0;
  }
}
