/* ===== Reset ===== */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

:root {
  /* shared alignment for [n] + bullets */
  --marker-col: 5ch;
  --marker-gap: 12px;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 18px;
  color: #111;
  background: #fff;
}

/* ===== Two-panel layout ===== */
.layout {
  height: 100vh;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  padding: 42px 64px;
  overflow: hidden;
  min-height: 0;
}

/* ===== LEFT: fixed panel ===== */
.left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  min-height: 0;
}

.name-block {
  width: 100%;
  text-align: center;
}

.name-main {
  margin: 0;
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.name-sub {
  margin-top: 8px;
  font-size: 22px;
  color: #888;
  font-weight: 600;
}

/* ===== Avatar (click-to-zoom in place) ===== */
.avatar-wrap {
  /* keeps the same starting layout */
  display: grid;
  place-items: center;
  width: 100%;
}

/* keep the visual exactly as before */
.avatar {
  width: 190px;
  height: 190px;
  border-radius: 999px;
  object-fit: cover;
  display: block;

  /* zoom behavior */
  transition: transform 180ms ease;
  transform-origin: center center;
  will-change: transform;
}

/* show magnifier cursor on hover */
.avatar:hover {
  cursor: zoom-in;
  /* looks like a "Lupe" */
}

/* zoomed state */
.avatar.is-zoomed {
  transform: scale(2);
  position: relative;
  z-index: 10;
}

/* cursor when zoomed */
.avatar.is-zoomed:hover {
  cursor: zoom-out;
}

.contact,
.contents {
  width: 100%;
  text-align: center;
}

.panel-title {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 800;
}

.contact-line {
  margin: 10px 0;
  font-size: 20px;
}

.subtle {
  opacity: 0.75;
}

/* ===== Contents links (centered, no bullets) ===== */
.toc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.toc a {
  color: #1a73e8;
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

/* ===== RIGHT: scrollable panel ===== */
.right {
  position: relative;
  overflow-y: auto;
  min-height: 0;
  padding-right: 10px;

  /* allows even the last section to scroll to the top */
  padding-bottom: 60vh;
}

.right h2 {
  margin: 18px 0 10px;
  font-size: 32px;
  font-weight: 800;
  scroll-margin-top: 0px;
}

.right p {
  margin: 0 0 18px;
  font-size: 20px;
  line-height: 1.7;
  max-width: 80ch;
}

/* ===== Publications ===== */
.pub-list {
  margin: 6px 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
  max-width: 80ch;
}

.pub-list li {
  display: grid;
  grid-template-columns: var(--marker-col) 1fr;
  column-gap: var(--marker-gap);
  align-items: start;
  font-size: 20px;
  line-height: 1.65;
}

.pub-num {
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
}

.pub-meta {
  margin-top: 4px;
  font-style: normal;
}

.pub-link {
  margin-left: 8px;
  color: #1a73e8;
  font-weight: 600;
  text-decoration: none;
}

.pub-link:hover {
  text-decoration: underline;
}

/* ===== Selected Talks (same margins + same alignment as publications) ===== */
.talk-list {
  margin: 6px 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
  max-width: 80ch;
}

.talk-item {
  display: grid;
  grid-template-columns: var(--marker-col) 1fr;
  column-gap: var(--marker-gap);
  align-items: start;
  font-size: 20px;
  line-height: 1.65;
}

.talk-bullet {
  text-align: right;
  font-weight: 800;
  white-space: nowrap;
}

.talk-title {
  margin-top: 2px;
}

.talk-note {
  margin-top: 2px;
}

/* ===== Teaching (two-line format + aligned marker column) ===== */
.teach-list {
  margin: 6px 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
  max-width: 80ch;
}

.teach-item {
  display: grid;
  grid-template-columns: var(--marker-col) 1fr;
  column-gap: var(--marker-gap);
  align-items: start;
  font-size: 20px;
  line-height: 1.65;
}

.teach-bullet {
  text-align: right;
  font-weight: 800;
  white-space: nowrap;
}

.teach-bottom {
  margin-top: 2px;
}

.teach-bottom em {
  font-style: italic;
}

/* Link defaults */
a {
  color: #1a73e8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .layout {
    height: auto;
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 20px 18px;
    overflow: visible;
  }

  .right {
    overflow: visible;
    padding-right: 0;
    padding-bottom: 0;
  }

  .name-main {
    font-size: 34px;
  }
}