:root {
  --paper: #f7f5f0;
  --panel: #ffffff;
  --ink: #14161a;
  --ink-2: #33373e;
  --muted: #5d636c;
  --line: #e1ddd3;
  --red: #d62718;
  --red-ink: #b51f12;
  --chip: #efece5;
  --shadow: 0 1px 2px rgba(20, 22, 26, .04), 0 8px 24px rgba(20, 22, 26, .05);
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1013;
    --panel: #15181c;
    --ink: #eceae4;
    --ink-2: #c9c7c1;
    --muted: #979da6;
    --line: #262a30;
    --red: #ff4a36;
    --red-ink: #ff6a59;
    --chip: #1c2025;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e1013;
  --panel: #15181c;
  --ink: #eceae4;
  --ink-2: #c9c7c1;
  --muted: #979da6;
  --line: #262a30;
  --red: #ff4a36;
  --red-ink: #ff6a59;
  --chip: #1c2025;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.brand img { width: 28px; height: 28px; border-radius: 6px; }
.brand { white-space: nowrap; }
.bar .btn .sm { display: none; }
@media (max-width: 480px) { .bar .btn .lg { display: none; } .bar .btn .sm { display: inline; } }
.nav { display: flex; gap: 22px; font-size: 14px; white-space: nowrap; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }
@media (max-width: 1040px) { .nav { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 10px;
  font: 600 15px/1 var(--sans); text-decoration: none; white-space: nowrap;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  transition: border-color .15s, transform .15s;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.primary:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn.small { height: 36px; padding: 0 14px; font-size: 14px; }

/* ---------- hero ---------- */
.hero { padding: 88px 0 56px; position: relative; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: center; }
.eyebrow {
  font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
h1 {
  font: 400 clamp(44px, 7vw, 80px)/1.0 var(--serif);
  letter-spacing: -.02em; margin: 18px 0 22px;
}
h1 .creds { color: var(--muted); font-size: .5em; letter-spacing: 0; vertical-align: .55em; margin-left: .2em; font-family: var(--sans); font-weight: 500; }
.lead { font-size: clamp(19px, 2.2vw, 23px); line-height: 1.45; color: var(--ink-2); max-width: 34em; margin: 0 0 14px; letter-spacing: -.005em; }
.sub { color: var(--muted); max-width: 40em; margin: 0 0 30px; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.loc { margin-top: 22px; font: 500 13px/1.4 var(--mono); color: var(--muted); }

.tach { width: 100%; max-width: 300px; justify-self: end; color: var(--ink); }
.tach .needle { transform-origin: 150px 150px; transform: rotate(-120deg); animation: rev 1.6s cubic-bezier(.2, .8, .2, 1) .3s forwards; }
@keyframes rev { 60% { transform: rotate(112deg); } 100% { transform: rotate(96deg); } }
@media (prefers-reduced-motion: reduce) { .tach .needle { animation: none; transform: rotate(96deg); } }
@media (max-width: 860px) {
  .hero { padding: 48px 0 32px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 8px; }
  .tach { display: none; }
}

/* ---------- stats ---------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 28px 24px 28px 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat b { display: block; font: 400 44px/1 var(--serif); letter-spacing: -.02em; }
.stat b em { font-style: normal; color: var(--red); }
.stat span { display: block; margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--muted); }
@media (max-width: 860px) {
  .stats .wrap { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 1000px) and (min-width: 861px) { .stat b { font-size: 38px; } }
@media (max-width: 420px) { .stat b { font-size: 32px; } .stat { padding-right: 12px; } .stat + .stat { padding-left: 12px; } .stat:nth-child(3) { padding-left: 0; } }

/* ---------- sections ---------- */
section.block { padding: 88px 0 0; scroll-margin-top: 60px; }
@media (max-width: 640px) { section.block { padding-top: 64px; } }
.head { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; margin-bottom: 36px; align-items: baseline; }
.head .num { font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.head .num i { font-style: normal; color: var(--red); margin-right: 8px; }
h2 { font: 400 clamp(32px, 4.4vw, 46px)/1.15 var(--serif); letter-spacing: -.015em; margin: 0; }
.head p { color: var(--muted); margin: 16px 0 0; max-width: 40em; }
@media (max-width: 960px) { .head { grid-template-columns: 1fr; gap: 10px; } }

/* pillars */
.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pillar { background: var(--panel); padding: 28px 28px 30px; }
.pillar h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -.01em; }
.pillar p { margin: 0; color: var(--ink-2); font-size: 16px; }
.pillar .k { font: 500 12px/1 var(--mono); color: var(--red); letter-spacing: .06em; margin-bottom: 14px; display: block; }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; } .pillar { padding: 22px 20px; } }

/* programs */
.programs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px;
}
.tag, .card .tag { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card h3 { margin: 0; font-size: 19px; line-height: 1.3; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.card .out { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.card .out b { color: var(--ink); font-weight: 600; }
@media (max-width: 960px) { .programs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .programs { grid-template-columns: 1fr; } }

/* timeline */
.timeline { border-left: 2px solid var(--line); margin-left: 6px; }
.role { position: relative; padding: 0 0 40px 32px; }
.role:last-child { padding-bottom: 0; }
.role::before { content: ""; position: absolute; left: -8px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }
.role.now::before { background: var(--red); border-color: var(--red); }
.role .when { font: 500 13px/1.4 var(--mono); color: var(--muted); }
.role h3 { margin: 4px 0 2px; font-size: 21px; letter-spacing: -.01em; }
.role .org { color: var(--ink-2); font-weight: 500; }
.role h3 .lineage { color: var(--muted); font-weight: 400; }
.role .org span { color: var(--muted); font-weight: 400; }
.role ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; max-width: 46em; }
.role li { position: relative; padding-left: 18px; color: var(--ink-2); }
.role li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 2px; background: var(--red); }
.sub-role { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.sub-role b { display: block; }
.sub-role .when { display: inline; margin-left: 6px; }

/* AI */
.ai { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ai .card { padding: 20px; }
.ai .card h3 { font-size: 17px; }
.ai .card p { font-size: 15px; }
@media (max-width: 960px) { .ai { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .ai { grid-template-columns: 1fr; } }

/* outside */
.outside { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.feature img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.feature .body { padding: 22px 24px 24px; }
.feature .body h3 { margin: 6px 0 8px; font-size: 20px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.feature .body h3 img { width: 30px; height: 30px; aspect-ratio: auto; }
.feature .body p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.stack { display: grid; gap: 16px; align-content: start; }
@media (max-width: 860px) { .outside { grid-template-columns: 1fr; } }

/* creds */
.creds-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.list li { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; }
.list li span { color: var(--muted); font-size: 14px; text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { background: var(--chip); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; color: var(--ink-2); }
.creds-grid h3 { font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
@media (max-width: 760px) { .creds-grid { grid-template-columns: 1fr; } .list li { flex-direction: column; gap: 2px; } .list li span { text-align: left; } }

/* contact */
.contact { margin: 96px 0 0; padding: 72px 0; background: var(--ink); color: var(--paper); }
.contact h2 { color: var(--paper); font-size: clamp(36px, 5.4vw, 60px); }
.contact h2 em { font-style: italic; color: var(--red); }
.contact p { color: color-mix(in srgb, var(--paper) 70%, transparent); max-width: 36em; margin: 16px 0 28px; font-size: 18px; }
.contact .btn { background: transparent; color: var(--paper); border-color: color-mix(in srgb, var(--paper) 30%, transparent); }
.contact .btn:hover { border-color: var(--paper); }
.contact .btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.contact .btn.primary:hover { filter: brightness(1.08); }
.contact .ctas { gap: 12px; }
:root[data-theme="dark"] .contact { background: var(--panel); border-top: 1px solid var(--line); }
:root[data-theme="dark"] .contact h2 { color: var(--ink); }
:root[data-theme="dark"] .contact p { color: var(--muted); }
:root[data-theme="dark"] .contact .btn { color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .contact .btn.primary { color: #fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .contact { background: var(--panel); border-top: 1px solid var(--line); }
  :root:not([data-theme="light"]) .contact h2 { color: var(--ink); }
  :root:not([data-theme="light"]) .contact p { color: var(--muted); }
  :root:not([data-theme="light"]) .contact .btn { color: var(--ink); border-color: var(--line); }
  :root:not([data-theme="light"]) .contact .btn.primary { color: #fff; }
}

/* résumé request form (the contact band is dark in both themes) */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 56px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
.request { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; padding: 26px; scroll-margin-top: 80px; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 18px; background: rgba(0, 0, 0, .28); border-radius: 12px; }
.modes button { height: 40px; border: 0; border-radius: 9px; background: transparent; color: rgba(247, 245, 240, .7); font: 600 14px/1 var(--sans); cursor: pointer; }
.modes button[aria-selected="true"] { background: rgba(255, 255, 255, .12); color: #f7f5f0; }
.modes button:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.contact .aside { font-size: 15px; margin-top: -12px; color: color-mix(in srgb, var(--paper) 55%, transparent); }
.request .opt { color: rgba(247, 245, 240, .45); }
.request h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.01em; color: #f7f5f0; }
.contact .request .hint { margin: 0 0 18px; font-size: 15px; color: rgba(247, 245, 240, .66); }
.request .field { margin-bottom: 14px; }
.request label { display: block; font-size: 13px; margin-bottom: 6px; color: rgba(247, 245, 240, .72); }
.request label span { color: rgba(247, 245, 240, .45); }
.request input, .request textarea {
  width: 100%; font: 16px/1.4 var(--sans); color: #f7f5f0;
  background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; padding: 11px 12px;
}
.request textarea { resize: vertical; min-height: 88px; }
.request input:focus, .request textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: transparent; }
.request .btn { width: 100%; justify-content: center; margin-top: 4px; }
.request .btn:disabled { opacity: .6; cursor: default; }
.contact .request .status { margin: 12px 0 0; font-size: 14px; min-height: 0; }
.contact .request .status.err { color: #ff8b7e; }
.contact .request .status a { color: inherit; }
.request .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

footer { padding: 28px 0 40px; font: 500 12px/1.6 var(--mono); color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media print {
  .bar, .tach, .contact .ctas, footer { display: none; }
  body { background: #fff; }
}
