:root {
  --ink: #182038;
  --ink-soft: #4f5b70;
  --paper: #fffef8;
  --cream: #f4f0df;
  --purple: #5b3fd1;
  --purple-dark: #39268f;
  --yellow: #ffc94a;
  --mint: #78d9c2;
  --green: #0d9f70;
  --coral: #e85d75;
  --blue: #1982c4;
  --line: #182038;
  --shadow: 5px 5px 0 var(--ink);
  --radius: 18px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    linear-gradient(rgba(91, 63, 209, .065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 63, 209, .065) 1px, transparent 1px);
  background-size: 24px 24px;
  font-family: "Aptos", "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

img, svg { max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
h1, h2, h3, h4 { margin: 0 0 .55em; font-family: "Trebuchet MS", "Aptos Display", sans-serif; line-height: 1.08; }
h1 { font-size: clamp(3rem, 9vw, 6.5rem); letter-spacing: -.055em; }
h2 { font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: -.035em; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2rem; }
blockquote { margin: 0; }

.skip-link { position: fixed; left: 12px; top: -100px; z-index: 1000; padding: 10px 14px; background: var(--yellow); border: 2px solid var(--ink); font-weight: 800; }
.skip-link:focus { top: 12px; }
.wrap { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section.compact { padding-block: 50px; }
.section-head { max-width: 780px; margin-bottom: 38px; }
.section-head p:last-child { color: var(--ink-soft); font-size: 1.08rem; }
.eyebrow { margin: 0 0 8px; color: var(--purple); font-size: .76rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.kicker { max-width: 800px; font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--ink-soft); }
.mono { font-family: "Courier New", monospace; }
.muted { color: var(--ink-soft); }
.small { font-size: .86rem; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 254, 248, .96); border-bottom: 3px solid var(--ink); backdrop-filter: blur(10px); }
.nav-shell { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-family: "Trebuchet MS", sans-serif; font-weight: 900; letter-spacing: -.02em; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; background: var(--yellow); border: 3px solid var(--ink); border-radius: 14px 14px 17px 10px; box-shadow: 3px 3px 0 var(--purple); transform: rotate(-3deg); font: 900 .9rem "Courier New", monospace; }
.brand span:last-child { display: flex; flex-direction: column; line-height: 1.03; }
.brand small { color: var(--ink-soft); font: 700 .67rem "Aptos", "Segoe UI", sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { padding: 9px 11px; border-radius: 8px; text-decoration: none; font-size: .88rem; font-weight: 750; }
.site-nav a:hover, .site-nav a:focus-visible { background: #ebe6ff; }
.site-nav a[aria-current="page"] { color: white; background: var(--purple); box-shadow: 2px 2px 0 var(--ink); }
.nav-toggle { display: none; width: 44px; height: 44px; place-items: center; background: var(--yellow); border: 2px solid var(--ink); border-radius: 9px; cursor: pointer; }
.nav-toggle > span:not(.sr-only), .nav-toggle::before, .nav-toggle::after { width: 22px; height: 2px; display: block; background: var(--ink); content: ""; transition: transform .2s, opacity .2s; }
.nav-toggle::before { transform: translateY(-6px); }
.nav-toggle::after { transform: translateY(4px); }

.hero { padding: clamp(70px, 10vw, 128px) 0 72px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: clamp(32px, 6vw, 76px); align-items: center; }
.hero h1 span { display: block; color: var(--purple); }
.hero-copy { max-width: 790px; }
.hero-copy .kicker { margin-top: 24px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0; }
.tag { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; font-size: .78rem; font-weight: 800; }
.tag::before { width: 8px; height: 8px; border-radius: 50%; background: var(--green); content: ""; }
.tag.caution::before { background: var(--yellow); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 11px 18px; color: white; background: var(--purple); border: 3px solid var(--ink); border-radius: 10px; box-shadow: 4px 4px 0 var(--ink); text-decoration: none; font-weight: 850; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.button:hover, .button:focus-visible { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.button.secondary { color: var(--ink); background: var(--yellow); }
.button.quiet { color: var(--ink); background: var(--paper); }
.button.small-button { min-height: 40px; padding: 7px 12px; font-size: .84rem; border-width: 2px; box-shadow: 2px 2px 0 var(--ink); }
.hero-board { position: relative; padding: 26px; background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: 9px 9px 0 var(--purple); transform: rotate(1deg); }
.hero-board::before { position: absolute; width: 96px; height: 26px; left: 50%; top: -15px; transform: translateX(-50%) rotate(-2deg); background: rgba(255, 201, 74, .78); content: ""; }
.hero-board .question { margin: 8px 0 22px; font: 900 1.45rem/1.35 "Trebuchet MS", sans-serif; }
.hero-board dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-board div { padding: 12px; background: #f2efff; border: 2px solid var(--ink); border-radius: 9px; }
.hero-board dt { color: var(--ink-soft); font-size: .7rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.hero-board dd { margin: 2px 0 0; font-weight: 850; }

.notice { padding: 17px 20px; display: flex; gap: 14px; align-items: flex-start; background: #fff0c7; border: 3px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--yellow); }
.notice strong { display: block; }
.notice p { margin: 0; }
.notice-mark { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 30px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 50%; font-weight: 900; }

.question-band { color: white; background: var(--ink); border-block: 4px solid var(--yellow); }
.question-band .wrap { padding-block: 58px; display: grid; grid-template-columns: .4fr 1.6fr; gap: 40px; align-items: start; }
.question-band .eyebrow { color: var(--yellow); }
.question-band blockquote { font: 850 clamp(1.5rem, 3vw, 2.6rem)/1.3 "Trebuchet MS", sans-serif; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { padding: 24px; background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.card h3 { margin-top: 12px; }
.card p:last-child { margin-bottom: 0; }
.card-icon { width: 48px; height: 48px; display: grid; place-items: center; background: var(--yellow); border: 2px solid var(--ink); border-radius: 50%; font: 900 1rem "Courier New", monospace; }
.card.purple { box-shadow: 6px 6px 0 var(--purple); }
.card.blue { box-shadow: 6px 6px 0 var(--blue); }
.card.coral { box-shadow: 6px 6px 0 var(--coral); }
.card.mint { box-shadow: 6px 6px 0 var(--mint); }

.study-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.study-card { position: relative; padding: 26px; overflow: hidden; background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.study-card::after { position: absolute; width: 110px; height: 110px; right: -35px; top: -35px; background: var(--accent, var(--mint)); border: 3px solid var(--ink); border-radius: 50%; content: ""; opacity: .5; }
.study-card > * { position: relative; z-index: 1; }
.study-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.study-number { width: 50px; height: 50px; display: grid; place-items: center; flex: 0 0 50px; background: var(--yellow); border: 3px solid var(--ink); border-radius: 50%; font: 900 .95rem "Courier New", monospace; }
.status { display: inline-flex; padding: 5px 9px; color: var(--ink); background: var(--mint); border: 2px solid var(--ink); border-radius: 999px; font-size: .7rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.status.complete { background: #dff7ed; }
.status.pilot { background: var(--yellow); }
.study-card h2 { margin-top: 24px; font-size: clamp(1.65rem, 3vw, 2.3rem); }
.study-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.study-meta span { padding: 5px 8px; background: #f2efff; border: 1.5px solid var(--ink); border-radius: 7px; font-size: .74rem; font-weight: 800; }
.study-card .question-line { margin: 18px 0; padding: 14px; background: #fff0c7; border-left: 5px solid var(--yellow); font-weight: 750; }
.study-card details { margin-top: 16px; border-top: 2px dashed #9aa4b7; padding-top: 14px; }
.study-card summary { cursor: pointer; font-weight: 850; }

.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 34px; }
.metric { padding: 18px; color: white; background: var(--ink); border: 3px solid var(--ink); border-radius: 13px; box-shadow: 4px 4px 0 var(--yellow); }
.metric b, .metric span { display: block; }
.metric b { color: var(--yellow); font: 900 2rem/1 "Trebuchet MS", sans-serif; }
.metric span { margin-top: 6px; color: #dce1ea; font-size: .78rem; }

.finding-list { display: grid; gap: 18px; }
.finding { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 22px; background: var(--paper); border: 3px solid var(--ink); border-radius: 15px; box-shadow: 4px 4px 0 var(--ink); }
.finding-index { color: var(--purple); font: 900 2.1rem "Courier New", monospace; }
.finding h3 { margin: 0 0 4px; }
.finding p { margin: 0; color: var(--ink-soft); }
.evidence-tag { padding: 5px 8px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px; font-size: .68rem; font-weight: 900; text-transform: uppercase; white-space: nowrap; }

.evidence-ladder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ladder-step { padding: 24px; border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.ladder-step:nth-child(1) { background: #dff7ed; }
.ladder-step:nth-child(2) { background: #fff0c7; }
.ladder-step:nth-child(3) { background: #f2efff; }
.ladder-step span { display: inline-grid; width: 34px; height: 34px; place-items: center; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; font-weight: 900; }

.timeline { position: relative; display: grid; gap: 24px; padding-left: 36px; }
.timeline::before { position: absolute; left: 12px; top: 6px; bottom: 8px; border-left: 3px dashed var(--purple); content: ""; }
.timeline-entry { position: relative; padding: 22px; background: var(--paper); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink); }
.timeline-entry::before { position: absolute; width: 18px; height: 18px; left: -36px; top: 27px; background: var(--yellow); border: 3px solid var(--ink); border-radius: 50%; content: ""; }
.timeline-entry time { display: block; color: var(--purple); font-size: .76rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }

.method-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.method-card { padding: 26px; background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.method-card ol { padding: 0; margin: 18px 0 0; list-style: none; counter-reset: steps; }
.method-card li { position: relative; padding: 0 0 22px 50px; counter-increment: steps; }
.method-card li::before { position: absolute; left: 0; top: 0; width: 34px; height: 34px; display: grid; place-items: center; background: var(--yellow); border: 2px solid var(--ink); border-radius: 50%; content: counter(steps); font-weight: 900; }
.method-card li:not(:last-child)::after { position: absolute; left: 16px; top: 38px; bottom: 5px; border-left: 2px dashed #9aa4b7; content: ""; }
.code-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.code-grid span { padding: 13px; background: #f2efff; border: 2px solid var(--ink); border-radius: 9px; font-size: .84rem; font-weight: 800; }

.paper-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.paper-card { padding: 28px; background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.paper-card .pdf-mark { width: 62px; height: 78px; display: grid; place-items: center; margin-bottom: 20px; color: white; background: var(--coral); border: 3px solid var(--ink); border-radius: 7px 14px 7px 7px; box-shadow: 4px 4px 0 var(--ink); font: 900 .85rem "Courier New", monospace; }
.paper-card h2 { font-size: 1.8rem; }
.paper-card .citation { padding: 13px; margin: 18px 0; background: #f2efff; border: 2px dashed var(--purple); border-radius: 8px; font: .77rem/1.5 "Courier New", monospace; }
.paper-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.transparency { padding: 28px; color: white; background: var(--purple); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--ink); }
.transparency h2 { color: var(--yellow); }
.transparency a { color: var(--yellow); }

.about-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 28px; align-items: start; }
.about-card, .contact-card { padding: 28px; background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.about-card .initial { width: 88px; height: 88px; display: grid; place-items: center; margin-bottom: 22px; background: var(--yellow); border: 3px solid var(--ink); border-radius: 50%; box-shadow: 4px 4px 0 var(--purple); font: 900 2rem "Trebuchet MS", sans-serif; }
.contact-card label { display: block; margin-bottom: 16px; font-size: .86rem; font-weight: 850; }
.contact-card input, .contact-card textarea, .contact-card select { width: 100%; margin-top: 6px; padding: 11px 12px; background: white; border: 2px solid var(--ink); border-radius: 8px; }
.contact-card textarea { min-height: 160px; resize: vertical; }
.honeypot { position: absolute; left: -9999px; }

.cta-band { padding: 38px; display: flex; align-items: center; justify-content: space-between; gap: 30px; background: var(--yellow); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: 7px 7px 0 var(--purple); }
.cta-band h2 { margin-bottom: 4px; font-size: clamp(1.8rem, 4vw, 3rem); }
.cta-band p { margin: 0; max-width: 680px; }

.site-footer { padding: 48px 0 28px; color: white; background: var(--ink); border-top: 5px solid var(--yellow); }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 34px; }
.site-footer .brand { color: white; }
.site-footer .brand small { color: #cbd2df; }
.site-footer h3 { color: var(--yellow); font-size: 1rem; }
.site-footer ul { padding: 0; margin: 0; list-style: none; }
.site-footer a { color: #dfe3ec; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.site-footer a:hover { color: var(--yellow); }
.footer-note { margin-top: 36px; padding-top: 22px; display: flex; justify-content: space-between; gap: 24px; color: #b9c0cf; border-top: 1px solid #4c5870; font-size: .78rem; }

@media (max-width: 980px) {
  .hero-grid, .question-band .wrap, .about-grid { grid-template-columns: 1fr; }
  .hero-board { max-width: 650px; transform: none; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-strip, .code-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-toggle { display: grid; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; padding: 12px 20px 18px; display: none; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 3px solid var(--ink); box-shadow: 0 8px 0 rgba(24,32,56,.15); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px; }
  .study-grid, .paper-grid, .method-layout, .evidence-ladder { grid-template-columns: 1fr; }
  .finding { grid-template-columns: 58px 1fr; }
  .finding .evidence-tag { grid-column: 2; justify-self: start; }
  .cta-band { align-items: flex-start; flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-note { flex-direction: column; }
}

@media (max-width: 540px) {
  .wrap { width: min(100% - 24px, var(--max)); }
  .hero { padding-top: 52px; }
  h1 { font-size: clamp(2.8rem, 17vw, 4.6rem); }
  .card-grid, .metric-strip, .code-grid { grid-template-columns: 1fr; }
  .hero-board dl { grid-template-columns: 1fr; }
  .finding { grid-template-columns: 1fr; }
  .finding .evidence-tag { grid-column: 1; }
  .paper-actions, .button-row { flex-direction: column; align-items: stretch; }
  .button { width: 100%; }
}

/* Portfolio integration: preserve the supplied research site as a dated notebook. */
.portfolio-return{background:#182038;color:#fff;font-size:12px;line-height:1.6;padding:11px 0}
.portfolio-return .wrap{display:flex;align-items:center;justify-content:space-between;gap:10px 24px;flex-wrap:wrap}
.portfolio-return a{font-weight:750;text-underline-offset:4px}.portfolio-return span{color:#e1dcef}
a:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid #1982c4;outline-offset:4px}
@media(max-width:600px){.portfolio-return .wrap{display:grid;gap:4px}.portfolio-return span{font-size:11px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
