@import url('https://fonts.googleapis.com/css2?family=Literata:ital,opsz,wght@0,7..72,400;0,7..72,500;0,7..72,600;1,7..72,400&display=swap');

:root {
  --paper: #f6f7f5;
  --ink: #1d2733;
  --muted: #5a6572;
  --rule: #d6dbe1;
  --persian: #1f3c9b;
  --persian-dark: #152a70;
}

* { box-sizing: border-box; }

html { font-size: 106.25%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Literata', Georgia, 'Times New Roman', serif;
  font-optical-sizing: auto;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
}

/* Masthead: the name is the one bold element */
.masthead { margin-bottom: 2.75rem; }

.name {
  font-size: clamp(2.6rem, 7vw, 3.9rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
}

.name a { color: inherit; text-decoration: none; }

.role {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0.7rem 0 0;
  border-top: 1px solid var(--rule);
}

nav a {
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

nav a:hover { border-bottom-color: var(--rule); }
nav a[aria-current="page"] { border-bottom-color: var(--persian); }

/* Text */
h2 {
  font-size: 1.45rem;
  font-weight: 500;
  margin: 2.6rem 0 0.9rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin: 1.9rem 0 0.6rem;
}

p { margin: 0 0 1rem; }

a { color: var(--persian); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--persian-dark); }

a:focus-visible {
  outline: 2px solid var(--persian);
  outline-offset: 3px;
  border-radius: 2px;
}

/* About */
.intro {
  display: grid;
  grid-template-columns: 1fr 11rem;
  gap: 2rem;
  align-items: start;
}

.portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 3px;
  background: var(--rule);
}

.contact {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
}

.contact a { word-break: break-all; }

/* Lists of papers and talks */
.entries {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entries li {
  margin: 0 0 1.05rem;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
}

.title { font-style: italic; }

.meta {
  display: block;
  color: var(--muted);
  font-size: 0.94rem;
}

.links { font-size: 0.94rem; }
.links a + a { margin-left: 0.75rem; }

.year {
  font-size: 1.08rem;
  font-weight: 600;
  margin: 1.8rem 0 0.6rem;
  color: var(--ink);
}

/* Opening line on About and Research */
.lead {
  font-size: 1.16rem;
  line-height: 1.5;
  color: var(--ink);
}

/* Research page: keywords, theme links, theme sections */
.keywords {
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

.themes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.4rem 0 0.5rem;
}

.themes a {
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--persian);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.2rem 0.85rem;
  background: #fff;
}

.themes a:hover { border-color: var(--persian); }

.theme {
  margin-top: 2.6rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 1.5rem;
}

.theme h2 { margin-top: 1.4rem; }

.points {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.points li { margin-bottom: 0.3rem; }
.points li::marker { color: var(--persian); }

.list-label {
  margin: 1.6rem 0 0.7rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

footer {
  margin-top: 3.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 640px) {
  .page { padding-top: 2.25rem; }
  .intro { grid-template-columns: 1fr; }
  .portrait { width: 9rem; order: -1; }
}

/* Page title for screen readers; the nav already shows where you are */
.sr-title {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
