:root {
  --bg: #ffffff;
  --bg-soft: #f4f6fa;
  --fg: #1a1f2b;
  --muted: #5b6475;
  --line: #e2e6ee;
  --accent: #1f5fbf;
  --accent-soft: #e6eefb;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151c;
    --bg-soft: #1a2029;
    --fg: #e8ecf3;
    --muted: #9aa4b5;
    --line: #2a3140;
    --accent: #7fb0ff;
    --accent-soft: #1e2a40;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--fg); }
.brand img { height: 32px; width: auto; }
.brand:hover { text-decoration: none; }
nav { display: flex; gap: 20px; }
nav a { color: var(--muted); font-weight: 500; }
nav a:hover { color: var(--fg); text-decoration: none; }

/* Hero */
.hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 64px 0 48px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 600; color: var(--accent); margin: 0 0 8px; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.15; margin: 0 0 16px; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 680px; margin: 0; }
.next-event {
  margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
}
.next-event a { font-weight: 600; }
.badge { background: var(--accent); color: var(--bg); font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }

/* Sections */
.section { padding: 56px 16px 8px; }
.section h2 { font-size: 1.6rem; margin: 0 0 24px; }

/* Events */
.event-list { display: grid; gap: 16px; }
.event { display: grid; grid-template-columns: 96px 1fr; gap: 20px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.event-year { font-size: 2rem; font-weight: 800; color: var(--accent); line-height: 1; }
.event-body h3 { margin: 4px 0 8px; font-size: 1.15rem; line-height: 1.35; }
.event-body h3 a { color: var(--fg); }
.event-body p { margin: 0 0 8px; }
.event-meta { color: var(--muted); font-size: .875rem; }
.event-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn {
  display: inline-block; padding: 7px 14px; border-radius: 8px; font: inherit; font-size: .9rem; font-weight: 600;
  background: var(--accent); color: var(--bg); border: 1px solid var(--accent); cursor: pointer;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent); }

/* Filters */
.filters { display: grid; gap: 12px; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: .875rem; padding: 5px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg); color: var(--fg);
}
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-row select, .filter-row input {
  font: inherit; font-size: .9rem; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--fg);
}
.filter-row input { flex: 1; min-width: 180px; }

/* Resources */
.resource-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.resource { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.r-title { font-weight: 500; }
.tag { font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; text-align: center; background: var(--bg-soft); color: var(--muted); }
.tag-recording { background: #fde8e8; color: #b42318; }
.tag-paper { background: var(--accent-soft); color: var(--accent); }
.tag-standard { background: #e6f5ec; color: #19703f; }
.tag-talk { background: #f3ecfb; color: #6b3fa0; }
.tag-slides { background: #fff4e0; color: #9a5b00; }
@media (prefers-color-scheme: dark) {
  .tag-recording { background: #3a1d1d; color: #ff9b91; }
  .tag-standard { background: #173024; color: #7fd6a3; }
  .tag-talk { background: #2a2140; color: #c6a8f0; }
  .tag-slides { background: #3a2c14; color: #f3c577; }
}
.empty { color: var(--muted); padding: 16px 0; }

.about p { max-width: 680px; }
.footer { padding: 48px 16px 32px; color: var(--muted); font-size: .875rem; }

@media (max-width: 600px) {
  nav { gap: 14px; font-size: .9rem; }
  .event { grid-template-columns: 1fr; gap: 8px; }
  .resource { grid-template-columns: 1fr; gap: 6px; }
  .tag { justify-self: start; }
}
.event-year span { display: block; margin-top: 6px; font-size: .8rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.about h3 { font-size: 1.1rem; margin: 28px 0 8px; }
.contact-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); padding: 4px 20px; max-width: 680px; }
.contact-email { font-size: 1.05rem; font-weight: 600; }
