:root {
  --bg: #000;
  --fg: #e8e8e8;
  --muted: #9a9a9a;
  --accent: #6aa9ff;
  --rule: #2a2a2a;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
  position: relative;
  z-index: 1;
}

#lenia-bg, #lenia-bg-fallback {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  object-fit: cover;
}

#lenia-bg {
  opacity: 0.6;
  filter: blur(16px) saturate(1.15);
}

#lenia-bg-fallback {
  opacity: 0.5;
  image-rendering: auto;
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  #lenia-bg { display: none; }
  #lenia-bg-fallback { display: none; }
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

header h1 {
  margin: 0 0 .25rem;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.affiliation {
  margin: 0 0 .5rem;
  color: var(--muted);
}

.tags {
  color: var(--muted);
  font-size: .92rem;
  margin-top: -.4rem;
}

.links { margin: 0; }
.links > * + *::before {
  content: " \00b7 ";
  color: var(--muted);
  margin: 0 .15rem;
}
.links button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  padding: 0;
  line-height: inherit;
  vertical-align: baseline;
}
.links button:hover { text-decoration: underline; }

section { margin-top: 2.75rem; }

h2 {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: .35rem;
  margin: 0 0 1rem;
}

#publications h3 {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  margin: 1.75rem 0 .55rem;
}

.demo {
  margin-bottom: 2.5rem;
}
.demo h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 .6rem;
}
.demo p {
  font-size: .95rem;
  color: var(--muted);
  margin: .6rem 0 1.2rem;
}
.demo figure {
  margin: 0 0 1.4rem;
}
.demo figcaption {
  font-size: .85rem;
  color: var(--muted);
  margin-top: .4rem;
}

.video-embed {
  aspect-ratio: 16 / 9;
  width: 100%;
  background: var(--rule);
}
.video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

p { margin: 0 0 1rem; }

ul.news, ul.pubs, ul.service {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.service li {
  margin-bottom: .55rem;
}

ul.news li {
  position: relative;
  padding-left: 6.25em;
  margin-bottom: .55rem;
}

ul.news .date {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: .9rem;
}


.pub-title {
  display: block;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.4;
  color: var(--fg);
}
.pub-authors {
  display: block;
  font-size: .92rem;
  margin-top: .15rem;
}
.pub-venue {
  display: block;
  color: var(--muted);
  font-size: .92rem;
  margin-top: .1rem;
}

ul.pubs li {
  border-left: 2px solid var(--rule);
  padding-left: .85rem;
  margin-bottom: 1rem;
}

ul.pubs li a {
  font-size: .9rem;
  margin-right: .4rem;
}

:root[data-lenia="off"] #lenia-bg,
:root[data-lenia="off"] #lenia-bg-fallback { display: none; }

@media (max-width: 520px) {
  main { padding: 2.5rem 1.1rem 4rem; }
  ul.news li { padding-left: 0; }
  ul.news .date { position: static; display: block; margin-bottom: .1rem; }
}
