/* Layout: his Squarespace structure (centered name, nav row, centered content, card row on Research) with a raised hero panel per page.
   Light paper by default; charcoal & brass when the visitor's device prefers dark. Brass = accent / 'preserved'; coral = what the system dropped. */
:root {
  --bg: #FAF9F6;
  --surface: #F1EDE6;
  --ink: #1E1B18;
  --muted: #5C544A;
  --rule: #E2DCD2;
  --sand: #FFFFFF;
  --sand-ink: #1E1B18;
  --sand-muted: #5C544A;
  --keep: #85621F;
  --keep-hi: #6E5018;
  --keep-bg: #F3E7CC;
  --loss: #A9402A;
  --loss-bg: #F8E2DA;
  --spec: #A47B2E;
  --display: "Marcellus", "Optima", "Palatino Linotype", Georgia, serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12100E; --surface: #1C1916; --ink: #EEE7DC; --muted: #A79C8C; --rule: #2F2A24;
    --sand: #221E1A; --sand-ink: #EEE7DC; --sand-muted: #A79C8C;
    --keep: #CDAA6A; --keep-hi: #DDBF85; --keep-bg: #352B19; --loss: #E58B74; --loss-bg: #3A221B;
    --spec: #CDAA6A; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #12100E; --surface: #1C1916; --ink: #EEE7DC; --muted: #A79C8C; --rule: #2F2A24;
    --sand: #221E1A; --sand-ink: #EEE7DC; --sand-muted: #A79C8C;
    --keep: #CDAA6A; --keep-hi: #DDBF85; --keep-bg: #352B19; --loss: #E58B74; --loss-bg: #3A221B;
    --spec: #CDAA6A; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--ink); }
body {
  margin: 0; font-family: var(--body); font-size: 1.125rem; line-height: 1.65;
  padding-inline: 20px; min-height: 100vh; display: flex; flex-direction: column;
}
img { max-width: 100%; }
a { color: inherit; text-decoration-color: var(--keep); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--keep); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--keep); outline-offset: 3px; }
p { margin: 0 0 1em; max-width: 65ch; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: var(--bg); border-bottom: 1px solid var(--rule);
  margin-inline: -20px; padding-inline: 20px;
}
.bar { max-width: 72rem; margin-inline: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding-block: 22px 10px; }
.social { display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--mono); font-size: .8rem; letter-spacing: .04em; }
.social a { text-decoration: none; color: var(--muted); }
.social a:hover { color: var(--ink); }
.name { font-family: var(--display); font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.name:hover { color: var(--ink); }
.cta-wrap { display: flex; justify-content: flex-end; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: var(--bg); background: var(--keep); padding: 10px 16px; border: 0; border-radius: 2px; cursor: pointer; }
.btn:hover { color: var(--bg); background: var(--keep-hi); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.btn.ghost:hover { border-color: var(--keep); color: var(--keep); }
.nav { max-width: 72rem; margin-inline: auto; padding-block: 0 16px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 34px; font-family: var(--body); font-size: 1rem; }
.nav a { text-decoration: none; color: var(--muted); padding-bottom: 3px; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--keep); }
.menu-btn { display: none; background: none; border: 0; color: var(--ink); padding: 8px; cursor: pointer; justify-self: end; }
.menu-btn span { display: block; width: 30px; height: 1.5px; background: currentColor; margin: 7px 0; }

@media (max-width: 760px) {
  .bar { grid-template-columns: 1fr auto auto; padding-block: 18px; gap: 6px; }
  .affil, .cta-wrap .btn { display: none; }
  .name { justify-self: start; }
  .menu-btn { display: block; }
  .nav { display: none; padding-block: 4px 22px; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: flex-start; gap: 14px; font-size: 1.3rem; }
  .nav .mobile-extra { display: flex; }
}
.nav .mobile-extra { display: none; gap: 18px; margin-top: 22px; font-family: var(--mono); font-size: .8rem; flex-wrap: wrap; }

/* ---------- page ---------- */
main { flex: 1; width: 100%; max-width: 46rem; margin-inline: auto; padding-block: 52px 72px; }
.hero-band { background: var(--surface); border-bottom: 1px solid var(--rule); margin-inline: -20px; padding-inline: 20px; }
.hero-inner { max-width: 46rem; margin-inline: auto; padding-block: 60px 52px; }
.hero-inner.wide { max-width: 72rem; }
.hero-inner > :last-child { margin-bottom: 0; }
.hero-inner .centered p:last-child { margin-bottom: 0; }
main.wide { max-width: 72rem; }
.centered { text-align: center; }
.centered p { margin-inline: auto; }
.kicker { font-family: var(--mono); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: .06em; text-transform: uppercase; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; margin: 0 0 24px; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.2; margin: 0 0 22px; }
h3 { font-family: var(--body); font-weight: 600; font-size: 1.15rem; line-height: 1.35; margin: 0; }
.tagline { font-size: clamp(1.1rem, 2.4vw, 1.35rem); color: var(--muted); margin-bottom: 18px; }
.lede { font-size: clamp(1.2rem, 2.6vw, 1.45rem); line-height: 1.55; }
.section { margin-top: 64px; }

/* ---------- ASR alignment figure ---------- */
.align { margin: 48px 0 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: 22px 24px; display: grid; gap: 16px; text-align: left; min-width: 0; }
.align-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; }
.label { font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rows { overflow-x: auto; }
.rows table { border-collapse: collapse; font-family: var(--mono); font-size: 1rem; }
.rows th { text-align: left; font-weight: 500; font-size: .72rem; letter-spacing: .08em; color: var(--muted); padding: 4px 18px 4px 0; }
.rows td { padding: 4px 10px; text-align: center; white-space: nowrap; }
.rows tr.ops td { font-size: .72rem; color: var(--muted); }
.rows .s, .rows .d { color: var(--loss); background: var(--loss-bg); border-radius: 2px; }
.rows .hit { color: var(--keep); background: var(--keep-bg); border-radius: 2px; font-weight: 500; }
.rows tr.ops .s, .rows tr.ops .d { background: none; font-weight: 500; }
.align p { margin: 0; font-size: 1rem; line-height: 1.55; }

/* ---------- now list (home) ---------- */
.now { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; text-align: left; }
.now li { display: grid; grid-template-columns: 8rem 1fr; gap: 4px 22px; padding-block: 18px; border-top: 1px solid var(--rule); }
.now li:last-child { border-bottom: 1px solid var(--rule); }
.now .label { padding-top: 4px; }
.now p { margin: 4px 0 0; font-size: 1.02rem; }
@media (max-width: 560px) { .now li { grid-template-columns: 1fr; } }

/* ---------- about ---------- */
.about-top { display: grid; grid-template-columns: 1fr 15rem; gap: 32px 44px; align-items: start; }
@media (max-width: 680px) { .about-top { grid-template-columns: 1fr; } }
.portrait { width: 100%; height: auto; max-width: 15rem; aspect-ratio: 1; border-radius: 2px; object-fit: cover; background: var(--surface); border: 1px solid var(--rule); display: grid; place-items: center; font-family: var(--display); font-size: 3.4rem; letter-spacing: .1em; color: var(--muted); }
blockquote { margin: 0 0 8px; padding-left: 18px; border-left: 2px solid var(--keep); font-style: italic; font-size: 1.15rem; max-width: 60ch; }
blockquote cite { display: block; font-style: normal; font-family: var(--mono); font-size: .78rem; color: var(--muted); margin-top: 8px; }

/* ---------- research cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 18px; margin-top: 40px; }
.card { border: 1px solid var(--rule); background: var(--sand); color: var(--sand-ink); border-radius: 2px; padding: 26px 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card .label { color: var(--sand-muted); }
.card h3 { font-family: var(--display); font-weight: 400; font-size: 1.35rem; letter-spacing: .02em; }
.card p { font-size: 1rem; margin: 0; }
.card .meta { font-family: var(--mono); font-size: .76rem; color: var(--sand-muted); }
.card .foot { margin-top: auto; padding-top: 12px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.status { font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sand-muted); border: 1px solid var(--rule); border-radius: 999px; padding: 4px 11px; }

/* ---------- cv ---------- */
.cv-block { margin-top: 48px; }
.cv-block:first-of-type { margin-top: 0; }
.cv-row { display: grid; grid-template-columns: 8rem 1fr; gap: 4px 22px; padding-block: 16px; border-top: 1px solid var(--rule); }
.cv-row .yr { font-family: var(--mono); font-size: .85rem; color: var(--muted); padding-top: 3px; font-variant-numeric: tabular-nums; }
.cv-row p { margin: 3px 0 0; font-size: 1rem; color: var(--muted); }
@media (max-width: 560px) { .cv-row { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { font-family: var(--mono); font-size: .8rem; border: 1px solid var(--rule); border-radius: 999px; padding: 4px 12px; }

/* ---------- contact ---------- */
form { display: grid; gap: 20px; margin-top: 34px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, fieldset legend { font-family: var(--mono); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.req { color: var(--keep); }
input, textarea, select { font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 2px; padding: 11px 12px; width: 100%; }
textarea { min-height: 9rem; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choices label { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--rule); border-radius: 999px; padding: 6px 14px; font-size: .95rem; cursor: pointer; text-transform: none; letter-spacing: 0; font-family: var(--body); color: var(--ink); }
.choices input { width: auto; accent-color: var(--keep); }
.form-note { font-family: var(--mono); font-size: .82rem; color: var(--keep); margin: 0; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); margin-inline: -20px; padding-inline: 20px; }
.site-footer .inner { max-width: 72rem; margin-inline: auto; padding-block: 28px 36px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
main > .align:first-child { margin-top: 0; }

/* ---------- hero illustration ---------- */
.hero-grid { display: grid; gap: 34px; }
.illo { margin: 0; display: grid; gap: 10px; }
.illo svg { width: 100%; height: auto; display: block; overflow: visible; }
.illo .spec { fill: var(--spec); }
.illo .wave { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.illo .guide { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 4; opacity: .7; }
.illo .word { font-family: var(--display); font-size: 34px; fill: var(--ink); letter-spacing: .02em; }
.illo .word.key { fill: var(--keep); }
.illo .bracket { fill: none; stroke: var(--keep); stroke-width: 1.5; }
.illo .note { font-family: var(--mono); font-size: 19px; fill: var(--keep); letter-spacing: .04em; }
.illo .note.sub { fill: var(--muted); }
.illo figcaption { font-size: .98rem; color: var(--muted); text-align: center; max-width: 52ch; margin-inline: auto; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }
.who { font-family: var(--mono); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--keep); margin: 0 0 12px; }

/* ---------- plain-language example (research page) ---------- */
.example { margin-top: 72px; display: grid; gap: 18px; }
.example .align { margin-top: 6px; }
.rows th.plain { font-family: var(--body); font-size: .95rem; letter-spacing: 0; color: var(--ink); text-transform: none; font-weight: 600; }
.rows th .tech { display: block; font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; color: var(--muted); font-weight: 400; }

/* ---------- direct contact ---------- */
.direct { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 18px; margin-top: 30px; }
.direct > div { border: 1px solid var(--rule); border-radius: 2px; padding: 16px 18px; min-width: 0; overflow-wrap: anywhere; }
.direct a { font-size: 1.05rem; }

/* voice-to-language illustration */
.illo .ring { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.illo .ring.faint { stroke-opacity: .35; }
.illo .core { fill: var(--keep); }
.illo .bar { stroke: var(--keep); stroke-width: 3; stroke-linecap: round; }
.illo .flow { fill: none; stroke: var(--keep); stroke-width: 1.6; stroke-linecap: round; }
.illo .edge { stroke: var(--muted); stroke-width: 1; }
.illo .node { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.illo .chip { fill: var(--bg); stroke: var(--keep); stroke-width: 1.4; }
.illo .chip-text { font-family: var(--body); font-size: 19px; fill: var(--ink); }

/* copyable email */
.copy-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.copy-btn { font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); background: transparent; border: 1px solid var(--rule); border-radius: 2px; padding: 4px 10px; cursor: pointer; }
.copy-btn:hover { border-color: var(--keep); color: var(--keep); }

.affil { font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; line-height: 1.5; color: var(--muted); }
@media (min-width: 761px) { .who { display: none; } }

/* theme toggle */
.cta-wrap { align-items: center; gap: 14px; }
.theme-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; background: transparent; color: var(--ink); border: 1px solid var(--rule); border-radius: 999px; cursor: pointer; }
.theme-btn:hover { border-color: var(--keep); color: var(--keep); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .i-moon { fill: currentColor; stroke: none; }
.theme-btn .i-sun { display: none; }
.theme-btn.is-dark .i-sun { display: block; }
.theme-btn.is-dark .i-moon { display: none; }
.linklike { font: inherit; color: var(--muted); background: none; border: 0; padding: 0; text-decoration: underline; text-decoration-color: var(--keep); text-underline-offset: 3px; cursor: pointer; }
.linklike:hover { color: var(--ink); }
