:root {
  --bg: #0b0d12;
  --bg-elevated: #111620;
  --text: #f7f9fb;
  --muted: #aab4bd;
  --line: rgba(255, 255, 255, 0.13);
  --mint: #34e8b2;
  --sky: #5dc4ff;
  --coral: #ff6e5b;
  --amber: #ffbd4a;
  --ink: #0b0d12;
  --surface: rgba(16, 20, 28, 0.78);
  --surface-strong: rgba(20, 26, 36, 0.92);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  color-scheme: dark;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 84% 14%, rgba(93, 196, 255, 0.12), transparent 32rem),
    radial-gradient(circle at 12% 34%, rgba(52, 232, 178, 0.08), transparent 28rem),
    linear-gradient(180deg, rgba(11, 13, 18, 0.2), #0b0d12 860px),
    #0b0d12;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

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

button,
input,
textarea {
  font: inherit;
}

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

#ambient-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.42;
  pointer-events: none;
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 18px;
  left: 50%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  width: min(1160px, calc(100% - 32px));
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(9, 12, 18, 0.66);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
  transition: background 180ms ease, border-color 180ms ease;
}

.topbar[data-elevated="true"] {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(9, 12, 18, 0.9);
}

.brand,
.nav-links,
.hero-actions,
.contact-actions,
.filter-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 760;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: linear-gradient(135deg, var(--mint), var(--sky));
  color: var(--ink);
  font-size: 0.8rem;
}

.nav-links {
  justify-content: center;
  gap: 6px;
}

.nav-links a,
.nav-cta {
  min-height: 38px;
  padding: 9px 13px;
  border-radius: 6px;
  color: rgba(247, 249, 251, 0.78);
  font-size: 0.92rem;
  transition: background 160ms ease, color 160ms ease;
}

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

.nav-cta {
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
}

.hero,
.page-hero {
  position: relative;
  overflow: hidden;
}

.hero {
  display: grid;
  min-height: 96vh;
  padding: 150px 22px 64px;
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media {
  background:
    url("assets/graph-network-hero.png") center / cover no-repeat,
    #121820;
  transform: scale(1.02);
  animation: slowZoom 18s ease-in-out infinite alternate;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(11, 13, 18, 0.96) 0%, rgba(11, 13, 18, 0.78) 48%, rgba(11, 13, 18, 0.28) 100%),
    linear-gradient(180deg, rgba(11, 13, 18, 0.1) 0%, rgba(11, 13, 18, 0.2) 72%, #0b0d12 100%);
}

.hero-inner,
.section,
.page-hero {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-inner {
  position: relative;
  z-index: 1;
  margin: auto;
}

.split-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 390px);
  gap: 34px;
  align-items: center;
}

.hero-copy-block {
  min-width: 0;
}

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

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

h1,
h2 {
  max-width: 880px;
  line-height: 0.98;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(3rem, 7vw, 7.2rem);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4.2vw, 4.6rem);
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-copy,
.page-hero-copy p {
  color: rgba(247, 249, 251, 0.78);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}

.hero-copy {
  max-width: 660px;
  margin-bottom: 28px;
}

.hero-actions,
.contact-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.button,
.filter-pill {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

.button {
  padding: 12px 17px;
  font-weight: 760;
}

.button:hover,
.filter-pill:hover,
.text-link:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--text);
  color: var(--ink);
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.09);
}

.button.ghost {
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(247, 249, 251, 0.78);
}

.text-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--mint);
  font-weight: 780;
  transition: transform 160ms ease;
}

.identity-card,
.profile-figure,
.about-snapshot,
.capability-card,
.project-card,
.project-feature,
.lab-visual,
.story-card,
.timeline article {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
}

.identity-card {
  align-self: stretch;
  min-height: 520px;
  animation: floatCard 7s ease-in-out infinite;
}

.identity-card img,
.profile-figure img {
  width: 100%;
  height: 100%;
  padding: 12px;
  background:
    radial-gradient(circle at 50% 18%, rgba(93, 196, 255, 0.14), transparent 34%),
    #070a10;
  object-fit: contain;
  object-position: center center;
}

.identity-card-copy {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(10, 13, 19, 0.74);
  backdrop-filter: blur(16px);
}

.identity-card-copy p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.identity-card-copy strong {
  display: block;
  line-height: 1.2;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 0 22px var(--mint);
}

.signal-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(120px, 170px));
  gap: 1px;
  max-width: 560px;
  margin: 16px 0 0;
  padding: 1px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.signal-grid div {
  padding: 18px;
  border-radius: 7px;
  background: rgba(11, 13, 18, 0.58);
}

.signal-grid dt {
  margin-bottom: 2px;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 840;
}

.signal-grid dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.marquee-section {
  overflow: hidden;
  border-block: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 12px;
  padding: 16px 0;
  animation: marquee 28s linear infinite;
}

.marquee-track span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 8px 14px;
  color: rgba(247, 249, 251, 0.78);
  background: rgba(255, 255, 255, 0.055);
}

.section {
  padding: 92px 0;
}

.section-heading {
  display: grid;
  gap: 12px;
  margin-bottom: 34px;
}

.about-preview,
.lab-section,
.contact-section {
  display: grid;
  gap: 28px;
  align-items: center;
}

.about-preview {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
}

.about-copy p,
.capability-card p,
.project-card p,
.project-feature p,
.lab-copy p,
.story-card p,
.timeline p {
  color: var(--muted);
}

.about-snapshot {
  padding: 18px;
}

.snapshot-line {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.snapshot-line:last-child {
  border-bottom: 0;
}

.snapshot-line span {
  color: var(--muted);
  font-size: 0.84rem;
}

.snapshot-line strong {
  font-size: 1.14rem;
}

.capability-grid,
.project-grid,
.stack-grid,
.project-list,
.story-section,
.timeline {
  display: grid;
  gap: 14px;
}

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

.capability-card {
  min-height: 310px;
  padding: 24px;
}

.capability-card::before,
.project-card::before,
.project-feature::before,
.story-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--accent, var(--mint));
}

.chip {
  display: inline-flex;
  margin-bottom: 22px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 760;
}

.accent-mint {
  --accent: var(--mint);
}

.accent-sky {
  --accent: var(--sky);
}

.accent-coral {
  --accent: var(--coral);
}

.accent-amber {
  --accent: var(--amber);
}

.projects-section {
  width: 100%;
  padding-inline: max(16px, calc((100% - 1160px) / 2));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    #10141b;
}

.filter-row {
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-pill {
  min-width: 86px;
  padding: 9px 14px;
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(247, 249, 251, 0.72);
}

.filter-pill.active {
  border-color: rgba(52, 232, 178, 0.58);
  background: rgba(52, 232, 178, 0.13);
  color: var(--text);
}

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

.project-card {
  min-height: 285px;
  padding: 24px;
  transition: opacity 180ms ease, transform 180ms ease;
}

.project-card[hidden],
.project-feature[hidden] {
  display: none;
}

.visual-card {
  display: grid;
  gap: 18px;
}

.visual-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  object-fit: cover;
}

.project-topline {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.83rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li,
.stack-grid span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(247, 249, 251, 0.78);
}

.tag-list li {
  padding: 7px 9px;
  font-size: 0.82rem;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.project-actions .button {
  min-height: 40px;
  padding: 9px 13px;
  font-size: 0.9rem;
}

.section-link-row {
  margin-top: 20px;
}

.lab-section {
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1.15fr);
}

.lab-copy p {
  max-width: 610px;
  font-size: 1.05rem;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
}

.metric-strip div {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.metric-strip span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.metric-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 1.45rem;
}

.lab-visual {
  min-height: 480px;
  background:
    radial-gradient(circle at 25% 25%, rgba(52, 232, 178, 0.16), transparent 34%),
    radial-gradient(circle at 77% 70%, rgba(255, 110, 91, 0.14), transparent 32%),
    #0e1219;
}

#gnn-canvas {
  display: block;
  width: 100%;
  height: 480px;
}

.lab-legend {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(10, 13, 19, 0.68);
  color: var(--muted);
  backdrop-filter: blur(14px);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.dot.mint {
  background: var(--mint);
}

.dot.sky {
  background: var(--sky);
}

.dot.coral {
  background: var(--coral);
}

.legend-text {
  margin-left: 4px;
  font-size: 0.82rem;
}

.contact-section {
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 0.8fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact-section h2 {
  max-width: 780px;
}

.contact-copy p {
  max-width: 640px;
  color: var(--muted);
}

.contact-copy code {
  color: var(--mint);
}

.contact-actions {
  justify-content: flex-end;
}

.contact-form {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contact-form label {
  display: grid;
  gap: 7px;
}

.contact-form label span {
  color: rgba(247, 249, 251, 0.78);
  font-size: 0.86rem;
  font-weight: 760;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  outline: 0;
  padding: 12px 13px;
  resize: vertical;
  transition: border-color 160ms ease, background 160ms ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(52, 232, 178, 0.58);
  background: rgba(255, 255, 255, 0.08);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.form-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-status.success {
  color: var(--mint);
}

.form-status.error {
  color: var(--coral);
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 34px;
  align-items: center;
  padding: 150px 0 70px;
}

.compact-page-hero {
  grid-template-columns: minmax(0, 1fr);
  min-height: 58vh;
}

.page-hero-copy h1 {
  font-size: clamp(2.8rem, 6.4vw, 6.4rem);
}

.page-hero-copy p {
  max-width: 760px;
}

.profile-figure {
  min-height: 560px;
}

.story-section {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.story-card {
  padding: 26px;
}

.story-card h2 {
  font-size: clamp(1.45rem, 2.2vw, 2.2rem);
  line-height: 1.05;
}

.timeline-section {
  border-top: 1px solid var(--line);
}

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

.timeline article {
  padding: 24px;
}

.timeline span {
  display: block;
  margin-bottom: 18px;
  color: var(--mint);
  font-weight: 800;
}

.project-page-section {
  padding-top: 20px;
}

.project-list {
  gap: 18px;
}

.project-feature {
  display: grid;
  grid-template-columns: minmax(250px, 0.48fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 22px;
}

.project-feature img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  object-fit: cover;
}

.project-feature h2 {
  margin: 14px 0;
  font-size: clamp(1.8rem, 3.2vw, 3.2rem);
  line-height: 1.02;
}

.footer {
  display: flex;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 38px;
  color: var(--muted);
  font-size: 0.94rem;
}

.footer p {
  margin: 0;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 620ms ease, transform 620ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero [data-reveal],
.page-hero [data-reveal] {
  opacity: 1;
  transform: none;
}

@keyframes slowZoom {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.08) translate3d(1.5%, -1%, 0);
  }
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: 92vh;
  }

  .split-hero,
  .page-hero,
  .about-preview,
  .lab-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .identity-card,
  .profile-figure {
    min-height: 460px;
  }

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

  .project-feature {
    grid-template-columns: 1fr;
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .topbar {
    top: 10px;
    width: calc(100% - 20px);
  }

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

  .hero {
    min-height: 94vh;
    padding: 122px 16px 42px;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(11, 13, 18, 0.84) 0%, rgba(11, 13, 18, 0.76) 70%, #0b0d12 100%),
      linear-gradient(90deg, rgba(11, 13, 18, 0.78), rgba(11, 13, 18, 0.24));
  }

  h1,
  .page-hero-copy h1 {
    max-width: 100%;
    font-size: clamp(2.25rem, 11vw, 3.25rem);
    line-height: 1.04;
    overflow-wrap: anywhere;
  }

  .hero-copy,
  .page-hero-copy p {
    max-width: 100%;
    font-size: 1rem;
  }

  h2 {
    font-size: clamp(1.85rem, 10vw, 3rem);
    line-height: 1.05;
  }

  .section {
    width: calc(100% - 28px);
    padding: 66px 0;
  }

  .page-hero {
    width: calc(100% - 28px);
    padding: 122px 0 48px;
  }

  .identity-card,
  .profile-figure {
    min-height: 390px;
  }

  .signal-grid,
  .metric-strip,
  .form-grid,
  .capability-grid,
  .project-grid,
  .story-section,
  .timeline {
    grid-template-columns: 1fr;
  }

  .capability-card,
  .project-card {
    min-height: auto;
  }

  .project-topline {
    flex-direction: column;
  }

  .lab-section {
    gap: 20px;
  }

  .lab-visual {
    min-height: 360px;
  }

  #gnn-canvas {
    height: 360px;
  }

  .project-feature {
    padding: 16px;
  }

  .footer {
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
