:root {
  --bg: #050816;
  --bg-soft: #0a1025;
  --bg-card: rgba(10, 18, 42, 0.78);
  --bg-card-strong: rgba(13, 22, 52, 0.94);
  --text: #f7fbff;
  --muted: #a8b6d3;
  --muted-2: #7180a3;
  --line: rgba(126, 211, 255, 0.19);
  --cyan: #69e6ff;
  --blue: #7a8cff;
  --violet: #bd7cff;
  --green: #65ffc8;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.45);
  --radius: 26px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(105, 230, 255, 0.16), transparent 34rem),
    radial-gradient(circle at 85% 10%, rgba(189, 124, 255, 0.17), transparent 32rem),
    radial-gradient(circle at 50% 100%, rgba(122, 140, 255, 0.11), transparent 36rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

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

#neural-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2;
  opacity: 0.55;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: min(var(--max), calc(100% - 32px));
  margin: 18px auto 0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 8, 22, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.28);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #03101d;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 0 36px rgba(105, 230, 255, 0.32);
}

.brand-text {
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-nav a {
  position: relative;
  transition: color 180ms ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transition: width 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.section-padding {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 104px 0;
}

.section-padding.compact {
  padding: 18px 0 76px;
}

.hero {
  min-height: 820px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.68fr);
  align-items: center;
  gap: 56px;
  position: relative;
}

.hero-glow {
  position: absolute;
  left: -12%;
  top: 18%;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(105,230,255,0.17), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.08;
  margin: 0;
}

h1 {
  font-size: clamp(4.2rem, 12vw, 9rem);
  letter-spacing: -0.09em;
  max-width: 920px;
  text-shadow: 0 0 34px rgba(105, 230, 255, 0.13);
}

h2 {
  font-size: clamp(2.1rem, 4vw, 4.3rem);
  letter-spacing: -0.06em;
}

h3 {
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.hero-title {
  margin: 18px 0 18px;
  color: var(--cyan);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  font-weight: 700;
}

.hero-summary {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(105, 230, 255, 0.56);
  background: rgba(105, 230, 255, 0.08);
  box-shadow: 0 14px 40px rgba(105, 230, 255, 0.13);
}

.btn.primary {
  color: #03101d;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  font-weight: 800;
}

.hero-card {
  position: relative;
  padding: 16px;
  border: 1px solid rgba(105, 230, 255, 0.26);
  border-radius: 36px;
  background:
    linear-gradient(180deg, rgba(105,230,255,0.10), rgba(189,124,255,0.06)),
    rgba(10, 18, 42, 0.78);
  box-shadow: var(--shadow), 0 0 80px rgba(105, 230, 255, 0.11);
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, rgba(105,230,255,0.36), transparent 35%, rgba(189,124,255,0.32));
  opacity: 0.26;
  pointer-events: none;
}

.portrait-wrap {
  position: relative;
  z-index: 1;
  border-radius: 28px;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 4 / 5.15;
}

.portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.profile-mini {
  position: relative;
  z-index: 1;
  padding: 22px 8px 4px;
}

.profile-mini h2 {
  margin-bottom: 6px;
  font-size: 2.2rem;
}

.profile-mini p {
  margin: 0;
  color: var(--muted);
}

.mini-label {
  color: var(--cyan) !important;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.metric-card,
.content-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.23);
  backdrop-filter: blur(18px);
}

.metric-card {
  padding: 26px;
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -42px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(105,230,255,0.24), transparent 68%);
}

.metric-value {
  font-size: 3rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.metric-label {
  color: var(--muted);
  margin-top: 10px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(240px, 0.44fr) minmax(0, 1fr);
  gap: 54px;
  align-items: start;
}

.sticky-heading {
  position: sticky;
  top: 116px;
}

.section-heading.centered {
  max-width: 760px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  margin: 18px 0 0;
}

.large-card {
  padding: clamp(26px, 5vw, 46px);
}

.large-card p {
  margin-top: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.chips span {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid rgba(105, 230, 255, 0.22);
  border-radius: 999px;
  color: #dff9ff;
  background: rgba(105, 230, 255, 0.07);
  font-size: 0.9rem;
}

.research-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

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

.research-card,
.project-card {
  min-height: 262px;
  padding: 26px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.research-card:hover,
.project-card:hover,
.publication-card:hover,
.stack-card:hover {
  transform: translateY(-4px);
  border-color: rgba(105, 230, 255, 0.45);
  background: var(--bg-card-strong);
}

.card-index {
  display: inline-flex;
  margin-bottom: 42px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.research-card p,
.project-card p {
  margin: 16px 0 0;
  color: var(--muted);
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 20px;
}

.tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.tab.active,
.tab:hover,
.tab:focus-visible {
  color: #03101d;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
}

.publication-tools {
  max-width: 760px;
  margin: 0 auto 28px;
}

.search-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

#publication-search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 15px 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  outline: none;
}

#publication-search:focus {
  border-color: rgba(105, 230, 255, 0.62);
  box-shadow: 0 0 0 4px rgba(105, 230, 255, 0.08);
}

.publication-list {
  display: grid;
  gap: 14px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: grid;
}

.publication-card,
.stack-card {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(10, 18, 42, 0.7);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.publication-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
}

.publication-title {
  margin: 0 0 7px;
  font-size: 1.02rem;
  line-height: 1.32;
}

.publication-meta,
.publication-authors,
.publication-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.publication-authors {
  color: #d8e4ff;
}

.publication-note {
  margin-top: 7px;
  color: var(--muted-2);
}

.publication-badges {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.badge {
  display: inline-flex;
  min-width: 72px;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid rgba(105, 230, 255, 0.22);
  border-radius: 999px;
  color: #dff9ff;
  background: rgba(105, 230, 255, 0.07);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.badge.violet {
  border-color: rgba(189, 124, 255, 0.28);
  background: rgba(189, 124, 255, 0.08);
}

.empty-message {
  padding: 24px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 20px;
}

.stack-list {
  display: grid;
  gap: 16px;
}

.stack-card h3 {
  margin-bottom: 8px;
}

.stack-card p {
  margin: 0;
  color: var(--muted);
}

.stack-card .status {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline {
  max-width: 880px;
  margin: 0 auto;
  position: relative;
  display: grid;
  gap: 18px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 16px;
  bottom: 16px;
  width: 1px;
  background: linear-gradient(var(--cyan), var(--violet));
  opacity: 0.45;
}

.timeline-item {
  position: relative;
  padding: 22px 24px 22px 56px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(10, 18, 42, 0.7);
}

.timeline-dot {
  position: absolute;
  left: 8px;
  top: 27px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 0 24px rgba(105, 230, 255, 0.45);
}

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

.contact-section {
  padding-bottom: 62px;
}

.contact-card {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 58px);
  text-align: center;
  background:
    radial-gradient(circle at 20% 0%, rgba(105, 230, 255, 0.13), transparent 30rem),
    radial-gradient(circle at 100% 100%, rgba(189, 124, 255, 0.13), transparent 30rem),
    var(--bg-card);
}

.contact-card p:not(.eyebrow) {
  color: var(--muted);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.contact-links a {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dff9ff;
  background: rgba(255, 255, 255, 0.05);
}

.site-footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted-2);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--cyan);
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 96px;
  }

  .hero-card {
    max-width: 480px;
  }

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

  .two-column {
    grid-template-columns: 1fr;
  }

  .sticky-heading {
    position: static;
  }
}

@media (max-width: 820px) {
  .site-header {
    align-items: center;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(5, 8, 22, 0.94);
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 8px 6px;
  }

  .section-padding {
    padding: 76px 0;
  }

  h1 {
    font-size: clamp(3.6rem, 18vw, 6rem);
  }

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

  .publication-badges {
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  .brand-text {
    display: none;
  }

  .metrics,
  .research-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .tabs {
    flex-direction: column;
  }

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

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

  #neural-canvas {
    display: none;
  }
}

/* Refined futuristic brand mark */
.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(105, 230, 255, 0.35), transparent 34%),
    radial-gradient(circle at 70% 72%, rgba(143, 124, 255, 0.32), transparent 38%),
    rgba(5, 8, 22, 0.88);
  border: 1px solid rgba(105, 230, 255, 0.38);
  box-shadow:
    0 0 28px rgba(105, 230, 255, 0.26),
    inset 0 0 18px rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: block;
  filter: drop-shadow(0 0 8px rgba(105, 230, 255, 0.42));
  transition: transform 220ms ease, filter 220ms ease;
}

.brand:hover .brand-icon {
  transform: rotate(8deg) scale(1.06);
  filter: drop-shadow(0 0 14px rgba(143, 124, 255, 0.55));
}
