:root {
  color-scheme: light;
  --background: #fdfdfc;
  --text: #16181d;
  --muted: #5d6570;
  --accent: #0f5c93;
  --accent-strong: #b45309;
  --award: #a46108;
  --award-weight: 500;
  --line: #e4e6ea;
  --soft-accent: #eef1f4;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --background: #101215;
  --text: #e7eaee;
  --muted: #98a1ac;
  --accent: #6fb4e8;
  --accent-strong: #e0a45c;
  --award: #c7a46a;
  --award-weight: 400;
  --line: #262a31;
  --soft-accent: #1c2027;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Avenir, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  transition: background-color 250ms ease, color 250ms ease;
}
a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.18em;
  transition: color 150ms ease;
}
a:hover, a:focus-visible { color: var(--accent-strong); text-decoration: underline; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button[hidden] { display: none; }
h1, h2, h3, p, figure { margin-top: 0; }
figure { margin-left: 0; margin-right: 0; }
.page-shell {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.15rem, 5vw, 2rem) 3rem;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  min-height: 34px;
  margin: -0.75rem 0 2rem;
}
.project-links, .theme-toggle, .step-number {
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.theme-toggle {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }
.theme-icon { font-size: 14px; line-height: 1; }
h1 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.2rem, 5vw, 2.9rem);
  font-weight: 500;
  letter-spacing: -1px;
  line-height: 1.1;
}
.project-authors { margin-bottom: 4px; }
.project-affiliation { margin-bottom: 0; color: var(--muted); font-size: 14px; }
.project-links {
  display: flex;
  flex-wrap: wrap;
  margin-top: 22px;
  font-size: 13px;
}
.project-links a { display: inline-flex; align-items: center; gap: 5px; padding: 3px 0; }
.project-links a:not(:last-child)::after { content: "/"; margin: 0 11px; color: var(--line); }
.project-summary { margin: 1.5rem 0 1rem; }
.project-award {
  margin-bottom: 0;
  color: var(--award);
  font-family: inherit;
  font-size: 14px;
  font-weight: var(--award-weight);
}
video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 480px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101215;
  object-fit: contain;
}
.teaser { margin-top: 1.75rem; margin-bottom: 0; }
figcaption { margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.content-section { margin-top: 2.75rem; padding-top: 2.75rem; border-top: 1px solid var(--line); }
h2 { margin-bottom: 22px; font-size: 27px; font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; }
.section-copy p { margin-bottom: 14px; }
.section-copy p:last-child { margin-bottom: 0; }
.demo { margin-bottom: 0; }
.demo figcaption strong { display: block; color: var(--text); font-size: 16px; font-weight: 500; }
.demo figcaption span { display: block; margin-top: 3px; }
.process-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.process-step { min-width: 0; margin-bottom: 0; }
.image-link { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--soft-accent); }
.process-step img { display: block; width: 100%; height: auto; }
.process-step figcaption { display: flex; align-items: baseline; gap: 7px; margin-top: 10px; color: var(--text); font-size: 13px; }
.step-number { flex-shrink: 0; color: var(--muted); font-size: 11px; }
footer { margin-top: 2.75rem; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: right; }
footer p { margin: 0; }
footer p + p { margin-top: 4px; }
.skip-link { position: absolute; top: -100px; left: 1rem; padding: 8px 12px; background: var(--background); border: 1px solid var(--line); z-index: 1; }
.skip-link:focus { top: 1rem; }
@media (max-width: 600px) {
  .site-header { margin-bottom: 1.75rem; }
  .content-section { margin-top: 2rem; padding-top: 2rem; }
  footer { text-align: left; }
}
@media (max-width: 700px) {
  .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; row-gap: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
