:root {
  --orange: #f7931a;
  --orange-light: #fff8f0;
  --dark: #111827;
  --text: #1f2937;
  --muted: #6b7280;
  --subtle: #9ca3af;
  --border: #e5e7eb;
  --bg: #ffffff;
  --font-title: 'Bungee Shade', cursive;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 8px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-y: scroll;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Page shell ── */

.page {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Header ── */

.site-header {
  padding-top: 3rem;
}

.header-top {
  margin-bottom: 1.5rem;
}

.site-title {
  font-family: var(--font-title);
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--dark);
  line-height: 1.1;
}

.site-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

/* ── Filter nav ── */

.filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
}

.filter-tabs {
  display: flex;
  gap: 2px;
  background: #f3f4f6;
  padding: 3px;
  border-radius: 9px;
}

.filter-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.3rem 0.85rem;
  border-radius: 7px;
  transition: all 0.15s ease;
  line-height: 1.4;
}

.filter-btn.active {
  background: var(--bg);
  color: var(--orange);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.filter-btn:not(.active):hover {
  color: var(--text);
}

.add-link {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s;
}

.add-link:hover {
  color: var(--orange);
}

.header-rule {
  height: 2px;
  background: var(--orange);
  border-radius: 1px;
}

/* ── Conference list ── */

.conference-list {
  padding-bottom: 2rem;
}

/* ── Year section ── */

.year-section {
  margin-top: 2rem;
}

.year-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  margin-bottom: 0.25rem;
}

.year-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.year-count {
  font-size: 0.7rem;
  color: var(--muted);
  background: #f3f4f6;
  padding: 0.1rem 0.5rem;
  border-radius: 99px;
  font-weight: 500;
}

/* ── Conference row ── */

.conf-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  margin: 0 -0.65rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: background 0.12s ease;
  position: relative;
}

.conf-row:hover {
  background: var(--orange-light);
}

.conf-row + .conf-row {
  border-top: 1px solid var(--border);
  margin-top: -1px;
}

.conf-row:hover + .conf-row {
  border-top-color: transparent;
}

.conf-row:hover,
.conf-row:hover ~ .conf-row:first-of-type {
  border-top-color: transparent;
}

/* Date */
.conf-date {
  font-size: 0.78rem;
  color: var(--subtle);
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Name */
.conf-name {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* Location badge */
.conf-location {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.15rem 0.6rem;
  background: var(--bg);
  transition: border-color 0.12s;
}

.conf-row:hover .conf-location {
  border-color: #d1d5db;
}

/* NEXT badge */
.next-badge {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--orange);
  padding: 0.1rem 0.32rem;
  border-radius: 3px;
  vertical-align: middle;
  line-height: 1.5;
  flex-shrink: 0;
}

/* Past conferences */
.conf-row.past {
  opacity: 0.45;
}

.conf-row.past:hover {
  opacity: 0.65;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Footer ── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2.5rem;
  color: var(--subtle);
  font-size: 0.78rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--orange);
}

/* ── Animations ── */

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.year-section {
  animation: fadeSlideIn 0.2s ease both;
}

.year-section:nth-child(2) { animation-delay: 0.05s; }
.year-section:nth-child(3) { animation-delay: 0.1s; }

/* ── Responsive ── */

@media (max-width: 520px) {
  .page {
    padding: 0 1rem;
  }

  .conf-row {
    grid-template-columns: 3.8rem 1fr;
    grid-template-rows: auto auto;
    padding: 0.6rem 0.5rem;
    margin: 0 -0.5rem;
    gap: 0.3rem 0.5rem;
  }

  .conf-location {
    grid-column: 2;
    justify-self: start;
  }

  .add-link {
    display: none;
  }
}
