:root {
  --background: #f7f7f5;
  --text: #202124;
  --muted: #666b73;
  --line: #e7e7e3;
  --soft: #eeeeea;
  --accent: #2d5bff;
}

:root[data-theme="dark"] {
  --background: #151515;
  --text: #f1f1f1;
  --muted: #a7a7ab;
  --line: #323236;
  --soft: #252528;
  --accent: #8aa2ff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

a {
  color: inherit;
}

a:focus-visible {
  border-radius: 0.2rem;
  outline: 3px solid currentColor;
  outline-offset: 0.35rem;
}

.site {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.site-header,
.site-main,
.site-footer {
  width: min(70rem, calc(100% - 3rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 1.75rem;
}

.site-header--actions {
  position: absolute;
  z-index: 10;
  top: 0;
  right: 0;
  left: 0;
  gap: 0.5rem;
  justify-content: flex-end;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.language-switch a,
.language-switch span {
  min-width: 2rem;
  padding: 0.35rem 0.4rem;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
}

.language-switch a:hover {
  background: var(--soft);
  color: var(--text);
}

.language-switch [aria-current="page"] {
  color: var(--text);
}

.theme-toggle {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  touch-action: manipulation;
}

.theme-toggle:hover {
  background: var(--soft);
  color: var(--text);
}

.theme-toggle:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 0.2rem;
}

.theme-icon {
  display: block;
  width: 18px;
  height: 18px;
}

.theme-icon__sun {
  display: none;
}

:root[data-theme-resolved="dark"] .theme-icon__moon {
  display: none;
}

:root[data-theme-resolved="dark"] .theme-icon__sun {
  display: inline;
}

.brand {
  font-size: 0.82rem;
  font-weight: 780;
  letter-spacing: 0.13em;
  text-decoration: none;
}

.site-main {
  flex: 1;
  padding-block: 4.5rem 6.5rem;
}

.site-main--centered {
  display: flex;
  align-items: center;
}

.hero {
  width: 100%;
  min-width: 0;
  max-width: 53rem;
  padding-block: 4vh 10vh;
}

.eyebrow {
  margin: 0 0 1.125rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow--brand {
  color: var(--text);
  font-weight: 800;
  text-transform: none;
}

h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(3.3rem, 9vw, 7.6rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.lead {
  max-width: 41rem;
  margin: 2.125rem 0 0;
  color: var(--muted);
  font-size: clamp(1.12rem, 2.2vw, 1.45rem);
  line-height: 1.55;
}

.publications {
  padding-top: 2.25rem;
  border-top: 1px solid var(--line);
}

.section-label {
  margin: 0 0 1.375rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.publication-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.publication-kicker {
  margin: 0 0 0.375rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.publication-title {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.publication-title a {
  text-decoration: none;
}

.publication-title a:hover,
.publication-action:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.publication-description {
  max-width: 42.5rem;
  margin: 0.625rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.publication-action {
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  padding-block: 1.75rem 2.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

@media (max-width: 43.75rem) {
  .site-header,
  .site-main,
  .site-footer {
    width: calc(100% - 2.25rem);
  }

  .site-header {
    padding-block: 1.375rem;
  }

  .site-main {
    padding-block: 3.25rem 5rem;
  }

  .hero {
    padding-block: 3vh 11vh;
  }

  h1 {
    font-size: clamp(3.4rem, 20vw, 5.5rem);
  }

  .lead {
    margin-top: 1.625rem;
  }

  .publication-card {
    grid-template-columns: 1fr;
    gap: 1.125rem;
    padding-block: 1.5rem;
  }

  .publication-description {
    font-size: 0.93rem;
  }

  .publication-action {
    justify-self: start;
  }

  .site-footer {
    flex-direction: column;
    padding-block: 1.5rem 1.875rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: #151515;
    --text: #f1f1f1;
    --muted: #a7a7ab;
    --line: #323236;
    --soft: #252528;
    --accent: #8aa2ff;
  }
}

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

@media print {
  :root,
  :root[data-theme] {
    --background: #fff;
    --text: #000;
    --muted: #555;
    --line: #bbb;
    --soft: #eee;
  }

  .theme-toggle {
    display: none;
  }

  .site-main {
    min-height: 65vh;
  }
}
