:root {
  --accent: #00bd6b; /* Kandinsky S2V 1.0 report accent */
  --bg: #ffffff;
  --fg: #16161a;
  --muted: #5c5c66;
  --line: #e6e6ea;
  --card: #f6f6f8;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- hero ---------- */

.hero {
  border-bottom: 1px solid var(--line);
  padding: 64px 0 40px;
  background: linear-gradient(180deg, #fff 0%, #f0fbf6 100%);
  text-align: center;
}

.org {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 14px;
}

h1 {
  font-size: clamp(32px, 5.2vw, 56px);
  line-height: 1.1;
  margin: 14px 0 0;
  color: var(--accent);
  letter-spacing: -.01em;
}

.tagline {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--muted);
  max-width: 760px;
  margin: 16px auto 0;
}

/* ---------- paper / code links ---------- */

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: background .15s, transform .15s;
}

.btn:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

/* ---------- toc ---------- */

.toc {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.toc a {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--fg);
  text-decoration: none;
  font-size: 14px;
  transition: border-color .15s, color .15s;
}

.toc a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- sections ---------- */

.section {
  padding: 56px 0 8px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 16px;
}

.section:last-of-type { border-bottom: none; }

.section-index {
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .14em;
}

.section h2 {
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.2;
  margin: 6px 0 0;
  max-width: 900px;
}

.section .blurb {
  color: var(--muted);
  max-width: 820px;
  margin: 12px 0 28px;
}

/* ---------- video grid (masonry via CSS columns) ---------- */

.grid {
  column-width: 300px;
  column-gap: 18px;
}

.card {
  break-inside: avoid;
  margin: 0 0 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.card video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
}

.card .meta {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 11px;
  letter-spacing: .04em;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
}

.card:hover .meta { opacity: 1; }

/* ---------- method overview ---------- */

.method { border-bottom: none; }

.abstract .blurb {
  max-width: 900px;
  color: var(--fg);
}

.method .blurb {
  max-width: 900px;
  color: var(--fg);
}

.figure {
  margin: 8px 0 0;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.figure img {
  display: block;
  width: 100%;
  height: auto;
}

.figure figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  max-width: 900px;
}

footer {
  padding: 40px 24px 60px;
  color: var(--muted);
  font-size: 14px;
}

.notice {
  max-width: 820px;
  margin: 0 0 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.65;
}

.notice h3 {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.notice p { margin: 0; }

.notice a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101014;
    --fg: #f2f2f5;
    --muted: #a0a0ac;
    --line: #2a2a32;
    --card: #17171d;
    --accent: #00bd6b;
  }
  .hero { background: linear-gradient(180deg, #101014 0%, #0e1813 100%); }
  .toc a { background: #17171d; }
}

.org a,
footer > p a {
  color: inherit;
  text-decoration: none;
}

.org a:hover,
footer > p a:hover { text-decoration: underline; }
