* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-synthesis: weight;
  font-size: 18px;
  line-height: 1.6;
  color: #111;
  background: #fff;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.site-header {
  border-bottom: none;
  background: #92A591;
  color: #fff;
}

.site-header .container {
  max-width: 1200px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.logo {
  width: 145px;
  height: 66px;
  object-fit: contain;
  justify-self: start;
}

.name {
  margin: 0;
  font-size: 38px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  justify-self: center;
  text-align: center;
  max-width: 100%;
}

.nav {
  justify-self: end;
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
  align-items: center;
}

.nav a {
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 10px;
  color: inherit;
  white-space: nowrap;
  font-size: 18px;
}

.nav a:hover {
  text-decoration: underline;
}

.about {
  display: flex;
  gap: 22px;
  align-items: center;
  margin-top: 18px;
}

.profile-pic {
  width: 300px;
  height: 400px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #e5e5e5;
  flex: 0 0 auto;
}

.about-text {
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-text h2 {
  margin: 0 0 14px 0;
  font-size: 26px;
}

.about-text h3 {
  margin: 18px 0 8px 0;
  font-size: 16px;
}

.about-text p {
  margin: 0 0 32px 0;
  font-size: 20px;
  line-height: 1.7;
}

.about-text ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.about-text li { margin: 6px 0; }

a { color: inherit; }
a:hover { text-decoration: underline; }

.accent-link {
  color: #92A591;
  font-weight: 600;
  text-decoration: none;
}

.email-link {
  color: #92A591;
  font-weight: 600;
  text-decoration: none;
}

.accent-link:hover,
.email-link:hover {
  text-decoration: none;
}

.nav a:focus-visible,
.email-link:focus-visible,
.accent-link:focus-visible,
.paper-abstract > summary:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
  border-radius: 10px;
}

.muted { opacity: 0.75; }

@media (max-width: 980px) {
  .header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }

  .nav {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  .profile-pic {
    width: 260px;
    height: 346px;
  }

  .logo {
    width: 135px;
    height: 62px;
  }

  .about-text p {
    font-size: 19px;
  }

  .site-header .container {
    max-width: 980px;
  }
}

@media (max-width: 700px) {
  .logo {
    width: 70px;
    height: 40px;
  }

  .nav a {
    font-size: 17px;
    padding: 6px 10px;
  }

  .name { font-size: 32px; }

  .about {
    flex-direction: column;
    align-items: center;
    gap: 26px;
  }

  .profile-pic {
    width: min(220px, 100%);
    height: auto;
    aspect-ratio: 3 / 4;
  }

  .about-text {
    width: 100%;
    max-width: 720px;
    padding-top: 6px;
  }

  .about-text h2 {
    font-size: 24px;
  }

  .about-text p {
    font-size: 18px;
    margin: 0 0 26px 0;
  }

  .site-header .container {
    max-width: 900px;
  }
}

.about-text h2.page-title {
  margin: 0 0 28px 0;
  font-size: 36px;
  color: #111;
  text-align: left;
}

.about-text h3.section-title {
  margin: 0 0 18px 0;
  font-size: 24px;
  color: #92A591;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

.papers {
  margin-top: 10px;
}

.paper {
  padding: 8px 0;
}

.paper + .paper {
  margin-top: 10px;
}

.paper-title {
  font-size: 20px;
  font-weight: 600;
}

.paper-authors {
  font-size: 18px;
  opacity: 0.9;
  margin-top: 3px;
}

.paper-abstract {
  margin-top: 4px;
  margin-bottom: 2px;
}

.paper-abstract > summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: #92A591;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}

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

.paper-abstract > summary::before {
  content: "▸";
  display: inline-block;
  transform-origin: center;
  transition: transform 0.15s ease;
}

.paper-abstract[open] > summary::before {
  transform: rotate(90deg);
}

.paper-body {
  padding: 10px 0 0 18px;
  font-size: 17px;
  line-height: 1.55;
}

.paper-body p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

.paper-body-empty {
  min-height: 22px;
}

@media (max-width: 700px) {
  .paper-title {
    font-size: 18px;
  }

  .paper-authors {
    font-size: 16px;
  }

  .paper-abstract > summary {
    font-size: 15px;
  }

  .paper-body {
    font-size: 16px;
    padding-left: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
