:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --surface: #ffffff;
  --text: #242424;
  --muted: #626766;
  --line: #deded7;
  --accent: #276a73;
  --accent-dark: #17454b;
  --button: #ececea;
  --button-hover: #e1e1de;
  --shadow: 0 20px 50px rgba(36, 36, 36, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

.icon-sprite {
  display: none;
}

a {
  color: var(--accent-dark);
  font-weight: 650;
  text-decoration-color: rgba(39, 106, 115, 0.34);
  text-underline-offset: 0.18em;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 247, 244, 0.88);
  border-bottom: 1px solid rgba(222, 222, 215, 0.9);
  backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  justify-content: flex-end;
  gap: 1.4rem;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0.85rem 1.4rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.93rem;
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
}

.page {
  max-width: 1060px;
  margin: 0 auto;
  padding: 3.8rem 1.4rem 4rem;
}

.profile {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(330px, 0.78fr) minmax(390px, 1.08fr);
  gap: 0;
  align-items: center;
  min-height: 470px;
  margin-bottom: 2.3rem;
  border-radius: 8px;
  background: linear-gradient(90deg, #f7f7f4 0%, #f7f7f4 36%, rgba(247, 247, 244, 0.9) 50%, rgba(247, 247, 244, 0.5) 66%, rgba(247, 247, 244, 0.08) 84%, rgba(247, 247, 244, 0) 100%);
}

.profile-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding: clamp(2.3rem, 5vw, 4.2rem) clamp(1.3rem, 4vw, 3rem);
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent-dark);
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0.4rem;
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 760;
  line-height: 1.02;
  letter-spacing: 0;
  text-align: center;
}

h1 span {
  display: block;
  color: var(--text);
  font-size: 1em;
  font-weight: 760;
}

h1 {
  color: var(--muted);
}

h1 small {
  display: block;
  width: fit-content;
  max-width: 72%;
  margin: 0.5rem auto 0;
  color: var(--muted);
  font-size: 0.34em;
  font-weight: 650;
  line-height: 1.1;
}

.affiliation {
  margin-bottom: 0.7rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.tagline {
  margin-bottom: 1.6rem;
  color: var(--text);
  font-size: clamp(0.78rem, 1.08vw, 0.98rem);
  font-weight: 680;
  white-space: nowrap;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.links a,
.paper-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  min-height: 2.25rem;
  padding: 0.34rem 0.72rem;
  border: 1px solid rgba(36, 36, 36, 0.08);
  border-radius: 5px;
  background: var(--button);
  color: #333333;
  font-weight: 650;
  text-decoration: none;
}

.links a:hover,
.paper-links a:hover {
  background: var(--button-hover);
  color: #111111;
}

.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.github-icon {
  fill: currentColor;
  stroke: none;
}

.portrait {
  justify-self: end;
  width: min(700px, 66vw);
  height: auto;
  border-radius: 6px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.2) 10%, #000 24%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.2) 10%, #000 24%);
}

.section {
  display: block;
  padding: 2.7rem 0;
  border-top: 1px solid var(--line);
}

.section h2 {
  margin-bottom: 0.85rem;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 790;
}

.section-body p:last-child {
  margin-bottom: 0;
}

.section-note {
  margin: -0.25rem 0 1.3rem;
  color: var(--muted);
  font-size: 0.95rem;
}

#publications {
  display: block;
}

#publications h2 {
  margin-bottom: 0.55rem;
}

#publications .section-note {
  margin: 0 0 1.5rem;
}

.timeline,
.publications {
  min-width: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 1.2rem;
  padding: 0 0 1.45rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.date,
.venue {
  color: var(--accent-dark);
  font-size: 0.88rem;
  font-weight: 760;
}

.timeline-item h3,
.publication h3 {
  margin-bottom: 0.2rem;
  font-size: 1.08rem;
  line-height: 1.35;
}

.timeline-item p {
  margin-bottom: 0;
  color: var(--muted);
}

.publication {
  position: relative;
  display: grid;
  grid-template-columns: clamp(140px, 22vw, 250px) minmax(0, 1fr);
  gap: 1rem clamp(1.1rem, 3vw, 2rem);
  padding: 1.1rem 0;
  border-top: 1px solid rgba(222, 222, 215, 0.74);
}

.publication-media {
  grid-column: 1;
  grid-row: 1 / span 4;
  align-self: center;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(36, 36, 36, 0.08);
  border-radius: 6px;
}

.publication-thumb {
  display: block;
  width: 100%;
  height: auto;
}

.publication:first-child {
  border-top: 0;
  padding-top: 0;
}

.publication h3,
.publication .authors,
.publication .venue,
.publication .paper-links {
  grid-column: 2;
  margin-left: 0;
  padding-left: 1rem;
  padding-right: 1rem;
  border-left: 4px solid #d4d4cf;
  border-right: 1px solid rgba(36, 36, 36, 0.08);
}

.publication h3 {
  padding-top: 1rem;
  border-top: 1px solid rgba(36, 36, 36, 0.08);
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

.publication .paper-links {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(36, 36, 36, 0.08);
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

.publication.highlight h3,
.publication.highlight .authors,
.publication.highlight .venue,
.publication.highlight .paper-links {
  border-left-color: #c7352f;
}

.highlight-label {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  margin-left: 0.45rem;
  padding: 0.1rem 0.48rem;
  border-radius: 999px;
  background: #fff0ee;
  color: #c7352f;
  font-size: 0.74rem;
  font-weight: 780;
  vertical-align: 0.08em;
}

.publication .venue {
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1.4;
}

.authors {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.15rem 0 0;
}

.paper-links a {
  min-height: 1.9rem;
  padding: 0.22rem 0.65rem;
  font-size: 0.88rem;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1060px;
  margin: 0 auto;
  padding: 1.6rem 1.4rem 2.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.footer p {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .nav {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .page {
    padding-top: 2rem;
  }

  .section,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .publication {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .publication-media {
    grid-column: 1;
    grid-row: auto;
    margin-bottom: 0.8rem;
  }

  .profile {
    position: relative;
    display: block;
    min-height: 520px;
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
    background: linear-gradient(90deg, rgba(247, 247, 244, 0.98) 0%, rgba(247, 247, 244, 0.94) 42%, rgba(247, 247, 244, 0.58) 66%, rgba(247, 247, 244, 0.16) 84%, rgba(247, 247, 244, 0) 100%);
  }

  .profile-copy {
    position: absolute;
    left: 0;
    bottom: 0.35rem;
    width: fit-content;
    max-width: min(92vw, 520px);
    margin: 0 0 0 1rem;
    padding: 2rem 1rem;
    text-align: left;
  }

  .profile-copy::before {
    position: absolute;
    inset: 1.2rem 0 auto 0;
    z-index: -1;
    min-height: calc(100% - 2.4rem);
    border: 1px solid rgba(222, 222, 215, 0.82);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    content: "";
  }

  h1 {
    font-size: clamp(2rem, 9.8vw, 3.45rem);
    text-align: left;
  }

  h1 small {
    margin-left: 0;
    margin-right: 0;
  }

  .tagline {
    font-size: clamp(0.72rem, 3.1vw, 0.9rem);
  }

  .portrait {
    position: absolute;
    top: 0;
    right: -245px;
    z-index: 1;
    width: 760px;
    max-width: none;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    object-position: 58% 50%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.28) 12%, #000 30%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.28) 12%, #000 30%);
  }

  .section {
    gap: 1rem;
  }

  .section-note,
  .publication h3,
  .publication .authors,
  .publication .venue,
  .publication .paper-links {
    grid-column: 1;
  }

  .date,
  .venue {
    white-space: normal;
  }
}

@media (max-width: 420px) {
  .page {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .nav,
  .footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .links a {
    flex: 1 1 auto;
    justify-content: center;
  }
}
