:root {
    --bg: #f2f6fa;
    --bg-accent: #dce8f4;
    --surface: #ffffff;
    --surface-alt: #f8fbff;
    --text: #162431;
    --text-soft: #4a5d6d;
    --border: #d5e2ee;
    --brand: #0c5a8d;
    --brand-soft: #95c2e5;
    --shadow: 0 16px 38px rgba(20, 45, 68, 0.12);
}

html[data-theme="dark"] {
    --bg: #0f1620;
    --bg-accent: #1a2533;
    --surface: #172231;
    --surface-alt: #1d2a3b;
    --text: #ecf3fb;
    --text-soft: #b5c6d8;
    --border: #2b3e55;
    --brand: #66b4e8;
    --brand-soft: #26557d;
    --shadow: 0 14px 34px rgba(6, 6, 6, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at 15% -10%, var(--bg-accent), transparent 38%),
    radial-gradient(circle at 85% 0%, rgba(112, 180, 223, 0.2), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: "IBM Plex Serif", Georgia, serif;
  line-height: 1.65;
}

.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 20% 15%, rgba(126, 171, 212, 0.15), transparent 30%),
    radial-gradient(circle at 78% 10%, rgba(18, 103, 158, 0.1), transparent 28%);
  z-index: -1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 3vw, 2.25rem);
  background: color-mix(in oklab, var(--surface), transparent 9%);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--brand);
  text-decoration: none;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-weight: 700;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

nav a {
  text-decoration: none;
  color: var(--text-soft);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.9rem;
}

nav a:hover,
nav a:focus-visible {
  color: var(--brand);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.85rem;
}

main {
  width: min(1080px, 92vw);
  margin: 0 auto;
  padding: 2.25rem 0 4rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(200px, 250px) 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: clamp(1rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 1 / 1.15;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.hero-media .cta-row {
  margin-top: 0.85rem;
  margin-bottom: 0.75rem;
}

.hero-media .btn {
  width: 100%;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
  margin-top: 0.15rem;
}

.meta-row a {
  text-decoration: none;
  color: var(--text-soft);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  border-radius: 999px;
  padding: 0.26rem 0.62rem;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.82rem;
}

.meta-row a:hover,
.meta-row a:focus-visible {
  color: var(--brand);
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1,
h2,
.timeline-title {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  line-height: 1.25;
}

h1 {
  margin: 0.35rem 0 0.45rem;
  font-size: clamp(1.8rem, 5vw, 3rem);
}

.name-title {
  font-family: "LXGW WenKai TC", "IBM Plex Serif", Georgia, serif;
  letter-spacing: 0.01em;
}

h1 span {
  font-size: 0.62em;
  color: var(--text-soft);
}

.hero-intro {
  margin: 0.9rem 0 1.1rem;
  max-width: 68ch;
}

.hero-intro a {
  color: var(--text-soft);
  text-decoration-color: color-mix(in oklab, var(--text-soft), transparent 38%);
}

.hero-intro a:hover,
.hero-intro a:focus-visible {
  color: var(--brand);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.58rem 1rem;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  border: 1px solid var(--border);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), color-mix(in oklab, var(--brand), white 20%));
  border-color: color-mix(in oklab, var(--brand), black 22%);
  color: #fff;
}

.btn-secondary {
  background: var(--surface-alt);
  color: var(--text);
}

.ps-note {
  margin: 0.45rem 0 0;
  font-size: 0.84rem;
  font-style: italic;
  color: color-mix(in oklab, var(--text-soft), var(--text) 12%);
}

.content-section a {
  color: var(--brand);
}

.content-section {
  margin-top: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  box-shadow: var(--shadow);
}

h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-head p,
.note {
  margin: 0;
  color: var(--text-soft);
}

.paper-list {
  margin: 0.9rem 0 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.85rem;
}

.pub-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-alt);
  padding: 0.8rem 0.9rem;
}

.venue-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 102px;
  padding: 0.28rem 0.56rem;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: var(--text-soft);
  border: 1px solid transparent;
}

.venue-tag.conf,
.venue-tag.journal {
  border-radius: 9px;
}

/* .venue-tag.journal {
  clip-path: polygon(10% 0, 90% 0, 100% 50%, 90% 100%, 10% 100%, 0 50%);
} */

.venue-tag.neurips {
  background: rgba(87, 121, 176, 0.2);
  border-color: rgba(87, 121, 176, 0.38);
  color: #39597e;
}

.venue-tag.iclr {
  background: rgba(64, 140, 179, 0.2);
  border-color: rgba(64, 140, 179, 0.38);
  color: #31627c;
}

.venue-tag.icde {
  background: rgba(56, 151, 150, 0.2);
  border-color: rgba(56, 151, 150, 0.38);
  color: #2e6767;
}

.venue-tag.emnlp {
  background: rgba(105, 133, 182, 0.2);
  border-color: rgba(105, 133, 182, 0.38);
  color: #405d83;
}

.venue-tag.tkdd {
  background: rgba(186, 118, 72, 0.2);
  border-color: rgba(186, 118, 72, 0.4);
  color: #7b4e2f;
}

.venue-tag.tors {
  background: rgba(205, 139, 69, 0.2);
  border-color: rgba(205, 139, 69, 0.4);
  color: #83572d;
}

.venue-tag.iscience {
  background: rgba(187, 98, 87, 0.2);
  border-color: rgba(187, 98, 87, 0.4);
  color: #7d433a;
}

html[data-theme="dark"] .venue-tag.neurips {
  background: rgba(116, 153, 214, 0.22);
  border-color: rgba(134, 169, 222, 0.45);
  color: #d4e5ff;
}

html[data-theme="dark"] .venue-tag.iclr {
  background: rgba(93, 171, 212, 0.22);
  border-color: rgba(110, 181, 220, 0.45);
  color: #d7efff;
}

html[data-theme="dark"] .venue-tag.icde {
  background: rgba(84, 178, 177, 0.22);
  border-color: rgba(108, 194, 192, 0.45);
  color: #d8fbf6;
}

html[data-theme="dark"] .venue-tag.emnlp {
  background: rgba(128, 154, 209, 0.22);
  border-color: rgba(145, 169, 220, 0.45);
  color: #dbe6ff;
}

html[data-theme="dark"] .venue-tag.tkdd {
  background: rgba(208, 141, 96, 0.23);
  border-color: rgba(220, 157, 116, 0.45);
  color: #ffe5d2;
}

html[data-theme="dark"] .venue-tag.tors {
  background: rgba(220, 161, 95, 0.23);
  border-color: rgba(230, 174, 115, 0.45);
  color: #ffecd7;
}

html[data-theme="dark"] .venue-tag.iscience {
  background: rgba(204, 130, 122, 0.23);
  border-color: rgba(216, 149, 141, 0.45);
  color: #ffe2de;
}

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

.pub-title {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
  font-style: normal;
}

.pub-authors {
  margin: 0.26rem 0 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.timeline,
.compact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.timeline li,
.compact-list li {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-alt);
  padding: 0.82rem 0.9rem;
}

.timeline-title {
  font-size: 1rem;
  font-weight: 700;
}

.timeline-meta {
  color: var(--text-soft);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.85rem;
  margin-bottom: 0.32rem;
}

.timeline p {
  margin: 0;
}

.compact-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.one-col li {
  align-items: center;
}

footer {
  width: min(1080px, 92vw);
  margin: 0 auto 2.2rem;
  color: var(--text-soft);
  font-size: 0.9rem;
  text-align: right;
}

.section-reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 0.65s cubic-bezier(0.2, 0.65, 0.2, 1) forwards;
}

.section-reveal:nth-child(2) { animation-delay: 0.06s; }
.section-reveal:nth-child(3) { animation-delay: 0.12s; }
.section-reveal:nth-child(4) { animation-delay: 0.18s; }
.section-reveal:nth-child(5) { animation-delay: 0.24s; }
.section-reveal:nth-child(6) { animation-delay: 0.3s; }
.section-reveal:nth-child(7) { animation-delay: 0.36s; }
.section-reveal:nth-child(8) { animation-delay: 0.42s; }

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 940px) {
  .topbar {
    position: static;
  }

  nav {
    display: none;
  }
}

@media (max-width: 760px) {
  main {
    width: min(1080px, 94vw);
    padding-top: 1rem;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-media {
    max-width: 300px;
    margin: 0 auto;
  }

  /* .hero-media img {
    aspect-ratio: 1 / 1;
    object-position: center top;
  } */

  .hero-media .btn {
    width: auto;
  }

  .meta-row {
    gap: 0.45rem;
  }

  .paper-list {
    padding-left: 0;
  }

  .venue-tag {
    font-size: 1.02rem;
  }

  .pub-item {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  footer {
    text-align: left;
  }
}
