:root {
  color-scheme: dark;
  --page: #151719;
  --surface: #1d2022;
  --ink: #eef0ed;
  --muted: #a9b0ab;
  --accent: #93cfad;
  --accent-ink: #14271c;
  --line: #333936;
  --hover: #252b27;
}
:root[data-theme="light"] {
  color-scheme: light;
  --page: #fafaf8;
  --surface: #f0f2ed;
  --ink: #222823;
  --muted: #626b66;
  --accent: #27664e;
  --accent-ink: #fff;
  --line: #d8ded8;
  --hover: #e7ece6;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
button { color: inherit; font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
[hidden] { display: none !important; }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { line-height: 1.3; font-weight: 600; }
h2 { font-size: 20px; letter-spacing: -.3px; }
h3 { font-size: 20px; letter-spacing: -.3px; }
h4 { font-size: 14px; }
.shell { width: min(720px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: absolute; top: 12px; left: 16px; z-index: 10; padding: 10px 16px; background: var(--accent); color: var(--accent-ink); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.header { display: flex; align-items: center; gap: 23px; padding-top: 28px; }
.identity { display: inline-flex; align-items: center; min-height: 44px; font-size: 23px; color: var(--ink); font-weight: 650; letter-spacing: -1.2px; white-space: nowrap; }
.identity span { color: var(--accent); }
.header nav { display: flex; gap: 21px; margin-left: auto; }
.header nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--muted); }
.theme-toggle { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; padding: 0; background: transparent; border: 1px solid var(--line); border-radius: 50%; }
.theme-toggle:hover { background: var(--hover); }
.theme-icon--moon { display: none; }
:root[data-theme="light"] .theme-icon--moon { display: block; }
:root[data-theme="light"] .theme-icon--sun { display: none; }
.hero { padding: 57px 0 48px; }
h1 { font-size: clamp(29px, 3.4vw, 37px); font-weight: 550; line-height: 1.24; letter-spacing: -1.15px; }
h1 span { color: var(--accent); }
.intro { max-width: 600px; margin-top: 20px; font-size: 16px; color: var(--muted); }
.profile-line { margin-top: 9px; font-size: 12px; color: var(--muted); }
.profile-line span { padding-inline: 7px; }
.links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; }
.links a { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; font-size: 14px; }
.hero-links { margin-top: 18px; }
.projects > h2 { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.project { padding: 28px 0 18px; border-bottom: 1px solid var(--line); }
.project-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.project-meta { margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.source-link { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; font-size: 12px; white-space: nowrap; }
.project-purpose { margin-top: 15px; color: var(--muted); font-size: 14px; }
.project-contribution { margin-top: 12px; }
.project-result { margin-top: 16px; padding-left: 15px; border-left: 2px solid var(--accent); font-size: 15px; }
.project-result strong { font-weight: 500; color: var(--accent); }
.project-details { margin-top: 12px; }
.project-details summary { display: flex; align-items: center; gap: 9px; width: fit-content; max-width: 100%; min-height: 44px; font-size: 13px; color: var(--muted); list-style: none; }
.project-details summary::-webkit-details-marker { display: none; }
.project-details summary:hover { color: var(--ink); }
.project-details summary > span { color: var(--accent); font-size: 19px; line-height: 1; font-weight: 300; }
.project-details[open] summary > span { transform: rotate(45deg); }
.details-body { margin: 8px 0 11px; padding: 3px 0 3px 19px; border-left: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.75; }
.details-body h4 { color: var(--ink); margin-top: 22px; margin-bottom: 8px; }
.details-body > :first-child { margin-top: 0; }
.details-body p + p { margin-top: 15px; }
.details-body ul { margin: 0; padding-left: 19px; }
.details-body li + li { margin-top: 7px; }
.details-body li::marker { color: var(--muted); font-size: 10px; }
.architecture { margin: 22px 0; padding: 21px; background: var(--surface); border-radius: 5px; }
.figure-label { font-size: 12px; font-weight: 500; color: var(--muted); }
.flow-controls { display: flex; gap: 8px; margin: 14px 0 22px; border-bottom: 1px solid var(--line); }
.flow-controls button { min-height: 44px; padding: 7px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 12px; }
.flow-controls button[aria-pressed="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.flow { margin: 0; padding: 0; list-style: none; }
.flow li { display: flex; align-items: start; gap: 14px; position: relative; padding-bottom: 22px; }
.flow li:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 28px; bottom: 4px; width: 1px; background: var(--line); }
.flow li:last-child { padding-bottom: 0; }
.node-number { display: grid; place-items: center; flex-shrink: 0; width: 25px; height: 25px; color: var(--muted); border: 1px solid var(--line); border-radius: 50%; font-size: 10px; font-variant-numeric: tabular-nums; }
.flow strong { display: block; color: var(--ink); font-size: 13px; font-weight: 500; }
.flow small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.flow-result strong { color: var(--accent); }
.figure-note { margin-top: 18px; font-size: 12px; }
.search-result { display: flex; align-items: center; gap: 25px; margin-top: 22px; }
.metric { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -.6px; }
.metric > span { font-size: 21px; color: var(--muted); }
.metric .metric-arrow { font-size: 18px; }
.metric strong { color: var(--accent); font-weight: 550; font-size: 31px; }
.search-result > p:last-child { font-size: 13px; line-height: 1.6; color: var(--muted); }
.metric-note { margin-top: 13px; color: var(--muted); font-size: 12px; line-height: 1.7; max-width: 650px; }
.evidence-links { margin-top: 15px; }
.evidence-links a { font-size: 13px; }
.small-projects { padding: 26px 0 30px; }
.small-projects h3 { margin-bottom: 13px; font-size: 16px; }
.small-projects p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.small-projects p + p { margin-top: 11px; }
.small-projects a { white-space: nowrap; }
.about { padding: 28px 0 21px; border-top: 1px solid var(--line); }
.about > p { margin-top: 15px; color: var(--muted); }
.contact { padding: 26px 0; border-top: 1px solid var(--line); }
.contact .links { margin-top: 8px; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0 28px; border-top: 1px solid var(--line); }
.footer a { display: inline-flex; align-items: center; min-height: 44px; gap: 7px; color: var(--muted); font-size: 11px; }
.footer a:hover { color: var(--accent); }
@media (max-width: 600px) {
  .header { padding-top: 17px; gap: 17px; }
  .header nav { gap: 16px; }
  .hero { padding-top: 42px; padding-bottom: 35px; }
  h1 { font-size: 30px; letter-spacing: -.8px; }
  .intro { font-size: 15px; }
  .project-heading { flex-wrap: wrap; gap: 1px 18px; }
  .project-heading > div { flex-basis: 100%; }
  .source-link { min-height: 38px; }
  .project-purpose { margin-top: 3px; }
  .project-heading + .project-contribution { margin-top: 4px; }
  .search-result { flex-direction: column; align-items: start; gap: 3px; margin-top: 18px; }
  .desktop-break { display: none; }
  .metric strong { font-size: 32px; }
  .metric > span { font-size: 22px; }
  .project-result { font-size: 14px; }
  .details-body { padding-left: 14px; font-size: 13px; }
  .architecture { padding: 17px; }
  .flow-controls button { flex: 1; padding-inline: 3px; font-size: 11px; }
  .flow small { font-size: 11px; }
}
@media (max-width: 420px) {
  .shell { width: calc(100% - 40px); }
  .header { gap: 14px; flex-wrap: wrap; }
  .identity { margin-right: auto; }
  .header nav { order: 3; flex-basis: 100%; margin-top: -8px; margin-left: 0; gap: 23px; }
  .header nav a { font-size: 12px; }
  .hero { padding-top: 27px; }
  h1 { font-size: 29px; }
  .links { gap: 0 20px; }
  .links a { font-size: 13px; }
  .project h3 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  :root, :root[data-theme="dark"], :root[data-theme="light"] { color-scheme: light; --page: #fff; --surface: #f4f4f4; --ink: #111; --muted: #444; --accent: #215c43; --accent-ink: #fff; --line: #ccc; }
  body { font-size: 11px; }
  .shell { width: 100%; }
  .header { padding: 0; }
  .header nav, .theme-toggle, .skip-link, .hero-links, .project-details, .footer { display: none; }
  .hero { padding: 22px 0; }
  h1 { font-size: 25px; }
  .project { padding-block: 18px; break-inside: avoid; }
  .about, .contact, .small-projects { padding-block: 18px; }
  .source-link { min-height: 22px; }
}
