:root {
  color-scheme: dark;
  --charcoal: #151a19;
  --ink: #fff9f1;
  --muted: #e5ded3;
  --brass: #f3c98f;
  --border: #8b9289;
  --surface: #262e2b;
  --rule: #6b736a;
  --sans: "Inter", "Aptos", "Helvetica Neue", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 18px; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 79% 19%, #242c29 0, transparent 56%), var(--charcoal);
  color: var(--ink);
  font: 17px/1.57 var(--sans);
}
h1, h2, h3, p, figure, dl, dd { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--brass); outline-offset: 4px; }
.shell { width: min(calc(100% - clamp(32px, 6vw, 80px)), 1200px); margin-inline: auto; }
.skip-link {
  position: fixed;
  inset: 12px auto auto 12px;
  z-index: 4;
  transform: translateY(-160%);
  padding: 9px 14px;
  background: var(--ink);
  color: var(--charcoal);
  border-radius: 5px;
}
.skip-link:focus { transform: none; }

.site-header { position: relative; z-index: 1; }
.header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(14px, 1.45vw, 22px) 0 8px clamp(0px, .6vw, 9px);
  min-height: clamp(70px, 5.65vw, 86px);
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-mark {
  flex: 0 0 auto;
  padding: 0 clamp(14px, 1.9vw, 27px) 4px 0;
  border-right: 1px solid var(--brass);
  font-size: clamp(32px, 3.1vw, 48px);
  line-height: 1;
  font-weight: 740;
  letter-spacing: -.12em;
}
.brand-mark span { position: relative; top: .15em; font-size: .83em; }
.brand-copy { display: grid; gap: 2px; padding-left: clamp(12px, 1.7vw, 26px); line-height: 1.16; }
.brand-copy strong { font-weight: 730; font-size: clamp(17px, 1.8vw, 27px); letter-spacing: -.027em; }
.brand-copy > span { color: var(--muted); font-size: clamp(12px, 1.19vw, 17px); }
.header-inner nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.6vw, 38px);
  font-weight: 650;
  font-size: clamp(14px, 1.3vw, 19px);
}
.header-inner nav a { display: grid; align-items: center; min-height: 44px; text-decoration: none; }
.header-inner nav a:hover, .header-inner nav a[aria-current] { color: var(--brass); text-decoration: underline; text-underline-offset: 5px; }

.hero {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(18px, 2.45vw, 34px);
  padding: 0 clamp(0px, 1.2vw, 18px) clamp(14px, 1.4vw, 20px) clamp(0px, 1.45vw, 22px);
}
.hero h1 {
  font-size: clamp(34px, 4.55vw, 66px);
  line-height: 1.055;
  font-weight: 770;
  letter-spacing: -.048em;
}
.hero h1 span { display: block; }
.hero-copy p {
  max-width: min(45ch, 42vw);
  margin-top: clamp(12px, 1.1vw, 16px);
  font-size: clamp(16px, 1.65vw, 23px);
  line-height: 1.37;
  color: var(--muted);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(11px, 1.3vw, 20px);
  min-height: 44px;
  margin-top: clamp(18px, 2vw, 29px);
  padding: 7px clamp(16px, 2.2vw, 32px);
  border: 2px solid var(--brass);
  border-radius: 10px;
  color: var(--brass);
  font-size: clamp(16px, 1.45vw, 21px);
  font-weight: 690;
  text-decoration: none;
}
.button span { font-size: 1.45em; line-height: 1; }
.button:hover { background: #3b3126; }
.hero-art {
  position: relative;
  aspect-ratio: 596 / 533;
  margin-top: clamp(-59px, -4vw, -26px);
  clip-path: polygon(
    0.3% 10.3%, 23.7% 10.3%, 24.1% 7.2%, 25.7% 4.8%, 28.3% 2.7%, 31.8% 1.3%,
    35.5% .55%, 39.3% .35%, 43.2% .95%, 46.6% 2.6%, 49.3% 4.9%, 51.5% 7.4%,
    52.7% 10.3%, 91.6% 10.3%, 91.6% 16%, 100% 16%, 100% 94.5%, 91.6% 94.5%,
    91.6% 100%, 0.3% 100%
  );
  overflow: hidden;
}
.hero-art img {
  position: absolute;
  display: block;
  width: 257.7181%;
  height: auto;
  max-width: none;
  left: -146.1409%;
  top: -4.878%;
}

.selected-work {
  border-top: 1px solid var(--brass);
  padding-top: clamp(14px, 1.36vw, 20px);
}
.selected-work h2 {
  font-size: clamp(24px, 2.17vw, 32px);
  line-height: 1.12;
  font-weight: 730;
  letter-spacing: -.035em;
}
.project-cards {
  display: grid;
  grid-template-columns: minmax(0, 1.29fr) minmax(0, .86fr) minmax(0, 1fr);
  gap: clamp(12px, 1.25vw, 18px);
  margin-top: clamp(12px, 1.25vw, 18px);
}
.project-card { min-width: 0; }
.project-card a {
  display: block;
  height: 100%;
  min-height: clamp(155px, 13.6vw, 202px);
  padding: clamp(13px, 1.15vw, 17px) clamp(15px, 1.9vw, 28px) clamp(15px, 1.3vw, 19px);
  border: 1px solid var(--border);
  border-top-color: #bfc2bc;
  border-radius: 11px;
  background: radial-gradient(ellipse at 15% 0, #383e3c, transparent 82%), linear-gradient(135deg, #2a2f2e, #242827 62%, #303534);
  box-shadow: inset 0 1px 0 #ffffff14;
  color: var(--ink);
  text-decoration: none;
}
.project-card a:hover { border-color: var(--brass); background: linear-gradient(140deg, #414542, #2a2f2e); }
.project-number {
  display: grid;
  gap: clamp(5px, .6vw, 8px);
  color: var(--brass);
  font-size: clamp(12px, 1.15vw, 17px);
  line-height: 1.15;
  font-weight: 690;
}
.project-number::after { content: ""; width: clamp(16px, 1.75vw, 26px); height: 2px; background: var(--brass); }
.project-card h3 {
  margin-top: clamp(8px, .9vw, 13px);
  font-size: clamp(18px, 1.85vw, 28px);
  line-height: 1.11;
  font-weight: 750;
  letter-spacing: -.03em;
}
.project-card:first-child h3 { font-size: clamp(18px, 2vw, 30px); text-wrap: balance; }
.project-card:last-child h3 { font-size: clamp(18px, 1.8vw, 27px); }
.project-card p, .project-card em {
  display: block;
  margin-top: clamp(7px, .87vw, 13px);
  font-size: clamp(15px, 1.29vw, 19px);
  line-height: 1.38;
  color: var(--muted);
}
.project-card em { margin-top: clamp(7px, .9vw, 13px); font-size: clamp(13px, 1.2vw, 17px); }

.site-footer {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.15vw, 17px);
  padding: clamp(16px, 1.9vw, 28px) 3px clamp(18px, 2vw, 30px);
  font-size: clamp(13px, 1.17vw, 17px);
  font-weight: 600;
}
.site-footer::after { content: ""; flex: 1; height: 1px; background: var(--brass); }

.project-detail { padding-top: clamp(8px, 1.35vw, 20px); }
.back-link, .text-link { color: var(--brass); font-weight: 680; text-underline-offset: 4px; text-decoration-thickness: .09em; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.project-detail h1 { font-size: clamp(32px, 3.7vw, 52px); line-height: 1.1; letter-spacing: -.04em; }
.project-context { max-width: 70ch; margin-top: 12px; color: var(--muted); font-size: clamp(16px, 1.3vw, 18px); }
.demo { margin-top: clamp(16px, 1.7vw, 25px); }
.demo-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.demo-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 13px;
  background: var(--surface);
  font-weight: 650;
  text-decoration: none;
}
.demo-nav a:hover { border-color: var(--brass); }
.demo-nav a[aria-current="page"] { border-color: var(--brass); background: var(--brass); color: #251e16; }
.demo-toolbar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 8px; }
.demo-note { color: var(--muted); font-size: 14px; }
.demo-toolbar .text-link { font-size: 14px; }
.program-frame {
  display: block;
  width: 100%;
  min-height: 575px;
  height: min(82dvh, 1040px);
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #f5f6f7;
  color-scheme: light;
}
.program-frame.companion-frame { min-height: 0; height: clamp(500px, 78dvh, 780px); }
.evaluation { margin-top: clamp(24px, 3.5vw, 50px); }
.evaluation h2 { font-size: clamp(23px, 2.5vw, 32px); }
.evaluation dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 17px;
  margin: 12px 0 16px;
}
.evaluation dl > div { border-top: 1px solid var(--brass); padding: 9px 0; }
.evaluation dt { font-weight: 700; }
.evaluation dd { margin-top: 4px; color: var(--muted); }
.about { min-height: 50vh; }


@media (max-width: 760px) {
  .header-inner { min-height: 74px; gap: 9px; }
  .brand-mark { padding-right: 13px; }
  .brand-copy { padding-left: 9px; }
  .hero { grid-template-columns: 1fr; padding-inline: 0; gap: 18px; }
  .hero-copy { padding-top: 10px; }
  .hero-copy p { max-width: 45ch; }
  .hero h1 { font-size: clamp(34px, 7.65vw, 54px); }
  .hero-art { width: min(100%, 430px); margin: 0 auto; }
  .project-cards, .evaluation dl { grid-template-columns: 1fr; }
  .project-card a { min-height: 0; }
  .program-frame { height: max(650px, 84dvh); }
}
@media (max-width: 375px) {
  .header-inner nav { gap: 7px; font-size: 12px; }
  .brand-mark { font-size: 29px; }
  .brand-copy strong { font-size: 15px; }
}

.research-label {
  color: var(--brass);
  font-size: .79rem;
  font-weight: 730;
  letter-spacing: .065em;
  line-height: 1.35;
  text-transform: uppercase;
}
.research-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: clamp(22px, 2.5vw, 34px);
  padding: 16px 0;
  border-block: 1px solid #59554c;
}
.research-callout h2 { font-size: clamp(18px, 1.7vw, 24px); line-height: 1.2; }
.research-callout p { margin-top: 5px; color: var(--muted); }
.research-callout .text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.implementation-brief {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 16px;
  margin-top: 16px;
  padding: 8px 14px;
  border-left: 2px solid var(--brass);
  background: #ffffff06;
  color: var(--muted);
  font-size: .91rem;
}
.implementation-brief .research-label { flex-basis: 100%; }
.implementation-brief .text-link { display: inline-block; padding-block: 3px; }
.evaluation > .research-label { margin-bottom: 4px; }
.evaluation .project-context { margin-top: 6px; }

.research-intro { padding: 10px 0 4px; }
.research-intro h1 { margin-top: 5px; }
.research-page .project-context { max-width: 64ch; line-height: 1.55; }
.research-citations { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 9px; font-size: .9rem; }
.research-citations a { color: var(--brass); text-underline-offset: 3px; }
.research-jumps { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.research-jumps a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 4px 11px; border: 1px solid var(--rule); border-radius: 6px; font-size: .9rem; font-weight: 670; text-decoration: none; }
.research-jumps a span, .research-jumps a:hover { color: var(--brass); }
.research-jumps a:hover { border-color: var(--brass); }

.research-section { margin-top: clamp(20px, 3.1vw, 42px); padding-top: clamp(18px, 2.5vw, 31px); border-top: 1px solid var(--border); }
.research-section h2 { margin-top: 4px; font-size: clamp(24px, 2.7vw, 37px); line-height: 1.12; letter-spacing: -.035em; }
.research-section h3 { font-size: clamp(18px, 1.55vw, 22px); line-height: 1.25; }
.epis-phases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 0; margin: 18px 0 0; list-style: none; }
.epis-phases li { padding-top: 9px; border-top: 1px solid var(--brass); }
.epis-phases h3 { margin: 4px 0 6px; }
.epis-phases p { max-width: 31ch; color: var(--muted); font-size: .97rem; }
.study-design { margin-top: clamp(19px, 2.5vw, 30px); }
.study-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
  gap: 9px;
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}
.study-flow > li, .study-benchmarks > div, .research-projects > article {
  min-width: 0;
  padding: clamp(12px, 1.4vw, 18px);
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: linear-gradient(150deg, #303935, var(--surface));
}
.study-flow > li { border-top-color: var(--brass); }
.study-flow h4 { margin: 4px 0 5px; font-size: 1.05rem; line-height: 1.24; }
.study-flow p { color: var(--muted); font-size: .97rem; }
.study-arms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 8px; }
.study-arms > div { display: grid; align-content: start; gap: 3px; padding: 8px 9px; border-radius: 6px; background: #f5e4c90e; }
.study-arms > div:first-child { background: #d8ad7025; }
.study-arms span { color: var(--muted); font-size: .82rem; line-height: 1.3; }
.study-arms strong { font-size: .9rem; line-height: 1.27; }
.study-benchmarks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.study-benchmarks > div { display: flex; flex-direction: column; gap: 7px; }
.study-benchmarks dt { font-size: .95rem; font-weight: 660; }
.study-benchmarks dd { order: -1; color: var(--brass); font-size: clamp(23px, 2.65vw, 36px); font-weight: 740; font-variant-numeric: tabular-nums; line-height: 1.05; }
.research-projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-top: 14px; }
.research-projects h3 { margin: 5px 0 7px; }
.research-projects h3 a { text-underline-offset: 4px; }
.research-projects h3 a:hover { color: var(--brass); }
.research-projects p:not(.research-label) { max-width: 49ch; color: var(--muted); }
.evaluation-check { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--rule); }
.evaluation-check strong { display: block; color: var(--ink); font-size: .9rem; }
.research-evidence { margin-top: 14px; padding: 13px 16px; border-left: 2px solid var(--brass); background: #ffffff06; }
.research-evidence > p:not(.research-citations), .study-notes > p:not(.research-citations) { max-width: 72ch; margin-top: 6px; color: var(--muted); }
.study-notes { margin-top: 13px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.study-notes summary { min-height: 44px; padding: 8px 0; color: var(--brass); font-weight: 680; cursor: pointer; }
.study-notes summary:focus-visible { outline: 3px solid var(--brass); outline-offset: 4px; }

@media (max-width: 790px) {
  .study-flow { grid-template-columns: 1fr; }
  .epis-phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 660px) {
  .research-projects { grid-template-columns: 1fr; }
  .study-benchmarks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evaluation dl { grid-template-columns: 1fr; }
}
@media (max-width: 530px) {
  .header-inner { flex-wrap: wrap; gap: 1px 16px; }
  .header-inner nav { gap: 19px; }
}
@media (max-width: 370px) {
  .study-arms { grid-template-columns: 1fr; }
  .epis-phases { grid-template-columns: 1fr; }
}

.bio-intro { padding: 8px 0 clamp(18px, 2.6vw, 30px); border-bottom: 1px solid var(--rule); }
.bio-intro h1 { margin-top: 4px; }
.bio-role { margin-top: 7px; color: var(--brass); font-size: clamp(16px, 1.7vw, 21px); font-weight: 680; }
.bio-grid { display: grid; grid-template-columns: minmax(240px, .78fr) minmax(0, 1.38fr); gap: clamp(20px, 4vw, 54px); margin-top: 22px; }
.bio-grid h2 { font-size: clamp(23px, 2.2vw, 32px); line-height: 1.2; letter-spacing: -.026em; }
.bio-education ol { padding: 0; margin: 12px 0 0; list-style: none; }
.bio-education li { padding: 11px 0; border-top: 1px solid var(--rule); }
.bio-education h3 { margin-top: 4px; font-size: 1.05rem; line-height: 1.28; }
.bio-education li p:last-child, .bio-narrative p { color: var(--muted); }
.bio-education li p:last-child { margin-top: 3px; }
.bio-narrative p { max-width: 68ch; margin-top: 10px; }
.bio-narrative section + section { margin-top: 19px; padding-top: 18px; border-top: 1px solid var(--rule); }
.bio-narrative .text-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: 6px 16px 0 0; }

.companion-journey { margin-top: clamp(22px, 3.5vw, 42px); padding: clamp(16px, 3vw, 35px); border: 1px solid var(--rule); border-radius: 10px; background: radial-gradient(ellipse at 18% 70%, #343e39, var(--surface) 70%); }
.companion-journey h3 { margin-top: 5px; font-size: clamp(20px, 2vw, 27px); }
.journey-intro { margin-top: 6px; color: var(--muted); }
.journey-steps {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(15px, 4vw, 60px);
  max-width: 860px;
  padding: 0;
  margin: 20px auto 0;
  list-style: none;
}
.journey-steps > li { min-width: 0; }
.journey-steps > li:first-child { text-align: center; }
.journey-phone {
  position: relative;
  width: min(100%, 15.5rem);
  margin: 9px auto 0;
  color: #172c29;
  color-scheme: light;
}
.journey-phone img { display: block; width: 100%; height: auto; filter: drop-shadow(0 12px 14px #0005); }
.journey-phone-screen { position: absolute; inset: 7.2% 9% 8%; overflow: auto; padding: 0 2px 6px; }
.journey-phone-sender { font-size: 1rem; font-weight: 780; }
.journey-phone-caption { padding-bottom: 6px; border-bottom: 1px solid #bac7bd; color: #3f5148; font-size: .8rem; }
.journey-phone-bubble { margin-top: 12px; padding: 11px; border-radius: 13px 13px 13px 3px; background: #dcebe3; text-align: left; font-size: .95rem; line-height: 1.45; }
.journey-phone-bubble a { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; margin-top: 4px; color: #1d4074; font-weight: 730; text-underline-offset: 3px; }
.journey-phone-bubble a:hover { color: #112b55; }
.journey-companion { margin-top: 9px; padding: clamp(14px, 2vw, 24px); border: 1px solid #a89cbf; border-radius: 9px; background: #f7f4fc; color: #231d39; color-scheme: light; }
.journey-companion-label { color: #4a3768; font-size: .86rem; font-weight: 730; }
.journey-companion h4 { margin: 4px 0 7px; font-size: clamp(19px, 2vw, 27px); line-height: 1.19; letter-spacing: -.023em; }
.journey-companion h4 + p { max-width: 40ch; color: #433951; }
.journey-demo-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; margin-top: 13px; padding: 7px 12px; border-radius: 6px; background: #493475; color: #fff; font-weight: 720; font-size: .95rem; text-decoration: none; }
.journey-demo-link:hover { background: #352658; }
.journey-phone a:focus-visible, .journey-companion a:focus-visible { outline-color: #392750; outline-offset: 3px; }
.journey-more { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; margin-top: 12px; }
.journey-more span { flex-basis: 100%; color: var(--muted); font-size: .9rem; }
.journey-more .text-link { display: inline-flex; align-items: center; min-height: 44px; }

@media (prefers-reduced-motion: no-preference) {
  .companion-journey:target .journey-phone-bubble { animation: message-arrive .35s ease-out; }
  @keyframes message-arrive {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
@media (max-width: 700px) {
  .bio-grid, .journey-steps { grid-template-columns: 1fr; }
}
