/* =========================================================
   EDITABLE TOKENS
   Change these to change the whole look of the site.
   ========================================================= */
:root {
  --bg: #fafaf7;
  --fg: #14140f;
  --fg-dim: #6f6f68;
  --accent: #14140f;
  --rule: rgba(20, 20, 15, 0.16);

  --font: "IBM Plex Mono", "SF Mono", "Menlo", monospace;

  --max-width: 640px;
  --gutter: 24px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------
   background canvas
   --------------------------------------------------------- */
#flock {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
}

/* ---------------------------------------------------------
   intro hero: full-screen cgRNA animation + scroll cue
   sits above the ambient background canvas (z-index) so it
   fully covers it, then scrolls away like normal content.
   --------------------------------------------------------- */
.intro {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-story {
  width: min(92vw, 1100px);
  height: auto;
  display: block;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  top: 28px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 13px;
}

.scroll-cue:hover {
  color: var(--fg);
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  animation: bob 1.6s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@media (max-width: 480px) {
  .intro-story {
    width: 94vw;
  }
}

/* ---------------------------------------------------------
   layout
   --------------------------------------------------------- */
main {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 6vw 0 auto;
  padding: 0 var(--gutter);
  text-align: right;
}

.hero {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 48px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 44px);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hero-photo {
  display: block;
  margin: 16px 0 0 auto;
  width: 192px;
  height: 192px;
  border-radius: 50%;
  object-fit: cover;
}

.hero .role {
  margin: 16px 0 0;
  color: var(--fg-dim);
  max-width: 46ch;
}

section {
  padding-bottom: 56px;
}

section h2 {
  font-size: 30px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

section p {
  max-width: 58ch;
  margin: 0 0 16px;
}

/* ---------------------------------------------------------
   research list
   --------------------------------------------------------- */
.research-list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

.research-list li + li {
  border-top: 1px solid var(--rule);
}

.research-list li {
  padding: 16px 0;
}

.paper-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.paper-title {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  line-height: 1.4;
}

.paper-title:hover {
  color: var(--accent);
  text-decoration: underline;
}

.paper-journal {
  flex-shrink: 0;
  color: var(--fg-dim);
  font-style: italic;
  font-size: 15px;
  white-space: nowrap;
}

.paper-authors {
  margin: 8px 0 0;
  color: var(--fg);
  font-size: 15px;
}

.paper-date {
  margin: 2px 0 0;
  color: var(--fg);
  font-size: 15px;
}

/* ---------------------------------------------------------
   conferences map
   --------------------------------------------------------- */
.map-wrap {
  margin: 4px 0 0;
}

.world-map {
  width: 100%;
  height: auto;
  display: block;
  color: var(--fg-dim);
}

.map-dot {
  fill: #4169e1;
  stroke: var(--bg);
  stroke-width: 0.6;
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.1s ease;
}

.map-dot:hover,
.map-dot:focus-visible {
  transform: scale(1.3);
}

.map-dot--active {
  fill: var(--fg);
}

.map-dot:focus-visible {
  outline: none;
}

.all-conferences-toggle {
  display: block;
  margin: 16px 0 0 auto;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: none;
  color: var(--fg);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
}

.all-conferences-toggle:hover {
  border-color: var(--fg-dim);
}

.all-conferences-panel {
  margin: 16px 0 0;
  padding: 4px 16px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  text-align: left;
  max-height: 360px;
  overflow-y: auto;
}

.all-conferences-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.all-conf-item {
  padding: 14px 0;
}

.all-conf-item + .all-conf-item {
  border-top: 1px solid var(--rule);
}

.all-conf-header {
  margin: 0;
  font-size: 13px;
  color: var(--fg-dim);
}

.all-conf-event {
  margin: 4px 0 0;
  font-weight: 500;
  color: var(--fg);
  font-size: 14px;
}

.all-conf-desc {
  margin: 4px 0 0;
  color: var(--fg);
  font-size: 14px;
}

.conference-info {
  position: relative;
  margin: 16px 0 0;
  padding: 14px 40px 14px 16px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  text-align: left;
}

.conference-info-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--fg-dim);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font);
}

.conference-info-close:hover {
  color: var(--fg);
}

.conference-city + .conference-city {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.conference-city-name {
  margin: 0;
  font-weight: 500;
  color: var(--fg);
}

.conference-events {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.conference-events li + li {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--rule);
}

.conference-info-event {
  margin: 0;
  font-weight: 500;
  color: var(--fg);
  font-size: 14px;
}

.conference-info-date {
  margin: 4px 0 0;
  color: var(--fg-dim);
  font-size: 13px;
}

.conference-info-desc {
  margin: 6px 0 0;
  color: var(--fg);
  font-size: 14px;
}

/* ---------------------------------------------------------
   contact list
   --------------------------------------------------------- */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.contact-list a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.contact-list a:hover {
  border-color: var(--fg);
}

footer {
  padding: 24px 0 48px;
  color: var(--fg-dim);
  font-size: 13px;
}

/* ---------------------------------------------------------
   small screens
   --------------------------------------------------------- */
@media (max-width: 480px) {
  .hero {
    min-height: 60vh;
  }
  .paper-top {
    flex-direction: column;
    gap: 2px;
  }
}



@media (prefers-reduced-motion: reduce) {
  .scroll-arrow {
    animation: none;
  }
}
