/* ============================================
   MULTIOMICS READING GROUP — Main Stylesheet
   Scholar-punk dark mode. Glass + grit.
   ============================================ */

/* --- Fonts ---
   DM Serif Display: editorial weight for headings
   JetBrains Mono: hacker energy for labels/meta
   DM Sans: readable body
*/
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=DM+Serif+Display:ital@0;1&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* --- Variables --- */
:root {
  --bg-deep: #07070c;
  --bg-surface: #0d0d14;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.15);

  --teal: #2dd4bf;
  --teal-dim: #0d9488;
  --cyan: #06b6d4;
  --purple: #7c3aed;
  --purple-glow: #a78bfa;
  --blue: #2563eb;
  --blue-bright: #60a5fa;

  --text-primary: #e8e8ed;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* --- Noise texture overlay --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Ambient background gradients --- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-glow::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(124, 58, 237, 0.08) 0%, transparent 70%);
  animation: drift-1 25s ease-in-out infinite;
}

.bg-glow::after {
  content: '';
  position: absolute;
  bottom: -10%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(ellipse, rgba(6, 182, 212, 0.06) 0%, transparent 70%);
  animation: drift-2 30s ease-in-out infinite;
}

@keyframes drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(5%, 10%) scale(1.1); }
  66% { transform: translate(-3%, -5%) scale(0.95); }
}

@keyframes drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-8%, -5%) scale(1.15); }
}

/* --- Selection --- */
::selection {
  background: rgba(45, 212, 191, 0.25);
  color: #fff;
}

/* --- Links --- */
a {
  color: var(--teal);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--cyan);
}
a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 3px;
}

/* --- Layout --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* ===========================
   NAVIGATION
   =========================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background var(--transition), backdrop-filter var(--transition);
}

.nav.scrolled {
  background: rgba(7, 7, 12, 0.85);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--glass-border);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-brand img {
  height: 36px;
  width: auto;
}

.nav-brand span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0.4rem 0;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--teal);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  transition: var(--transition);
  border-radius: 1px;
}

/* ===========================
   HERO
   =========================== */
.hero {
  padding: 10rem 0 5rem;
  text-align: center;
  position: relative;
}

.hero-logo {
  width: clamp(100px, 18vw, 200px);
  height: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 0 40px rgba(45, 212, 191, 0.15))
          drop-shadow(0 0 80px rgba(124, 58, 237, 0.1));
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--teal) 0%, var(--cyan) 40%, var(--purple-glow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 1.8vw, 1.05rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 3rem;
  font-weight: 400;
  line-height: 1.6;
}

.hero-tagline em {
  color: var(--teal);
  font-style: normal;
}

/* --- CTA Buttons --- */
.cta-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal-dim), var(--teal));
  color: var(--bg-deep);
  border-color: var(--teal);
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--teal), #5eead4);
  color: var(--bg-deep);
  box-shadow: 0 0 30px rgba(45, 212, 191, 0.3),
              0 4px 20px rgba(45, 212, 191, 0.15);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--glass-border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--purple-glow);
  color: var(--purple-glow);
  box-shadow: 0 0 25px rgba(124, 58, 237, 0.1);
  transform: translateY(-2px);
}

/* ===========================
   SECTIONS
   =========================== */
section {
  padding: 5rem 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--teal);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 620px;
  margin-bottom: 3rem;
  line-height: 1.7;
}

/* ===========================
   SCHEDULE / CALENDAR
   =========================== */
#schedule {
  border-top: 1px solid var(--glass-border);
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.schedule-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.35rem 1.75rem;
  background: var(--bg-surface);
  transition: background var(--transition);
}

.schedule-item:hover {
  background: var(--bg-card-hover);
}

.schedule-item.is-next {
  background: rgba(45, 212, 191, 0.04);
  border-left: 3px solid var(--teal);
}

.schedule-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.5;
}

.schedule-date .day {
  font-size: 1.5rem;
  display: block;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.schedule-info {
  min-width: 0;
}

.schedule-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.schedule-speaker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.schedule-speaker strong {
  color: var(--text-secondary);
  font-weight: 500;
}

.schedule-time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
  letter-spacing: 0.03em;
}

.schedule-local-time {
  display: block;
  color: var(--teal-dim);
  margin-top: 0.2rem;
  font-size: 0.65rem;
}

.schedule-paper-link {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px dashed var(--glass-border);
  transition: color var(--transition), border-color var(--transition);
}

.schedule-paper-link:hover {
  color: var(--teal);
  border-color: var(--teal);
}

.schedule-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  background: rgba(45, 212, 191, 0.12);
  color: var(--teal);
  margin-top: 0.35rem;
}

/* ===========================
   TOPICS / WHAT WE COVER
   =========================== */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.topic-card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.topic-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.topic-card:hover {
  border-color: var(--glass-border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}

.topic-card:hover::before {
  opacity: 1;
}

.topic-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.topic-card h3 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.topic-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===========================
   RESOURCES
   =========================== */
.resources-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.resource-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text-primary);
}

.resource-link:hover {
  border-color: var(--glass-border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  color: var(--text-primary);
}

.resource-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.15);
}

.resource-link:nth-child(2) .resource-icon {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.15);
}

.resource-text {
  min-width: 0;
}

.resource-text strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 0.15rem;
}

.resource-text span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.resource-arrow {
  margin-left: auto;
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: transform var(--transition), color var(--transition);
}

.resource-link:hover .resource-arrow {
  transform: translateX(4px);
  color: var(--teal);
}

/* ===========================
   ORGANIZERS
   =========================== */
.organizers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.organizer-card {
  padding: 2rem 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  text-align: center;
  transition: all var(--transition);
  position: relative;
}

.organizer-card:hover {
  border-color: var(--glass-border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

.organizer-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  background: linear-gradient(135deg, var(--purple), var(--teal-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.organizer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.organizer-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.organizer-role {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.4rem;
}

.organizer-affiliation {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.organizer-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  border-bottom: 1px dashed var(--glass-border);
  padding-bottom: 1px;
  transition: color var(--transition), border-color var(--transition);
}

.organizer-link:hover {
  color: var(--teal);
  border-color: var(--teal);
}

/* ===========================
   FOOTER
   =========================== */
.footer {
  border-top: 1px solid var(--glass-border);
  padding: 3rem 0;
  text-align: center;
}

.footer p {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.footer a {
  color: var(--text-secondary);
}

/* ===========================
   ANIMATIONS — Entrance
   =========================== */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > .fade-up:nth-child(1) { transition-delay: 0s; }
.stagger > .fade-up:nth-child(2) { transition-delay: 0.07s; }
.stagger > .fade-up:nth-child(3) { transition-delay: 0.14s; }
.stagger > .fade-up:nth-child(4) { transition-delay: 0.21s; }
.stagger > .fade-up:nth-child(5) { transition-delay: 0.28s; }
.stagger > .fade-up:nth-child(6) { transition-delay: 0.35s; }
.stagger > .fade-up:nth-child(7) { transition-delay: 0.42s; }
.stagger > .fade-up:nth-child(8) { transition-delay: 0.49s; }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 7, 12, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 200;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1rem;
  }

  .nav-toggle {
    display: flex;
    z-index: 300;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero {
    padding: 8rem 0 3rem;
  }

  .schedule-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1.25rem;
  }

  .schedule-date {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
  }

  .schedule-date .day {
    font-size: 1.1rem;
    display: inline;
  }

  .schedule-time {
    text-align: left;
  }

  .topics-grid {
    grid-template-columns: 1fr;
  }

  .organizers-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
  }
}

/* ===========================
   PAGE-SPECIFIC: Organizers
   =========================== */
.page-header {
  padding: 9rem 0 3rem;
  text-align: center;
}

.page-header .section-label {
  justify-content: center;
}

.page-header .section-title {
  margin-bottom: 0.75rem;
}

.page-header p {
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* Divider flourish */
.divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--purple));
  margin: 3rem auto;
  border-radius: 99px;
}

/* ===========================
   SKIP LINK (a11y)
   =========================== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--teal);
  color: var(--bg-deep);
  padding: 0.5rem 1rem;
  border-radius: 0 0 8px 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  z-index: 9999;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ===========================
   PAST TALKS
   =========================== */
#past-section[aria-hidden="true"] {
  display: none !important;
}

#past-section[aria-hidden="false"] {
  display: block !important;
}

.past-session-group {
  margin-bottom: 2.5rem;
}

.past-session-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple-glow);
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

.schedule-item.is-cancelled {
  opacity: 0.45;
}

.schedule-item.is-cancelled .schedule-title {
  text-decoration: line-through;
  text-decoration-color: var(--text-muted);
}

.schedule-item.is-skip {
  opacity: 0.35;
}

.schedule-badge.badge-cancelled {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.schedule-badge.badge-postponed {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}

.schedule-badge.badge-open {
  background: rgba(45, 212, 191, 0.12);
  color: var(--teal);
  cursor: pointer;
}

.schedule-empty {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
}

.toggle-arrow {
  font-size: 0.65rem;
}
