/* Inter, self-hosted (SIL Open Font License 1.1, see static/fonts/OFL.txt). Latin subset, variable weight. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* The paper website's palette. The plot orange is 3.2:1 on white: graphics and large or bold text only
   (>= 24 px, or >= 18.66 px bold). Small orange text uses the same hue darker, 4.56:1. */
:root {
  color-scheme: light;
  --ink: #141414;
  --muted: #666666;
  --border: #e6e6e6;
  --background: #ffffff;
  --brand: #eb6834;
  --brand-text: #c1552b;
  --brand-tint: #fef6f3;
  --brand-border: #f9d3c4;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-optical-sizing: auto;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

.page {
  max-width: calc(860px + 2 * 16px);
  margin: 0 auto;
  padding: 72px 16px 96px;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header: the name, then role and affiliation, then the link pills; the photo on the right. */
.intro {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

.intro-text {
  flex: 1;
  min-width: 0;
  container-type: inline-size; /* the name's size follows this column, not the viewport */
}

/* "Walter Simoncini" is 7.6 em wide in Inter Bold at this tracking: 12.5cqi keeps it on one line with room
   to spare, up to 68 px. */
.intro h1 {
  margin: 0;
  font-size: clamp(32px, 12.5cqi, 68px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.affiliation {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.affiliation a {
  color: var(--brand-text);
  text-decoration: underline;
  text-decoration-color: var(--brand-border);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  white-space: nowrap; /* a line may break between names, never inside one */
  transition: text-decoration-color 0.15s ease;
}

.affiliation a:hover {
  text-decoration-color: currentColor;
}

/* Reads as the affiliation's third line. Two classes, so the phone margin below does not reopen the gap. */
.affiliation.supervisors {
  margin-top: 0;
}

.avatar {
  flex: none;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
}

/* Pills: rounded, a hairline border that turns orange on hover. */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--background);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s ease;
}

/* The email pill is a button until clicked: same look as the links. */
button.pill {
  margin: 0;
  font-family: inherit;
  cursor: pointer;
}

a.pill:hover,
button.pill:hover {
  border-color: var(--brand);
}

.pill svg {
  flex: none;
  width: 16px;
  height: 16px;
}

/* A link that is not out yet: dashed and muted, not clickable. */
.pill.is-soon {
  border-style: dashed;
  color: var(--muted);
}

/* Publications */
.publications h2 {
  margin: 56px 0 32px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.publications ol,
.publications ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pub + .pub {
  margin-top: 40px;
}

.pub h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.pub p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.pub .authors {
  margin-top: 6px;
}

.pub .authors strong {
  color: var(--ink);
  font-weight: 600;
}

.pub .links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pub .pill {
  gap: 6px;
  padding: 5px 12px;
  font-size: 13px;
  line-height: 18px;
}

.pub .pill svg {
  width: 14px;
  height: 14px;
}

/* Tablets: a smaller photo. */
@media (max-width: 899px) {
  .avatar {
    width: 128px;
    height: 128px;
  }
}

/* Phones: the photo moves above the name, and the pills form a 2-column grid of equal width. */
@media (max-width: 639px) {
  .page {
    padding-top: 40px;
    padding-bottom: 64px;
  }

  .intro {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding-bottom: 28px;
  }

  .avatar {
    order: -1;
    width: 72px;
    height: 72px;
  }

  .affiliation {
    margin-top: 12px;
    font-size: 16px;
  }

  .pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 20px;
  }

  .pills .pill:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .publications h2 {
    margin: 40px 0 24px;
  }

  .pub + .pub {
    margin-top: 32px;
  }

  .pub h3 {
    font-size: 17px;
  }
}

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