:root {
  --bg: #050b14;
  --bg-2: #0a1424;
  --ink: #e8f3fa;
  --muted: #9aa6b0;
  --line: rgba(144, 195, 223, 0.16);
  --navy: #071c4c;
  --navy-mid: #123d7b;
  --ice: #90c3df;
  --ice-soft: #c8e2f0;
  --accent: #438ec6;
  --font-display: "Montserrat", "Avenir Next", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --radius: 18px;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(1100px 700px at 8% -8%, rgba(18, 61, 123, 0.55), transparent 55%),
    radial-gradient(900px 620px at 92% 6%, rgba(67, 142, 198, 0.22), transparent 52%),
    linear-gradient(180deg, #02060d 0%, #071427 42%, #050b14 100%);
  overflow-x: hidden;
}

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

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

.orb {
  pointer-events: none;
  position: fixed;
  width: 42vw;
  height: 42vw;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.28;
  z-index: 0;
  animation: drift 16s ease-in-out infinite alternate;
}

.orb-a {
  top: -12vw;
  left: -10vw;
  background: radial-gradient(circle, rgba(18, 61, 123, 0.9), transparent 70%);
}

.orb-b {
  right: -14vw;
  bottom: 10vh;
  background: radial-gradient(circle, rgba(67, 142, 198, 0.55), transparent 70%);
  animation-delay: -6s;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4vw, -3vh, 0) scale(1.12); }
}

.top,
main,
.foot {
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem clamp(1rem, 4vw, 2.5rem);
  position: sticky;
  top: 0;
  backdrop-filter: blur(14px);
  background: rgba(5, 11, 20, 0.78);
  border-bottom: 1px solid var(--line);
  z-index: 20;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  min-width: 0;
}

.brand,
.foot-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-icon {
  display: block;
  height: 28px;
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(67, 142, 198, 0.35));
}

.hero-logo {
  display: block;
  width: min(420px, 78vw);
  height: auto;
  margin: 0 0 0.95rem;
  filter: drop-shadow(0 12px 36px rgba(67, 142, 198, 0.28));
}

.foot-logo {
  display: block;
  height: 36px;
  width: auto;
  opacity: 0.92;
}

.nav {
  display: flex;
  gap: 1.25rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--ink);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 0.78rem/1 var(--font-body);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}

.lang-btn.is-active {
  background: linear-gradient(135deg, var(--navy-mid), var(--accent));
  color: #f4f9fc;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.55rem 0.95rem;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}

.btn-primary {
  background: linear-gradient(135deg, #123d7b, #438ec6);
  color: #f4f9fc;
  box-shadow: 0 10px 30px rgba(67, 142, 198, 0.32);
}

.btn-ghost {
  border-color: var(--line);
  background: transparent;
}

.hero {
  position: relative;
  min-height: 0;
  display: grid;
  align-items: start;
  padding: clamp(1.1rem, 2.8vh, 1.75rem) clamp(1rem, 4vw, 2.5rem) clamp(2rem, 5vh, 3.25rem);
  overflow: hidden;
}

.hero-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 46rem;
  animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow,
.section-kicker {
  display: inline-block;
  margin: 0 0 1rem;
  color: var(--ice);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  margin: 0;
}

.hero-line {
  display: block;
  font-size: clamp(1.45rem, 3.4vw, 2.35rem);
  line-height: 1.15;
  font-weight: 700;
  max-width: 18ch;
  color: var(--ice-soft);
}

.lead,
.section-lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 42rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero-pulse {
  position: absolute;
  right: 8%;
  bottom: 18%;
  display: grid;
  gap: 0.55rem;
  z-index: 1;
}

.hero-pulse span {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ice), transparent);
  animation: sweep 2.2s ease-in-out infinite;
}

.hero-pulse span:nth-child(1) { width: 9rem; }
.hero-pulse span:nth-child(2) { width: 6.5rem; animation-delay: 0.25s; }
.hero-pulse span:nth-child(3) { width: 4rem; animation-delay: 0.5s; }

@keyframes sweep {
  0%, 100% { opacity: 0.25; transform: scaleX(0.85); transform-origin: left; }
  50% { opacity: 1; transform: scaleX(1); }
}

section {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3.5rem, 8vh, 5.5rem) 0;
}

.who h2,
.approach h2,
.work h2,
.experience h2,
.contact h2,
.research h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  max-width: 18ch;
  margin-bottom: 1rem;
}

.who h2,
.work h2 {
  max-width: 22ch;
}

.who .section-lead {
  max-width: 62rem;
}

.approach-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.step {
  position: relative;
  padding: 1.4rem 1.2rem 1.5rem;
  border-top: 2px solid var(--accent);
  background: linear-gradient(180deg, rgba(67, 142, 198, 0.14), transparent 70%);
  transition: transform 0.25s ease, background 0.25s ease;
}

.step-ethics {
  position: absolute;
  right: 0.85rem;
  bottom: 0.75rem;
  width: 28px;
  height: auto;
  opacity: 0.85;
  pointer-events: none;
}

.step:hover {
  transform: translateY(-4px);
  background: linear-gradient(180deg, rgba(144, 195, 223, 0.16), transparent 70%);
}

.step-no {
  display: block;
  color: var(--ice);
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 1.4rem;
}

.step h3 {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.work-item {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.work-mark {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: auto;
  opacity: 0.7;
  pointer-events: none;
}

.work-item:hover {
  border-color: rgba(67, 142, 198, 0.55);
  transform: translateY(-3px);
}

.work-no {
  color: var(--ice);
  font-family: var(--font-display);
  font-weight: 700;
}

.work-item h3 {
  margin: 0.7rem 0 0.65rem;
  font-size: 1.25rem;
}

.work-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.research-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(1.6rem, 4vw, 2.4rem);
  border-radius: 28px;
  border: 1px solid rgba(67, 142, 198, 0.35);
  background:
    linear-gradient(135deg, rgba(18, 61, 123, 0.45), rgba(67, 142, 198, 0.12) 45%, transparent),
    rgba(7, 20, 39, 0.92);
}

.tagline {
  margin: 0 0 1rem;
  color: var(--ice-soft);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.research-panel p:not(.tagline) {
  color: var(--muted);
  line-height: 1.7;
  max-width: 58ch;
}

.text-link {
  display: inline-block;
  margin-top: 1.2rem;
  color: var(--ice);
  font-weight: 600;
}

.exp-groups {
  display: grid;
  gap: 1.75rem;
  margin-top: 1.75rem;
}

.exp-label {
  margin: 0 0 0.35rem;
  color: var(--ice);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.exp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.exp-list li {
  padding: 1.1rem 0 1.1rem 1.4rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.45;
  position: relative;
}

.exp-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.45rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(67, 142, 198, 0.7);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: end;
}

.contact-card {
  padding: 1.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  min-height: 5.5rem;
}

.contact-email {
  color: var(--ice-soft);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.contact-email:hover {
  color: #ffffff;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.icp a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* —— Robot / ethics / lab motifs —— */
.motif {
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.motif-hero {
  right: clamp(0.5rem, 4vw, 3rem);
  top: 0.5rem;
  width: min(300px, 36vw);
  height: 340px;
}

.motif-robot {
  position: absolute;
  right: 8%;
  top: 0;
  width: 72%;
  height: auto;
  opacity: 0.72;
  animation: motifFloat 9s ease-in-out infinite alternate;
}

.motif-shield {
  position: absolute;
  left: 0;
  bottom: 8%;
  width: 42%;
  height: auto;
  opacity: 0.78;
  animation: motifFloat 11s ease-in-out infinite alternate-reverse;
}

.motif-circuit-hero {
  position: absolute;
  left: 6%;
  top: 12%;
  width: 70%;
  opacity: 0.55;
}

.motif-approach {
  right: 0;
  top: 0.5rem;
  width: 120px;
  opacity: 0.55;
}

.motif-lab {
  width: 100%;
  height: auto;
  animation: motifSpin 28s linear infinite;
}

.approach,
.work {
  position: relative;
}

.motif-work {
  right: 0;
  top: -0.25rem;
  width: min(220px, 40vw);
  height: 120px;
}

.motif-bot-mini {
  position: absolute;
  right: 0;
  top: 0;
  width: 72px;
  opacity: 0.55;
}

.motif-circuit-work {
  position: absolute;
  right: 70px;
  top: 28px;
  width: 140px;
  opacity: 0.5;
}

.motif-research {
  position: absolute;
  right: clamp(0.5rem, 3vw, 1.5rem);
  top: clamp(0.5rem, 2vw, 1.25rem);
  width: min(200px, 36vw);
  opacity: 0.7;
}

.motif-ethics-duo {
  width: 100%;
  height: auto;
}

@keyframes motifFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}

@keyframes motifSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

  .approach-track,
  .work-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-pulse,
  .motif-hero,
  .motif-approach,
  .motif-work {
    display: none;
  }

  .motif-research {
    opacity: 0.35;
    width: 110px;
  }

  .brand-icon {
    height: 24px;
  }

  .hero-logo {
    width: min(360px, 88vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb,
  .hero-pulse span,
  .hero-copy,
  .motif-robot,
  .motif-shield,
  .motif-lab {
    animation: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
