:root {
  color-scheme: dark;
  --bg: #070a12;
  --surface: #0d1220;
  --surface-strong: #131a2a;
  --text: #f6f8fc;
  --muted: #9ba8bd;
  --line: rgba(255, 255, 255, 0.1);
  --primary: #60a5fa;
  --primary-strong: #3b82f6;
  --secondary: #a78bfa;
  --accent: #22d3ee;
  --header: rgba(7, 10, 18, 0.8);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --radius: 24px;
  --max-width: 1160px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-strong: #eef2ff;
  --text: #111827;
  --muted: #58657a;
  --line: rgba(15, 23, 42, 0.11);
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --secondary: #7c3aed;
  --accent: #0891b2;
  --header: rgba(248, 250, 252, 0.84);
  --shadow: 0 24px 70px rgba(37, 51, 78, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% -10%, rgba(59, 130, 246, 0.14), transparent 34rem),
    radial-gradient(circle at 90% 10%, rgba(124, 58, 237, 0.13), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(127, 127, 127, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 127, 127, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 70%);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

svg {
  display: block;
}

.container {
  width: min(calc(100% - 40px), var(--max-width));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: var(--header);
  backdrop-filter: blur(18px);
  transition: border-color 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
}

.nav {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-strong), var(--secondary));
  box-shadow: 0 10px 28px rgba(59, 130, 246, 0.2);
  color: white;
  font-size: 13px;
  letter-spacing: -0.06em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 620;
  transition: background 160ms ease, color 160ms ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--surface-strong);
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  cursor: pointer;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 160ms ease, transform 160ms ease;
}

.icon-button:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
}

.hero {
  display: grid;
  min-height: calc(100vh - 72px);
  padding: 88px 0 72px;
  align-items: center;
}

.hero-grid {
  display: grid;
  align-items: center;
  gap: clamp(48px, 7vw, 96px);
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 28px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

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

h1 {
  max-width: 850px;
  margin-bottom: 24px;
  font-size: clamp(3.2rem, 8vw, 6.6rem);
  font-weight: 820;
  letter-spacing: -0.07em;
  line-height: 0.94;
}

.gradient-text {
  background: linear-gradient(105deg, var(--primary), var(--accent) 45%, var(--secondary));
  background-clip: text;
  color: transparent;
}

.hero-copy {
  max-width: 690px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero-copy strong {
  color: var(--text);
  font-weight: 650;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 720;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary-strong), var(--secondary));
  box-shadow: 0 14px 34px rgba(59, 130, 246, 0.22);
  color: #fff;
}

.profile-card {
  position: relative;
  overflow: hidden;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(145deg, var(--surface), var(--surface-strong));
  box-shadow: var(--shadow);
}

.profile-card::after {
  position: absolute;
  top: -90px;
  right: -90px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--primary);
  content: "";
  filter: blur(90px);
  opacity: 0.2;
}

.avatar {
  display: grid;
  width: 100%;
  max-width: 512px;
  height: auto;
  aspect-ratio: 1;
  margin-bottom: 28px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: linear-gradient(135deg, var(--primary-strong), var(--secondary));
  box-shadow: 0 18px 44px rgba(59, 130, 246, 0.23);
  color: white;
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card h2 {
  margin-bottom: 4px;
  font-size: 1.55rem;
  letter-spacing: -0.035em;
}

.profile-role {
  margin-bottom: 24px;
  color: var(--muted);
}

.profile-meta {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.profile-meta li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.profile-meta strong {
  color: var(--text);
  font-weight: 660;
  text-align: right;
}

.section {
  padding: 100px 0;
}

.section.alt {
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}

.section-header {
  display: grid;
  margin-bottom: 54px;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.65fr);
}

.section-kicker {
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section h2,
.page-hero h1 {
  margin-bottom: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: -0.055em;
  line-height: 1;
}

.section-intro {
  align-self: end;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 1.02rem;
}

.ownership-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, 1fr);
}

.ownership-card,
.project-card,
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.08);
}

.ownership-card {
  position: relative;
  overflow: hidden;
  padding: 32px;
}

.ownership-card::after {
  position: absolute;
  right: -54px;
  bottom: -70px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--primary);
  content: "";
  filter: blur(70px);
  opacity: 0.1;
}

.ownership-index {
  display: block;
  margin-bottom: 34px;
  color: var(--primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.12em;
}

.ownership-card h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.ownership-card p {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
}

.featured-paper {
  display: flex;
  margin-top: 18px;
  padding: 30px 32px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border: 1px solid color-mix(in srgb, var(--primary) 34%, var(--line));
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 90% 0, rgba(96, 165, 250, 0.12), transparent 34%),
    var(--surface);
}

.featured-paper-copy {
  max-width: 720px;
}

.paper-badge {
  display: inline-block;
  margin-bottom: 13px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.featured-paper h3 {
  margin-bottom: 8px;
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.featured-paper p {
  margin-bottom: 0;
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline-item {
  display: grid;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  gap: 28px;
  grid-template-columns: 180px minmax(0, 1fr);
}

.timeline-item:last-child {
  border-bottom: 1px solid var(--line);
}

.timeline-date {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.timeline-content h3 {
  margin-bottom: 4px;
  font-size: 1.3rem;
  letter-spacing: -0.025em;
}

.timeline-company {
  margin-bottom: 15px;
  color: var(--primary);
  font-weight: 650;
}

.timeline-content p {
  max-width: 800px;
  margin-bottom: 0;
  color: var(--muted);
}

.skill-groups {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, 1fr);
}

.skill-group {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.skill-group h3 {
  margin-bottom: 18px;
  font-size: 1rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.project-card {
  display: grid;
  padding: clamp(28px, 5vw, 46px);
  align-items: center;
  gap: 40px;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
}

.project-card h3 {
  margin-bottom: 12px;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: -0.04em;
}

.project-card p {
  max-width: 650px;
  color: var(--muted);
}

.install-command {
  display: inline-block;
  margin: 2px 0 24px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}

.project-visual {
  position: relative;
  display: grid;
  min-height: 230px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.26), transparent 40%),
    linear-gradient(145deg, #111827, #172554);
}

.project-flow {
  position: relative;
  display: grid;
  width: min(100% - 36px, 260px);
  align-items: center;
  gap: 12px;
  grid-template-columns: 1fr;
  text-align: center;
}

.project-flow span {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: white;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 680;
}

.project-flow b {
  color: var(--accent);
  font-size: 18px;
  transform: rotate(90deg);
}

.contact-card {
  display: flex;
  padding: clamp(30px, 5vw, 54px);
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background:
    radial-gradient(circle at 80% 0, rgba(124, 58, 237, 0.17), transparent 36%),
    var(--surface);
}

.contact-card h2 {
  margin-bottom: 12px;
}

.contact-card p {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer {
  padding: 30px 0 42px;
  border-top: 1px solid var(--line);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 13px;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-links a {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  transition: border-color 160ms ease, color 160ms ease;
}

.social-links a:hover {
  border-color: var(--primary);
  color: var(--text);
}

.page-hero {
  padding: 90px 0 64px;
}

.page-hero h1 {
  margin-bottom: 20px;
}

.page-hero p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.publication-group {
  margin-bottom: 72px;
}

.publication-group h2 {
  margin-bottom: 24px;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.publication-list {
  display: grid;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.publication {
  display: grid;
  padding: 27px 0;
  border-bottom: 1px solid var(--line);
  gap: 20px;
  grid-template-columns: 72px minmax(0, 1fr) auto;
}

.publication-year {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 650;
}

.publication h3 {
  margin-bottom: 7px;
  font-size: 1.05rem;
  line-height: 1.4;
}

.publication p {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 14px;
}

.publication .venue {
  color: var(--primary);
  font-weight: 620;
}

.publication-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.publication-links a {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  transition: border-color 160ms ease, color 160ms ease;
}

.publication-links a:hover {
  border-color: var(--primary);
  color: var(--text);
}

.error-page {
  display: grid;
  min-height: calc(100vh - 72px);
  place-items: center;
  padding: 72px 0;
}

.error-content {
  text-align: center;
}

.error-code {
  display: block;
  margin-bottom: -24px;
  background: linear-gradient(105deg, var(--primary), var(--accent), var(--secondary));
  background-clip: text;
  color: transparent;
  font-size: clamp(8rem, 28vw, 18rem);
  font-weight: 850;
  letter-spacing: -0.09em;
  line-height: 0.85;
  opacity: 0.2;
}

.error-content .section-kicker {
  margin-bottom: 12px;
}

.error-content h1 {
  max-width: 780px;
  margin-inline: auto;
  margin-bottom: 18px;
  font-size: clamp(2.3rem, 6vw, 4.6rem);
}

.error-content > p:not(.section-kicker) {
  max-width: 620px;
  margin: 0 auto 30px;
  color: var(--muted);
}

.error-content .button-row {
  justify-content: center;
}

@media (max-width: 900px) {
  .hero-grid,
  .project-card,
  .section-header {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .profile-card {
    max-width: 520px;
  }

  .ownership-grid,
  .skill-groups {
    grid-template-columns: 1fr;
  }

  .publication {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .publication-links {
    grid-column: 2;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .nav-links {
    position: absolute;
    top: 64px;
    right: 14px;
    left: 14px;
    display: none;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: grid;
  }

  .nav-links a {
    padding: 12px;
  }

  .menu-toggle {
    display: grid;
  }

  .hero {
    padding-top: 64px;
  }

  h1 {
    font-size: clamp(3rem, 17vw, 4.7rem);
  }

  .section {
    padding: 76px 0;
  }

  .timeline-item {
    gap: 10px;
    grid-template-columns: 1fr;
  }

  .contact-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .featured-paper {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-content {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .publication-links {
    margin-top: 8px;
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
