:root{
  --void:#000000;
  --teal:#0C6F6E;
  --teal-bright:#4AB191;
  --glow:#FCC57D;
  --ink:#E0E0E0;
  --paper:#000000;
  --rule:rgba(255,255,255,.10);
  --nav-h:148px;
  --display:"Outfit",system-ui,sans-serif;
  --body:"DM Sans",system-ui,sans-serif;

  /* Chain artwork geometry. Aspect and anchor percentages are measured from
     module-chain-2024-no-labels.png — change these if the art is re-exported. */
  --chain-aspect:4.4297;
  --band-h:clamp(560px,74vh,760px);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:var(--body);color:var(--ink);background:var(--paper);-webkit-font-smoothing:antialiased}
a{color:inherit}
img{max-width:100%;display:block}
.skip{position:absolute;left:-9999px;top:0;background:var(--teal);color:#fff;padding:.75rem 1rem;z-index:999}
.skip:focus{left:0}
:focus-visible{outline:2px solid var(--teal-bright);outline-offset:3px}

/* ---------- header ---------- */
.site-header{
  position:fixed;inset:0 0 auto 0;z-index:100;
  display:flex;align-items:center;justify-content:center;
  height:clamp(68px,8vw,92px);padding:0 2rem;
  background:linear-gradient(135deg,#0C6F6E 0%,#4AB191 100%);
  box-shadow:0 0 120px rgba(12,111,110,.85),0 8px 60px rgba(74,177,145,.65);
  transition:transform .3s ease;
}
.site-header.hidden{transform:translateY(-100%)}
.brand{display:block;text-decoration:none;padding:0}
.brand-logo{height:clamp(43px,5vw,60px);width:auto}
.site-nav{position:absolute;top:100%;left:50%;transform:translateX(-50%);
  display:flex;align-items:center;gap:clamp(2.1rem,4.5vw,5rem);
  background:#222222;backdrop-filter:blur(8px);
  border-radius:0 0 14px 14px;padding:1.5rem 4.5rem;white-space:nowrap;
  transition:transform .3s ease,opacity .3s ease}
.site-header.hidden .site-nav{transform:translateX(-50%) translateY(-120%);opacity:0}
.site-nav a{font-family:"Outfit",sans-serif;font-size:1rem;font-weight:700;text-decoration:none;
  text-transform:uppercase;letter-spacing:.09em;color:var(--glow);
  padding:.3rem 0;border-bottom:2px solid transparent;transition:color .18s}
.site-nav a:hover{color:#fff}
.btn-contact{font-family:"Outfit",sans-serif;font-size:1rem;font-weight:500;text-decoration:none;
  text-transform:none;letter-spacing:.03em;color:var(--glow);white-space:nowrap;
  padding:.3rem 0;border-bottom:2px solid transparent;transition:color .18s}
.btn-contact:hover{color:#fff}
.nav-toggle{display:none;background:none;border:0;font:inherit;cursor:pointer;padding:.5rem;color:rgba(255,255,255,.78)}

/* ---------- hero ---------- */
.hero{min-height:100vh;padding:calc(var(--nav-h) + 4rem) clamp(1rem,5vw,4rem) 4rem;
  display:grid;grid-template-columns:minmax(280px,.8fr) 1fr;gap:clamp(2rem,6vw,5rem);
  align-items:center;background:#000000}
.hero__figure{justify-self:center;max-width:440px}
.hero__figure img{filter:drop-shadow(0 26px 52px rgba(252,197,125,.18));max-height:clamp(360px,65vh,620px);height:auto}
.hero h1{font-family:var(--display);font-weight:600;font-size:clamp(1.9rem,4.4vw,3.1rem);
  line-height:1.1;margin:0 0 1.5rem;color:var(--glow);letter-spacing:-.01em}
.hero p{font-size:clamp(1rem,1.35vw,1.15rem);line-height:1.65;max-width:62ch;margin:0 0 2.25rem;color:#fff}
.btn-primary{display:inline-block;font-family:var(--display);font-weight:500;text-decoration:none;
  background:var(--teal-bright);color:#fff;padding:.9rem 2.1rem;border-radius:50px;letter-spacing:.02em;
  transition:background .18s,transform .18s}
.btn-primary:hover{background:var(--teal);transform:translateY(-2px)}

/* ---------- rail ---------- */
.rail-section{background:var(--void);color:#fff;padding:clamp(3rem,6vw,4.5rem) 0 clamp(2.5rem,5vw,3.5rem);position:relative}
.rail-head{padding:0 clamp(1.5rem,5vw,4rem);display:flex;align-items:flex-end;justify-content:space-between;
  gap:2rem;margin-bottom:2rem;flex-wrap:wrap}
.rail-head h2{font-family:var(--display);font-weight:600;font-size:clamp(1.4rem,2.6vw,2.1rem);margin:0;letter-spacing:-.01em;color:var(--glow)}
.rail-hint{font-family:var(--display);font-size:.78rem;letter-spacing:.11em;text-transform:uppercase;
  color:rgba(255,255,255,.42);display:flex;align-items:center;gap:.6rem;margin:0}
.rail-hint svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.5}

.rail{display:flex;align-items:stretch;overflow-x:auto;overscroll-behavior-x:contain;
  padding:0 clamp(1.5rem,5vw,4rem);cursor:grab;scrollbar-width:none}
.rail::-webkit-scrollbar{display:none}
.rail.dragging{cursor:grabbing;scroll-behavior:auto}
.rail.dragging *{user-select:none}
.rail > *{flex:none}

/* The chain stage: width derives from the artwork's aspect ratio so that
   percentage anchors land exactly on the modules. */
.stage{position:relative;height:var(--band-h);width:calc(var(--band-h) * var(--chain-aspect))}
.stage__art{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;
  mix-blend-mode:screen;pointer-events:none}
.callout{position:absolute;width:11%;min-width:270px}

.mcard{border-left:3px solid var(--glow);padding:.2rem 0 .2rem 1.15rem}
.mcard h3{font-family:var(--display);font-weight:600;font-size:1.02rem;text-transform:uppercase;
  letter-spacing:.055em;margin:0 0 .85rem;line-height:1.25}
.mcard ul{list-style:none;margin:0 0 1rem;padding:0;display:flex;flex-wrap:wrap;gap:.38rem .48rem}
.mcard li{font-size:.79rem;line-height:1.3;background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.15);padding:.3rem .55rem;border-radius:2px;color:rgba(255,255,255,.92)}
.mcard a{font-family:var(--display);font-size:.76rem;font-weight:500;letter-spacing:.05em;
  text-transform:uppercase;color:#fff;text-decoration:none;
  display:inline-block;background:var(--teal-bright);padding:.5rem 1.4rem;border-radius:50px;
  transition:background .18s}
.mcard a:hover{background:var(--teal)}

/* Mobile-only module card list (hidden on desktop, shown in place of chain artwork) */
.mobile-modules{display:none}

/* Trailing group: modules that aren't in the chain artwork */
.future{display:flex;align-items:center;gap:clamp(1.25rem,2vw,2rem);
  padding-left:clamp(2.5rem,5vw,5rem);margin-left:clamp(2rem,4vw,4rem);
  height:var(--band-h);border-left:1px solid rgba(255,255,255,.14);position:relative}
.future__label{writing-mode:vertical-rl;font-family:var(--display);font-size:1.48rem;
  letter-spacing:.18em;text-transform:uppercase;color:rgba(255,255,255,.4)}
.future .mcard{width:250px;border-left:none}
.mcard__img{width:100%;height:160px;object-fit:contain;margin-bottom:.85rem;
  filter:drop-shadow(0 4px 16px rgba(252,197,125,.15))}
.mcard__img--sm{width:auto;height:53px;display:block;margin-left:auto;margin-right:auto}

.rail-foot{display:flex;align-items:center;gap:1.25rem;padding:1.75rem clamp(1.5rem,5vw,4rem) 0}
.rail-progress{flex:1;height:3px;background:rgba(255,255,255,.14);position:relative;overflow:hidden}
.rail-progress i{position:absolute;inset:0 auto 0 0;width:0;background:var(--teal-bright)}
.rail-arrows{display:flex;gap:.5rem}
.rail-arrows button{width:42px;height:42px;border:1px solid rgba(255,255,255,.24);background:none;
  color:#fff;cursor:pointer;border-radius:50%;display:grid;place-content:center;
  transition:background .18s,border-color .18s,opacity .18s}
.rail-arrows button:hover:not(:disabled){background:rgba(255,255,255,.1);border-color:var(--teal-bright)}
.rail-arrows button:disabled{opacity:.28;cursor:default}
.rail-arrows svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.8}

/* ---------- cta ---------- */
.cta{background:var(--void);text-align:center;padding:clamp(2rem,4vw,3.5rem) clamp(1.5rem,6vw,4rem) clamp(4rem,9vw,7rem)}
.cta h2{font-family:var(--display);font-weight:600;font-size:clamp(1.8rem,3.8vw,2.8rem);
  color:var(--glow);margin:0 0 1.25rem;letter-spacing:-.01em}
.cta p{font-size:clamp(1rem,1.4vw,1.15rem);line-height:1.65;color:rgba(255,255,255,.75);
  max-width:58ch;margin:0 auto 2.5rem}
.cta__actions{display:flex;gap:1.25rem;justify-content:center;flex-wrap:wrap}
.btn-secondary{display:inline-block;font-family:var(--display);font-weight:500;text-decoration:none;
  border:2px solid var(--teal-bright);color:var(--teal-bright);padding:.9rem 2.1rem;border-radius:50px;
  letter-spacing:.02em;transition:background .18s,color .18s}
.btn-secondary:hover{background:var(--teal-bright);color:#fff}

/* ---------- footer ---------- */
.site-footer{background:linear-gradient(135deg,#0C6F6E 0%,#4AB191 100%);color:rgba(255,255,255,.82);padding:2.5rem 2rem;text-align:center;font-size:.85rem}
.site-footer p{margin:.75rem 0 0}
.footer-logo{height:36px;width:auto;margin:0 auto}
.footer-social{display:flex;justify-content:center;gap:1.75rem;margin-top:.9rem}
.footer-social__link{display:inline-flex;align-items:center;gap:.45rem;
  font-family:var(--display);font-size:.82rem;font-weight:600;letter-spacing:.05em;text-transform:uppercase;
  color:#fff;text-decoration:none;opacity:.8;transition:opacity .18s}
.footer-social__link:hover{opacity:1}
.footer-social__link svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ---------- about page ---------- */
.about-hero,
.page-hero {
  padding:calc(var(--nav-h) + 3rem) clamp(1.5rem,6vw,5rem) 3rem;
  display:flex;align-items:center;justify-content:center;text-align:center;background:#000;
}
.about-hero{min-height:40vh}
.page-hero{min-height:36vh}
.about-hero h1,
.page-hero h1{
  font-family:var(--display);font-weight:600;
  font-size:clamp(1.8rem,4.2vw,3.15rem);
  color:var(--glow);margin:0;letter-spacing:-.02em;line-height:1
}
.about-section{max-width:800px;margin:0 auto;padding:clamp(1.9rem,3.75vw,3rem) clamp(1.5rem,6vw,5rem)}
.about-section + .about-section{border-top:1px solid var(--rule)}
.about-section h2{font-family:var(--display);font-weight:600;font-size:clamp(1.5rem,2.8vw,2rem);color:var(--glow);margin:0 0 1.25rem;letter-spacing:-.01em}
.about-section p{font-size:clamp(1rem,1.35vw,1.1rem);line-height:1.75;color:rgba(255,255,255,.85);margin:0 0 1.5rem}
.about-lead{font-size:clamp(1.05rem,1.5vw,1.2rem)!important;color:#fff!important}
.timeline{list-style:none;margin:2rem 0 0;padding:0;display:flex;flex-direction:column;gap:1rem}
.timeline li{display:flex;align-items:baseline;gap:1.5rem}
.timeline__year{font-family:var(--display);font-weight:600;font-size:1.1rem;color:var(--teal-bright);min-width:3.5rem;flex-shrink:0}
.timeline__event{font-size:.95rem;line-height:1.5;color:rgba(255,255,255,.78)}

/* ---------- projects page ---------- */
.proj-section{padding:clamp(3rem,6vw,5rem) clamp(1.5rem,6vw,5rem);display:flex;flex-direction:column;align-items:center}
.proj-section > *{width:100%;max-width:1000px}
.proj-section--dark{background:#0a0a0a}
.proj-section__title{font-family:var(--display);font-weight:600;font-size:clamp(1.5rem,2.8vw,2.1rem);color:var(--glow);margin:0 0 2rem;letter-spacing:-.01em}
.proj-subsection__title{font-family:var(--display);font-weight:600;font-size:clamp(1.1rem,2vw,1.5rem);color:#fff;margin:2.5rem 0 .75rem}
.proj-subsection__lead{font-size:clamp(.95rem,1.3vw,1.05rem);line-height:1.7;color:rgba(255,255,255,.72);max-width:72ch;margin:0 0 2rem}
.clinical-block{border-left:3px solid var(--teal-bright);padding:1.25rem 1.5rem;background:rgba(255,255,255,.03);margin-bottom:3rem;max-width:820px}
.clinical-block__img{max-width:480px;height:auto;display:block;margin-bottom:1.25rem;border-radius:4px;filter:drop-shadow(0 8px 24px rgba(0,0,0,.5))}
.badge{display:inline-block;font-family:var(--display);font-size:.7rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase;background:var(--teal);color:#fff;padding:.3rem .75rem;border-radius:50px;margin-bottom:1rem}
.clinical-block p{font-size:clamp(.95rem,1.3vw,1.05rem);line-height:1.75;color:rgba(255,255,255,.82);margin:0 0 .9rem}
.clinical-block p:last-child{margin-bottom:0}
.module-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:1.5rem}
.module-card{border:1px solid rgba(255,255,255,.1);border-top:3px solid var(--teal-bright);padding:1.5rem;background:rgba(255,255,255,.03)}
.module-card__header{margin-bottom:1rem}
.module-card__acronym{font-family:var(--display);font-weight:700;font-size:1.5rem;color:var(--glow);margin:0 0 .25rem;letter-spacing:.04em}
.module-card__expanded{font-family:var(--display);font-size:.78rem;font-weight:500;letter-spacing:.04em;color:rgba(255,255,255,.5);margin:0 0 .35rem;font-style:italic}
.module-card__role{font-family:var(--display);font-size:.8rem;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--teal-bright);margin:0}
.module-card ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.6rem}
.module-card li{font-size:.88rem;line-height:1.55;color:rgba(255,255,255,.78);padding-left:1rem;position:relative}
.module-card li::before{content:'';position:absolute;left:0;top:.55em;width:4px;height:4px;border-radius:50%;background:var(--teal-bright)}
.module-card__intro{font-size:.9rem;line-height:1.65;color:rgba(255,255,255,.72);margin:0 0 .85rem}

/* ---------- horizontal-scroll sticky section ---------- */
.rail-wrapper{position:relative}
@media(min-width:901px){
  .rail-section{position:sticky;top:0}
}

/* ---------- small screens ---------- */
@media(max-width:900px){
  .hero{grid-template-columns:1fr;padding-top:calc(60px + 2.5rem)}
  .hero__figure{order:-1;max-width:290px}
  .site-header{height:60px;padding:0 1.25rem;justify-content:center}
  .nav-toggle{position:absolute;left:1rem}
  .brand-logo{height:30px}
  .site-nav{position:fixed;top:60px;left:0;right:0;transform:none;
    flex-direction:column;align-items:stretch;
    border-radius:0;gap:0;background:#000;backdrop-filter:none;
    padding:.5rem 1.25rem 1.25rem;display:none;border-bottom:1px solid var(--rule)}
  .site-nav.open{display:flex}
  .site-nav a{padding:.85rem 0;border-bottom:1px solid var(--rule)}
  .btn-contact{margin-top:0;text-align:left;padding:.85rem 0;border-bottom:1px solid var(--rule)}
  .nav-toggle{display:block}
  .rail-head,.rail-arrows,.rail-hint,.rail-foot{display:none}
  .rail-section{padding-top:clamp(2rem,4vw,3rem)}
  .rail{display:block;overflow-x:visible;cursor:auto;padding:0}
  .stage{display:none}
  .mobile-modules{display:block}
  /* Cards: remove left border, add full-width gold separator between each */
  .mobile-modules .mcard,
  .future .mcard{width:auto;margin:0 clamp(1.25rem,5vw,3rem);border-left:0;
    border-bottom:1px solid var(--glow);padding:1.25rem 0 1.5rem}
  .mobile-modules .mcard:last-child,
  .future .mcard:last-child{border-bottom:0;padding-bottom:0}
  .mobile-modules .future__label,
  .future__label{writing-mode:horizontal-tb;display:block;margin:0 clamp(1.25rem,5vw,3rem) 1rem}
  /* Gold line between System Modules and In Development groups */
  .future{display:block;height:auto;border-left:0;padding:clamp(1.25rem,4vw,2rem) 0 0;margin:0;
    border-top:1px solid var(--glow)}
  .about-hero{min-height:30vh;padding-top:calc(60px + 2rem)}
  .page-hero{min-height:28vh;padding-top:calc(60px + 2rem)}
  .module-grid{grid-template-columns:1fr}
  .app-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:480px){
  .app-grid{grid-template-columns:1fr}
}
