:root {
  --ink: #000000;
  --muted: rgba(0, 0, 0, 0.68);
  --paper: #ffffff;
  --panel: #ffffff;
  --line: #d0d1c9;
  --blue: #1e3765;
  --teal: #007fa3;
  --aqua: #6fc7ea;
  --red: #dc4633;
  --deep-teal: #0d534d;
  --princeton: #e77500;
  --princeton-tint: #fff1e8;
  --gray-tint: #f2f3f1;
  --teal-tint: #e5f2f6;
  --shadow: 0 24px 80px rgba(30, 55, 101, 0.12);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", "Helvetica Neue", Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(115deg, transparent 0 57%, rgba(30, 55, 101, 0.045) 57% 58%, transparent 58%),
    linear-gradient(18deg, transparent 0 70%, rgba(231, 117, 0, 0.07) 70% 71%, transparent 71%),
    linear-gradient(156deg, rgba(208, 209, 201, 0.28) 0 12%, transparent 12%),
    var(--paper);
  background-attachment: fixed;
  background-size: 100% 860px, 100% 620px, 100% 780px, auto;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
}

a {
  color: inherit;
}

.skip-link {
  background: var(--ink);
  color: #ffffff;
  left: 1rem;
  padding: 0.7rem 1rem;
  position: absolute;
  top: -4rem;
  z-index: 10;
}

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

.site-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(30, 55, 101, 0.14);
  display: flex;
  justify-content: space-between;
  left: 0;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  position: sticky;
  top: 0;
  z-index: 5;
}

.wordmark {
  align-items: center;
  display: inline-flex;
  gap: 0.75rem;
  text-decoration: none;
}

.wordmark span {
  align-items: center;
  background: var(--blue);
  border-radius: 50%;
  color: var(--princeton);
  display: inline-flex;
  font-weight: 800;
  height: 2.4rem;
  justify-content: center;
  width: 2.4rem;
}

.wordmark strong {
  font-family: var(--serif);
  font-size: 1.1rem;
}

.main-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.main-nav a {
  border-radius: 999px;
  color: var(--blue);
  font-size: 1.05rem;
  font-weight: 650;
  padding: 0.55rem 0.8rem;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: var(--teal-tint);
  color: var(--blue);
}

.main-nav .nav-pill {
  background: var(--blue);
  color: #ffffff;
}

main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 0 clamp(1rem, 4vw, 3rem) 3rem;
}

.hero {
  align-items: end;
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  min-height: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.2rem, 3vw, 2rem);
}

.eyebrow {
  color: var(--blue);
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: 0;
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

.research-eyebrow {
  font-size: 0.92rem;
}

h1,
h2,
h3 {
  line-height: 1;
  margin: 0;
}

h1 {
  font-family: var(--serif);
  font-size: clamp(3.2rem, 8vw, 6.8rem);
  font-weight: 500;
  max-width: 10ch;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(2.3rem, 5vw, 4.5rem);
  font-weight: 500;
}

h3 {
  font-family: var(--sans);
  font-size: clamp(1.12rem, 1.4vw, 1.38rem);
  font-weight: 600;
  line-height: 1.24;
}

.role-stack {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1.55rem;
  margin: 1rem 0 1.2rem;
}

.role {
  background: var(--princeton);
  border: 1px solid var(--blue);
  box-shadow: 6px 6px 0 var(--blue);
  display: inline-block;
  font-size: 1.12rem;
  font-weight: 700;
  margin: 0;
  padding: 0.55rem 0.78rem;
  transform: rotate(-1.5deg);
}

.secondary-role {
  background: #ffffff;
  color: var(--blue);
  margin-left: clamp(0.2rem, 2vw, 1.25rem);
  transform: rotate(2deg);
}

.intro {
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  max-width: 720px;
}

.hero-actions,
.paper-actions,
.teaching-list article {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.button,
.paper-actions a,
.paper-actions button,
.bibtex-panel button,
.teaching-list a {
  align-items: center;
  border: 1px solid var(--blue);
  border-radius: 999px;
  color: var(--blue);
  display: inline-flex;
  font: inherit;
  font-weight: 650;
  min-height: 2.6rem;
  padding: 0.62rem 1rem;
  text-decoration: none;
}

.button.primary,
.paper-actions a:first-child {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

.button.secondary,
.paper-actions a,
.paper-actions button,
.bibtex-panel button,
.teaching-list a {
  background: var(--panel);
}

.button:hover,
.paper-actions a:hover,
.paper-actions button:hover,
.bibtex-panel button:hover,
.teaching-list a:hover,
.contact-links a:hover {
  box-shadow: 4px 4px 0 var(--princeton);
  transform: translate(-2px, -2px);
}

.paper-actions button {
  cursor: pointer;
}

.bibtex-panel {
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

.bibtex-panel pre {
  background: var(--gray-tint);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 0 0 0.75rem;
  max-height: 18rem;
  overflow: auto;
  padding: 1rem;
  white-space: pre-wrap;
}

.bibtex-panel button {
  cursor: pointer;
}

.hero-visual {
  display: grid;
  gap: 1rem;
}

.portrait-card {
  background: var(--panel);
  border: 1px solid var(--blue);
  box-shadow: var(--shadow);
  margin: 0;
  padding: 0.8rem;
  transform: rotate(1.5deg);
}

.portrait-card img {
  aspect-ratio: 3 / 4;
  display: block;
  filter: saturate(0.95) contrast(1.02);
  object-fit: cover;
  width: 100%;
}

.portrait-card figcaption {
  align-items: center;
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
  padding: 0.85rem 0.2rem 0.1rem;
}

.portrait-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.attention-canvas {
  background:
    linear-gradient(140deg, rgba(146, 201, 112, 0.95), rgba(104, 174, 92, 0.95));
  border: 1px solid var(--blue);
  box-shadow: 10px 10px 0 rgba(231, 117, 0, 0.18);
  display: block;
  height: 180px;
  width: 100%;
}

.quick-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 clamp(1.6rem, 4vw, 3rem);
}

.quick-grid article {
  background: rgba(242, 243, 241, 0.82);
  border: 1px solid var(--line);
  padding: 1.2rem;
}

.quick-grid a {
  color: var(--blue);
  font-weight: 650;
}

.stat {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  line-height: 1;
}

.quick-grid p,
.section-head p,
.contact-band p,
.teaching-list p,
.coauthors,
.subtitle {
  color: var(--muted);
}

.section {
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.research-shell {
  padding-top: clamp(1.4rem, 3vw, 2.5rem);
}

.section-head {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 0.85fr) minmax(250px, 0.55fr);
  margin-bottom: 2rem;
}

.section-head .eyebrow {
  grid-column: 1 / -1;
}

.section-head p {
  font-size: 1.05rem;
  margin: 0;
}

.research-tools {
  align-items: end;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(260px, 1fr) auto;
  margin-bottom: 1rem;
}

.search-box span {
  color: var(--muted);
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.search-box input {
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: 0;
  font: inherit;
  min-height: 3.3rem;
  padding: 0 1rem;
  width: 100%;
}

.filter-group {
  background: var(--panel);
  border: 1px solid var(--ink);
  display: flex;
  padding: 0.25rem;
}

.filter-button {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  min-height: 2.75rem;
  padding: 0 0.85rem;
}

.filter-button.active {
  background: var(--princeton);
  color: var(--ink);
}

.paper-list {
  display: grid;
  gap: 1rem;
}

.research-group-heading {
  border-top: 2px solid var(--blue);
  color: var(--blue);
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.8rem);
  font-weight: 500;
  margin-top: 2rem;
  padding-top: 1.4rem;
}

.research-group-heading:first-child {
  margin-top: 0;
}

.paper-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(30, 55, 101, 0.34);
  display: grid;
  gap: 0.75rem;
  padding: clamp(1.15rem, 3vw, 1.75rem);
}

.paper-card:hover {
  box-shadow: 8px 8px 0 rgba(0, 127, 163, 0.18);
}

.paper-meta {
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
  padding-bottom: 0.75rem;
}

.paper-meta span {
  color: var(--blue);
  font-weight: 650;
}

.paper-meta span:first-child {
  color: var(--princeton);
  font-size: 1.05rem;
}

.paper-meta span:last-child {
  color: var(--blue);
  font-size: clamp(1.08rem, 1.45vw, 1.32rem);
  line-height: 1.25;
}

.paper-meta span + span::before {
  color: var(--line);
  content: "/";
  margin-right: 0.7rem;
}

.paper-card h3 {
  font-size: clamp(1.12rem, 1.45vw, 1.38rem);
}

[hidden] {
  display: none !important;
}

.coauthors,
.subtitle {
  margin: 0;
}

details {
  border-top: 0;
  color: var(--ink);
}

summary {
  color: var(--blue);
  cursor: pointer;
  font-weight: 650;
  width: fit-content;
}

details p {
  font-size: 1rem;
  line-height: 1.68;
  margin-bottom: 0;
  max-width: 84ch;
}

.empty-state {
  background: var(--red);
  border: 1px solid var(--ink);
  color: #ffffff;
  font-weight: 800;
  padding: 1rem;
}

.split-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 0.65fr) minmax(300px, 1fr);
}

.teaching-list {
  display: grid;
  gap: 1rem;
}

.teaching-list article {
  align-items: center;
  background: rgba(242, 243, 241, 0.82);
  border: 1px solid var(--line);
  padding: 1rem;
}

.teaching-list article p {
  background: var(--princeton-tint);
  border: 1px solid rgba(231, 117, 0, 0.36);
  color: var(--ink);
  display: inline-flex;
  flex-basis: auto;
  margin: 0;
  padding: 0.32rem 0.55rem;
}

.teaching-list h3,
.teaching-list article a {
  flex-basis: 100%;
}

.contact-band {
  background: var(--blue);
  color: #ffffff;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
  margin: 0 calc(clamp(1rem, 4vw, 3rem) * -1);
  padding-left: clamp(1rem, 4vw, 3rem);
  padding-right: clamp(1rem, 4vw, 3rem);
}

.contact-band .eyebrow,
.contact-band p {
  color: var(--aqua);
}

.contact-links {
  align-content: start;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  justify-self: start;
}

.contact-links a {
  align-items: center;
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 999px;
  color: var(--blue);
  display: inline-flex;
  font-weight: 650;
  min-height: 2.6rem;
  padding: 0.62rem 1rem;
  text-decoration: none;
  width: fit-content;
}

.contact-band h2 {
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.08;
}

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

.map-frame {
  background: var(--panel);
  border: 1px solid rgba(30, 55, 101, 0.34);
  box-shadow: 10px 10px 0 rgba(231, 117, 0, 0.14);
  overflow: hidden;
}

.map-frame iframe {
  aspect-ratio: 4 / 3;
  border: 0;
  display: block;
  min-height: 360px;
  width: 100%;
}

.site-footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  padding: 1.5rem clamp(1rem, 4vw, 3rem) 3rem;
}

.site-footer p {
  color: var(--muted);
  margin: 0;
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .hero,
  .quick-grid,
  .section-head,
  .research-tools,
  .split-section,
  .contact-band {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: clamp(3rem, 13vw, 5.2rem);
  }

  .portrait-card {
    max-width: 360px;
  }

  .filter-group {
    overflow-x: auto;
  }
}

@media (max-width: 520px) {
  main {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .main-nav a {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .role {
    box-shadow: 4px 4px 0 var(--blue);
  }

  .paper-actions a,
  .button,
  .contact-links a,
  .teaching-list a {
    justify-content: center;
    width: 100%;
  }
}
