:root {
  --text: #1f2937;
  --muted: #4b5563;
  --link: #3273dc;
  --line: #e5e7eb;
  --soft: #f5f5f5;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

main { width: min(960px, calc(100% - 40px)); margin: 0 auto; }
section { margin: 0 0 4.5rem; }
h1, h2, h3 { color: #111827; line-height: 1.2; }
h1 { margin: 0; font-size: clamp(2.35rem, 6vw, 4rem); letter-spacing: -.035em; }
h2 { margin: 0 0 1rem; font-size: clamp(1.65rem, 4vw, 2.2rem); text-align: center; }
h3 { margin: 0 0 .45rem; font-size: 1.12rem; }
p { margin: 0 0 1rem; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; height: auto; }

.paper-header { padding: 4.5rem 0 2rem; text-align: center; }
.project-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem; margin-top: 3.5rem; }
.project-links a {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  padding: .52rem .95rem;
  color: #fff;
  background: #363636;
  border-radius: 999px;
  font-size: .94rem;
  font-weight: 600;
}
.project-links a:hover { background: #111; text-decoration: none; }

figure { margin: 2rem 0 0; }
figure img { margin: 0 auto; }
figcaption { max-width: 820px; margin: .7rem auto 0; color: var(--muted); font-size: .91rem; text-align: center; }
.featured-figure { width: 100%; }
.featured-figure img { width: 100%; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 2rem 0 1rem; border: 1px solid var(--line); border-radius: 6px; }
.stats div { padding: 1.2rem .6rem; text-align: center; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats strong { display: block; color: #111827; font-size: 1.65rem; line-height: 1.2; }
.stats span { color: var(--muted); font-size: .82rem; }

.schema img { width: 100%; }
.notebooks { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.8rem; }
.notebooks article { padding: 1.25rem; border: 1px solid var(--line); border-radius: 6px; }
.notebooks p { color: var(--muted); font-size: .94rem; }
.notebooks a { font-weight: 600; }

code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
pre { overflow-x: auto; margin: 1.5rem 0 0; padding: 1.35rem; background: var(--soft); border-radius: 6px; font-size: .88rem; line-height: 1.6; }
footer { padding: 2rem 20px 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; text-align: center; }
footer p { margin: .2rem 0; }

@media (max-width: 700px) {
  main { width: min(100% - 28px, 960px); }
  .paper-header { padding-top: 3rem; }
  section { margin-bottom: 3.5rem; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats div:nth-child(2) { border-right: 0; }
  .stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .notebooks { grid-template-columns: 1fr; }
}
