:root {
  --bg: #05070c;
  --accent: #4ad9ff;
  --accent2: #9b8cff;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-strong: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --muted: #99a3b5;
  --text: #eef1f7;
  --content: 1080px;
  --header-height: 68px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: rgba(74, 217, 255, 0.28);
  color: #fff;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #fff;
}

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

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid var(--bg);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

@keyframes hp-drift1 {
  0%, 100% { transform: translate(-6%, -4%) scale(1); }
  50% { transform: translate(8%, 6%) scale(1.15); }
}

@keyframes hp-drift2 {
  0%, 100% { transform: translate(6%, 3%) scale(1.1); }
  50% { transform: translate(-8%, -6%) scale(0.9); }
}

@keyframes hp-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@keyframes hp-spin {
  to { transform: rotate(360deg); }
}

@keyframes hp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* ---------- background layers ---------- */

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora-blob {
  position: absolute;
  filter: blur(30px);
}

.aurora-blob-a {
  top: -20%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle at center, rgba(74, 217, 255, 0.22), transparent 62%);
  animation: hp-drift1 22s ease-in-out infinite;
}

.aurora-blob-b {
  right: -10%;
  bottom: -25%;
  width: 65vw;
  height: 65vw;
  background: radial-gradient(circle at center, rgba(155, 124, 255, 0.2), transparent 62%);
  animation: hp-drift2 26s ease-in-out infinite;
}

.aurora-blob-c {
  top: 30%;
  left: 40%;
  width: 40vw;
  height: 40vw;
  filter: blur(40px);
  background: radial-gradient(circle at center, rgba(74, 217, 255, 0.1), transparent 65%);
  animation: hp-drift1 30s ease-in-out infinite;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 35%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 35%, transparent 78%);
}

.fade-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 100% 60% at 50% 0%, transparent 40%, rgba(5, 7, 12, 0.55) 100%);
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  width: 460px;
  height: 460px;
  margin: -230px 0 0 -230px;
  background: radial-gradient(circle at center, rgba(74, 217, 255, 0.1), transparent 60%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  will-change: transform;
}

/* ---------- progress bar ---------- */

.scroll-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 2px;
}

.scroll-progress {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  box-shadow: 0 0 12px rgba(74, 217, 255, 0.6);
}

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(8, 10, 16, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.3px;
}

.brand-mark {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 16px rgba(74, 217, 255, 0.4);
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
}

.header-right {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.5vw, 28px);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
  overflow-x: auto;
  font-size: 14px;
  font-weight: 500;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--accent);
}

.lang-toggle {
  position: relative;
  display: flex;
  align-items: center;
  width: 76px;
  height: 30px;
  flex-shrink: 0;
  padding: 3px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 100px;
}

.lang-toggle-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 100px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 4px 14px rgba(74, 217, 255, 0.35);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.lang-toggle button {
  position: relative;
  z-index: 2;
  flex: 1;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.lang-toggle button.is-active {
  color: var(--bg);
}

/* ---------- layout ---------- */

main {
  position: relative;
  z-index: 2;
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px) 120px;
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(56px, 9vw, 110px) 0 clamp(40px, 6vw, 80px);
}

.hero-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 44px;
}

.hero-copy {
  flex: 1 1 420px;
  min-width: 300px;
}

.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border-radius: 100px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: hp-pulse 2s ease-in-out infinite;
}

.hero-copy h1 {
  margin: 22px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(46px, 7.5vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff 30%, rgba(255, 255, 255, 0.55));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 22px 0 0;
  max-width: 520px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
}

.hero-lead-strong {
  color: #fff;
}

.hero-tagline {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.4);
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  letter-spacing: 0.5px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.button-primary {
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 30px -10px rgba(74, 217, 255, 0.6);
  color: var(--bg);
}

.button-primary:hover {
  color: var(--bg);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 34px;
}

.hero-stats strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: #fff;
}

.hero-stats span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero-stats-sep {
  width: 1px;
  background: var(--border);
}

.hero-visual {
  position: relative;
  flex: 0 0 auto;
  width: clamp(220px, 30vw, 300px);
  height: clamp(220px, 30vw, 300px);
  animation: hp-float 6s ease-in-out infinite;
}

.avatar-ring {
  position: absolute;
  border-radius: 50%;
}

.avatar-ring-outer {
  inset: -6%;
  border: 1px solid rgba(74, 217, 255, 0.25);
  border-top-color: var(--accent);
  border-right-color: var(--accent2);
  animation: hp-spin 14s linear infinite;
}

.avatar-ring-inner {
  inset: 6%;
  border: 1px dashed rgba(155, 124, 255, 0.28);
  animation: hp-spin 22s linear infinite reverse;
}

.avatar-frame {
  position: absolute;
  inset: 12%;
  overflow: hidden;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

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

.collab-chip {
  position: absolute;
  right: 2%;
  bottom: 8%;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 12px;
  background: rgba(8, 10, 16, 0.7);
  border: 1px solid var(--border);
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.collab-chip span:first-child {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
}

/* ---------- sections ---------- */

.section {
  scroll-margin-top: 90px;
  padding: 40px 0;
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 26px;
}

.section-index {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--accent);
}

.section-heading h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.01em;
}

.section-heading-link {
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  color: var(--accent);
  white-space: nowrap;
}

.heading-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section-kicker {
  margin: 0 0 24px;
  color: var(--accent2);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.glass-panel,
.glass-card {
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.about-panel {
  padding: clamp(24px, 4vw, 40px);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}

.about-panel p {
  margin: 0;
  color: #d6dbe6;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.75;
}

.about-panel p + p {
  margin-top: 18px;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.glass-card {
  border-radius: 18px;
  padding: 24px;
}

.mono-index {
  margin-bottom: 12px;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.mono-index-alt {
  color: var(--accent2);
}

.research-grid p {
  margin: 0;
  color: #dfe4ee;
  font-size: 15px;
  line-height: 1.6;
}

.timeline-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.timeline-column {
  flex: 1 1 340px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-card {
  padding: 22px 24px;
  border-left: 2px solid rgba(255, 255, 255, 0.14);
}

.timeline-card.accent-left {
  border-left-color: var(--accent);
}

.timeline-card.accent-left-2 {
  border-left-color: var(--accent2);
}

.timeline-title {
  color: #fff;
  font-weight: 700;
  font-size: 17px;
}

.timeline-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}

.timeline-desc {
  margin: 12px 0 0;
  color: #c4cad6;
  font-size: 13.5px;
  line-height: 1.6;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 16px;
}

.news-date-badge {
  padding: 5px 11px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--bg);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
}

.news-date-badge-alt {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: #fff;
}

.news-text {
  color: #e4e8f0;
  font-size: 15px;
}

/* ---------- publications ---------- */

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pub-card {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  border-radius: 20px;
  padding: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 24px 50px -30px rgba(0, 0, 0, 0.8);
}

.pub-image {
  position: relative;
  flex: 1 1 230px;
  min-width: 200px;
  align-self: flex-start;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.pub-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  color: var(--bg);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.pub-image img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.pub-body {
  flex: 3 1 340px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pub-title {
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.35;
}

span.pub-title {
  color: #fff;
}

.pub-desc {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

.mono-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
}

/* ---------- demos ---------- */

.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.demo-card {
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 24px 50px -30px rgba(0, 0, 0, 0.8);
}

.demo-image {
  position: relative;
}

.demo-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(8, 10, 16, 0.65);
  border: 1px solid var(--border);
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.demo-image img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.demo-body {
  padding: 18px 20px 20px;
}

.demo-caption {
  margin: 0;
  color: #dfe4ee;
  font-size: 14.5px;
  line-height: 1.55;
}

/* ---------- honors ---------- */

.honors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.honor-card {
  flex: 1 1 300px;
}

.honor-card .mono-index {
  margin-bottom: 10px;
}

.honor-text {
  color: #fff;
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.5;
}

.reviewer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

.reviewer-label {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.reviewer-tag {
  padding: 8px 15px;
  border-radius: 100px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}

/* ---------- contact / footer ---------- */

.contact-section {
  padding: 60px 0 0;
}

.contact-panel {
  text-align: center;
  padding: clamp(40px, 6vw, 70px) 24px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(74, 217, 255, 0.08), rgba(155, 124, 255, 0.08));
  border: 1px solid var(--border);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.contact-panel h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 5vw, 48px);
  letter-spacing: -0.02em;
}

.contact-panel p {
  max-width: 480px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.contact-actions .button-primary,
.contact-actions .button {
  padding: 14px 26px;
  font-size: 15px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  color: rgba(255, 255, 255, 0.35);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

/* ---------- reveal-on-scroll ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .site-nav {
    display: none;
  }

  .hero-grid {
    justify-content: center;
    text-align: center;
  }

  .hero-copy {
    flex-basis: 100%;
  }

  .hero-actions,
  .hero-stats {
    justify-content: center;
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 60px;
  }

  .site-header {
    padding-inline: 16px;
  }

  .brand span:last-child {
    display: none;
  }

  .hero-visual {
    width: min(60vw, 220px);
    height: min(60vw, 220px);
  }

  .pub-card {
    flex-direction: column;
  }

  .pub-image {
    flex-basis: auto;
    width: 100%;
  }

  .timeline-columns {
    flex-direction: column;
  }

  .contact-actions .button {
    width: 100%;
    justify-content: center;
  }

  .footer-meta {
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
