:root {
  --ink: #151719;
  --muted: #5a6169;
  --line: #d9dee3;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-2: #8b3a3a;
  --accent-3: #415a77;
  --soft: #eef4f2;
  --shadow: 0 18px 45px rgba(20, 26, 32, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(238, 244, 242, 0.78), rgba(251, 250, 247, 0.96) 460px),
    var(--paper);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 265px);
  align-items: stretch;
  align-content: start;
  column-gap: clamp(52px, 6vw, 76px);
  row-gap: 24px;
  padding: 72px 0 54px;
}

.hero > h1 {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 0;
}

.hero-copy {
  grid-column: 1;
  grid-row: 2;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-bio .lede {
  margin-bottom: 18px;
}

.hero-bio .lede:last-child {
  margin-bottom: 0;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(1.2rem, 1.8vw, 1.7rem);
  line-height: 1.02;
  font-weight: 820;
}

h2 {
  margin-bottom: 0;
  font-size: 1.7rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0;
}

h3 {
  margin: 42px 0 16px;
  color: var(--accent-3);
  font-size: 1.2rem;
}

h4 {
  margin-bottom: 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.lede {
  max-width: none;
  color: #39424d;
  font-size: 1.02rem;
  text-align: justify;
  text-justify: inter-word;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-top: 0;
  font-size: 1.08rem;
}

.hero-actions a {
  display: inline-flex;
  gap: 0.24rem;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0;
  color: var(--accent);
  font-size: inherit;
  font-weight: 400;
}

.hero-actions > span {
  color: #9aa4ad;
}

.hero-actions a:hover {
  text-decoration: underline;
}

.hero-actions svg {
  display: block;
  width: 0.82rem;
  height: 0.82rem;
  flex: 0 0 0.82rem;
}

.hero-actions .mail-icon,
.hero-actions .scholar-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-actions .linkedin-icon {
  fill: currentColor;
}

.portrait {
  margin: 0;
  position: relative;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: stretch;
  max-height: none;
}

.portrait img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  color: var(--accent-2);
  font-size: clamp(1.2rem, 1.8vw, 1.7rem);
  font-weight: 500;
}

.transfers {
  min-height: 0;
}

.transfer-grid {
  display: grid;
  gap: 8px;
}

.transfers > .transfer-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
  align-items: stretch;
}

.publications {
  padding-bottom: 28px;
}

.year-block {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 0 28px;
  align-items: start;
  margin-top: 32px;
}

.year-block:first-of-type {
  margin-top: 0;
}

.year-block h3 {
  position: sticky;
  top: 86px;
  margin-top: 0;
}

.pub-list {
  grid-column: 2;
  display: grid;
  gap: 8px;
}

.pub-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 13px 16px;
  background: var(--panel);
  border: 1px solid #e3e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(18, 26, 34, 0.045);
}

.transfers .transfer-card.has-thumb {
  grid-template-columns: 140px minmax(0, 1fr);
}

.transfers .transfer-card.has-thumb .pub-thumb {
  min-height: 0;
  align-self: center;
}

.transfers .transfer-card.has-thumb .pub-thumb img {
  height: auto;
  object-fit: cover;
}

.pub-thumb {
  align-self: stretch;
  min-height: 112px;
}

.pub-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  border-radius: 6px;
}

.pub-copy {
  min-width: 0;
}

.pub-card h4 {
  margin-bottom: 4px;
  font-size: 1rem;
  line-height: 1.42;
  font-weight: 500;
}

.pub-card p {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.42;
}

.pub-card p:last-child {
  margin-bottom: 0;
}

.pub-venue {
  color: var(--accent-2);
  font-weight: 400;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pub-links span {
  color: #9aa4ad;
}

.publications .pub-link-icon {
  display: inline-flex;
  gap: 0.24rem;
  align-items: center;
}

.publications .pub-link-icon::before {
  width: 0.82rem;
  height: 0.82rem;
  flex: 0 0 0.82rem;
  content: "";
  background: currentColor;
  opacity: 0.7;
  -webkit-mask: var(--pub-link-icon) center / contain no-repeat;
  mask: var(--pub-link-icon) center / contain no-repeat;
}

.pub-link-project {
  --pub-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10Z'/%3E%3C/svg%3E");
}

.pub-link-paper {
  --pub-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2zM14 2v6h6M16 13H8M16 17H8M10 9H8'/%3E%3C/svg%3E");
}

.pub-link-code {
  --pub-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 22v-4a4.8 4.8 0 0 0-1-3.5c3.28-.36 6.72-1.61 6.72-7A5.4 5.4 0 0 0 19.22 4 5 5 0 0 0 19.13.5S17.95.14 15 1.82a13.4 13.4 0 0 0-7 0C5.05.14 3.87.5 3.87.5A5 5 0 0 0 3.78 4a5.4 5.4 0 0 0-1.5 3.5c0 5.42 3.44 6.66 6.72 7A4.8 4.8 0 0 0 8 18v4M9 18c-4.51 2-5-2-7-2'/%3E%3C/svg%3E");
}

.pub-link-data {
  --pub-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5' rx='9' ry='3'/%3E%3Cpath d='M3 5v14c0 1.7 4 3 9 3s9-1.3 9-3V5M3 12c0 1.7 4 3 9 3s9-1.3 9-3'/%3E%3C/svg%3E");
}

.pub-card a {
  font-weight: 400;
}

.pub-card .pub-authors a {
  font-weight: 400;
}

.pub-card .pub-authors strong {
  color: inherit;
  font-weight: 500;
}

footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 46px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

footer p {
  margin-bottom: 0;
}

@media (max-width: 820px) {
  .hero,
  .section-heading,
  .year-block {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 44px;
  }

  .hero > h1,
  .hero-copy,
  .portrait {
    grid-column: 1;
    grid-row: auto;
  }

  .portrait {
    align-self: start;
    max-width: 300px;
    max-height: none;
  }

  .portrait img {
    height: auto;
    max-height: none;
    aspect-ratio: 4 / 5;
  }

  .section-heading {
    gap: 8px;
  }

  .year-block h3 {
    position: static;
    margin: 28px 0 0;
  }

  .pub-list {
    grid-column: 1;
    gap: 12px;
  }

  .transfers > .transfer-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 560px) {
  main,
  footer {
    width: min(100% - 28px, 1120px);
  }

  .transfers .transfer-card.has-thumb {
    grid-template-columns: 1fr;
  }

  .transfers .transfer-card.has-thumb .pub-thumb {
    max-width: 260px;
  }

  h1 {
    font-size: 1.4rem;
  }

  .section-heading h2 {
    font-size: 1.4rem;
  }

  .lede {
    font-size: 1rem;
  }

  .pub-card {
    grid-template-columns: 1fr;
    padding: 13px 14px;
  }

  .pub-thumb {
    min-height: auto;
  }
}
