:root {
  --bg: #09090a;
  --panel: #111214;
  --panel-2: #15171a;
  --text: #f4f4f1;
  --muted: #9fa3a7;
  --line: rgba(255,255,255,.11);
  --accent: #a7ff4f;
  --accent-2: #66e3ff;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px max(28px, calc((100vw - var(--max)) / 2));
  background: linear-gradient(to bottom, rgba(9,9,10,.92), rgba(9,9,10,0));
  backdrop-filter: blur(4px);
}

.brand {
  font-weight: 750;
  font-size: 20px;
  letter-spacing: -.04em;
}

.nav { display: flex; gap: 28px; }
.nav a { color: #b7b9bc; font-size: 14px; transition: color .2s ease; }
.nav a:hover { color: var(--text); }

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

.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: center;
  gap: 6vw;
  padding-top: 120px;
  padding-bottom: 80px;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-weight: 720;
}

.hero h1, .section-heading h2, .contact-section h2 {
  margin: 0;
  font-size: clamp(52px, 7.2vw, 106px);
  line-height: .93;
  letter-spacing: -.065em;
  font-weight: 690;
}

.hero h1 span, .contact-section h2 span { color: #6f7478; }
.hero-lead {
  max-width: 620px;
  margin: 32px 0 0;
  color: #b4b7ba;
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.5;
}
.hero-actions { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--text); color: #111; border-color: var(--text); }
.button.ghost { color: #d2d4d5; }

.hero-orbit {
  position: relative;
  aspect-ratio: 1;
  max-width: 460px;
  width: 100%;
  justify-self: end;
  filter: saturate(.95);
}
.orb, .orb-ring { position: absolute; border-radius: 50%; }
.orb-a {
  width: 62%; height: 62%; left: 17%; top: 18%;
  background: radial-gradient(circle at 35% 35%, rgba(167,255,79,.65), rgba(38,104,30,.12) 45%, transparent 67%);
  filter: blur(5px);
  animation: drift 8s ease-in-out infinite alternate;
}
.orb-b {
  width: 54%; height: 54%; right: 10%; bottom: 12%;
  background: radial-gradient(circle at 55% 42%, rgba(102,227,255,.42), rgba(41,64,122,.12) 50%, transparent 70%);
  filter: blur(10px);
  animation: drift 11s ease-in-out infinite alternate-reverse;
}
.orb-ring {
  inset: 12%;
  border: 1px solid rgba(167,255,79,.3);
  box-shadow: inset 0 0 80px rgba(167,255,79,.04);
  transform: rotateX(67deg) rotateZ(-18deg);
}
.orbit-label {
  position: absolute;
  color: #8c9195;
  font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.label-a { top: 12%; left: 10%; }
.label-b { top: 70%; right: 0; }
.label-c { bottom: 4%; left: 28%; }
@keyframes drift { from { transform: translate3d(-3%, -2%, 0) scale(.96); } to { transform: translate3d(4%, 3%, 0) scale(1.06); } }

.work-section { padding-top: 110px; padding-bottom: 120px; }
.section-heading { margin-bottom: 64px; }
.section-heading h2 { font-size: clamp(46px, 5vw, 76px); line-height: .98; max-width: 900px; }

.project {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.project-feature {
  display: grid;
  grid-template-columns: 1.45fr .75fr;
  gap: 34px;
  margin-bottom: 110px;
}
.project-media {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #101114;
  border: 1px solid rgba(255,255,255,.07);
}
.video-wrap { min-height: 560px; }
.video-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-vignette { position: absolute; inset: 0; box-shadow: inset 0 -110px 120px rgba(0,0,0,.28); pointer-events: none; }
.live-pill {
  position: absolute;
  left: 18px; bottom: 18px;
  padding: 9px 12px;
  border-radius: 999px;
  font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #d9ddd6;
  background: rgba(10,10,11,.65);
  border: 1px solid rgba(255,255,255,.13);
  backdrop-filter: blur(10px);
}
.live-pill span { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.project-info { padding: 4px 0 0; }
.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: #7f8488;
  font: 11px/1.25 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.project-info h3 {
  margin: 36px 0 18px;
  font-size: clamp(34px, 3vw, 52px);
  line-height: 1.02;
  letter-spacing: -.045em;
}
.project-info p { margin: 0; color: #aeb2b5; line-height: 1.62; font-size: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tags span {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: #9da2a6;
  font-size: 11px;
}
.text-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0 0 4px;
  margin-top: 30px;
  border-bottom: 1px solid #555b5f;
  cursor: pointer;
  font-size: 14px;
}
.text-link:hover { border-color: var(--accent); color: var(--accent); }

.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.project-card { display: flex; flex-direction: column; }
.image-frame { aspect-ratio: 1.18; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .65s cubic-bezier(.2,.7,.2,1); }
.project-card:hover img { transform: scale(1.025); }
.report-frame { aspect-ratio: 16 / 10; background: #f7f7f8; }
.report-frame img { object-position: center center; object-fit: cover; }
.biomarker-frame img { object-position: center 48%; }
.project-info.compact { padding-top: 24px; }
.project-info.compact h3 { margin-top: 26px; font-size: clamp(30px, 2.6vw, 43px); }

.research-strip {
  margin-top: 98px;
  padding: 34px 0 12px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: .75fr 1.4fr auto;
  gap: 36px;
  align-items: start;
}
.research-strip h3 { margin: 8px 0 0; font-size: 30px; letter-spacing: -.035em; }
.research-strip p { margin: 0; color: #a7abad; line-height: 1.6; }
.status { color: #b7f28c; border: 1px solid rgba(167,255,79,.22); background: rgba(167,255,79,.06); padding: 8px 10px; border-radius: 999px; font-size: 11px; white-space: nowrap; }

.about-section { padding-top: 120px; padding-bottom: 140px; border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.about-lead { margin: 0; font-size: clamp(26px, 3vw, 42px); line-height: 1.2; letter-spacing: -.035em; }
.about-columns { display: grid; gap: 34px; }
.about-columns h4 { margin: 0 0 8px; font-size: 13px; color: #d9dbdc; }
.about-columns p { margin: 0; color: #8f9497; line-height: 1.55; }

.contact-section { padding-top: 130px; padding-bottom: 170px; border-top: 1px solid var(--line); }
.contact-section h2 { max-width: 1050px; }
.contact-links { display: flex; gap: 28px; margin-top: 46px; flex-wrap: wrap; }
.contact-links a { color: #b7bbbd; border-bottom: 1px solid #4d5255; padding-bottom: 4px; }
.contact-links a:hover { color: var(--accent); border-color: var(--accent); }

.footer {
  width: min(var(--max), calc(100% - 56px));
  margin: 0 auto;
  padding: 24px 0 36px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: #696e71;
  font-size: 12px;
}

.case-dialog {
  width: min(900px, calc(100% - 32px));
  max-height: 88vh;
  padding: 0;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 24px;
  background: #101113;
  color: var(--text);
  box-shadow: 0 30px 100px rgba(0,0,0,.55);
  overflow: auto;
}
.case-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(8px); }
.close-dialog {
  position: sticky;
  top: 16px;
  float: right;
  margin: 16px 16px 0 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(20,21,23,.85);
  color: var(--text);
  cursor: pointer;
  z-index: 2;
}
.case-inner { padding: 64px 54px 58px; }
.case-inner h2 { margin: 0 0 18px; font-size: clamp(38px, 6vw, 64px); letter-spacing: -.055em; line-height: .98; }
.case-kicker { color: var(--accent); font: 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; letter-spacing: .1em; }
.case-lead { color: #b6b9bc; font-size: 18px; line-height: 1.55; max-width: 720px; }
.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 36px; }
.case-block { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #141619; }
.case-block h4 { margin: 0 0 10px; font-size: 13px; }
.case-block p, .case-block li { color: #9ea3a6; line-height: 1.55; font-size: 14px; }
.case-block ul { margin: 0; padding-left: 18px; }
.case-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.case-gallery img { width: 100%; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.case-note { margin-top: 28px; padding: 18px 20px; border-left: 2px solid var(--accent); background: rgba(167,255,79,.04); color: #9fa5a0; font-size: 13px; line-height: 1.55; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: .08s; }

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 180px; }
  .hero-orbit { max-width: 330px; justify-self: start; margin: 20px 0 30px; }
  .project-feature { grid-template-columns: 1fr; }
  .video-wrap { min-height: auto; aspect-ratio: 16/10; }
  .project-grid { grid-template-columns: 1fr; }
  .research-strip { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .case-grid, .case-gallery { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .section-pad, .footer { width: min(100% - 30px, var(--max)); }
  .topbar { padding: 18px 16px; }
  .nav { gap: 16px; }
  .nav a { font-size: 12px; }
  .hero { padding-top: 145px; }
  .hero h1 { font-size: clamp(46px, 15vw, 72px); }
  .project-feature { margin-bottom: 76px; }
  .work-section { padding-top: 80px; }
  .case-inner { padding: 60px 22px 36px; }
}

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


/* v4: report and biomedical ML are separated, but keep the softer card language of v2 */
.project-stack {
  display: grid;
  gap: 86px;
}

.project-split {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, .82fr);
  gap: 42px;
  align-items: center;
  padding-top: 26px;
}

.project-split-reverse {
  grid-template-columns: minmax(340px, .82fr) minmax(0, 1.18fr);
}

.split-media {
  aspect-ratio: 16 / 10;
  background: #f5f6f7;
  position: relative;
}

.split-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.split-copy {
  padding: 4px 0;
}

.split-copy h3 {
  margin-top: 30px;
}

.published-pill {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 9px 12px;
  border-radius: 999px;
  color: #0d1110;
  background: rgba(205, 255, 158, .92);
  border: 1px solid rgba(255,255,255,.34);
  backdrop-filter: blur(10px);
  font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .04em;
  box-shadow: 0 8px 30px rgba(0,0,0,.14);
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 48px;
}

.contact-card {
  position: relative;
  min-height: 132px;
  padding: 20px 44px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.028), rgba(255,255,255,.008));
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.contact-card:hover {
  transform: translateY(-3px);
  border-color: rgba(167,255,79,.32);
  background: rgba(167,255,79,.035);
}

.contact-card small {
  display: block;
  margin-bottom: 17px;
  color: #777d81;
  font: 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.contact-card strong {
  display: block;
  color: #d9dcda;
  font-size: 14px;
  font-weight: 520;
  overflow-wrap: anywhere;
}

.contact-card > span {
  position: absolute;
  right: 18px;
  top: 18px;
  color: #747a7e;
}

@media (max-width: 920px) {
  .project-split,
  .project-split-reverse {
    grid-template-columns: 1fr;
  }

  .project-split-reverse .split-copy { order: 2; }
  .project-split-reverse .split-media { order: 1; }

  .contact-cards {
    grid-template-columns: 1fr;
  }
}
