/* ==========================================================================
   Uno1Lab — uno1lab.com
   Light theme, Dana-Farber palette. Plain CSS, no build step.
   Official DFCI brand colors:
     #036393 dark blue · #3db3e2 light blue · #faa21c orange
   ========================================================================== */

:root {
  color-scheme: light;

  /* surfaces */
  --bg:        #ffffff;
  --bg-tint:   #f3f7fb;
  --bg-deep:   #eef5fa;
  --surface:   #ffffff;

  /* text */
  --ink:       #17252f;
  --ink-2:     #45555f;
  --muted:     #6f7d88;

  /* lines */
  --line:        #e2eaf1;
  --line-strong: #cfdbe6;

  /* Dana-Farber brand — official codes (Admin/LOGOS/DFCI-Color-code.txt):
     orange #faa21c · dark blue #036393 · light blue #3db3e2            */
  --brand:        #036393;   /* DFCI dark blue                          */
  --brand-deep:   #024a6f;   /* darkened step, for headings             */
  --brand-ink:    #02557e;   /* link ink                                */
  --brand-bright: #3db3e2;   /* DFCI light blue                         */
  --brand-soft:   #e7f4fb;

  /* DFCI orange. Only 2:1 on white, so it is used for GRAPHIC accents
     (rules, dots, bars, washes) and never for text. --orange-deep is the
     darkened step to use if it ever has to carry type.                  */
  --orange:       #faa21c;
  --orange-deep:  #96600a;
  --orange-soft:  #fef4e2;

  --radius:   14px;
  --radius-s: 9px;
  --maxw:     1060px;

  --shadow:    0 1px 2px rgba(3, 99, 147, .05), 0 10px 28px rgba(3, 99, 147, .07);
  --shadow-lg: 0 2px 5px rgba(3, 99, 147, .07), 0 22px 48px rgba(3, 99, 147, .12);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

::selection { background: var(--orange-soft); color: var(--ink); }

/* --- base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

a { color: var(--brand-ink); text-decoration-color: rgba(3, 99, 147, .32); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--brand); }

h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; margin: 0; font-weight: 640; }
p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

.eyebrow {
  font-family: var(--mono);
  font-size: .715rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::after {
  content: "";
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--orange), rgba(3, 99, 147, .3) 38%, transparent);
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #fff; padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* --- header -------------------------------------------------------------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-head.is-stuck { border-bottom-color: var(--line); box-shadow: 0 1px 12px rgba(3, 99, 147, .05); }

.nav { display: flex; align-items: center; gap: 18px; height: 64px; }

.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-weight: 680; letter-spacing: -.025em; font-size: 1.05rem;
  color: var(--ink); text-decoration: none; margin-right: auto;
}
.brand-mark {
  width: 34px; height: 34px; flex: none;
  display: block; object-fit: contain;
}

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  color: var(--ink-2); text-decoration: none; font-size: .92rem; font-weight: 500;
  padding: 7px 11px; border-radius: 8px; white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.nav-links a:hover { background: var(--bg-tint); color: var(--brand-ink); }
.nav-links a[aria-current="page"] { color: var(--brand-ink); background: var(--brand-soft); }

.nav-tools { display: flex; align-items: center; gap: 2px; }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; background: transparent; color: var(--muted);
  border-radius: 8px; cursor: pointer; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--bg-tint); color: var(--brand); }
.icon-btn svg { width: 17px; height: 17px; }

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 8px; box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 13px; font-size: 1rem; }
}

/* --- hero ---------------------------------------------------------------- */

.hero { position: relative; overflow: hidden; padding: 82px 0 66px; }
.hero::before {
  content: ""; position: absolute; inset: -55% -15% auto -15%; height: 640px; z-index: -2;
  background:
    radial-gradient(40% 52% at 20% 38%, rgba(3, 99, 147, .16), transparent 70%),
    radial-gradient(36% 48% at 78% 20%, rgba(61, 179, 226, .20), transparent 72%),
    radial-gradient(30% 42% at 62% 66%, rgba(250, 162, 28, .22), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(3, 99, 147, .07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(3, 99, 147, .07) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(72% 62% at 50% 28%, #000 28%, transparent 78%);
  -webkit-mask-image: radial-gradient(72% 62% at 50% 28%, #000 28%, transparent 78%);
}

.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center; }

.hero h1 {
  font-size: clamp(2.2rem, 5.2vw, 3.4rem);
  letter-spacing: -.038em; font-weight: 680;
  margin: 0 0 18px;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--brand), var(--brand-bright));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede { font-size: 1.1rem; color: var(--ink-2); max-width: 58ch; margin: 0 0 12px; }

.hero-logo {
  width: 184px; height: 184px; flex: none;
  border-radius: 24px; padding: 18px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  object-fit: contain;
}
@media (max-width: 880px) {
  .hero { padding: 54px 0 44px; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-logo { width: 126px; height: 126px; border-radius: 20px; }
}

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px;
  font-size: .94rem; font-weight: 560; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary {
  background: var(--brand); color: #fff;
  box-shadow: 0 1px 2px rgba(2, 85, 126, .2), 0 8px 20px rgba(3, 99, 147, .26);
}
.btn-primary:hover {
  background: var(--brand-ink); transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(2, 85, 126, .24), 0 14px 28px rgba(3, 99, 147, .3);
}
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { transform: translateY(-1px); border-color: var(--brand); color: var(--brand-ink); }

/* --- skyline band -------------------------------------------------------- */

.skyline { position: relative; line-height: 0; overflow: hidden; margin: 0; }
.skyline img {
  width: 100%; height: clamp(148px, 23vw, 272px);
  object-fit: cover; object-position: center 62%; display: block;
}
.skyline::before {            /* fade the sky into the page above it */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 52%;
  background: linear-gradient(to bottom, var(--bg) 2%, rgba(255, 255, 255, 0));
  pointer-events: none;
}
.skyline figcaption {
  position: absolute; right: 16px; bottom: 11px;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .14em;
  text-transform: uppercase; line-height: 1.4;
  color: #fff; text-shadow: 0 1px 6px rgba(0, 40, 65, .75);
}

/* --- sections ------------------------------------------------------------ */

.section { padding: 64px 0; }
.section-tint { background: var(--bg-tint); border-block: 1px solid var(--line); }
.section h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); margin: 0 0 10px; }
.section-intro { color: var(--muted); max-width: 62ch; margin: 0 0 34px; }

.page-head { padding: 60px 0 32px; }
.page-head h1 { font-size: clamp(1.9rem, 4.3vw, 2.65rem); letter-spacing: -.035em; margin: 0 0 14px; }
.page-head p { color: var(--ink-2); max-width: 66ch; font-size: 1.05rem; margin: 0; }

/* --- cards --------------------------------------------------------------- */

.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 22px; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.card h3 { font-size: 1.06rem; margin: 0 0 8px; }
.card p { color: var(--ink-2); font-size: .945rem; margin: 0; }
.card-num {
  font-family: var(--mono); font-size: .7rem; color: var(--orange-deep);
  letter-spacing: .1em; display: block; margin-bottom: 12px;
}

/* --- recruiting banner --------------------------------------------------- */

.banner {
  position: relative; overflow: hidden;
  border-radius: 18px; padding: 30px 32px;
  background: linear-gradient(118deg, var(--brand-soft), var(--surface) 64%);
  border: 1px solid rgba(3, 99, 147, .22);
  border-left: 4px solid var(--orange);
  box-shadow: var(--shadow);
  display: flex; gap: 26px; align-items: center; flex-wrap: wrap;
}
.banner-body { flex: 1 1 340px; }
.banner h2 { font-size: 1.5rem; margin: 0 0 10px; color: var(--brand-deep); }
.banner p { color: var(--ink-2); margin: 0; font-size: 1rem; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: .69rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-ink); background: var(--brand-soft);
  padding: 5px 11px; border-radius: 999px; margin-bottom: 12px;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.8); } }

.flags { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.flags .pill { margin-bottom: 0; }
.flag-new {
  display: inline-block; background: var(--orange); color: #3a2400;
  font-family: var(--mono); font-size: .69rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  box-shadow: 0 1px 2px rgba(120, 78, 6, .25), 0 5px 14px rgba(250, 162, 28, .4);
}
.stamp {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: .73rem; font-weight: 600; letter-spacing: .06em;
  color: var(--orange-deep); background: var(--orange-soft);
  border: 1px solid rgba(250, 162, 28, .55);
  padding: 5px 11px; border-radius: 999px;
}
.stamp svg { width: 13px; height: 13px; flex: none; }

/* --- publications -------------------------------------------------------- */

.topic { margin: 0 0 46px; }
.topic-head {
  display: flex; align-items: baseline; gap: 12px; margin: 0 0 16px;
  padding-bottom: 10px; border-bottom: 2px solid var(--brand-soft);
  position: relative;
}
.topic-head::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 46px; height: 2px; background: var(--orange);
}
.topic-head h2 { font-size: 1.2rem; margin: 0; color: var(--brand-deep); }
.topic-count { font-family: var(--mono); font-size: .73rem; color: var(--muted); }

.pub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pub {
  display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 18px;
  padding: 15px 14px; border-radius: var(--radius-s);
  transition: background .15s ease;
}
.pub:hover { background: var(--bg-tint); }
.pub-year { font-family: var(--mono); font-size: .8rem; color: var(--brand); padding-top: 2px; font-weight: 500; }
.pub-title { font-weight: 560; color: var(--ink); margin: 0 0 4px; line-height: 1.45; }
.pub-meta { color: var(--muted); font-size: .89rem; margin: 0; }
.pub-meta .journal { font-style: italic; color: var(--ink-2); }
.pub-meta .me { color: var(--ink); font-weight: 600; }
.pub-links { margin-top: 7px; display: flex; gap: 14px; flex-wrap: wrap; }
.pub-links a { font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; text-decoration: none; color: var(--brand-ink); }
.pub-links a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .pub { grid-template-columns: 1fr; gap: 6px; }
  .pub-year { padding-top: 0; }
}

/* --- packages ------------------------------------------------------------ */

.pkg-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.pkg {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.pkg:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: rgba(3, 99, 147, .35); }
.pkg-name {
  font-family: var(--mono); font-size: 1.02rem; font-weight: 600; letter-spacing: -.01em;
  color: var(--brand-deep); margin: 0 0 6px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
}
.pkg-ver {
  font-family: var(--mono); font-size: .69rem; color: var(--muted);
  margin: 0 0 12px; letter-spacing: .02em;
}
.pkg-name .tag {
  font-size: .61rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 500;
  color: var(--brand-ink); background: var(--brand-soft);
  padding: 3px 7px; border-radius: 5px;
}
.pkg p { font-size: .91rem; color: var(--ink-2); margin: 0 0 16px; flex: 1; }
.pkg .code {
  font-family: var(--mono); font-size: .75rem; line-height: 1.7;
  background: #f4f8fc; border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; margin: 0 0 14px;
  color: var(--brand-deep); overflow-x: auto; white-space: pre;
}
.pkg-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pkg-links a {
  font-family: var(--mono); font-size: .73rem; letter-spacing: .03em; text-decoration: none;
  color: var(--ink-2); border: 1px solid var(--line-strong); padding: 5px 10px; border-radius: 7px;
  transition: border-color .15s, color .15s, background .15s;
}
.pkg-links a:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }

/* --- members ------------------------------------------------------------- */

.name-list { list-style: none; margin: 0; padding: 0; max-width: 520px; }
.name-list li {
  padding: 13px 2px; border-bottom: 1px solid var(--line);
  font-size: 1.04rem; color: var(--ink);
}
.name-list li:first-child { border-top: 1px solid var(--line); }
.name-list a { color: inherit; text-decoration: none; }
.name-list a:hover { color: var(--brand-ink); text-decoration: underline; }

/* --- explanatory figure --------------------------------------------------
   Two-series categorical colors, validated for CVD separation
   (protan ΔE 23.6, normal ΔE 30.7) against a light surface. The brand
   orange #faa21c itself fails the 3:1 contrast check for line marks, so the
   chart uses a darkened step of the same hue.
   -------------------------------------------------------------------------- */

:root {
  --series-1: #036393;   /* treatment — DFCI dark blue                  */
  --series-2: #c87f10;   /* control — darkened DFCI orange (see README)  */
  --grid:     #e8eef4;
  --axis:     #c3ced8;
}

.figure-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 42px; align-items: center; }
@media (max-width: 880px) { .figure-grid { grid-template-columns: 1fr; gap: 28px; } }

.chart-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 20px 16px; box-shadow: var(--shadow);
}
.chart-card svg { display: block; width: 100%; height: auto; }

.chart-legend {
  display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 6px;
  font-family: var(--mono); font-size: .71rem; letter-spacing: .04em; color: var(--ink-2);
}
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.chart-caption {
  font-size: .8rem; color: var(--muted); margin: 12px 0 0; line-height: 1.55;
  padding-top: 12px; border-top: 1px solid var(--line);
}

/* --- profile page -------------------------------------------------------- */

.profile-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 34px; align-items: center; }
.profile-photo {
  width: 168px; height: 168px; border-radius: 20px; flex: none; object-fit: cover;
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); background: var(--bg-tint);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 2.6rem; font-weight: 600; color: var(--brand-deep);
}
.profile-head h1 { font-size: clamp(1.9rem, 4.2vw, 2.55rem); margin: 0 0 8px; }
.profile-title { color: var(--brand-deep); font-size: 1.04rem; font-weight: 560; margin: 0 0 4px; }
.profile-affil { color: var(--muted); font-size: .95rem; margin: 0; }
@media (max-width: 720px) {
  .profile-head { grid-template-columns: 1fr; gap: 22px; }
  .profile-photo { width: 116px; height: 116px; border-radius: 16px; font-size: 1.9rem; }
}

.link-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); }
.tile {
  display: flex; align-items: center; gap: 13px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 13px 15px; text-decoration: none; box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.tile:hover { transform: translateY(-2px); border-color: rgba(3, 99, 147, .4); box-shadow: var(--shadow-lg); }
.tile-icon {
  width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-deep);
}
.tile-icon svg { width: 17px; height: 17px; }
.tile-text { min-width: 0; }
.tile-name { display: block; font-weight: 560; font-size: .94rem; color: var(--ink); line-height: 1.3; }
.tile-host {
  display: block; font-family: var(--mono); font-size: .68rem; color: var(--muted);
  letter-spacing: .03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* --- prose --------------------------------------------------------------- */

.prose { max-width: 740px; }
.prose h2 { font-size: 1.2rem; margin: 40px 0 12px; padding-bottom: 9px; border-bottom: 2px solid var(--brand-soft); color: var(--brand-deep); }
.prose h3 { font-size: 1.02rem; margin: 26px 0 8px; color: var(--ink); }
.prose p { color: var(--ink-2); }
.prose ul { margin: 10px 0 18px; padding-left: 20px; color: var(--ink-2); }
.prose li { margin: 5px 0; }
.prose strong { color: var(--ink); font-weight: 600; }

.callout {
  background: var(--brand-soft);
  border: 1px solid rgba(3, 99, 147, .25);
  border-radius: var(--radius); padding: 22px 24px; margin: 28px 0;
}
.callout h3 { margin: 0 0 8px; color: var(--brand-deep); font-size: 1.02rem; }
.callout p { margin: 0 0 10px; color: var(--ink-2); }
.callout p:last-child { margin: 0; }

.meta-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.meta-list li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.meta-list .k { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.meta-list .v { color: var(--ink-2); }
@media (max-width: 560px) { .meta-list li { grid-template-columns: 1fr; gap: 3px; } }

/* --- footer -------------------------------------------------------------- */

.site-foot {
  border-top: 3px solid var(--orange); margin-top: 72px;
  padding: 40px 0 48px; background: var(--bg-tint);
}
.foot-grid { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; }
.foot-brand { font-weight: 640; letter-spacing: -.02em; margin: 0 0 6px; color: var(--brand-deep); }
.foot-note { color: var(--muted); font-size: .88rem; margin: 0; max-width: 46ch; }
.foot-logo { display: inline-block; margin-top: 20px; opacity: .92; transition: opacity .15s ease; }
.foot-logo:hover { opacity: 1; }
.foot-logo img { height: 38px; width: auto; display: block; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a { color: var(--ink-2); text-decoration: none; font-size: .9rem; }
.foot-links a:hover { color: var(--brand-ink); }
