:root {
  color-scheme: light dark;
  --bg: #f6f3ec;
  --fg: #1a1a1a;
  --fg-85: rgba(26, 26, 26, 0.85);
  --fg-55: rgba(26, 26, 26, 0.55);
  --fg-40: rgba(26, 26, 26, 0.4);
  --fg-30: rgba(26, 26, 26, 0.3);
  --fg-10: rgba(26, 26, 26, 0.1);
  --fg-05: rgba(26, 26, 26, 0.05);
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161616;
    --fg: #f1eee7;
    --fg-85: rgba(241, 238, 231, 0.85);
    --fg-55: rgba(241, 238, 231, 0.55);
    --fg-40: rgba(241, 238, 231, 0.4);
    --fg-30: rgba(241, 238, 231, 0.3);
    --fg-10: rgba(241, 238, 231, 0.1);
    --fg-05: rgba(241, 238, 231, 0.05);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f3ec;
  --fg: #1a1a1a;
  --fg-85: rgba(26, 26, 26, 0.85);
  --fg-55: rgba(26, 26, 26, 0.55);
  --fg-40: rgba(26, 26, 26, 0.4);
  --fg-30: rgba(26, 26, 26, 0.3);
  --fg-10: rgba(26, 26, 26, 0.1);
  --fg-05: rgba(26, 26, 26, 0.05);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #161616;
  --fg: #f1eee7;
  --fg-85: rgba(241, 238, 231, 0.85);
  --fg-55: rgba(241, 238, 231, 0.55);
  --fg-40: rgba(241, 238, 231, 0.4);
  --fg-30: rgba(241, 238, 231, 0.3);
  --fg-10: rgba(241, 238, 231, 0.1);
  --fg-05: rgba(241, 238, 231, 0.05);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg-85);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s, color 0.2s;
}
::selection { background: var(--fg); color: var(--bg); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
}

/* Layout: one tight, centered sheet */
main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vh 0 6vh;
}
@media (min-width: 768px) {
  main { padding: 7vh 0; }
}
.hero, .container, .footer-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}
@media (min-width: 768px) { .hero, .container, .footer-inner { padding: 0 40px; } }
.hero {
  padding: 0 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.container { padding-top: 0; padding-bottom: 0; }
.container > section + section { margin-top: 28px; }

.hero-logo { width: 38%; height: auto; display: block; margin: 0; filter: brightness(0); }
@media (max-width: 599px) { .hero-logo { width: 48%; } }
:root[data-theme="dark"] .hero-logo { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .hero-logo { filter: brightness(0) invert(1); }
}

.theme-toggle {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--fg-55);
  background: transparent;
  border: 1px solid var(--fg-10);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}
.theme-toggle:hover, .theme-toggle:focus-visible {
  color: var(--fg);
  background: var(--fg-05);
  border-color: var(--fg-30);
}
.theme-toggle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.moon-icon { display: none; }
:root[data-theme="dark"] .sun-icon { display: none; }
:root[data-theme="dark"] .moon-icon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .sun-icon { display: none; }
  :root:not([data-theme]) .moon-icon { display: block; }
}

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  text-align: left;
  color: var(--fg-55);
  margin: 0 0 10px;
}

p {
  margin: 0 0 14px;
  text-align: left;
}
p:last-child { margin-bottom: 0; }
.names { line-height: 1.85; margin-top: 12px; }
.sep { color: var(--fg-55); }

/* Interactive names + role links share one look */
.pill {
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 0;
  padding: 2px 4px;
  margin: 0 -4px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--fg-30);
  border-radius: 4px;
  transition: color 0.15s, background-color 0.15s, text-decoration-color 0.15s;
}
.pill:hover, .pill:focus-visible {
  color: var(--fg);
  background: var(--fg-05);
  text-decoration-color: var(--fg);
}

.text-link {
  color: var(--fg-85);
  text-decoration: none;
  transition: color 0.15s;
}
.text-link:hover, .text-link:focus-visible {
  color: var(--fg);
}

.bio {
  position: fixed;
  z-index: 10;
  max-width: 320px;
  display: flex; align-items: flex-start; gap: 10px;
  line-height: 1.55;
  font-size: 13px;
  background: var(--bg);
  border: 1px solid var(--fg-10);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 8px 24px var(--fg-10);
  pointer-events: none;
}
.bio[hidden] { display: none; }
.bio-arrow { color: var(--fg-40); margin-top: 1px; }
.bio-name {
  color: var(--fg);
  margin-bottom: 2px;
}


.footer-inner {
  margin-top: 28px;
  padding-top: 0;
  padding-bottom: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.03em;
  color: var(--fg-55);
}
.offices { display: grid; gap: 12px 32px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .offices { grid-template-columns: 1fr 1fr; } }
.office { display: flex; flex-direction: column; }
.office-label { font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-40); }
.office-name { color: var(--fg); margin-top: 2px; }
.full { display: none; }
.abbr { display: inline; }
@media (min-width: 600px) {
  .full { display: inline; }
  .abbr { display: none; }
}
.footer-bar {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  align-items: baseline;
}
.footer-link {
  color: inherit; text-decoration: none; transition: color 0.15s;
  background: none; border: 0; padding: 0; font: inherit; letter-spacing: inherit; cursor: pointer;
}
.footer-link:hover, .footer-link:focus-visible { color: var(--fg); }

/* Legal & governance dialog */
.legal {
  width: min(720px, calc(100vw - 32px));
  max-height: 80vh;
  padding: 0;
  border: 1px solid var(--fg-10);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg-85);
  font-family: var(--font-sans);
  overflow: hidden;
}
.legal::backdrop { background: rgba(0, 0, 0, 0.45); }
.legal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--fg-10);
}
.legal-close {
  background: none; border: 0; color: var(--fg-55);
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px;
}
.legal-close:hover { color: var(--fg); }
.legal-body { padding: 20px; overflow-y: auto; max-height: calc(80vh - 52px); }
.legal-body h2 { font-size: 16px; font-weight: 600; color: var(--fg); margin: 0 0 10px; }
.legal-body h3 { font-size: 12px; font-weight: 600; color: var(--fg); margin: 18px 0 4px; }
.legal-body p { margin: 0 0 8px; font-size: 13px; line-height: 1.6; }
.legal-body ul { margin: 0 0 8px; padding-left: 18px; font-size: 13px; line-height: 1.6; }
.legal-body li { margin: 0 0 2px; }
