/* ============================================================
   Microplastic Sensor — professional light theme
   ============================================================ */
:root {
  --bg: #ffffff;
  --bg-tint: #f2f7fb;
  --ink: #122536;
  --ink-soft: #46586a;
  --ink-faint: #7b8a98;
  --line: #e3ebf2;
  --brand: #1877bf;
  --brand-deep: #115c91;
  --brand-ink: #0c4369;
  --accent: #39bcd6;
  --dark: #0a2236;
  --dark-2: #0e2d47;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(12, 35, 54, .05), 0 4px 16px rgba(12, 35, 54, .05);
  --shadow-md: 0 10px 40px rgba(12, 35, 54, .09);
  --maxw: 1160px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--font);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; letter-spacing: -.02em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  font-family: var(--display); font-weight: 600; font-size: .98rem;
  padding: .85em 1.5em; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn--sm { padding: .55em 1.1em; font-size: .86rem; }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(24, 119, 191, .3); }
.btn--primary:hover { background: var(--brand-deep); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(24, 119, 191, .38); }
.btn--ghost { background: transparent; color: var(--brand-ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand-deep); transform: translateY(-2px); }
.btn--ghost-light { background: rgba(255, 255, 255, .08); color: #eafafa; border-color: rgba(255, 255, 255, .22); }
.btn--ghost-light:hover { background: rgba(255, 255, 255, .16); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.nav.is-scrolled { border-color: var(--line); box-shadow: 0 2px 20px rgba(12, 35, 54, .05); }
.nav__inner {
  max-width: var(--maxw); margin-inline: auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__logo { height: 42px; width: auto; display: block; }
.nav__links { display: flex; gap: 26px; margin-left: auto; font-weight: 500; font-size: .95rem; }
.nav__links a { color: var(--ink-soft); position: relative; padding: 4px 0; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--brand); transition: width .25s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { width: 100%; }
.nav .btn--primary { margin-left: 8px; }
.nav__toggle { display: none; background: none; border: 0; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .3s var(--ease); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 92px 0 80px; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.blob--1 { width: 520px; height: 520px; background: radial-gradient(circle, #7defe6, transparent 70%); top: -160px; right: -120px; }
.blob--2 { width: 460px; height: 460px; background: radial-gradient(circle, #bfe9ff, transparent 70%); bottom: -180px; left: -140px; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, #000 20%, transparent 75%);
  opacity: .6;
}
.hero__inner {
  position: relative; z-index: 1; max-width: 960px; margin-inline: auto; padding-inline: 24px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero__copy { text-align: center; }
.eyebrow {
  display: inline-block; font-family: var(--display); font-weight: 600; font-size: .82rem;
  letter-spacing: .04em; text-transform: uppercase; color: var(--brand-ink);
  background: rgba(24, 119, 191, .1); border: 1px solid rgba(24, 119, 191, .22);
  padding: .5em 1.1em; border-radius: 999px; margin-bottom: 26px;
}
.hero__title { font-size: clamp(2.2rem, 5.6vw, 4rem); font-weight: 700; margin-bottom: 24px; }
.grad {
  display: block;
  background: linear-gradient(100deg, var(--brand-deep) 0%, var(--brand) 45%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.hero__lede { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--ink-soft); max-width: 680px; margin: 0 auto 34px; }
.hero__lede strong { color: var(--ink); font-weight: 600; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.hero__visual { position: relative; display: grid; place-items: center; margin-top: 48px; }
.hero__device {
  max-height: 400px; width: auto;
  filter: drop-shadow(0 30px 50px rgba(12, 35, 54, .22));
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.hero__stats {
  position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-top: 64px;
}
.stat {
  background: rgba(255, 255, 255, .7); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 12px; box-shadow: var(--shadow-sm); backdrop-filter: blur(6px);
}
.stat__num { display: block; font-family: var(--display); font-weight: 700; font-size: 1.9rem; color: var(--brand-ink); line-height: 1; }
.stat__num small { font-size: .95rem; color: var(--ink-faint); font-weight: 600; }
.stat__label { display: block; margin-top: 8px; font-size: .82rem; color: var(--ink-faint); letter-spacing: .01em; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section--tint { background: var(--bg-tint); border-block: 1px solid var(--line); }
.section__head { max-width: 760px; margin-bottom: 52px; }
.section__head--light h2, .section__head--light .section__sub { color: #eafafa; }
.kicker {
  display: inline-block; font-family: var(--display); font-weight: 600; font-size: .8rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px;
}
.section__head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; margin-bottom: 14px; }
.section__sub { color: var(--ink-soft); font-size: 1.08rem; }

/* ---------- Abstract ---------- */
.abstract { max-width: 820px; }
.abstract p { font-size: 1.1rem; color: var(--ink-soft); margin-bottom: 20px; }
.abstract strong { color: var(--ink); font-weight: 600; }
.keywords { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.keywords li {
  font-size: .85rem; font-weight: 500; color: var(--brand-ink);
  background: rgba(24, 119, 191, .09); border: 1px solid rgba(24, 119, 191, .18);
  padding: .45em 1em; border-radius: 999px;
}

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: rgba(24, 119, 191, .35); }
.card__icon {
  width: 50px; height: 50px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(24, 119, 191, .12), rgba(57, 188, 214, .16));
  border-radius: 14px; margin-bottom: 18px; color: var(--brand-deep);
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: .96rem; }

/* ---------- Pipeline ---------- */
.pipeline { display: flex; align-items: stretch; gap: 10px; margin-bottom: 56px; flex-wrap: wrap; }
.pnode {
  flex: 1 1 260px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.pnode::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.pnode__num { font-family: var(--display); font-weight: 700; font-size: 1.6rem; color: rgba(24, 119, 191, .3); }
.pnode h3 { font-size: 1.12rem; margin: 6px 0 10px; }
.pnode p { color: var(--ink-soft); font-size: .94rem; }
.pnode__arrow { display: flex; align-items: center; color: var(--brand); font-size: 1.6rem; font-weight: 700; }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
.split__text h3 { font-size: 1.5rem; margin-bottom: 16px; }
.split__text p { color: var(--ink-soft); margin-bottom: 16px; }
.split__text strong { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.chips span {
  font-size: .82rem; font-weight: 500; color: var(--ink-soft);
  background: var(--bg-tint); border: 1px solid var(--line); padding: .4em .9em; border-radius: 8px;
}
.split__panel { }
.spec { background: var(--dark); color: #d6efee; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-md); }
.spec h4 { color: #fff; font-size: 1.05rem; margin-bottom: 18px; letter-spacing: .02em; }
.spec ul { list-style: none; display: grid; gap: 14px; }
.spec li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: baseline; font-size: .92rem; border-bottom: 1px solid rgba(255, 255, 255, .08); padding-bottom: 12px; }
.spec li:last-child { border-bottom: 0; padding-bottom: 0; }
.spec b { color: var(--accent); font-weight: 600; font-family: var(--display); }
.spec span { color: #a9c9c8; }

/* ---------- Steps ---------- */
.steps { list-style: none; display: grid; gap: 18px; counter-reset: step; max-width: 880px; }
.step {
  display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 28px; box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.step:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.step__n {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px;
  font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
}
.step h3 { font-size: 1.15rem; margin-bottom: 6px; }
.step p { color: var(--ink-soft); font-size: .96rem; }

/* ---------- Results ---------- */
.results { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 40px; }
.result {
  background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm); padding: 26px 28px; box-shadow: var(--shadow-sm);
}
.result h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--brand-ink); }
.result p { color: var(--ink-soft); font-size: .96rem; }
.quote {
  font-family: var(--display); font-size: clamp(1.2rem, 2.4vw, 1.6rem); font-weight: 500;
  line-height: 1.4; color: var(--ink); max-width: 860px; margin-top: 20px;
  padding-left: 26px; border-left: 4px solid var(--brand);
}

/* ---------- Paper (dark) ---------- */
.section--dark { background: radial-gradient(ellipse at top, var(--dark-2), var(--dark)); color: #d6efee; }
.paper {
  background: #0a2523; border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); max-width: 920px; margin-inline: auto;
}
.paper__toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px 22px; background: rgba(255, 255, 255, .04); border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.paper__file { font-family: var(--display); font-weight: 500; color: #cdeceb; font-size: .92rem; }
.paper__actions { display: flex; gap: 10px; }
.paper__frame { position: relative; height: 78vh; min-height: 520px; background: #f1f5f5; }
.paper__frame iframe { position: relative; z-index: 1; width: 100%; height: 100%; border: 0; }
.paper__fallback {
  position: absolute; inset: 0; z-index: 0; display: grid; place-content: center; gap: 16px; text-align: center;
  color: var(--ink-soft);
}

/* ---------- Team ---------- */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.member {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; text-align: center; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.member:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.member__avatar {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: #fff; letter-spacing: .02em;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  box-shadow: 0 6px 18px rgba(24, 119, 191, .3);
}
.member h3 { font-size: 1.1rem; margin-bottom: 4px; }
.member p { color: var(--ink-faint); font-size: .9rem; }

/* ---------- References ---------- */
.refs { max-width: 900px; padding-left: 20px; display: grid; gap: 12px; }
.refs li { color: var(--ink-soft); font-size: .94rem; line-height: 1.55; padding-left: 6px; }
.refs em { color: var(--ink); font-style: italic; }

/* ---------- Footer ---------- */
.footer { background: var(--dark); color: #bcdbda; padding-top: 56px; }
.footer__inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 36px; }
.brand--footer { color: #fff; margin-bottom: 14px; }
.footer__note { max-width: 420px; font-size: .92rem; color: #8fb4b2; }
.footer__links { display: grid; gap: 10px; align-content: start; font-size: .95rem; }
.footer__links a { color: #bcdbda; transition: color .2s var(--ease); }
.footer__links a:hover { color: var(--accent); }
.footer__bar {
  border-top: 1px solid rgba(255, 255, 255, .08); padding: 20px 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  max-width: var(--maxw); margin-inline: auto; width: 100%;
  font-size: .85rem; color: #7ba3a1;
}

/* ---------- Figures ---------- */
.figure { margin: 44px auto 0; max-width: 960px; text-align: center; }
.figure img {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow-md); padding: 10px;
}
.figure figcaption { margin-top: 16px; font-size: .9rem; color: var(--ink-faint); max-width: 760px; margin-inline: auto; }
.figure--inset { margin: 0; }
.figure--inset img { box-shadow: var(--shadow-sm); padding: 6px; }
.figure--inset figcaption { margin-top: 10px; font-size: .84rem; }

/* ---------- Detection showcase ---------- */
.showcase { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.showcase__app { display: grid; place-items: center; }
.showcase__app img {
  max-height: 520px; width: auto;
  filter: drop-shadow(0 24px 44px rgba(12, 35, 54, .2));
}
.showcase__grid { display: grid; gap: 24px; }

/* ---------- Graphs ---------- */
.graphs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 40px; }
.graph {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.graph:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.graph img { width: 100%; border-radius: var(--radius-sm); background: #fff; }
.graph figcaption { margin-top: 16px; font-size: .92rem; color: var(--ink-soft); line-height: 1.55; }
.graph figcaption b { color: var(--brand-ink); font-family: var(--display); font-weight: 600; }

/* ---------- Footer logo ---------- */
.footer__logo { height: 56px; width: auto; margin-bottom: 16px; filter: brightness(0) invert(1); opacity: .95; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .team { grid-template-columns: repeat(2, 1fr); }
  .pnode__arrow { transform: rotate(90deg); margin: -4px auto; }
  .pipeline { flex-direction: column; }
  .hero__inner { grid-template-columns: 1fr; text-align: center; gap: 36px; }
  .hero__copy { text-align: center; }
  .hero__lede { margin-inline: auto; }
  .hero__cta { justify-content: center; }
  .hero__device { max-height: 340px; }
  .showcase { grid-template-columns: 1fr; gap: 28px; }
  .showcase__app img { max-height: 420px; }
  .graphs { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav__links, .nav .btn--primary { display: none; }
  .nav__links.is-open {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 20px 24px; gap: 16px;
    box-shadow: var(--shadow-md);
  }
  .nav__toggle { display: flex; margin-left: auto; }
  .nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .results { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}
@media (max-width: 480px) {
  .cards, .team { grid-template-columns: 1fr; }
  .spec li { grid-template-columns: 1fr; gap: 2px; }
  .paper__frame { height: 65vh; }
}
