html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #111111;
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  font-size: 14px;
  font-weight: 300;
}

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 36px 24px 60px;
}

h1 {
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 16px;
  text-align: center;
}

h2 {
  font-size: 25px;
  font-weight: 500;
  margin: 0 0 12px;
}

p,
a,
td,
th,
tr,
li {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 300;
}

p {
  margin: 0 0 12px;
}

strong {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
}

a {
  color: #1772d0;
  text-decoration: none;
}

a:hover,
a:focus {
  color: #f09228;
  text-decoration: none;
}

/* Profile photo */
.profile-pic {
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  margin-top: 10px;
  transition: all 0.3s cubic-bezier(.25, .8, .25, 1);
}

.profile-pic:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

/* ─── Link badges ─────────────────────────────────────────────────────────── */
.links {
  margin-top: 16px;
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}

.link-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 999px;
  background: #f2f2f2;
  color: #222 !important;
  text-decoration: none !important;
  font-size: 13px !important;
  font-weight: 400;
  border: 1px solid #e0e0e0;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
  line-height: 1;
}

.link-badge svg {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.18s ease;
}

.link-badge:hover {
  background: #111;
  color: #fff !important;
  border-color: #111;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.link-badge:hover svg {
  opacity: 1;
}

/* ─── Section anchor links ────────────────────────────────────────────────── */
.section-anchor {
  font-size: 0.72em;
  font-weight: 300;
  color: #bbb;
  text-decoration: none !important;
  margin-left: 8px;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease;
  vertical-align: middle;
  user-select: none;
}

h2:hover .section-anchor {
  opacity: 1;
}

.section-anchor:hover {
  color: #1772d0 !important;
}

/* Divider */
hr {
  border: 0;
  border-top: 1px solid #e5e5e5;
  margin: 22px 0;
}

/* Sections */
section {
  margin-bottom: 18px;
}

ul {
  margin: 0;
  padding-left: 22px;
}

li {
  margin-bottom: 6px;
}

.item {
  margin-bottom: 16px;
}

.item-title {
  font-weight: 500;
  margin-bottom: 4px;
  font-size: 14px;
}

/* Footer */
.footer {
  margin-top: 30px;
  padding-top: 18px;
  text-align: right;
  font-size: 12px;
  color: #666666;
}

.footer a {
  font-size: 12px;
}

/* Invited talks */
.invited-talks {
  padding-bottom: 20px;
  margin-bottom: 0;
}

.invited-talks table {
  margin-bottom: 0;
}

/* Podcasts */
.podcasts-section {
  margin-top: 10px;
}

.podcast-intro {
  max-width: 900px;
  margin: 10px 0 14px 0;
  line-height: 1.75;
}

.podcast-links {
  margin: 0 0 22px 0;
  line-height: 1.6;
}

.podcast-links a {
  font-weight: 500;
}

.podcast-card {
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.podcast-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.podcast-card img {
  display: block;
  width: 100%;
  height: auto;
}

.podcast-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.1));
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.podcast-overlay span {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.15);
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.podcast-card:hover .podcast-overlay {
  opacity: 1;
}

.podcast-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.podcast-carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 8px 4px;
}

.podcast-carousel::-webkit-scrollbar {
  display: none;
}

.podcast-carousel .podcast-card {
  flex: 0 0 260px;
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.podcast-carousel .podcast-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.podcast-carousel .podcast-card img {
  display: block;
  width: 100%;
  height: auto;
}

.podcast-arrow {
  border: 1px solid #d9d9d9;
  background: #ffffff;
  color: #333333;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.podcast-arrow:hover {
  background: #f7f7f7;
  transform: scale(1.05);
}

/* ─── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  body {
    font-size: 13px;
  }

  .page {
    padding: 24px 16px 40px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 17px;
  }

  p,
  a,
  li,
  .item-title,
  strong {
    font-size: 13px;
  }

  table.header-table tr {
    display: flex;
    flex-direction: column-reverse;
  }

  table.header-table td {
    display: block;
    width: 100% !important;
    text-align: center;
  }

  .profile-pic {
    width: 180px !important;
    height: auto !important;
    margin: 0 auto 16px;
    display: block;
  }

  /* Badge links wrap nicely on mobile */
  .links {
    justify-content: center;
    gap: 6px;
  }

  .link-badge {
    font-size: 12px !important;
    padding: 5px 11px;
  }

  table.logo-table {
    display: block;
  }

  table.logo-table tr {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  table.logo-table td {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
  }

  table.logo-table td img {
    height: 36px !important;
  }

  .podcast-intro {
    max-width: 100%;
  }

  /* Research + Invited Talks stack vertically */
  main table {
    width: 100% !important;
    border-collapse: collapse;
  }

  main table tr {
    display: block;
    margin-bottom: 18px;
  }

  main table td {
    display: block;
    width: 100% !important;
    box-sizing: border-box;
    padding: 0 !important;
    text-align: left !important;
  }

  main table td:first-child {
    margin-bottom: 10px;
    text-align: center !important;
  }

  main table td:first-child img {
    width: 140px !important;
    height: auto !important;
    max-width: 100%;
  }

  main table td:last-child {
    padding: 0 2px !important;
  }

  /* Podcast carousel mobile sizing */
  .podcast-carousel-wrapper {
    gap: 8px;
  }

  .podcast-carousel {
    gap: 14px;
    padding: 6px 0;
  }

  .podcast-carousel .podcast-card {
    flex: 0 0 160px;
    width: 160px;
  }

  .podcast-arrow {
    width: 32px;
    height: 32px;
    font-size: 16px;
    flex-shrink: 0;
  }
}
