/* ============================================================
   AmsoStat - main stylesheet
   ============================================================ */
:root {
  --navy: #0B2540;
  --navy-2: #0E2E50;
  --ink: #07182B;
  --teal: #0FB5AE;
  --teal-600: #0C9690;
  --teal-050: #E7F7F5;
  --blue: #2D7FF9;

  --bg: #FFFFFF;
  --alt: #F3F8FC;
  --surface: #FFFFFF;
  --text: #10233A;
  --muted: #53657C;
  --muted-light: #A9BBD0;
  --border: #E5ECF4;
  --border-2: #D7E1EC;

  --shadow-sm: 0 1px 2px rgba(16, 35, 58, .06), 0 2px 6px rgba(16, 35, 58, .05);
  --shadow-md: 0 8px 24px rgba(16, 35, 58, .09);
  --shadow-lg: 0 28px 64px rgba(7, 24, 43, .22);

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --pill: 999px;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", var(--font-body);

  --maxw: 1160px;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; color: var(--navy); font-weight: 700; letter-spacing: -0.01em; }
ul { list-style: none; padding: 0; }

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

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 200;
  background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: var(--r-sm);
  transition: top .2s ease; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; line-height: 1;
  padding: .85rem 1.5rem; border-radius: var(--pill);
  border: 1.6px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: .58rem 1.05rem; font-size: .92rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy-2); box-shadow: var(--shadow-md); }

.btn-outline { background: var(--surface); color: var(--navy); border-color: var(--border-2); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal-600); }

.btn-ghost { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .42); }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); border-color: #fff; }

/* bright CTA on dark backgrounds */
.hero .btn-primary, .section--contact .btn-primary {
  background: var(--teal); color: #06231F; box-shadow: 0 10px 30px rgba(15, 181, 174, .35);
}
.hero .btn-primary:hover, .section--contact .btn-primary:hover { background: #1AC6BE; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--navy); letter-spacing: -0.02em; }
.brand-name span { color: var(--teal); }

.nav { display: flex; align-items: center; }
.nav-menu { display: flex; align-items: center; gap: .4rem; }
.nav-menu > li > a:not(.btn) {
  display: inline-block; padding: .5rem .8rem; border-radius: var(--r-sm);
  color: var(--muted); font-weight: 500; font-size: .98rem; text-decoration: none;
  transition: color .15s ease, background .15s ease;
}
.nav-menu > li > a:not(.btn):hover { color: var(--navy); background: var(--alt); }
.nav-cta { margin-left: .4rem; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px;
  align-items: center; justify-content: center; background: none; border: 0; cursor: pointer;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(1100px 480px at 82% -8%, rgba(15, 181, 174, .26), transparent 58%),
    radial-gradient(800px 500px at 0% 110%, rgba(45, 127, 249, .16), transparent 60%),
    linear-gradient(158deg, #0A2240 0%, #0B2540 42%, #08203A 100%);
  color: #fff;
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(4rem, 9vw, 7rem);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent 85%);
  mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent 85%);
}
.hero-glow { position: absolute; width: 420px; height: 420px; right: -60px; top: -80px; z-index: -1;
  background: radial-gradient(circle, rgba(15, 181, 174, .4), transparent 65%); filter: blur(20px); }
.hero-inner { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }

.eyebrow { font-family: var(--font-display); font-weight: 600; font-size: .82rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 1rem; }
.eyebrow--dark { color: var(--teal-600); }

.hero h1 { font-size: clamp(2.15rem, 4.6vw, 3.5rem); color: #fff; margin-bottom: 1.1rem; }
.hero-sub { font-size: clamp(1.02rem, 1.7vw, 1.2rem); color: #C3D2E4; max-width: 36ch; margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2.4rem; }

.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem 1.6rem; max-width: 460px; }
.hero-stats li { display: flex; flex-direction: column; gap: .15rem; border-left: 2px solid rgba(15, 181, 174, .55); padding-left: .9rem; }
.hero-stats strong { font-family: var(--font-display); font-size: 1.5rem; color: #fff; line-height: 1; }
.hero-stats span { font-size: .85rem; color: #9DB1C9; }

/* hero chart panels */
.hero-visual { position: relative; }
.chart-panel { background: #fff; border-radius: var(--r); box-shadow: var(--shadow-lg); padding: .85rem .85rem .6rem; }
.chart-panel img { width: 100%; height: auto; border-radius: 8px; }
.chart-panel-head { display: flex; align-items: center; gap: .5rem; padding: .15rem .35rem .65rem;
  font-weight: 600; font-size: .82rem; color: var(--muted); }
.chart-panel-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.chip { margin-left: auto; background: var(--teal-050); color: var(--teal-600); border-radius: var(--pill);
  padding: .18rem .6rem; font-size: .72rem; font-weight: 700; }
.chip--coral { background: #FDECEF; color: #E14668; }
.chart-panel--main { position: relative; z-index: 2; }
.chart-panel--float { margin-top: 1rem; }

/* ---------- proof bar ---------- */
.proofbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.proofbar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; padding-block: 1.6rem; }
.proofbar-label { font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.proofbar-logos { display: flex; flex-wrap: wrap; gap: 1.4rem 2rem; margin-left: auto; }
.proofbar-logos li { display: flex; flex-direction: column; line-height: 1.2; color: var(--navy); }
.proofbar-logos em { font-style: normal; font-family: var(--font-display); font-weight: 600; font-size: .98rem; }
.proofbar-logos span { font-size: .76rem; color: var(--muted); }

/* ---------- sections ---------- */
.section { padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.section--alt { background: var(--alt); }
.section-head { max-width: 660px; margin-bottom: clamp(2.2rem, 4vw, 3.2rem); }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.55rem); margin-bottom: .9rem; }
.section-lead { color: var(--muted); font-size: 1.08rem; }
.section-lead strong { color: var(--navy); }

/* ---------- grids ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); }

.service-card { padding: 1.7rem; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #CFE7E5; }
.service-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  border-radius: 12px; background: var(--teal-050); color: var(--teal-600); margin-bottom: 1.1rem; }
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 { font-size: 1.2rem; margin-bottom: .55rem; }
.service-card p { color: var(--muted); font-size: .99rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.1rem; }
.tags li { font-size: .76rem; font-weight: 600; color: var(--navy); background: var(--alt);
  border: 1px solid var(--border); border-radius: var(--pill); padding: .28rem .7rem; }

/* ---------- work / sample charts ---------- */
.work-card { position: relative; overflow: hidden; padding: .9rem .9rem 1.4rem;
  transition: transform .2s ease, box-shadow .2s ease; }
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.work-badge { display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted); background: var(--alt); border: 1px solid var(--border);
  padding: .2rem .6rem; border-radius: var(--pill); margin-bottom: .55rem; }
.work-frame { background: linear-gradient(180deg, #FBFDFE, #F4F8FC); border: 1px solid var(--border);
  border-radius: 14px; padding: .9rem; margin-bottom: 1.1rem; }
.work-frame img { width: 100%; height: auto; }
.work-card figcaption { padding-inline: .6rem; }
.work-card h3 { font-size: 1.08rem; margin-bottom: .3rem; }
.work-card p { color: var(--muted); font-size: .93rem; margin-bottom: .7rem; }
.tag-inline { font-size: .76rem; font-weight: 600; color: var(--teal-600); }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.about-media { position: relative; max-width: 210px; margin-inline: auto; }
.about-photo { width: 100%; height: auto; border-radius: var(--r-lg); box-shadow: var(--shadow-md);
  border: 1px solid var(--border); aspect-ratio: 1; object-fit: cover; }
.about-badge { position: absolute; left: -8px; bottom: -14px; background: #fff; border: 1px solid var(--border);
  box-shadow: var(--shadow-md); border-radius: var(--r-sm); padding: .5rem .85rem; display: flex; flex-direction: column; }
.about-badge strong { font-family: var(--font-display); color: var(--navy); font-size: .96rem; }
.about-badge span { font-size: .76rem; color: var(--teal-600); font-weight: 600; }
.about-copy h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 1rem; }
.about-copy p { color: var(--muted); margin-bottom: 1rem; }
.cred-list { display: grid; gap: .55rem; margin: 1.4rem 0 1.8rem; }
.cred-list li { position: relative; padding-left: 1.7rem; color: var(--text); font-size: .98rem; }
.cred-list li::before { content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 16px;
  background: var(--teal-050); border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--teal); }
.cred-list li::after { content: ""; position: absolute; left: 5px; top: calc(.45em + 4px); width: 6px; height: 6px;
  background: var(--teal); border-radius: 50%; }
.about-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- process ---------- */
.process-grid { list-style: none; }
.process-card { padding: 1.7rem; position: relative; }
.process-num { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--teal-600);
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  border-radius: 12px; background: var(--teal-050); margin-bottom: 1rem; }
.process-card h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.process-card p { color: var(--muted); font-size: .96rem; }

/* ---------- publications ---------- */
.pub-list { display: grid; gap: 1rem; }
.pub-item { display: grid; grid-template-columns: 1fr; gap: .6rem 1.6rem; background: var(--surface);
  border: 1px solid var(--border); border-left: 4px solid var(--teal); border-radius: var(--r);
  padding: 1.5rem 1.7rem; box-shadow: var(--shadow-sm); }
.pub-venue { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.pub-venue em { font-style: normal; font-family: var(--font-display); font-weight: 600; color: var(--navy); }
.pub-venue span { font-size: .82rem; color: var(--muted); font-weight: 600; }
.pub-body h3 { font-size: 1.12rem; margin-bottom: .35rem; line-height: 1.3; }
.pub-body p { color: var(--muted); font-size: .96rem; margin-bottom: .6rem; }
.pub-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; color: var(--teal-600);
  text-decoration: none; font-size: .95rem; }
.pub-link:hover { color: var(--navy); }

/* ---------- testimonials ---------- */
.testi-deck { position: relative; margin-bottom: 1.6rem; }
.testi-track { display: flex; gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px 2px 10px; }
.testi-track::-webkit-scrollbar { display: none; }
.testi-card { flex: 0 0 100%; scroll-snap-align: start; display: flex; flex-direction: column; gap: 1rem; margin: 0;
  background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--teal);
  border-radius: var(--r-lg); padding: 1.9rem; box-shadow: var(--shadow-sm); }
.testi-quote-mark { color: var(--teal); opacity: .8; flex: none; }
.testi-card blockquote { margin: 0; }
.testi-card blockquote p { color: var(--text); font-size: .98rem; }
/* clamp long reviews until expanded */
.testi-card.is-clamped blockquote p {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7; line-clamp: 7;
  overflow: hidden;
}
.testi-card.is-expanded blockquote p {
  -webkit-line-clamp: unset; line-clamp: unset; display: block; overflow: visible;
}
.testi-more {
  align-self: flex-start; display: inline-flex; align-items: center; gap: .35rem;
  margin-top: -.2rem; background: none; border: 0; padding: .1rem 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: .92rem; color: var(--teal-600);
  transition: color .15s ease;
}
.testi-more:hover { color: var(--navy); }
.testi-more .tm-chev { width: 15px; height: 15px; transition: transform .2s ease; }
.testi-card.is-expanded .testi-more .tm-chev { transform: rotate(180deg); }
.testi-card sup { color: var(--teal-600); font-weight: 700; }
.testi-refs { border-top: 1px dashed var(--border-2); padding-top: .85rem; font-size: .82rem; color: var(--muted); }
.testi-refs summary { cursor: pointer; font-weight: 600; color: var(--teal-600); }
.testi-refs summary:hover { color: var(--navy); }
.testi-refs ol { list-style: decimal; padding-left: 1.2rem; margin-top: .55rem; display: grid; gap: .45rem; }
.testi-refs a { color: var(--teal-600); word-break: break-word; }
.testi-person { display: flex; align-items: center; gap: .9rem; margin-top: auto;
  border-top: 1px solid var(--border); padding-top: 1.1rem; }
.testi-avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--navy), var(--teal-600)); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: .95rem; letter-spacing: .03em; }
.testi-person strong { display: block; color: var(--navy); font-family: var(--font-display); line-height: 1.3; }
.testi-role { display: block; color: var(--muted); font-size: .87rem; line-height: 1.4; }
.testi-person time { display: block; color: var(--muted-light); font-size: .8rem; margin-top: .15rem; }

.testi-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.6rem;
  background: var(--alt); border: 1.5px dashed var(--border-2); border-radius: var(--r-lg); padding: 1.5rem 1.8rem; }
.testi-cta h3 { font-size: 1.18rem; margin-bottom: .2rem; }
.testi-cta p { color: var(--muted); font-size: .95rem; max-width: 52ch; }
.testi-cta .btn { flex: none; }

.review-tips { background: var(--alt); border: 1px solid var(--border); border-left: 3px solid var(--teal);
  border-radius: var(--r-sm); padding: 1rem 1.2rem; margin-bottom: 1.3rem; }
.review-tips h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--teal-600); margin-bottom: .5rem; }
.review-tips ul { list-style: disc; padding-left: 1.1rem; display: grid; gap: .35rem; color: var(--text); font-size: .93rem; }
.review-note { color: var(--muted); font-size: .84rem; }

.testi-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--navy); border: 1px solid var(--border-2);
  box-shadow: var(--shadow-md); cursor: pointer;
  transition: background .15s ease, color .15s ease, opacity .15s ease; }
.testi-arrow:hover:not(:disabled) { background: var(--navy); color: #fff; border-color: var(--navy); }
.testi-arrow:disabled { opacity: .35; cursor: default; }
.testi-arrow[hidden] { display: none; }
.testi-arrow--prev { left: -10px; }
.testi-arrow--next { right: -10px; }

/* up to 2 cards per view on tablet, 3 on desktop; fewer cards stretch to fill */
@media (min-width: 700px) {
  .testi-card { flex-basis: calc((100% - 1.5rem) / 2); }
  .testi-card:first-child:nth-last-child(1) { flex-basis: 100%; }
}
@media (min-width: 1000px) {
  .testi-card { flex-basis: calc((100% - 3rem) / 3); }
  .testi-card:first-child:nth-last-child(1) { flex-basis: 100%; }
  .testi-card:first-child:nth-last-child(2),
  .testi-card:first-child:nth-last-child(2) ~ .testi-card { flex-basis: calc((100% - 1.5rem) / 2); }
}

/* ---------- FAQ (search-facing accordion) ---------- */
.faq-list { display: grid; gap: .8rem; max-width: 900px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  padding: 1.15rem 1.4rem; box-shadow: var(--shadow-sm); }
.faq-item > summary.disclosure { display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; width: 100%; font-family: var(--font-display); font-size: 1.05rem; color: var(--navy); }
.faq-item > summary.disclosure .chev { margin-top: .28em; }
.faq-item[open] > summary.disclosure { margin-bottom: .7rem; }
.faq-item > p { color: var(--muted); font-size: .99rem; }

/* ---------- contact ---------- */
.section--contact {
  background:
    radial-gradient(900px 420px at 88% -10%, rgba(15, 181, 174, .22), transparent 60%),
    linear-gradient(165deg, #0B2540, #08203A);
  color: #fff;
}
.section--contact .section-head h2 { color: #fff; }
.section-lead--light { color: #B8C8DC; }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
.contact-side { display: grid; gap: 1.5rem; }

.form-card { padding: 1.8rem; color: var(--text); }
.form-card h3 { font-size: 1.22rem; margin-bottom: .35rem; }
.form-intro { color: var(--muted); font-size: .96rem; margin-bottom: 1.3rem; }
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.field label, .field legend { font-weight: 600; font-size: .9rem; color: var(--navy); }
.field .req { color: var(--teal-600); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--text);
  padding: .72rem .85rem; border: 1.5px solid var(--border-2); border-radius: var(--r-sm);
  background: #fff; width: 100%; transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15, 181, 174, .16);
}
.field input:user-invalid, .field textarea:user-invalid { border-color: #E5708A; }
fieldset.field { border: 0; padding: 0; }
.checks { display: grid; gap: .5rem; margin-top: .2rem; }
.checks label { display: flex; align-items: flex-start; gap: .6rem; font-weight: 500; font-size: .94rem;
  color: var(--text); cursor: pointer; }
.checks input { width: 18px; height: 18px; flex: none; margin-top: .12rem; accent-color: var(--teal-600); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-status { font-size: .92rem; font-weight: 600; margin: 0; min-height: 1px; }
.form-status.is-success { color: var(--teal-600); }
.form-status.is-error { color: #D6456A; }
.form-status.is-pending { color: var(--muted); }

.form-card--callback { background: #fff; }
.contact-direct { padding: 1.6rem 1.8rem; }
.contact-direct h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.contact-line { display: flex; align-items: center; gap: .7rem; padding: .5rem 0; color: var(--navy);
  font-weight: 600; text-decoration: none; word-break: break-word; }
.contact-line svg { color: var(--teal-600); flex: none; }
.contact-line:hover { color: var(--teal-600); }
.contact-loc { color: var(--muted); font-size: .88rem; margin-top: .7rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #C3D2E4; padding-block: 3rem 1.8rem; }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 2.2rem; padding-bottom: 2.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, .1); }
.footer-brand p { color: #92A6BE; font-size: .95rem; margin-top: .9rem; max-width: 38ch; }
.brand--footer .brand-name { color: #fff; }
.brand--footer .brand-name span { color: var(--teal); }
.brand--footer .brand-mark { background: rgba(15, 181, 174, .12); }
.footer-nav, .footer-contact { display: flex; flex-direction: column; gap: .55rem; }
.footer-nav h4, .footer-contact h4 { color: #fff; font-size: .82rem; text-transform: uppercase;
  letter-spacing: .08em; margin-bottom: .4rem; }
.footer-nav a, .footer-contact a, .footer-contact span { color: #A8BAD0; text-decoration: none; font-size: .95rem; }
.footer-nav a:hover, .footer-contact a:hover { color: var(--teal); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; padding-top: 1.6rem; }
.footer-bottom p { font-size: .84rem; color: #7E92AB; }
.footer-note { max-width: 52ch; }

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

/* ============================================================
   responsive
   ============================================================ */
@media (min-width: 600px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .pub-item { grid-template-columns: 200px 1fr; align-items: start; }
}
@media (min-width: 720px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .about-grid { grid-template-columns: 210px 1fr; align-items: start; }
}
@media (min-width: 980px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .hero-inner { grid-template-columns: 1.05fr .95fr; }
  .contact-grid { grid-template-columns: 1.25fr 1fr; }
  /* overlapping hero chart panels */
  .chart-panel--float { position: absolute; right: -22px; bottom: -52px; width: 60%; margin-top: 0; z-index: 3; }
  .hero-visual { padding-bottom: 1rem; }
}
@media (min-width: 760px) {
  .footer-inner { grid-template-columns: 1.6fr 1fr 1fr; }
}

/* the horizontal nav carries 8 links + CTA; tighten it before it can outgrow the header */
@media (min-width: 1025px) and (max-width: 1240px) {
  .nav-menu { gap: .1rem; }
  .nav-menu > li > a:not(.btn) { padding: .5rem .52rem; font-size: .92rem; }
  .nav-cta { margin-left: .25rem; }
  .nav-cta .btn { padding: .5rem .9rem; font-size: .87rem; }
}

@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column;
    align-items: stretch; gap: .2rem; background: #fff; padding: 1rem 1.4rem 1.3rem;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md);
  }
  .nav-menu.open { display: flex; }
  .nav-menu > li > a:not(.btn) { display: block; padding: .7rem .6rem; }
  .nav-cta { margin: .5rem 0 0; }
  .nav-cta .btn { width: 100%; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr 1fr; gap: .9rem 1rem; }
  .hero-stats strong { font-size: 1.3rem; }
  .proofbar-logos { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .service-card:hover, .work-card:hover { transform: none; }
}

/* ============================================================
   portfolio components (v2)
   ============================================================ */

/* ---------- hero availability + role tags ---------- */
.hero-avail { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1.1rem;
  background: rgba(15, 181, 174, .14); border: 1px solid rgba(15, 181, 174, .4);
  color: #C9F3EF; font-size: .82rem; font-weight: 600; padding: .35rem .8rem; border-radius: var(--pill); }
.hero-avail .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 0 0 rgba(15, 181, 174, .7); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(15, 181, 174, 0); } 100% { box-shadow: 0 0 0 0 rgba(15, 181, 174, 0); } }

/* ---------- reusable stat band ---------- */
.stat-band { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem 1rem;
  padding: 1.4rem 1.6rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm); margin-bottom: 2rem; }
.stat-band li { border-left: 2px solid var(--teal); padding-left: .9rem; }
.stat-band strong { display: block; font-family: var(--font-display); font-size: 1.55rem; color: var(--navy); line-height: 1.05; }
.stat-band span { font-size: .84rem; color: var(--muted); }

/* ---------- experience timeline ---------- */
.exp-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.timeline { position: relative; display: grid; gap: 1.7rem; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--teal), var(--border-2)); }
.tl-item { position: relative; padding-left: 2.3rem; }
.tl-item::before { content: ""; position: absolute; left: 1px; top: 4px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; border: 3px solid var(--teal-600); box-shadow: 0 0 0 4px var(--bg); }
.tl-item--now::before { background: var(--teal); }
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .6rem; }
.tl-role { font-family: var(--font-display); font-weight: 700; color: var(--navy); font-size: 1.12rem; }
.tl-org { color: var(--teal-600); font-weight: 600; }
.tl-meta { margin-left: auto; font-size: .84rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tl-tag { display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--teal-600); background: var(--teal-050); border-radius: var(--pill); padding: .15rem .55rem; margin-top: .5rem; }
.tl-points { display: grid; gap: .45rem; margin-top: .7rem; }
.tl-points li { position: relative; padding-left: 1.15rem; color: var(--muted); font-size: .96rem; }
.tl-points li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px;
  border-radius: 50%; background: var(--teal); }
.tl-points li b { color: var(--text); font-weight: 600; }
.exp-side { display: grid; gap: 1.2rem; align-content: start; }
.exp-card { padding: 1.5rem 1.6rem; }
.exp-card h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.exp-card .exp-sub { color: var(--teal-600); font-weight: 600; font-size: .92rem; margin-bottom: .8rem; }
.exp-card ul { display: grid; gap: .4rem; }
.exp-card li { position: relative; padding-left: 1.1rem; font-size: .95rem; color: var(--muted); }
.exp-card li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.exp-card li b { color: var(--text); }

/* ---------- featured research: timing metrics ---------- */
.research-lead { display: grid; gap: 1.5rem; align-items: center; margin-bottom: 2.2rem; }
.research-lead-figure { background: linear-gradient(180deg, #FBFDFE, #F1F7FC); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 1rem; }
.research-lead-figure img { width: 100%; height: auto; }
.research-lead p { color: var(--muted); margin-bottom: 1rem; }
.metrics { display: grid; gap: 1.5rem; }
.metric { display: grid; gap: 1.3rem; align-items: center; padding: 1.3rem; }
.metric-figure { background: linear-gradient(180deg, #FBFDFE, #F1F7FC); border: 1px solid var(--border);
  border-radius: 14px; padding: .85rem; }
.metric-figure img { width: 100%; height: auto; }
.metric-tag { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--teal-600); background: var(--teal-050); padding: .25rem .7rem; border-radius: var(--pill); margin-bottom: .75rem; }
.metric-body h3 { font-size: 1.28rem; margin-bottom: .5rem; }
.metric-body p { color: var(--muted); font-size: .98rem; margin-bottom: .6rem; }
.metric-list { display: grid; gap: .45rem; margin-top: .7rem; }
.metric-list li { position: relative; padding-left: 1.35rem; font-size: .92rem; color: var(--text); }
.metric-list li::before { content: ""; position: absolute; left: 0; top: .45em; width: 8px; height: 8px;
  background: var(--teal); transform: rotate(45deg); border-radius: 2px; }
.cite { margin-top: 1.8rem; padding: 1.5rem 1.7rem; border-radius: var(--r);
  background: linear-gradient(160deg, #0B2540, #08203A); color: #C3D2E4; border-left: 4px solid var(--teal); }
.cite h4 { color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; margin-bottom: .6rem; }
.cite p { font-size: .95rem; color: #C3D2E4; margin-bottom: .55rem; }
.cite p b { color: #fff; font-weight: 600; }
.cite .cite-impact { color: #9DB1C9; font-size: .92rem; }
.cite a { color: var(--teal); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.cite a:hover { color: #fff; }

/* ---------- publications (enhanced) ---------- */
.pub-authors { font-size: .89rem; color: var(--muted); margin-bottom: .4rem; line-height: 1.5; }
.pub-authors b { color: var(--navy); font-weight: 700; }
.pub-badge { display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: .2rem .55rem; border-radius: var(--pill); margin-top: .15rem; align-self: flex-start; }
.pub-badge--journal { background: var(--teal-050); color: var(--teal-600); }
.pub-badge--abstract { background: #EAF1FF; color: #2563EB; }
.pub-badge--ack { background: var(--alt); color: var(--muted); border: 1px solid var(--border); }
.pub-badge--progress { background: #FEF4E6; color: #B7791F; }
.pub-impact { font-size: .92rem; color: var(--muted); border-left: 2px solid var(--border-2); padding-left: .75rem; margin-top: .6rem; }
.pub-note { color: var(--muted); font-size: .95rem; margin-top: 1.4rem; }
.pubs-more { margin-top: 1.3rem; }
.pubs-more > summary.disclosure { justify-content: center; width: 100%; padding: .85rem 1rem;
  border: 1px solid var(--border-2); border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-sm); }
.pubs-more > summary.disclosure:hover { border-color: var(--teal); color: var(--teal-600); }
.pubs-more[open] > summary.disclosure { margin-bottom: 1.3rem; }

/* ---------- expandable disclosures (native details/summary) ---------- */
summary.disclosure { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--font-display); font-weight: 600; font-size: .98rem; color: var(--navy);
  padding: .35rem 0; transition: color .15s ease; }
summary.disclosure::-webkit-details-marker { display: none; }
summary.disclosure:hover { color: var(--teal-600); }
summary.disclosure:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
summary.disclosure .chev { width: 16px; height: 16px; color: var(--teal-600); transition: transform .2s ease; flex: none; }
details[open] > summary.disclosure .chev { transform: rotate(180deg); }

/* ---------- about: beyond the work (collapsed by default) ---------- */
.about-more { margin-top: 1.5rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.about-more > summary.disclosure { font-size: 1.05rem; }
.life-sub { color: var(--muted); font-size: .92rem; margin: .5rem 0 0; }
.life-strip { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.1rem; }
.life-figure { margin: 0; display: flex; flex-direction: column; }
.life-frame { overflow: hidden; border-radius: 12px; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); align-self: flex-start; }
.life-frame img { height: 168px; width: auto; max-width: 100%; display: block; transition: transform .5s ease; }
.life-figure:hover .life-frame img { transform: scale(1.08); }
.life-figure figcaption { font-size: .8rem; color: var(--muted); margin-top: .45rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.chips li { font-size: .82rem; font-weight: 600; color: var(--navy); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--pill); padding: .35rem .8rem; }

/* ---------- experience: featured role + expandable detail ---------- */
.tl-item--featured::before { background: var(--teal); width: 18px; height: 18px; left: 0; top: 3px;
  box-shadow: 0 0 0 4px rgba(15, 181, 174, .16); }
.tl-details { margin-top: .5rem; }
.tl-details > summary.disclosure { font-size: .9rem; color: var(--teal-600); }
.tl-details[open] { margin-bottom: .2rem; }
.tl-details .tl-points { margin-top: .6rem; }

/* ---------- responsive (v2) ---------- */
@media (min-width: 760px) {
  .stat-band { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 760px) {
  .about-media { max-width: 168px; }
}
@media (max-width: 520px) {
  .life-frame img { height: 138px; }
}
@media (min-width: 900px) {
  .research-lead { grid-template-columns: 1.05fr .95fr; gap: 2.4rem; }
  .metric { grid-template-columns: 1.05fr .95fr; gap: 2rem; padding: 1.5rem; }
  .metric--rev .metric-figure { order: 2; }
}
@media (min-width: 980px) {
  .exp-grid { grid-template-columns: 1.35fr 1fr; gap: 3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-avail .pulse { animation: none; }
  .life-figure:hover .life-frame img { transform: none; }
}

/* ============================================================
   sample-analysis cards -> click-to-open detail modal
   ============================================================ */
.work-card { cursor: pointer; }
.work-card:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.work-frame { position: relative; }
.work-frame::after {
  content: ""; position: absolute; top: .6rem; right: .6rem; width: 34px; height: 34px; border-radius: 50%;
  background-color: rgba(255, 255, 255, .94); box-shadow: var(--shadow-sm);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B2540' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 17px;
  opacity: 0; transform: scale(.8); transition: opacity .2s ease, transform .2s ease; pointer-events: none;
}
.work-card:hover .work-frame::after,
.work-card:focus-visible .work-frame::after { opacity: 1; transform: scale(1); }

.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 1.2rem; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(7, 24, 43, .58);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; transition: opacity .28s ease; }
.modal-card { position: relative; z-index: 1; width: 100%; max-width: 760px; max-height: 88vh; overflow: auto;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(16px) scale(.985); transition: opacity .28s ease, transform .28s ease; }
.modal.is-open .modal-backdrop { opacity: 1; }
.modal.is-open .modal-card { opacity: 1; transform: none; }
.modal-close { position: absolute; top: .75rem; right: .75rem; z-index: 2; width: 40px; height: 40px; display: grid;
  place-items: center; border-radius: 50%; border: 1px solid var(--border); background: rgba(255, 255, 255, .92);
  color: var(--navy); cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.modal-close:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.modal-figure { background: linear-gradient(180deg, #FBFDFE, #EEF5FB); padding: clamp(1.1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--border); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.modal-figure img { width: 100%; height: auto; display: block; }
.modal-body { padding: clamp(1.3rem, 3vw, 1.9rem); }
.modal-tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--teal-600); background: var(--teal-050); padding: .25rem .7rem; border-radius: var(--pill); margin-bottom: .7rem; }
.modal-body h3 { font-size: clamp(1.3rem, 3vw, 1.6rem); margin-bottom: .7rem; }
.modal-desc { color: var(--muted); font-size: 1.02rem; margin-bottom: 1.2rem; }
.modal-example { background: var(--alt); border: 1px solid var(--border); border-left: 3px solid var(--teal);
  border-radius: var(--r); padding: 1.1rem 1.3rem; }
.modal-example h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--teal-600); margin-bottom: .45rem; }
.modal-example p { color: var(--text); font-size: .98rem; }
.modal-note { color: var(--muted-light); font-size: .82rem; margin-top: 1.1rem; }
body.modal-open { overflow: hidden; }

/* other / custom analyses bar */
.custom-bar { width: 100%; display: flex; align-items: center; gap: 1rem; text-align: left; cursor: pointer;
  margin-top: 1.6rem; padding: 1.05rem 1.3rem; background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--r); box-shadow: var(--shadow-sm); font-family: var(--font-body);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.custom-bar:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--teal); }
.custom-bar:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.custom-bar-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px;
  background: var(--teal-050); color: var(--teal-600); }
.custom-bar-icon svg { width: 22px; height: 22px; }
.custom-bar-text { display: flex; flex-direction: column; gap: .12rem; }
.custom-bar-text strong { font-family: var(--font-display); font-size: 1.1rem; color: var(--navy); }
.custom-bar-text span { font-size: .9rem; color: var(--muted); }
.custom-bar-arrow { margin-left: auto; flex: none; color: var(--teal-600); transition: transform .18s ease; }
.custom-bar:hover .custom-bar-arrow { transform: translateX(4px); }

/* wide modal + collage board */
.modal-card--wide { max-width: 1040px; }
.collage { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.5rem; }
.collage-item { margin: 0; }
.collage-frame { background: linear-gradient(180deg, #FBFDFE, #F1F7FC); border: 1px solid var(--border);
  border-radius: 12px; padding: .9rem; display: grid; place-items: center; }
.collage-frame img { width: 100%; height: auto; display: block; }
.collage-item figcaption { font-size: .84rem; color: var(--muted); margin-top: .5rem; font-weight: 500; }

@media (min-width: 680px) {
  .collage { grid-template-columns: 1fr 1fr; }
  .collage-item--wide { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .custom-bar-text span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .modal-backdrop, .modal-card, .work-frame::after, .custom-bar, .custom-bar-arrow { transition: none; }
}

/* ============================================================
   "alive" motion layer (v3)
   ============================================================ */

/* scroll progress bar */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 400;
  background: linear-gradient(90deg, var(--teal), var(--blue)); box-shadow: 0 0 10px rgba(15, 181, 174, .6);
  transition: width .1s linear; will-change: width; }

/* hero drifting aurora */
.hero-aurora { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero-aurora::before, .hero-aurora::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); }
.hero-aurora::before { width: 460px; height: 460px; top: -150px; left: 4%;
  background: radial-gradient(circle, rgba(15, 181, 174, .40), transparent 70%);
  animation: drift1 17s ease-in-out infinite alternate; }
.hero-aurora::after { width: 420px; height: 420px; bottom: -170px; right: 3%;
  background: radial-gradient(circle, rgba(45, 127, 249, .30), transparent 70%);
  animation: drift2 21s ease-in-out infinite alternate; }
@keyframes drift1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(70px, 46px) scale(1.16); } }
@keyframes drift2 { from { transform: translate(0, 0) scale(1); } to { transform: translate(-56px, -34px) scale(1.12); } }

/* hero live ECG trace */
.hero-ecg { position: absolute; left: 0; bottom: 6%; width: 200%; height: 132px; z-index: -1;
  pointer-events: none; opacity: .2; animation: ecg-scroll 9s linear infinite; }
.hero-ecg svg { width: 100%; height: 100%; display: block; }
.hero-ecg path { fill: none; stroke: var(--teal); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round;
  vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px rgba(15, 181, 174, .55)); }
@keyframes ecg-scroll { to { transform: translateX(-50%); } }

/* count-up stability */
.hero-stats strong { font-variant-numeric: tabular-nums; }

/* cursor spotlight on feature cards */
.service-card, .work-card { position: relative; overflow: hidden; }
.service-card::after, .work-card::after { content: ""; position: absolute; inset: 0; z-index: 0;
  pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, -20%), rgba(15, 181, 174, .16), transparent 60%); }
.service-card:hover::after, .work-card:hover::after { opacity: 1; }
.service-card > *, .work-card > * { position: relative; z-index: 1; }

/* hero visual 3D parallax */
.hero-visual { transition: transform .35s ease; transform-style: preserve-3d; will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .hero-aurora::before, .hero-aurora::after, .hero-ecg { animation: none; }
  .scroll-progress, .hero-visual { transition: none; }
}

/* ============================================================
   selected project (bar + modal content)
   ============================================================ */
.custom-bar--project { border-left: 3px solid var(--teal); }
.custom-bar-tag { display: inline-block; align-self: flex-start; font-size: .64rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--teal-600); background: var(--teal-050);
  border-radius: var(--pill); padding: .12rem .55rem; margin-bottom: .3rem; }

/* projects dropdown */
.projects-dd { margin-top: 1.6rem; }
.projects-dd-head { margin-top: 0; list-style: none; cursor: pointer; }
.projects-dd-head::-webkit-details-marker { display: none; }
.projects-dd-head:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.projects-dd-chev { margin-left: auto; flex: none; color: var(--teal-600); transition: transform .2s ease; }
.projects-dd[open] > .projects-dd-head { border-color: var(--teal); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.projects-dd[open] > .projects-dd-head .projects-dd-chev { transform: rotate(180deg); }
.projects-dd-list { display: grid; gap: .8rem; margin-top: .8rem; }
.projects-dd-list .custom-bar { margin-top: 0; }
.modal-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em;
  background: var(--teal-050); color: var(--teal-600); padding: .05em .38em; border-radius: 5px; }
.proj-body { color: var(--muted); font-size: .98rem; margin-bottom: .5rem; }
.proj-body + .metric-list, .proj-body + .proj-figs { margin-top: .9rem; }
.proj-section > .proj-figs:first-child, .proj-section > h4 + .proj-figs { margin-top: 0; }
.proj-figs .collage-item--wide { grid-column: 1 / -1; }
@media (prefers-reduced-motion: reduce) {
  .projects-dd-chev { transition: none; }
}

/* ============================================================
   AmsoStat Studio (section + launch window)
   ============================================================ */
.section--studio {
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(15, 181, 174, .2), transparent 60%),
    radial-gradient(700px 420px at 100% 115%, rgba(45, 127, 249, .14), transparent 60%),
    linear-gradient(160deg, #0A2240, #08203A);
  color: #fff;
}
.section--studio h2 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.7rem); margin-bottom: .9rem; }
.section--studio h2 span { color: var(--teal); }
.studio-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2.2rem, 5vw, 3.5rem); align-items: center; }
.studio-lead { font-family: var(--font-display); font-size: clamp(1.08rem, 1.9vw, 1.3rem); font-weight: 600;
  color: #C9F3EF; margin-bottom: 1rem; }
.studio-desc { color: #B8C8DC; font-size: 1.02rem; margin-bottom: 1.3rem; max-width: 52ch; }
.studio-points { display: grid; gap: .55rem; margin-bottom: 1.8rem; }
.studio-points li { position: relative; padding-left: 1.7rem; color: #C3D2E4; font-size: .97rem; }
.studio-points li::before { content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 16px;
  border-radius: 50%; box-shadow: inset 0 0 0 2px var(--teal); }
.studio-points li::after { content: ""; position: absolute; left: 5px; top: calc(.45em + 5px); width: 6px; height: 6px;
  background: var(--teal); border-radius: 50%; }
.section--studio .btn-primary { background: var(--teal); color: #06231F; box-shadow: 0 10px 30px rgba(15, 181, 174, .35); }
.section--studio .btn-primary:hover { background: #1AC6BE; }

.studio-thumb { position: relative; display: block; width: 100%; padding: 0; border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--r); overflow: hidden; cursor: pointer; background: #0A2036;
  box-shadow: var(--shadow-lg); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.studio-thumb:hover { transform: translateY(-4px); border-color: rgba(15, 181, 174, .6);
  box-shadow: 0 34px 70px rgba(4, 16, 30, .5); }
.studio-thumb:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.studio-thumb img { width: 100%; height: auto; display: block; }
.studio-thumb-overlay { position: absolute; inset: auto 0 0 0; display: flex; align-items: center; justify-content: center;
  gap: .6rem; padding: .9rem 1rem; font-family: var(--font-display); font-weight: 600; font-size: .98rem; color: #fff;
  background: linear-gradient(180deg, rgba(7, 24, 43, 0), rgba(7, 24, 43, .88) 55%); }
.studio-play { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--teal); color: #06231F; box-shadow: 0 6px 18px rgba(15, 181, 174, .45);
  transition: transform .2s ease; }
.studio-play svg { margin-left: 2px; }
.studio-thumb:hover .studio-play { transform: scale(1.12); }

.modal--studio { padding: clamp(.6rem, 2vw, 1.6rem); }
.modal-card--studio { max-width: 1400px; width: 100%; height: 92vh; height: 92dvh; max-height: none;
  overflow: hidden; display: flex; background: #07182B; }
.studio-frame { width: 100%; height: 100%; border: 0; display: block; background: #07182B; }
.modal-card--studio .modal-close { background: rgba(11, 37, 64, .9); color: #fff; border-color: rgba(255, 255, 255, .25); }
.modal-card--studio .modal-close:hover { background: var(--teal); color: #06231F; border-color: var(--teal); }

@media (min-width: 940px) {
  .studio-grid { grid-template-columns: .9fr 1.1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .studio-thumb, .studio-play { transition: none; }
  .studio-thumb:hover { transform: none; }
}

.proj-stats { margin: 1.5rem 0 0; }
.proj-section { margin-top: 1.9rem; }
.proj-section > h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--teal-600);
  margin-bottom: .9rem; }

.trials-list { display: grid; gap: .7rem; }
.trials-list li { display: grid; grid-template-columns: 1fr auto; gap: .15rem .9rem;
  padding: .85rem 1.1rem; background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--teal); border-radius: var(--r-sm); }
.trials-list .trial-area { grid-column: 1; font-size: .7rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted); }
.trials-list a { grid-column: 2; grid-row: 1 / span 2; align-self: center; white-space: nowrap;
  font-family: var(--font-display); font-weight: 700; font-size: .95rem; color: var(--navy); text-decoration: none; }
.trials-list a:hover { color: var(--teal-600); }
.trials-list p { grid-column: 1; color: var(--text); font-size: .96rem; }
.proj-note { color: var(--muted); font-size: .88rem; margin-top: .85rem; }

.steps { display: flex; flex-wrap: wrap; gap: .6rem; }
.steps li { display: flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 600; color: var(--navy);
  background: var(--alt); border: 1px solid var(--border); border-radius: var(--pill); padding: .4rem .95rem .4rem .5rem; }
.steps li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: var(--teal); color: #06231F; font-family: var(--font-display); font-size: .78rem; font-weight: 700; }

.proj-figs { display: grid; gap: 1.1rem; }
.proj-principles { margin-top: 0; }
.proj-principles li strong { color: var(--navy); }
.proj-tech { margin-top: 1.7rem; }
