* {
  box-sizing: border-box;
}

:root {
  --background: #ffffff;
  --text: #111111;
  --muted: rgba(17, 17, 17, 0.55);
  --line: rgba(17, 17, 17, 0.16);
  --accent: #dda3e8;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.page {
  min-height: 100vh;
  padding: 46px 8vw 120px;
}

/* Header */

.site-header {
  margin-bottom: 26px;
}

h1 {
  margin: 0;
  width: fit-content;
}

h1 a {
  display: block;
  color: var(--accent);
  text-decoration: none;
  font-size: clamp(2.6rem, 5vw, 4.9rem);
  line-height: 0.83;
  letter-spacing: -0.075em;
  font-weight: 400;
}

.language-switch {
  position: fixed;
  left: 8vw;
  bottom: 42px;
  z-index: 12;
  color: var(--accent);
  font-size: 0.92rem;
  line-height: 1.4;
}

.language-switch a {
  color: var(--accent);
}

/* Navigation */

.side-nav {
  position: fixed;
  left: calc(8vw + 42px);
  top: 52vh;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  color: var(--accent);
  font-size: 0.95rem;
  line-height: 1.45;
}

.side-nav a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* Sections */

.section {
  display: grid;
  grid-template-columns: minmax(0, 780px) 110px;
  gap: 42px;
  align-items: start;
  margin-left: 220px;
  margin-bottom: 82px;
}

.section + .section {
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.section-content {
  grid-column: 1;
  grid-row: 1;
  max-width: 780px;
}

.section-label {
  grid-column: 2;
  grid-row: 1;
  writing-mode: vertical-rl;
  transform: none;
  font-size: clamp(1.6rem, 2.4vw, 2.3rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--muted);
  padding-top: 4px;
}

.section-content p {
  margin: 0 0 22px;
  font-size: 1rem;
  line-height: 1.66;
}

.section-content p:last-child {
  margin-bottom: 0;
}

h2 {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.3;
  text-transform: lowercase;
  letter-spacing: 0.01em;
}

/* Research */

.research-clusters {
  margin-top: 42px;
}

.research-cluster {
  margin-bottom: 28px;
}

.paper-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.paper-list li {
  margin-bottom: 9px;
  font-size: 0.86rem;
  line-height: 1.45;
}

.paper-list a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.paper-list em {
  font-size: 0.84rem;
  font-style: normal;
  color: var(--muted);
}

/* Works */

.work-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px 48px;
}

.work-list article {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.work-list p {
  font-size: 0.98rem;
  line-height: 1.55;
  color: rgba(17, 17, 17, 0.78);
}

.other-works {
  grid-column: 1 / -1;
  justify-self: end;
  margin: 2px 0 0;
  text-align: right;
  font-size: 0.98rem;
  line-height: 1.55;
}

.other-works,
.other-works a {
  color: var(--accent);
}

/* Contact */

.contact {
  padding-bottom: 40px;
}

/* Footer */

.site-footer {
  margin-top: 110px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: right;
}

.footer-info {
  text-align: right;
}

.footer-info p {
  margin: 0 0 10px;
}

.footer-links a,
.footer-links span {
  color: var(--accent);
}

/* Responsive */

@media (max-width: 780px) {
  body {
    font-size: 15px;
    line-height: 1.6;
  }

  .page {
    padding: 30px 22px 80px;
  }

  .site-header {
    margin-bottom: 26px;
  }

  h1 a {
    font-size: clamp(2.2rem, 13vw, 4.2rem);
    line-height: 0.84;
  }

  .language-switch {
    position: static;
    margin: 0 0 38px;
    font-size: 0.92rem;
  }

  .side-nav {
    position: static;
    transform: none;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 0 0 56px;
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .section {
    display: block;
    max-width: none;
    margin-left: 0;
    margin-bottom: 66px;
  }

  .section + .section {
    padding-top: 28px;
    border-top: 1px solid var(--line);
  }

  .section-label {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 1.05rem;
    line-height: 1.2;
    letter-spacing: 0;
    color: var(--accent);
    margin-bottom: 22px;
    padding-top: 0;
  }

  .section-content {
    max-width: none;
  }

  .section-content p {
    font-size: 1rem;
    line-height: 1.62;
    margin-bottom: 20px;
  }

  .research-clusters {
    margin-top: 32px;
  }

  .research-cluster {
    margin-bottom: 26px;
  }

  .paper-list li {
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .work-list {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .other-works {
    grid-column: auto;
    justify-self: stretch;
    text-align: right;
    margin-top: 4px;
  }

  .site-footer {
    margin-top: 72px;
    padding-top: 24px;
    font-size: 0.88rem;
    text-align: right;
  }

  .footer-info {
    text-align: right;
  }
}
