@font-face {
  font-family: "Crimson Text";
  src: url("fonts/crimson-text.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "EB Garamond";
  src: url("fonts/eb-garamond.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: only light;
  background-color: #ffffff;
  --text: #202020;
  --muted: #555;
  --line: #d4d4d4;
  --link: #990000;
  --link-hover: #580b19;
  --coauthor-link: #284969;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: #ffffff;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover { color: var(--link-hover); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 4px;
}

.site-shell {
  width: min(100% - 48px, 820px);
  margin: 0 auto;
  padding: 52px 0 44px;
}

.intro {
  padding-bottom: 32px;
}

.intro-details {
  display: grid;
  grid-template-columns: clamp(140px, 24vw, 200px) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  border-top: 1px solid #777;
  padding-top: 26px;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 19px;
  font-family: "Crimson Text", var(--serif);
  font-size: clamp(2.5rem, 7vw, 3.65rem);
  font-weight: 400;
  line-height: 1.03;
  text-align: center;
}

.affiliation {
  margin-bottom: 12px;
  line-height: 1.35;
}

.bio {
  max-width: 620px;
  margin-bottom: 12px;
}

.contact {
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.portrait-placeholder {
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
}

h2 {
  margin-bottom: 10px;
  font-size: 1.65rem;
  font-weight: 600;
}

.paper {
  padding: 17px 0 19px;
  border-top: 1px solid var(--line);
}

.paper h3 {
  margin-bottom: 3px;
  color: var(--link);
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.paper-resources {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5em;
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 1rem;
}

.paper-resources li + li::before {
  content: "|" / "";
  margin-right: 0.5em;
}

.resource-pending { color: var(--link); }

.paper-meta {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.paper-meta a { color: var(--coauthor-link); }
.paper-meta a:hover { color: var(--text); }

.abstract-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 9px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--link);
  cursor: pointer;
  font: 0.875rem/1.4 var(--sans);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.abstract-toggle:hover { color: var(--link-hover); }
.toggle-mark { font-size: 1rem; text-decoration: none; }

.abstract {
  overflow: hidden;
  max-width: 740px;
  color: #404040;
}

.abstract.is-opening { animation: reveal 180ms ease-out; }

.abstract p { margin: 14px 0 0; }
.placeholder-label { color: var(--muted); font-style: italic; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .abstract.is-opening { animation: none; }
}

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 36px, 820px);
    padding-top: 30px;
  }

  .intro-details {
    gap: 20px;
  }
}

@media (max-width: 440px) {
  .intro-details {
    grid-template-columns: 1fr;
  }

  .portrait-placeholder { width: 160px; }
}
