:root {
  --ink: #1c1c1a;
  --paper: #ffffff;
  --muted: #77766f;
  --line: #d3d1ca;
  --soft: #f6f6f3;
  --page: 1440px;
  --gutter: clamp(22px, 4.5vw, 72px);
  --space: clamp(90px, 11vw, 170px);
  --measure: 780px;
  --sans: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3,
dl,
dd,
dt {
  margin: 0;
}

a:focus-visible,
summary:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 13px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.research-header,
.research-hero,
.research-list,
.article-hero,
.article-stats,
.article-section,
.paper-section,
.research-contact,
.research-footer {
  width: min(100%, var(--page));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.research-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 82px;
  font-size: 13px;
}

.brand {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  width: fit-content;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.brand__mark {
  display: block;
  width: 36px;
  height: 18px;
  object-fit: contain;
}

.language-menu {
  position: relative;
  justify-self: end;
}

.language-menu summary {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 40px;
  justify-content: flex-end;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  list-style: none;
}

.language-menu summary::-webkit-details-marker {
  display: none;
}

.language-menu__chevron {
  display: block;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  transition: transform 150ms ease;
}

.language-menu[open] .language-menu__chevron {
  margin-top: 3px;
  transform: rotate(225deg);
}

.language-menu__list {
  position: absolute;
  z-index: 5;
  top: calc(100% + 16px);
  right: -10px;
  display: grid;
  width: 156px;
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 14px 36px rgba(28, 28, 26, 0.08);
}

.language-menu__list a {
  padding: 9px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.language-menu__list a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.research-header a,
.research-entry,
.paper-link,
.research-contact a,
.research-footer a {
  transition: opacity 150ms ease;
}

.research-header a:hover,
.research-entry:hover,
.paper-link:hover,
.research-contact a:hover,
.research-footer a:hover {
  opacity: 0.55;
}

.language-menu__list a:hover {
  background: var(--soft);
  color: var(--ink);
  opacity: 1;
}

.label {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.research-hero {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1.58fr);
  gap: var(--gutter);
  min-height: calc(76svh - 82px);
  padding-top: clamp(82px, 12vh, 150px);
  padding-bottom: clamp(62px, 9vh, 108px);
  border-top: 1px solid var(--line);
}

.research-hero h1 {
  grid-column: 1 / -1;
  align-self: center;
  max-width: 1200px;
  font-size: clamp(66px, 9.5vw, 138px);
  font-weight: 400;
  line-height: 0.91;
  letter-spacing: -0.073em;
}

html[data-language="ru"] .research-hero h1,
html[data-language="kk"] .research-hero h1 {
  font-size: clamp(58px, 8.2vw, 120px);
  letter-spacing: -0.064em;
}

html[data-language="zh"] .research-hero h1 {
  font-size: clamp(60px, 8.7vw, 126px);
  letter-spacing: -0.045em;
}

.research-hero__copy {
  grid-column: 2;
  align-self: end;
  max-width: 600px;
  margin-left: auto;
  font-size: clamp(18px, 1.55vw, 23px);
  line-height: 1.48;
  letter-spacing: -0.025em;
}

.research-list {
  padding-top: var(--space);
  padding-bottom: var(--space);
  border-top: 1px solid var(--line);
}

.research-list__heading {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1.58fr);
  gap: var(--gutter);
  margin-bottom: clamp(70px, 8vw, 118px);
}

.research-list__heading h2 {
  max-width: 900px;
  font-size: clamp(42px, 5.2vw, 76px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.058em;
}

.research-entry {
  display: grid;
  grid-template-columns: minmax(130px, 0.34fr) minmax(0, 1.26fr) minmax(120px, 0.4fr);
  gap: var(--gutter);
  align-items: start;
  padding-top: 32px;
  padding-bottom: 42px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.research-entry__content {
  display: grid;
  gap: 22px;
}

.research-entry h3 {
  max-width: 820px;
  font-size: clamp(28px, 3.3vw, 48px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.052em;
}

.research-entry__content > p {
  max-width: 700px;
  color: #5f5e59;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.52;
  letter-spacing: -0.015em;
}

.research-entry__cta {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-self: end;
  font-size: 12px;
  white-space: nowrap;
}

.article-hero {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1.58fr);
  gap: var(--gutter);
  min-height: calc(90svh - 82px);
  padding-top: clamp(76px, 10vh, 132px);
  padding-bottom: clamp(58px, 8vh, 96px);
  border-top: 1px solid var(--line);
}

.article-hero h1 {
  grid-column: 1 / -1;
  align-self: center;
  max-width: 1320px;
  font-size: clamp(58px, 7.9vw, 114px);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.071em;
}

html[data-language="ru"] .article-hero h1,
html[data-language="kk"] .article-hero h1 {
  font-size: clamp(50px, 6.9vw, 100px);
  letter-spacing: -0.062em;
}

html[data-language="zh"] .article-hero h1 {
  font-size: clamp(54px, 7.4vw, 106px);
  letter-spacing: -0.042em;
}

.article-hero__lead {
  grid-column: 2;
  align-self: end;
  max-width: 760px;
  margin-left: auto;
  font-size: clamp(19px, 1.7vw, 25px);
  line-height: 1.48;
  letter-spacing: -0.028em;
}

.article-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-top: 0;
  padding-bottom: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.article-stats > div {
  min-height: 184px;
  padding: 28px clamp(22px, 3vw, 44px) 32px 0;
  border-right: 1px solid var(--line);
}

.article-stats > div + div {
  padding-left: clamp(22px, 3vw, 44px);
}

.article-stats > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.article-stats dt {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.article-stats dd {
  margin-top: 58px;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.article-section,
.paper-section,
.research-contact {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1.58fr);
  gap: var(--gutter);
  padding-top: var(--space);
  padding-bottom: var(--space);
  border-top: 1px solid var(--line);
}

.article-section:first-of-type {
  border-top: 0;
}

.article-section__content {
  max-width: var(--measure);
}

.article-section h2,
.paper-section h2,
.research-contact h2 {
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.058em;
}

.article-section__content > p {
  margin-top: clamp(44px, 5vw, 72px);
  color: #494945;
  font-size: clamp(18px, 1.45vw, 21px);
  line-height: 1.62;
  letter-spacing: -0.014em;
}

.system-list {
  display: grid;
  margin-top: clamp(54px, 6vw, 86px);
  border-top: 1px solid var(--line);
}

.system-list > div {
  display: grid;
  grid-template-columns: minmax(150px, 0.58fr) minmax(0, 1.42fr);
  gap: 30px;
  padding-top: 22px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.system-list dt {
  font-size: 15px;
  line-height: 1.4;
}

.system-list dd {
  color: #5f5e59;
  font-size: 15px;
  line-height: 1.5;
}

.paper-section__content {
  display: grid;
  gap: clamp(52px, 7vw, 94px);
  max-width: var(--measure);
}

.paper-section__content > p {
  max-width: 700px;
  color: #494945;
  font-size: clamp(18px, 1.45vw, 21px);
  line-height: 1.62;
  letter-spacing: -0.014em;
}

.paper-link {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(22px, 2.6vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.article-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.research-contact > div {
  display: grid;
  gap: clamp(72px, 10vw, 136px);
}

.research-contact__links {
  display: grid;
  gap: 22px;
}

.research-contact a {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(20px, 2.5vw, 36px);
  letter-spacing: -0.035em;
}

.research-contact__channel {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  margin-left: auto;
  color: var(--muted);
  font-size: clamp(13px, 1.15vw, 17px);
  letter-spacing: 0;
  white-space: nowrap;
}

.arrow-icon {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 0.62em;
  height: 0.62em;
  margin-right: 0.08em;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
}

.arrow-icon::after {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 0.88em;
  height: 1px;
  background: currentColor;
  content: "";
  transform: rotate(-45deg);
  transform-origin: right center;
}

.research-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 36px;
  align-items: center;
  min-height: 94px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 760px) {
  .research-header {
    grid-template-columns: 1fr auto;
    min-height: 70px;
  }

  .research-header > p {
    display: none;
  }

  .brand__mark {
    width: 32px;
    height: 16px;
  }

  .language-menu summary {
    font-size: 10px;
  }

  .language-menu__list {
    top: calc(100% + 14px);
    right: 0;
  }

  .research-hero,
  .research-list__heading,
  .article-hero,
  .article-section,
  .paper-section,
  .research-contact {
    grid-template-columns: 1fr;
  }

  .research-hero,
  .article-hero {
    gap: 42px;
    min-height: calc(88svh - 70px);
    padding-top: 72px;
  }

  .research-hero h1,
  .research-hero__copy,
  .article-hero h1,
  .article-hero__lead {
    grid-column: 1;
    margin-left: 0;
  }

  .research-hero h1 {
    font-size: clamp(56px, 17vw, 92px);
  }

  html[data-language="ru"] .research-hero h1,
  html[data-language="kk"] .research-hero h1 {
    font-size: clamp(46px, 12.8vw, 72px);
  }

  .article-hero h1,
  html[data-language="ru"] .article-hero h1,
  html[data-language="kk"] .article-hero h1 {
    font-size: clamp(44px, 12vw, 68px);
  }

  html[data-language="zh"] .research-hero h1,
  html[data-language="zh"] .article-hero h1 {
    font-size: clamp(48px, 14vw, 78px);
  }

  .research-list__heading,
  .article-section,
  .paper-section,
  .research-contact {
    gap: 42px;
  }

  .research-entry {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .research-entry__cta {
    justify-self: start;
  }

  .article-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-stats > div,
  .article-stats > div + div {
    min-height: 150px;
    padding: 24px 22px 26px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .article-stats > div:nth-child(even) {
    padding-left: 22px;
    border-left: 1px solid var(--line);
  }

  .article-stats > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .article-stats dd {
    margin-top: 42px;
  }

  .system-list > div {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .research-footer {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 30px;
    padding-bottom: 30px;
  }
}

@media (max-width: 420px) {
  .article-stats {
    grid-template-columns: 1fr;
  }

  .article-stats > div,
  .article-stats > div + div,
  .article-stats > div:nth-child(even) {
    min-height: 0;
    padding: 24px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    border-left: 0;
  }

  .article-stats > div:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .article-stats > div:last-child {
    border-bottom: 0;
  }

  .article-stats dd {
    margin-top: 26px;
  }

  .research-contact h2 br {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
