/* Better Bioinformatics — shared styles */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --navy-950: #1B2740;
  --teal-900: #2A3F63;
  --teal-800: #33507D;
  --teal-700: #3D5F91;
  --teal-600: #4A70A3;
  --teal-500: #5B85B8;
  --teal-300: #A8C6E3;
  --teal-100: #E8F1FA;
  --accent: #C0392B;
  --accent-dark: #A32F21;
  --accent-tint: #F7DEDA;
  --ink: #1B2740;
  --ink-soft: #4A5A75;
  --bg: #F7F9FC;
  --surface: #FFFFFF;
  --line: #DCE4EE;
  --shadow: 0 4px 20px rgba(27, 39, 64, 0.08);
  --shadow-lg: 0 12px 40px rgba(27, 39, 64, 0.14);
  --radius: 14px;
  --radius-sm: 8px;
  --max: 1120px;
  --font-head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy-950);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

a { color: var(--teal-700); text-decoration-color: var(--teal-300); }
a:hover { color: var(--accent-dark); }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

img { max-width: 100%; display: block; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 0.75em;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(192,57,43,0.35); }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-dark { background: var(--navy-950); color: #fff; }
.btn-dark:hover { background: var(--teal-900); color: #fff; }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--teal-500); color: var(--teal-700); }
.btn-ghost-light { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.35); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,0.18); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 249, 252, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy-950);
}
.brand img { width: 38px; height: 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: var(--navy-950); }
.brand-tag { font-size: 0.68rem; color: var(--teal-600); letter-spacing: 0.04em; text-transform: uppercase; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--navy-950);
  border-bottom-color: var(--accent);
}
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy-950);
  margin: 5px 0;
  transition: 0.2s;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .nav-cta .btn-outline { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(circle at 15% 20%, rgba(91,133,184,0.16), transparent 55%),
              linear-gradient(180deg, #F7F9FC 0%, #EAF0F8 100%);
  padding: 72px 0 56px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 54ch; }

.hero-card {
  background: var(--navy-950);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 0%, rgba(192,57,43,0.25), transparent 55%);
  pointer-events: none;
}
.hero-card .tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.hero-card h3 { color: #fff; font-size: 1.4rem; margin-bottom: 6px; }
.hero-card .meta { color: var(--teal-300); font-size: 0.92rem; margin-bottom: 14px; }
.hero-card .who { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.hero-card .who img, .hero-card .who .avatar-fallback { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.hero-card .who .avatar-fallback { background: var(--teal-700); font-size: 1rem; }
.hero-card .who-name { font-weight: 600; }
.hero-card .who-role { font-size: 0.85rem; color: var(--teal-300); }
.hero-card .actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--navy-950); color: #fff; }
.section-dark h2 { color: #fff; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { color: var(--ink-soft); }
.section-dark .section-head p { color: rgba(255,255,255,0.7); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.icon-badge {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--teal-100);
  color: var(--teal-700);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.format-steps { display: grid; gap: 18px; }
.format-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: start;
}
.format-step .num {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--navy-950);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.format-step h4 { margin-bottom: 4px; }
.format-step p { color: var(--ink-soft); margin: 0; }

/* ---------- Badges / status ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-head);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-upcoming { background: var(--teal-100); color: var(--teal-700); }
.badge-today { background: var(--accent-tint); color: var(--accent-dark); }
.badge-today::before { content: "●"; color: var(--accent); font-size: 0.6rem; }
.badge-past { background: #EFEFEA; color: var(--ink-soft); }
.badge-cancelled { background: #FBE7E7; color: #B03B3B; }

/* ---------- Schedule ---------- */
.schedule-list { display: flex; flex-direction: column; gap: 14px; }
.schedule-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 20px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.schedule-row.is-past { opacity: 0.72; }
.schedule-row.is-today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.schedule-row.is-cancelled .s-title { text-decoration: line-through; color: var(--ink-soft); }
.s-date { font-family: var(--font-head); font-weight: 600; color: var(--teal-700); }
.s-date .day { display: block; font-size: 1.3rem; color: var(--navy-950); }
.s-date .month { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.s-main .s-title { font-weight: 600; color: var(--navy-950); margin-bottom: 4px; font-size: 1.05rem; }
.s-main .s-speaker { color: var(--teal-700); font-weight: 500; }
.s-main .s-meta { color: var(--ink-soft); font-size: 0.88rem; margin-top: 4px; }
.s-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 720px) {
  .schedule-row { grid-template-columns: 1fr; }
  .s-actions { justify-content: flex-start; }
}

/* ---------- Speaker cards ---------- */
.speaker-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.speaker-photo {
  aspect-ratio: 4 / 3.2;
  background: linear-gradient(160deg, var(--teal-900), var(--navy-950));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.speaker-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.avatar-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
}
.speaker-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.speaker-body .s-role { color: var(--ink-soft); font-size: 0.88rem; }
.speaker-body .s-talk { font-weight: 600; color: var(--navy-950); margin-top: 4px; }
.speaker-body .s-date-chip { font-size: 0.8rem; color: var(--teal-700); font-weight: 600; margin-top: 2px; }
.speaker-learn { margin: 10px 0 0; padding-left: 18px; color: var(--ink-soft); font-size: 0.9rem; }
.speaker-learn li { margin-bottom: 4px; }

/* ---------- Organiser cards ---------- */
.person-card { text-align: left; }
.person-photo {
  width: 84px; height: 84px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--teal-800);
  display: flex; align-items: center; justify-content: center;
}
.person-photo .avatar-fallback { font-size: 1.4rem; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-card h3 { margin-bottom: 2px; }
.person-role { color: var(--accent-dark); font-weight: 600; font-size: 0.88rem; margin-bottom: 10px; }

/* ---------- Recordings ---------- */
.rec-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.rec-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--teal-900), var(--navy-950));
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.rec-thumb .play {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.5);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.3rem;
}
.rec-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.rec-body h3 { font-size: 1.02rem; margin-bottom: 4px; }
.rec-body .rec-meta { color: var(--ink-soft); font-size: 0.85rem; margin-bottom: 14px; }
.rec-pending { color: var(--ink-soft); font-size: 0.85rem; font-style: italic; }

/* ---------- Resources ---------- */
.resource-card-compact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.resource-card-compact:hover { border-color: var(--teal-500); box-shadow: var(--shadow); }
.resource-card-compact:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; }
.resource-card-compact h3 { margin-bottom: 2px; }
.resource-talk-compact { color: var(--ink-soft); font-size: 0.9rem; margin: 0; }
.resource-card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; margin-top: auto; padding-top: 8px; }
.resource-card-actions .btn { padding-left: 12px; padding-right: 12px; flex: 1 1 auto; text-align: center; }

dialog.materials-modal {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  width: min(640px, 90vw);
  max-height: 82vh;
  box-shadow: var(--shadow-lg);
}
dialog.materials-modal::backdrop { background: rgba(27, 39, 64, 0.55); }
.modal-inner { padding: 28px 30px; overflow-y: auto; max-height: 82vh; }
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin-bottom: 4px; }
.modal-head .resource-talk { color: var(--teal-700); font-weight: 500; margin: 0; max-width: 44ch; font-size: 0.92rem; }
.modal-close {
  background: var(--teal-100);
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--accent-tint); color: var(--accent-dark); }
.resource-section { margin-top: 22px; }
.resource-section:first-of-type { margin-top: 0; }
.resource-section h4 {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.resource-section ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.resource-section li a { font-weight: 600; }
.resource-section .desc { display: block; color: var(--ink-soft); font-size: 0.9rem; margin-top: 2px; }

/* ---------- Contact ---------- */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.contact-card h3 { margin-bottom: 6px; }
.contact-card p { color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-950);
  color: rgba(255,255,255,0.75);
  padding: 48px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand img { width: 32px; height: 32px; }
.footer-brand span { font-family: var(--font-head); font-weight: 700; color: #fff; }
.site-footer h4 { color: #fff; font-family: var(--font-head); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 0.92rem; }
.site-footer a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Page header (non-home) ---------- */
.page-hero {
  background: var(--navy-950);
  color: #fff;
  padding: 56px 0 44px;
}
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255,255,255,0.72); max-width: 60ch; font-size: 1.05rem; }

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.filter-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
  font-family: var(--font-head);
}
.filter-btn.active { background: var(--navy-950); color: #fff; border-color: var(--navy-950); }

.note-box {
  background: var(--teal-100);
  border: 1px solid var(--teal-300);
  color: var(--teal-800);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 0.92rem;
  margin-bottom: 36px;
}

.divider { height: 1px; background: var(--line); margin: 48px 0; }
