:root {
  color-scheme: dark;
  --bg: #090909;
  --bg-rgb: 9, 9, 9;
  --text: #f4f7f7;
  --muted: rgba(244, 247, 247, 0.66);
  --faint: rgba(244, 247, 247, 0.42);
  --accent: #5ee0d6;
  --accent-strong: #7df5ed;
  --accent-soft: rgba(94, 224, 214, 0.13);
  --line: rgba(94, 224, 214, 0.18);
  --line-strong: rgba(94, 224, 214, 0.4);
  --surface: rgba(255, 255, 255, 0.035);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --max: 1080px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #fbfbf9;
  --bg-rgb: 251, 251, 249;
  --text: #111716;
  --muted: rgba(17, 23, 22, 0.68);
  --faint: rgba(17, 23, 22, 0.42);
  --accent: #287d78;
  --accent-strong: #176b66;
  --accent-soft: rgba(40, 125, 120, 0.13);
  --line: rgba(40, 125, 120, 0.2);
  --line-strong: rgba(40, 125, 120, 0.42);
  --surface: rgba(0, 0, 0, 0.035);
  --surface-strong: rgba(0, 0, 0, 0.07);
  --shadow: 0 24px 80px rgba(21, 55, 52, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(94, 224, 214, 0.11), transparent 28rem),
    radial-gradient(circle at 82% 22%, rgba(255, 255, 255, 0.05), transparent 24rem),
    var(--bg);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 72%);
  z-index: -1;
}

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

a:hover {
  color: var(--accent-strong);
}

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

img {
  display: block;
  max-width: 100%;
}

::selection {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.hero {
  position: relative;
  min-height: auto;
  isolation: isolate;
  display: grid;
  place-items: center;
  padding: 38px 24px 26px;
  overflow: hidden;
}

.hero-canvas,
.hero-vignette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-canvas {
  z-index: -3;
}

.hero-vignette {
  z-index: -2;
  background:
    radial-gradient(circle at 50% 38%, transparent 0 18rem, rgba(0, 0, 0, 0.34) 54rem),
    linear-gradient(to bottom, rgba(var(--bg-rgb), 0.1), rgba(var(--bg-rgb), 0.96));
}

.hero-card {
  width: min(var(--max), calc(100vw - 48px));
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02)),
    rgba(var(--bg-rgb), 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.hero-photo {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.25);
}

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

.eyebrow,
.venue {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin-bottom: 10px;
  font-size: 6.4rem;
  font-weight: 100;
  line-height: 0.95;
  letter-spacing: 0;
}

.hero h1 span {
  color: var(--accent);
}

.subtitle {
  max-width: 680px;
  margin-bottom: 16px;
  color: var(--text);
  font-size: 1.55rem;
  font-weight: 300;
  line-height: 1.28;
}

.affiliation {
  color: var(--muted);
  margin-bottom: 22px;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.socials a,
.theme-toggle,
.action {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
  transition: transform 220ms var(--ease), border-color 220ms var(--ease), background 220ms var(--ease);
}

.socials a:hover,
.theme-toggle:hover,
.action:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--accent-soft);
}

.section {
  width: min(var(--max), calc(100vw - 48px));
  margin: 0 auto;
  padding: 72px 0;
}

.section-tight {
  padding-top: 24px;
}

.section-header {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 30px;
}

.section-header .index {
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
}

.section-header h2 {
  margin: 0;
  font-size: 3.25rem;
  font-weight: 100;
  letter-spacing: 0;
}

.rule {
  height: 1px;
  background: linear-gradient(to right, var(--line-strong), transparent);
}

.about-text {
  max-width: 900px;
}

.about-text p {
  color: var(--muted);
  text-align: justify;
}

.chips,
.tags,
.pub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chips span,
.tags span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 14px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.news-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 22px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.news-item time {
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

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

.project-grid,
.publication-list {
  display: grid;
  gap: 22px;
}

.project-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-card,
.pub-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 18rem),
    var(--surface);
  transition: transform 260ms var(--ease), border-color 260ms var(--ease), background 260ms var(--ease);
}

.project-card:hover,
.pub-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.project-media,
.pub-thumb {
  min-height: 180px;
  background-color: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--line);
}

.project-media-latent {
  background:
    radial-gradient(circle at 30% 35%, rgba(94, 224, 214, 0.95), transparent 9rem),
    radial-gradient(circle at 70% 45%, rgba(255, 255, 255, 0.62), transparent 7rem),
    repeating-linear-gradient(120deg, transparent 0 12px, rgba(94, 224, 214, 0.08) 12px 13px),
    #101312;
}

.project-media-vision {
  background:
    linear-gradient(135deg, rgba(94, 224, 214, 0.32), transparent 46%),
    radial-gradient(circle at 72% 30%, rgba(255, 255, 255, 0.52), transparent 8rem),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    #101312;
  background-size: auto, auto, 28px 28px, 28px 28px, auto;
}

.project-body {
  padding: 22px;
}

.project-body h3,
.pub-content h3 {
  margin-bottom: 10px;
  font-size: 1.85rem;
  font-weight: 300;
  line-height: 1.2;
}

.project-body p,
.pub-content p {
  color: var(--muted);
}

.pub-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.pub-thumb {
  min-height: 100%;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

.pub-thumb-wave {
  background:
    radial-gradient(circle at 38% 34%, rgba(94, 224, 214, 0.86), transparent 7rem),
    radial-gradient(circle at 66% 62%, rgba(255, 255, 255, 0.5), transparent 8rem),
    conic-gradient(from 180deg at 50% 50%, rgba(94, 224, 214, 0.2), transparent, rgba(94, 224, 214, 0.3)),
    #101312;
}

.pub-content {
  padding: clamp(22px, 3vw, 34px);
}

.authors {
  margin-bottom: 10px;
}

.action {
  width: auto;
  min-width: 88px;
  padding: 0 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.action.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.bibtex {
  display: none;
  margin: 18px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  overflow-x: auto;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.22);
  font-size: 14px;
  line-height: 1.45;
}

.bibtex.is-open {
  display: block;
}

.theme-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  width: 44px;
  min-width: 44px;
  padding: 0;
  cursor: pointer;
}

.footer {
  width: min(var(--max), calc(100vw - 48px));
  margin: 0 auto;
  padding: 30px 0 42px;
  color: var(--faint);
  font-size: 14px;
  border-top: 1px solid var(--line);
}

.footer p {
  margin: 0;
}

.reveal,
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
}

.reveal.is-visible,
.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.is-visible > *:nth-child(2) {
  transition-delay: 70ms;
}

.reveal-stagger.is-visible > *:nth-child(3) {
  transition-delay: 140ms;
}

@media (max-width: 820px) {
  body {
    font-size: 16px;
  }

  .hero {
    min-height: auto;
    padding-top: 24px;
    padding-bottom: 18px;
  }

  .hero-card,
  .pub-card,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    width: min(240px, 72vw);
  }

  .hero-card {
    justify-items: start;
  }

  .hero h1 {
    font-size: 4.8rem;
  }

  .subtitle {
    font-size: 1.3rem;
  }

  .section-header h2 {
    font-size: 2.75rem;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .pub-thumb {
    min-height: 190px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 520px) {
  .hero-card,
  .section,
  .footer {
    width: min(100vw - 28px, var(--max));
  }

  .hero-card {
    padding: 20px;
  }

  .section {
    padding: 66px 0;
  }

  .section-header {
    grid-template-columns: auto 1fr;
  }

  .section-header .rule {
    grid-column: 1 / -1;
  }

  .hero h1 { font-size: 3.8rem; }
  .subtitle { font-size: 1.15rem; }
  .section-header h2 { font-size: 2.35rem; }
  .project-body h3,
  .pub-content h3 { font-size: 1.55rem; }
}

.pub-actions span.action {
  cursor: default;
}
