/* ==========================================================
   Alaris — Modern, Clean, Accessible UI (final, classic team)
   ========================================================== */

:root{
  --bg:#0b1016; --panel:#0c1420; --card:#0f1826;
  --text:#eaf2fb; --muted:#9fb2cb;
  --brand:#38bdf8; --accent:#34d399;
  --chip:#142131; --border:#1c2b3d; --ring:#22d3ee;
  --radius:18px; --radius-sm:12px;
  --shadow:0 8px 20px rgba(0,0,0,.22);
  --shadow-lg:0 14px 34px rgba(0,0,0,.30);
  --leading:1.62;
}

html,body{height:100%}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  line-height: var(--leading);
  color: var(--text);
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(56,189,248,.08), transparent),
    radial-gradient(900px 420px at 108% -12%, rgba(52,211,153,.07), transparent),
    var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

a{color:inherit; text-decoration:none}
a:hover{opacity:.94}
img{max-width:100%; height:auto; display:block}

/* Accessibility: skip link */
.skip-link{
  position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  position:fixed; left:16px; top:16px; z-index:1050;
  background:#0b1320; color:#fff; padding:8px 12px; border-radius:10px;
  outline:2px solid var(--ring);
}

/* Containers & prose */
.container-xl{ max-width:1200px; }
.container-narrow{ max-width:880px; margin-inline:auto; }
.lede{color:var(--muted); max-width:72ch}
.prose{ max-width:72ch; line-height:1.65; letter-spacing:.1px }
.prose p + p{ margin-top:.9rem }

/* Nav + Hero */
.backdrop-blur{backdrop-filter:saturate(140%) blur(8px)}
.navbar .nav-link{opacity:.88; transition:opacity .2s ease, color .2s ease}
.navbar .nav-link:hover,.navbar .nav-link:focus{opacity:1; color:#fff}

.hero-glass{
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  backdrop-filter: blur(8px) saturate(120%);
}
.stats-strip{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px }
.stats-strip .stat{
  border:1px solid var(--border); border-radius:14px; padding:10px 12px;
  display:grid; grid-template-columns:auto 1fr; align-items:center; gap:8px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
}
.stats-strip .k{ font-weight:800; font-size:1.05rem }
.stats-strip .l{ color:var(--muted); font-size:.9rem }
@media (max-width:575.98px){ .stats-strip{ grid-template-columns:1fr } }

/* Headings + Flow */
h1,h2,h3,h4{letter-spacing:.2px}
h1{font-weight:800}
h3{font-weight:800; margin-bottom:.4rem}
h3::after{
  content:""; display:block; width:64px; height:3px; margin-top:.6rem;
  background:linear-gradient(90deg, var(--brand), var(--accent)); border-radius:3px;
}
.eyebrow{ display:inline-block; font-size:.78rem; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); margin-bottom:.35rem }
.section .title{ margin-bottom:.6rem; font-weight:800; letter-spacing:.2px }
.divider{ height:1px; background:linear-gradient(90deg, transparent, var(--border), transparent); margin:20px 0 24px; border:0; opacity:.9 }
.section{ scroll-margin-top:90px; padding-block:56px }
.band{ position:relative; isolation:isolate }
.band::before{
  content:""; position:absolute; inset:-28px 0; z-index:-1; pointer-events:none;
  background:linear-gradient(180deg, rgba(56,189,248,.09) 0%, rgba(52,211,153,.06) 38%, rgba(0,0,0,0) 88%);
  filter:blur(26px);
}
.flow-lg{ padding-block:64px }
.flow-xxl{ padding-block:84px }

/* Forms (filters) */
.controls .form-label{ color:var(--muted); margin-bottom:6px }
.form-control,.form-select{ background:#0f1724; border-color:#213246; color:var(--text) }
.form-control:focus,.form-select:focus{ border-color:#2a4762; box-shadow:0 0 0 .15rem rgba(34,211,238,.18) }

/* Team group headings — classic style (no pills) */
#groups > section > h4{
  background:none; border:0; padding:0; margin:2px 0 14px; font-weight:700;
}
#groups > section > h4::before{
  content:""; display:inline-block; width:8px; height:8px; margin-right:.55rem;
  border-radius:50%;
  background: radial-gradient(circle at 30% 30%, var(--brand), var(--accent));
}

/* Person Cards */
.person-card{
  background: var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px;
  box-shadow:var(--shadow);
  display:flex; flex-direction:column; gap:12px;
  height:100%;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  cursor:pointer;
}
.person-card:hover{ transform:translateY(-3px); box-shadow:var(--shadow-lg) }
.person-card:focus-visible{ outline:2px solid var(--ring); outline-offset:3px }
.person-card .avatar-wrap{display:flex; justify-content:center}
.person-card .avatar{
  width:124px; height:124px; border-radius:50%;
  object-fit:cover; background:#0f1117; border:2px solid #1f3347;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.person-card .name{font-weight:800; font-size:1.06rem; margin:0; text-align:center}
.person-card .role{color:var(--muted); margin:0; text-align:center}
.person-card .blurb{
  color:var(--muted); font-size:.94rem; margin:0;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:2.8em;
}
.person-card .tags{display:flex; flex-wrap:wrap; gap:8px; justify-content:center}
.person-card .tag{
  padding:4px 10px; font-size:.78rem; color:var(--muted);
  background:var(--chip); border:1px solid var(--border); border-radius:999px;
}
.person-card .links{display:flex; gap:10px; justify-content:center; flex-wrap:wrap}

/* Icon buttons (used in Contact) */
.icon-btn{
  --size:36px; width:var(--size); height:var(--size);
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--border); border-radius:12px;
  background:rgba(255,255,255,.02); color:var(--text);
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease;
}
.icon-btn i{ font-size:1rem; line-height:1 }
.icon-btn:hover{ transform:translateY(-1px); border-color:var(--brand); background:rgba(255,255,255,.04) }

/* Carousels */
.card-surface{ background:var(--card); border:1px solid var(--border); box-shadow:var(--shadow) }
.ratio .object-fit-cover{ object-fit:cover; border-radius:12px }
.carousel-caption{
  background: linear-gradient(180deg, rgba(0,0,0,.36), rgba(0,0,0,.16));
  padding:.35rem .6rem; border-radius:10px;
}

/* Modal */
.modal-content{
  background:linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01)), var(--panel) !important;
  border:1px solid var(--border) !important; border-radius:var(--radius) !important;
}
.modal-header .modal-title{font-weight:800}
.modal-avatar{
  display:block; max-width:200px; max-height:200px; width:auto; height:auto; object-fit:contain;
  border-radius:12px; border:1px solid var(--border); background:#0f1117; box-shadow:0 8px 20px rgba(0,0,0,.25);
}
@media (max-width:576px){ .modal-avatar{ max-width:140px; max-height:140px } }

/* Timeline rail */
.timeline-rail{ list-style:none; padding:0; margin:0; position:relative }
.timeline-rail::before{
  content:""; position:absolute; left:10px; top:0; bottom:0; width:2px; background:#223345;
}
.timeline-rail > li{
  position:relative; padding-left:36px; margin:18px 0;
}
.timeline-rail > li::before{
  content:""; position:absolute; left:2px; top:.45rem; width:16px; height:16px; border-radius:50%;
  background: radial-gradient(circle at 30% 30%, var(--brand), var(--accent));
  border:2px solid var(--bg);
}

/* Buttons, Footer */
.btn-primary{
  --bs-btn-bg: linear-gradient(135deg, var(--brand), var(--accent));
  --bs-btn-border-color: transparent;
  --bs-btn-hover-bg: linear-gradient(135deg, var(--accent), var(--brand));
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: linear-gradient(135deg, var(--accent), var(--brand));
}
.btn-outline-light{
  --bs-btn-color:#eaf2fb; --bs-btn-border-color:#5b6a7c;
  --bs-btn-hover-bg:rgba(255,255,255,.06); --bs-btn-hover-border-color:#9fb2cb;
}
.site-footer{color:var(--muted)}
.empty{color:var(--muted); text-align:center; margin:22px 0}

/* Responsive refinements */
@media (max-width: 991.98px){
  .section{ padding-block:48px }
  .hero-glass{ padding:24px }
}
@media (max-width: 575.98px){
  .person-card .avatar{ width:104px; height:104px }
  .icon-btn{ --size:34px }
}
.person-card .blurb:empty { display:none; }

/* === Fit/scale sections to the screen === */
/* navbar height (tweak if yours changes) */
:root { --nav-h: 72px; }

/* sections that should fill *at least* one viewport height */
.fit-screen{
  /* use svh/dvh for mobile browser UI, fall back to vh */
  min-block-size: calc(100svh - var(--nav-h));
  display: grid;              /* easy vertical centering */
  align-items: center;        /* center the section's content */
  padding-block: clamp(24px, 4vh, 72px);
}
@supports (min-height: 100dvh){
  .fit-screen{ min-block-size: calc(100dvh - var(--nav-h)); }
}

/* Optional: snap one “screen” at a time (toggle by adding class="snap" on <body>) */
body.snap{ scroll-snap-type: y mandatory; }
body.snap .fit-screen{ scroll-snap-align: start; }

/* === Fluid type / component scaling === */
:root{
  /* fluid sizes – adjust if you want larger/smaller */
  --fs-body: clamp(14px, 0.95rem + 0.1vw, 16px);
  --fs-lead: clamp(16px, 1rem + 0.5vw, 20px);
  --fs-h1:   clamp(28px, 1.6rem + 2.8vw, 44px);
  --fs-h3:   clamp(18px, 1.05rem + 0.8vw, 24px);
}
body{ font-size: var(--fs-body); }
#home .lead{ font-size: var(--fs-lead); }
h1.display-5{ font-size: var(--fs-h1) !important; }
h3.title{ font-size: var(--fs-h3); }

/* Cards scale a bit on small/large screens */
.person-card{ padding: clamp(14px, 2.2vw, 18px); }
.person-card .avatar{
  width: clamp(88px, 10vw, 124px);
  height: clamp(88px, 10vw, 124px);
}

/* Carousels already use .ratio; make sure images cover */
.ratio .object-fit-cover{ object-fit: cover; }

/* Keep empty blurbs from reserving space (if you added the blurb fix) */
.person-card .blurb:empty{ display:none; }

/* === Gradient headline & subtle brand underline === */
.gradient-text{
  background: linear-gradient(90deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.title-underline::after{
  content:""; display:block; width:72px; height:3px; margin-top:.6rem;
  background:linear-gradient(90deg, var(--brand), var(--accent)); border-radius:3px;
}

/* === Hero background blobs === */
.hero {
  position: relative;
  overflow: clip;
}
.hero .bg-blobs{
  position:absolute; inset:-10% -5% auto -5%; pointer-events:none; z-index:0;
  filter: blur(42px) saturate(110%);
}
.hero .blob{
  position:absolute; width:340px; height:340px; border-radius:50%;
  opacity:.22;
}
.hero .blob.b1{ left:-40px; top:-60px; background: radial-gradient(circle, var(--brand), transparent 60%); }
.hero .blob.b2{ right:-80px; top:-40px; background: radial-gradient(circle, var(--accent), transparent 60%); }

/* Ensure hero content sits above blobs */
.hero .container-xl{ position: relative; z-index: 1; }

/* === Nav: active link underline === */
.navbar .nav-link.active{
  color:#fff; position:relative;
}
.navbar .nav-link.active::after{
  content:""; position:absolute; left:8px; right:8px; bottom:4px; height:2px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius:2px;
}

/* === Person cards: hover sheen === */
.person-card{
  position:relative;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.person-card::after{
  content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background: linear-gradient(135deg, rgba(255,255,255,.06), transparent 40%);
  opacity:0; transition:opacity .25s ease;
}
.person-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.person-card:hover::after{ opacity:1; }

/* === Carousel: cleaner controls & dots === */
.carousel-control-prev, .carousel-control-next{
  width:42px; height:42px; border-radius:50%;
  top:50%; transform:translateY(-50%);
  background: rgba(0,0,0,.35); border:1px solid rgba(255,255,255,.2);
}
.carousel-control-prev:hover, .carousel-control-next:hover{ background: rgba(0,0,0,.5); }
.carousel-indicators [data-bs-target]{
  width:8px; height:8px; border-radius:50%; background:#7e8da1; opacity:.6;
}
.carousel-indicators .active{ background: #fff; opacity:1 }

/* === Scroll reveal === */
.reveal-up{ opacity:0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal-up.in{ opacity:1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce){
  .reveal-up{ opacity:1 !important; transform:none !important; }
}

/* === Back-to-top button === */
.to-top{
  position:fixed; right:18px; bottom:18px; z-index:1050;
  width:42px; height:42px; border-radius:12px;
  border:1px solid var(--border); background:rgba(255,255,255,.04);
  color:var(--text); display:none; align-items:center; justify-content:center;
  box-shadow: var(--shadow);
}
.to-top.show{ display:flex; }

/* === Timeline icons improvement === */
.timeline-rail > li strong::before{
  content:"◆"; display:inline-block; margin-right:.5rem; color: color-mix(in oklab, var(--brand) 60%, #fff 40%);
}

/* === Footer divider glow === */
.site-footer{
  background:
    linear-gradient(180deg, rgba(56,189,248,.06), rgba(52,211,153,.04)),
    transparent;
}

