/* ---------- Hero Links ---------- */
.hero-links {
  margin-top: .15rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  width: 100%;
  min-height: 1.2em;
}
.hero-links a {
  display: inline-flex;
  align-items: center;
  font-size: 1.08rem;
  color: var(--clr-accent);
  text-decoration: none;
  transition: color var(--transition), transform var(--transition);
}
.hero-links a:hover {
  color: #2d5a8e;
  transform: translateY(-2px) scale(1.07);
}
.hero-links svg {
  width: 26px;
  height: 26px;
  margin-right: 0.4em;
  vertical-align: middle;
  transition: filter var(--transition);
  filter: drop-shadow(0 1px 2px rgba(30,58,95,0.08));
}
/* Font Awesome uses <i> elements — ensure they're visible and sized */
.hero-links i {
  font-style: normal;
  font-size: 1.6em;
  width: 26px;
  margin-top: .15rem;
  margin-bottom: .05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.2em;
  color: #3b82f6; /* professional light blue */
}
.hero-links a:hover i { color: #2563eb; }

/* ============================================================
   Jim Halverson — Personal Academic Website
   Clean, minimal, modern design
   ============================================================ */

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

:root {
  --font-heading: 'Libre Baskerville', Georgia, serif;
  --font-body: 'Cabin', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  --clr-bg: #fcfcfb;
  transform: translateY(-3px);
  --clr-surface: #ffffff;
  --clr-text: #1c1917;
  --clr-text-secondary: #57534e;
  --clr-text-tertiary: #a8a29e;
  --clr-accent: #1e3a5f;
  --clr-accent-light: #e8eef4;
  --clr-border: #e7e5e4;
  --clr-border-light: #f5f5f4;
  --clr-highlight: #f59e0b;

  --radius: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.06), 0 2px 4px -2px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.06), 0 4px 6px -4px rgba(0,0,0,.04);

  --max-w: 1080px;
  --max-w-wide: 1080px;
  --transition: 0.25s cubic-bezier(.4,0,.2,1);
}

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

body {
  font-family: var(--font-body);
  color: var(--clr-text);
  background: var(--clr-bg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: var(--clr-accent);
  color: #fff;
}

a {
  color: #3b82f6;
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: #2563eb; }

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

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: .5rem 1rem;
  background: var(--clr-accent);
  color: #fff;
  border-radius: var(--radius);
  z-index: 999;
  font-size: .92rem;
}
.skip-link:focus { top: 1rem; }

/* ---------- Container ---------- */
.container       { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.container--wide { max-width: var(--max-w-wide); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Header / Nav ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252,252,251,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: none;
}

.header-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--clr-text);
  letter-spacing: -.01em;
}
.logo:hover { color: var(--clr-accent); }

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 600;
  color: var(--clr-text-secondary);
  letter-spacing: .06em;
  text-transform: uppercase;
  position: relative;
  padding: .25rem 0;
}
nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--clr-accent);
  transition: width var(--transition);
}
nav a:hover,
nav a.active { color: var(--clr-accent); }
nav a:hover::after,
nav a.active::after { width: 100%; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--clr-text);
  padding: .25rem;
}

/* ---------- Hero (Home) ---------- */
.hero {
  padding: 2rem 0 1rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.hero-photo {
  position: relative;
  text-align: center;
}

.hero-photo img {
  width: 260px;
  height: 260px;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 50%;
  box-shadow: 0 8px 30px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.08);
  filter: grayscale(10%);
  transition: filter var(--transition);
  background: linear-gradient(135deg, var(--clr-accent-light) 0%, #d4dce6 100%);
}
.hero-photo img:hover {
  filter: grayscale(0%);
}

/* Fallback initials when image is empty/broken */
.hero-photo-fallback {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(145deg, #1e3a5f 0%, #2d5a8e 50%, #3b7dd8 100%);
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 5rem;
  color: rgba(255,255,255,.85);
  letter-spacing: .05em;
}

.hero-photo::after {
  display: none;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: .35rem;
}

.hero-title {
  font-size: .95rem;
  color: var(--clr-accent);
  font-weight: 500;
  margin-top: .35rem;
  margin-bottom: .05rem;
}

.hero-affiliation {
  font-size: .85rem;
  color: var(--clr-text-secondary);
  margin-bottom: 0;
  margin-top: .05rem;
}

.hero-bio {
  color: var(--clr-text-secondary);
  font-size: .95rem;
  line-height: 1.8;
}
.hero-bio p + p { margin-top: 1rem; }
.hero-bio strong { color: var(--clr-text); font-weight: 600; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.75rem;
}

.tag {
  display: inline-block;
  padding: .3rem .8rem;
  border-radius: 100px;
  font-size: .88rem;
  font-weight: 500;
  letter-spacing: .02em;
  background: var(--clr-accent-light);
  color: var(--clr-accent);
  transition: all var(--transition);
}
.tag:hover {
  background: var(--clr-accent);
  color: #fff;
}

/* ---------- Quick Contact Bar ---------- */
.contact-bar {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .95rem;
  color: var(--clr-text-secondary);
}
.contact-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: var(--clr-accent);
}
.contact-item a { color: var(--clr-text-secondary); }
.contact-item a:hover { color: var(--clr-accent); }

/* ---------- Main / Sections ---------- */
main { flex: 1; }

.section {
  padding: 2.5rem 0;
}
.section + .section {
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 1.25rem;
  letter-spacing: -.01em;
}

.section-subtitle {
  font-size: .92rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--clr-text-tertiary);
  font-weight: 600;
  margin-bottom: .75rem;
}

/* ---------- Cards Grid ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all var(--transition);
}
.card:hover {
  border-color: var(--clr-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 400;
  margin-bottom: .25rem;
}

.card-desc {
  font-size: .95rem;
  color: var(--clr-text-secondary);
  line-height: 1.5;
}

.card-link {
  display: inline-block;
  margin-top: .5rem;
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--clr-accent);
}
.card-link::after { content: ' →'; }

/* ---------- Timeline (Positions / Education) ---------- */
.timeline {
  list-style: none;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--clr-border);
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: .75rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--clr-bg);
  border: 2px solid var(--clr-accent);
}

.timeline-role {
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: 0;
  line-height: 1.3;
}

.timeline-org {
  font-size: .88rem;
  color: var(--clr-text-secondary);
  line-height: 1.3;
}

.timeline-year {
  font-size: .88rem;
  color: var(--clr-text-tertiary);
  font-weight: 500;
  line-height: 1.3;
}

/* ---------- Talks List ---------- */
.talks-list {
  list-style: none;
}

.talk-item {
  padding: .5rem 0;
  border-bottom: 1px solid var(--clr-border-light);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .75rem;
  align-items: baseline;
}
.talk-item:last-child { border-bottom: none; }

.talk-name {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.25;
}

.talk-venue {
  font-size: .92rem;
  color: var(--clr-text-secondary);
  margin-top: 0;
  line-height: 1.25;
}

.talk-title-text {
  font-size: .9rem;
  color: var(--clr-text-tertiary);
  font-style: italic;
  margin-top: 0;
  line-height: 1.25;
}

.talk-year {
  font-size: .88rem;
  font-weight: 500;
  color: var(--clr-text-tertiary);
  white-space: nowrap;
}

/* ---------- Awards ---------- */
.award-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: .45rem 0;
  border-bottom: 1px solid var(--clr-border-light);
}
.award-item:last-child { border-bottom: none; }

.award-name {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.25;
}
.award-org {
  font-size: .92rem;
  color: var(--clr-text-secondary);
  line-height: 1.25;
}
.award-year {
  font-size: .88rem;
  color: var(--clr-text-tertiary);
  white-space: nowrap;
  font-weight: 500;
}

/* ---------- CV Page - Collapsible Sections ---------- */
.cv-section {
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  background: var(--clr-surface);
  margin-bottom: 1rem;
  overflow: hidden;
}

.cv-section-header {
  padding: .85rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: background var(--transition);
}
.cv-section-header:hover { background: var(--clr-border-light); }

.cv-section-header h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 400;
}

.cv-section-header .chevron {
  width: 20px;
  height: 20px;
  stroke: var(--clr-text-tertiary);
  transition: transform var(--transition);
}

.cv-section.open .chevron { transform: rotate(180deg); }

.cv-section-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.cv-section.open .cv-section-body {
  max-height: 12000px;
}

.cv-section-content {
  padding: 0 1.5rem 1rem;
}

/* ---------- Seminars compact list ---------- */
.seminars-compact {
  list-style: none;
  columns: 2;
  column-gap: 2rem;
}
.seminars-compact li {
  font-size: .95rem;
  color: var(--clr-text-secondary);
  padding: .2rem 0;
  break-inside: avoid;
}
.seminars-compact li strong {
  color: var(--clr-text);
  font-weight: 500;
}

/* ---------- Service list ---------- */
.service-list {
  list-style: none;
}
.service-list li {
  padding: .35rem 0;
  border-bottom: 1px solid var(--clr-border-light);
  font-size: .9rem;
  color: var(--clr-text-secondary);
  line-height: 1.5;
}
.service-list li:last-child { border-bottom: none; }
.service-list li strong { color: var(--clr-text); }

/* ---------- Contact Page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.contact-block {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.contact-block h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.contact-block p {
  font-size: .9rem;
  color: var(--clr-text-secondary);
  line-height: 1.8;
}

.contact-block a { color: var(--clr-accent); }

/* ---------- Page Header ---------- */
.page-header {
  padding: 1rem 0 0;
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 400;
  letter-spacing: -.02em;
}

.page-header p {
  color: var(--clr-text-secondary);
  margin-top: .5rem;
  font-size: .95rem;
}

/* ---------- Footer ---------- */
footer {
  margin-top: auto;
  border-top: none;
  padding: 1.5rem 0;
  text-align: center;
}

footer p {
  font-size: .88rem;
  color: var(--clr-text-tertiary);
}
footer a {
  color: var(--clr-text-secondary);
}

/* ---------- Utility ---------- */
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.text-center { text-align: center; }
.text-sm { font-size: .92rem; }
.text-muted { color: var(--clr-text-tertiary); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  html { font-size: 20px; }

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

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  .hero-photo img {
    width: 50%;
    height: auto;
    flex-shrink: 0;
  }
  .hero-photo .hero-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--clr-text);
    text-align: center;
  }
  .hero-photo .hero-title::after {
    content: "\A Northeastern University";
    white-space: pre;
    color: var(--clr-text-secondary);
    font-size: 0.9rem;
    font-weight: 400;
  }
  .hero-photo .hero-affiliation {
    display: none;
  }
  .hero-photo::after { display: none; }

  .hero-bio { max-width: none; }
  .tags { justify-content: center; }
  .contact-bar { justify-content: center; }

  .hero-name { font-size: 2rem; }

  .menu-toggle { display: block; }

  nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--clr-bg);
    border-bottom: 1px solid var(--clr-border);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-md);
  }
  nav.active { display: block; }
  nav ul { flex-direction: column; gap: .5rem; }
  nav a { padding: .5rem 0; display: block; }

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

  .talk-item { grid-template-columns: 1fr; }
  .talk-year { text-align: left; }

  .seminars-compact { columns: 1; }

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

  .page-header { text-align: center; }
  .page-header p { text-align: center; max-width: none; }
}

@media (max-width: 480px) {
  .hero-name { font-size: 1.75rem; }
  .section { padding: 2.5rem 0; }
}

/* ---------- Publications — Flip Cards ---------- */
.pub-intro {
  font-size: 1rem;
  color: var(--clr-text-secondary);
  margin-bottom: 0;
  line-height: 1.7;
}

.pub-section { padding-top: 1rem; }

.pub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.pub-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--clr-border);
  background: var(--clr-surface);
  box-shadow: var(--shadow);
}

/* -- Front card elements -- */
.pub-title {
  font-family: var(--font-heading);
  font-size: .95rem;
  font-weight: 400;
  line-height: 1.45;
  margin-bottom: .5rem;
  color: var(--clr-text);
}

.pub-description {
  font-size: .82rem;
  color: var(--clr-text-secondary);
  line-height: 1.5;
  margin-bottom: .75rem;
}

.pub-highlights {
  font-size: .78rem;
  color: var(--clr-text-tertiary);
  line-height: 1.4;
}

.pub-highlights strong {
  font-weight: 700;
  color: var(--clr-text-secondary);
}

.pub-highlights-list {
  margin-top: .25rem;
  padding-left: 1rem;
}

.pub-highlights-list li {
  margin-bottom: .08rem;
}

.pub-highlights-list a {
  color: #1d4ed8;
  text-decoration: none;
}

.pub-highlights-list a:hover {
  text-decoration: underline;
}

/* Post-highlights should use the same link color as highlights */
.pub-posthighlights a {
  color: #1d4ed8;
  text-decoration: none;
}
.pub-posthighlights a:hover {
  text-decoration: underline;
}

.paper-details {
  margin-bottom: 0.5rem;
}

.paper-title {
  cursor: pointer;
  font-weight: 500;
  color: #1d4ed8;
  text-decoration: none;
  display: block;
  padding: 0.25rem 1.2rem 0.25rem 0;
  position: relative;
}

.paper-title::before {
  content: "▶";
  color: var(--clr-text-secondary);
  font-size: 0.8em;
  position: absolute;
  right: 0;
  top: 0.25rem;
  transition: transform 0.2s ease;
}

.paper-title:hover::before {
  color: #1d4ed8;
}

details[open] .paper-title::before {
  content: "▼";
  transform: rotate(0deg);
}

.paper-summary {
  margin-top: 0.5rem;
  margin-left: 0;
  font-size: 0.75rem;
  color: var(--clr-text-secondary);
  line-height: 1.4;
  padding-left: 0;
}

.paper-summary p {
  margin: 0.5rem 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.paper-summary p:first-child {
  margin-top: 0;
}

.paper-summary p:last-child {
  margin-bottom: 0;
}

/* -- Footer links -- */
.pub-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--clr-border);
  font-size: .88rem;
  color: var(--clr-text-secondary);
  text-align: center;
}

/* -- Publications responsive -- */
@media (max-width: 768px) {
  .pub-grid { grid-template-columns: 1fr; }
  .pub-title { max-width: 100%; }
}

/* ---------- Admin Page Styles ---------- */
.admin-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.btn-primary, .btn-secondary {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--clr-accent);
  color: white;
}

.btn-primary:hover {
  background: #1a2a3a;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--clr-surface);
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
}

.btn-secondary:hover {
  background: var(--clr-bg);
  border-color: var(--clr-accent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-card h3 {
  font-size: 0.9rem;
  color: var(--clr-text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--clr-accent);
  line-height: 1;
}

.stat-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--clr-text);
}

.data-section {
  margin-bottom: 3rem;
}

.data-section h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--clr-text);
}

.activity-list, .geo-list {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.activity-item, .geo-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--clr-border);
}

.activity-item:last-child, .geo-item:last-child {
  border-bottom: none;
}

.activity-time {
  font-size: 0.85rem;
  color: var(--clr-text-secondary);
  margin-bottom: 0.25rem;
}

.activity-details {
  font-size: 0.9rem;
  color: var(--clr-text);
}

.geo-country {
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: 0.25rem;
}

.geo-count {
  font-size: 0.9rem;
  color: var(--clr-accent);
  margin-bottom: 0.25rem;
}

.geo-cities {
  font-size: 0.8rem;
  color: var(--clr-text-secondary);
}

.no-data {
  padding: 2rem;
  text-align: center;
  color: var(--clr-text-secondary);
  font-style: italic;
}

/* -- Time range buttons -- */
.range-bar {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.btn-range {
  padding: 0.5rem 1rem;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  background: var(--clr-surface);
  color: var(--clr-text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-range:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
}

.btn-range.active {
  background: var(--clr-accent);
  color: #fff;
  border-color: var(--clr-accent);
}

/* -- Leaflet popup override -- */
.leaflet-popup-content-wrapper {
  font-family: var(--font-body);
  border-radius: var(--radius) !important;
}

.leaflet-popup-content {
  margin: 0.75rem 1rem !important;
  font-size: 0.88rem;
  line-height: 1.5;
}

.map-popup strong {
  font-size: 0.95rem;
}

.popup-count {
  color: var(--clr-accent);
  font-weight: 600;
}

.popup-pages {
  margin: 0.35rem 0 0;
  padding-left: 1rem;
  font-size: 0.8rem;
  color: var(--clr-text-secondary);
}

.popup-pages li {
  margin-bottom: 0.1rem;
}

/* -- Admin responsive -- */
@media (max-width: 768px) {
  .admin-controls {
    flex-direction: column;
    align-items: center;
  }

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

  .stat-number {
    font-size: 2rem;
  }
}
