:root {
  --bg: #fff;
  --ink: #24292f;
  --muted: #57606a;
  --line: #d8dee4;
  --soft: #f6f8fa;
  --blue: #0969da;
  --blue-soft: #ddf4ff;
  --red: #cf222e;
  --shadow: 0 1px 2px rgba(27, 31, 36, 0.04);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a:hover {
  text-decoration: underline;
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.masthead__inner-wrap {
  width: min(1220px, calc(100% - 32px));
  min-height: 56px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.masthead__home {
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.masthead__menu {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.masthead__menu a {
  display: inline-flex;
  padding: 8px 9px;
  color: var(--muted);
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
}

.masthead__menu a:hover,
.masthead__menu a.active {
  color: var(--blue);
  background: var(--blue-soft);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 9px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.layout {
  width: min(1220px, calc(100% - 32px));
  margin: 28px auto 56px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: start;
}

.sidebar.sticky {
  position: sticky;
  top: 84px;
}

.profile_box {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.author__avatar {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.author__avatar img {
  width: 152px;
  height: 152px;
  object-fit: cover;
  object-position: center 28%;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
}

.author__content {
  text-align: center;
}

.author__name {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.15;
}

.author__bio {
  margin: 4px 0 10px;
  color: var(--muted);
}

.author__position {
  margin: 0 0 14px;
  color: var(--ink);
  font-weight: 600;
}

.author__urls {
  margin: 14px 0;
  padding: 14px 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.author__urls li {
  margin: 7px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.public-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}

.page {
  min-width: 0;
}

.page__content {
  max-width: 900px;
}

.page__content p {
  margin: 0 0 1rem;
}

.page__content h1 {
  margin: 2rem 0 0.8rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.55rem;
  line-height: 1.25;
}

.page__content h1:first-of-type {
  margin-top: 1.2rem;
}

.page__content ul,
.page__content ol {
  margin: 0 0 1.1rem;
  padding-left: 1.4rem;
}

.page__content li {
  margin: 0.45rem 0;
}

.publication-list li {
  margin-bottom: 1rem;
}

.evidence {
  color: var(--red);
  font-weight: 700;
}

.anchor {
  position: relative;
  top: -80px;
}

.site-footer {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 34px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .nav-toggle {
    display: block;
  }

  .masthead__menu {
    display: none;
    position: absolute;
    top: 56px;
    left: 16px;
    right: 16px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(27, 31, 36, 0.12);
  }

  .masthead__menu.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .sidebar.sticky {
    position: static;
  }

  .page__content {
    max-width: none;
  }
}

@media (max-width: 620px) {
  .masthead__inner-wrap,
  .layout,
  .site-footer {
    width: min(100% - 22px, 1220px);
  }

  .layout {
    margin-top: 18px;
  }

  .masthead__menu.open {
    grid-template-columns: 1fr;
  }

  .page__content h1 {
    font-size: 1.35rem;
  }
}
