:root {
  --bg: #f4f6f9;
  --bg-elevated: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-muted: #3976a0;
  --accent-warm: #ea580c;
  --border: #e2e8f0;
  --ring: rgba(37, 99, 235, 0.25);
  --shadow-md: 0 8px 30px rgba(15, 23, 42, 0.08);
  --radius-sm: 10px;
  --preview-shadow: 0 8px 25px rgba(15, 23, 42, 0.28);
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-elevated);
  -webkit-font-smoothing: antialiased;
}

sup {
  font-size: 0.7em;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
  top: -0.55em;
  font-weight: inherit;
}

.page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2.5rem clamp(1rem, 4vw, 2rem) 3rem;
  width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.15em;
  transition: color 0.15s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent-warm);
  outline: none;
}

a:focus-visible {
  border-radius: 4px;
  box-shadow: 0 0 0 3px var(--ring);
}

.profile {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2rem 2.5rem;
  margin-bottom: 2.5rem;
}

.profile-photo {
  width: clamp(160px, 28vw, 220px);
  height: auto;
  flex-shrink: 0;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

.profile-info {
  flex: 1 1 240px;
  min-width: 0;
}

.profile-info p {
  margin: 0 0 1rem;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
}

.profile-info p:last-of-type {
  margin-bottom: 0;
}

.profile-info p a {
  color: var(--accent-muted);
}

.profile-info p a:is(:hover, :focus-visible) {
  text-decoration: underline;
}

.profile h1 {
  margin: 0 0 1.25rem;
  /* font-size: clamp(1.75rem, 4vw, 2.25rem); */
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.2;
}

.profile .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  justify-content: flex-start;
}

.profile .links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.profile .links i {
  font-size: 0.92rem;
  width: 1.1em;
  flex-shrink: 0;
  text-align: center;
  opacity: 0.92;
}

.profile .links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.profile .links a:hover i {
  opacity: 1;
  color: var(--accent);
}

.hiring-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  margin-bottom: 2rem;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
}

.hiring-note h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.hiring-note p {
  margin: 0.15rem 0 0;
  color: var(--text-muted);
}

.hiring-note a {
  color: var(--accent-muted);
  font-weight: 600;
  text-decoration: underline;
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.research-intro,
.services p {
  max-width: 65ch;
  margin: 0;
}

.services {
  margin-top: 2.5rem;
}

.services .footnote {
  margin-top: 0.35rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.publications {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.publication {
  display: grid;
  grid-template-columns: min(34%, 300px) minmax(0, 1fr);
  align-items: start;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.publication:last-child {
  border-bottom: none;
}

.publication:has(.publication-preview:hover) {
  position: relative;
  z-index: 2;
}

.publication-media {
  position: relative;
  z-index: 1;
  padding-inline-end: 1.75rem;
}

.publication-content {
  font-size: 0.9375rem;
}

.publication-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.45;
}

.publication-content p {
  margin: 0;
}

.publication-content a {
  color: inherit;
}

.publication-content a:is(:hover, :focus-visible) {
  text-decoration: underline;
}

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

.publication-venue em {
  font-style: normal;
  font-weight: 600;
}

.publication-content .publication-summary {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.publication-preview {
  --preview-zoom: 2.15;
  position: relative;
  display: block;
}

.publication-thumbnail {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.publication-overlay {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: var(--radius-sm);
  pointer-events: none;
  background: #0f172a;
}

.publication-preview:hover .publication-overlay {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .publication-preview:has(> .publication-overlay) {
    transform-origin: left center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .publication-preview:has(> .publication-overlay):hover {
    transform: scale(var(--preview-zoom));
    box-shadow: var(--preview-shadow);
  }
}

.award {
  color: #dc2626;
  font-weight: 600;
  font-size: 0.9em;
}

strong {
  font-weight: 600;
}

.site-footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.site-footer a {
  font-weight: 500;
}

@media screen and (max-width: 768px) {
  .page {
    padding: 1.5rem 1.1rem 2.5rem;
  }

  .profile {
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
  }

  .profile h1 {
    text-align: center;
  }

  .profile .links {
    justify-content: center;
    border-top: none;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
  }

  .publication {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    padding: 1.25rem 0;
  }

  .publication-media {
    padding-inline-end: 0;
  }

  .publication-preview {
    --preview-zoom: 1.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  a,
  .profile .links a,
  .publication-overlay {
    transition: none;
  }
}
