@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,600;1,700&display=swap");

:root {
  --paper: #f6f4ed;
  --ink: #002a32;
  --muted: #506568;
  --content-width: 800px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 20;
  padding: 0.6rem 0.9rem;
  color: var(--paper);
  background: var(--ink);
}

.skip-link:focus {
  top: 1rem;
}

.home-layout {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
}

.home-copy {
  flex: 0 0 65%;
  min-width: 0;
  padding: 48px clamp(28px, 3.15vw, 43px) 80px;
}

.site-header,
.about-content {
  width: 100%;
  max-width: var(--content-width);
  margin-right: auto;
  margin-left: auto;
}

nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 29px;
  gap: 28px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  line-height: 1.4;
  text-transform: uppercase;
}

nav a {
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible,
nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.site-name {
  margin-left: auto;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.about-content {
  padding-top: 47px;
}

.about-content h1,
.about-content h2,
.page-content h2 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1.6px;
  line-height: 1.4;
  text-transform: uppercase;
}

p {
  margin: 0 0 9px;
}

strong {
  font-weight: 700;
}

.contacts {
  margin-top: 71px;
}

.contacts h2 {
  margin-bottom: 7px;
  font-size: 13px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  text-decoration: none;
}

.contact-link:hover span,
.contact-link:focus-visible span {
  text-decoration: underline;
}

.contact-link svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.portrait {
  display: block;
  flex: 0 0 35%;
  width: 35%;
  min-height: 600px;
  max-height: min(100vh, 716px);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: center center;
}

.inner-page {
  width: min(calc(100% - 48px), var(--content-width));
  margin: 0 auto;
  padding: 48px 0 80px;
}

.inner-page .site-header {
  max-width: none;
}

.page-content {
  padding-top: 49px;
}

.page-title {
  margin: 0 0 66px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -1.25px;
  line-height: 1.2;
}

.page-content section + section {
  margin-top: 34px;
}

.page-content h2 {
  margin-bottom: 14px;
}

.paper {
  margin-bottom: 34px;
}

.paper > p {
  margin: 0 0 7px;
}

.paper em,
.teaching-content em {
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
}

.paper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: flex-start;
  padding-left: 5px;
}

.paper details {
  position: relative;
}

.paper summary,
.paper-button {
  display: block;
  width: 143px;
  min-height: 36px;
  padding: 5px 12px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background: transparent;
  font-size: 15px;
  line-height: 24px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.paper summary {
  list-style: none;
}

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

.paper summary:hover,
.paper summary:focus-visible,
.paper-button:hover,
.paper-button:focus-visible {
  color: var(--paper);
  background: var(--ink);
}

.paper details[open] {
  width: 100%;
}

.paper details[open] summary {
  margin-bottom: 10px;
}

.abstract-copy {
  max-width: 760px;
  padding: 10px 0 2px;
  color: var(--muted);
  font-size: 15px;
}

.abstract-copy p {
  margin-bottom: 10px;
}

.abstract-copy .paper-note {
  margin-top: 13px;
  font-size: 14px;
  font-style: italic;
}

.teaching-content section + section {
  margin-top: 32px;
}

.teaching-content ul {
  margin: 0;
  padding-left: 54px;
}

.teaching-content li {
  margin: 0 0 2px;
  padding-left: 1px;
}

@media (max-width: 800px) {
  .home-layout {
    display: block;
  }

  .home-copy {
    width: 100%;
    padding: 30px 24px 48px;
  }

  nav {
    justify-content: space-between;
    gap: 16px;
  }

  .site-name {
    margin-left: 0;
  }

  .nav-links {
    gap: 16px;
  }

  .about-content {
    padding-top: 54px;
  }

  .contacts {
    margin-top: 52px;
  }

  .portrait {
    width: 100%;
    min-height: 440px;
    max-height: none;
    aspect-ratio: 4 / 5;
    object-position: center 42%;
  }

  .inner-page {
    width: min(calc(100% - 48px), var(--content-width));
    padding-top: 30px;
  }

  .page-content {
    padding-top: 58px;
  }

  .page-title {
    margin-bottom: 52px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  nav {
    align-items: flex-start;
    font-size: 9px;
  }

  .nav-links {
    flex-direction: column;
    gap: 7px;
    align-items: flex-end;
  }

  .about-content h1,
  .about-content h2,
  .page-content h2 {
    font-size: 16px;
  }

  .page-title {
    font-size: 31px;
  }

  .paper-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding-left: 0;
  }

  .paper details,
  .paper summary,
  .paper-button {
    width: 100%;
  }

  .paper details[open] {
    grid-column: 1 / -1;
  }

  .teaching-content ul {
    padding-left: 28px;
  }
}
