:root {
  --primary-color: #0ea5a3;
  --secondary-color: #0b1937;
  --text-color: #0f172a;
  --muted-text: #475569;
  --card-bg: #ffffff;
  --light-bg: #f7f9fc;
  --border: #e5e7eb;
  --radius: 12px;
}

body { background: #ffffff; }

/* ensure content never sits under sticky nav */
main.section { margin-top: 1rem; }
@media (max-width: 640px) { main.section { margin-top: 1.25rem; } }
.hero { padding: 1.25rem 0; }
.hero h1 { text-align: center; font-size: 2.2rem; margin-bottom: .5rem; }
.hero p { text-align: center; max-width: 820px; margin: 0 auto; }

/* highlight style to match datafixers teal */
.highlight { color: var(--primary-color); font-weight: 700; }

.lai-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: .5rem 0;
}
.lai-nav .nav-links { list-style: none; display: flex; gap: .5rem; justify-content: center; align-items: center; }
.lai-nav .nav-links li { display: flex; align-items: center; }
.lai-nav .tab-btn { font-size: 1rem; }
/* ensure anchor-based Home looks identical to button tabs */
.lai-nav .nav-links a.tab-btn { font-size: 1rem; }
.menu-toggle { display:none; border:1px solid var(--border); background:#fff; border-radius:.5rem; padding:.35rem .6rem; }
/* Equal height and alignment for all nav buttons */
/* Minimal tabs without circles/borders */
.tab-btn { display:inline-flex; align-items:center; justify-content:center; height: 44px; padding: 0 .25rem; border: 0; background: transparent; color: var(--text-color); border-radius: 0; cursor: pointer; font-weight: 700; text-decoration:none; line-height: 1; }
.tab-btn.active { background: transparent; color: var(--primary-color); }

.filters { margin: 1rem 0 2rem; }
.filter-row { display: flex; gap: .75rem; flex-wrap: wrap; }
#searchBox { flex: 1 1 320px; min-width: 200px; padding: .75rem 1rem; border-radius: 999px; border: 1px solid var(--border); background: #fff; outline: none; }
#sortSelect { padding: .75rem 1rem; border-radius: 999px; border: 1px solid var(--border); background: #fff; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 1rem; align-items: stretch; }
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card .card-body { padding: 1rem 1rem 0.75rem; display:flex; flex-direction:column; gap:.5rem; }
.badge { display:inline-block; width: fit-content; max-width: 100%; font-size:.75rem; font-weight:700; padding:.2rem .5rem; border-radius:999px; background: #e6fffe; color: var(--primary-color); }
.card h3 { font-size: 1.05rem; line-height: 1.35; }
.card p.muted { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { color: var(--muted-text); font-size: .85rem; display:flex; gap:.5rem; flex-wrap:wrap; }
.kv { display:flex; flex-direction:column; gap:.25rem; margin-top:.25rem; }
.kv b { font-size:.8rem; color: var(--secondary-color); }
.card .actions { margin-top:.5rem; display:flex; gap:.5rem; }
.btn { display:inline-block; padding:.35rem .6rem; border-radius:999px; text-decoration:none; background: #e6fffe; color: var(--primary-color); border:1px solid var(--primary-color); font-weight:600; font-size:.85rem; }
.btn:hover { background: var(--primary-color); color:#fff; border-color: var(--primary-color); }

.muted { color: var(--muted-text); }
.hidden { display: none !important; }
.footnote { color: var(--muted-text); font-size: .8rem; margin-top: .5rem; }

.cards-academic .card h3 { font-size: 1rem; }
.cards-academic .meta { font-size: .8rem; }
.abstract { color: var(--muted-text); font-size: .9rem; margin-top: .25rem; }

/* Popup styles (overlay) */
.popup { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: none; align-items: center; justify-content: center; z-index: 1000; }
.popup.show { display: flex; }
.popup-content { background: var(--card-bg); padding: 2rem; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.2); width: min(640px, 92vw); text-align: left; }
.popup-content h2 { color: var(--primary-color); font-size: 1.4rem; margin-bottom: .75rem; }
.popup-content p { color: var(--text-color); margin-bottom: 1rem; line-height: 1.6; }
.btn-popup { display:inline-block; padding:.6rem 1.1rem; background: var(--primary-color); color:#fff; border-radius:999px; text-decoration:none; font-weight:700; }
.btn-popup:hover { filter: brightness(0.95); }
.icon-btn { border: 1px solid var(--border); background: #fff; color: var(--text-color); border-radius: .5rem; }

/* Site footer pinned to bottom */
.footer.section { background: var(--card-bg); border-top:1px solid var(--border); margin-top: 2rem; padding: 1.5rem 0; }
.footer.section .container { text-align: center; }

/* Fixed course banner */
.course-fixed { position: fixed; left: 0; right: 0; bottom: -200px; background: var(--card-bg); border-top: 1px solid var(--border); box-shadow: 0 -6px 18px rgba(0,0,0,.08); transition: transform .25s ease, bottom .25s ease; z-index: 999; }
.course-fixed.show { bottom: 0; }
.course-inner { display:flex; align-items:center; gap:.75rem; max-width: 1100px; margin: 0 auto; padding: .75rem 1rem; }
.course-img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.course-text { display:flex; flex-direction:column; gap:.15rem; font-size:.9rem; color: var(--text-color); flex:1; }
.course-text strong { color: var(--primary-color); }
.course-btn { white-space: nowrap; }
.course-close { border:1px solid var(--border); background:#fff; color: var(--text-color); border-radius:.5rem; padding:.25rem .5rem; font-size:1.1rem; }

@media (max-width: 640px) {
  .course-inner { padding: .6rem .75rem; }
  .course-img { width: 32px; height: 32px; }
  .course-text { font-size:.85rem; }
}

/* Mobile menu behavior */
@media (max-width: 768px) {
  .menu-toggle { display:inline-block; margin-left:.5rem; }
  .lai-nav .nav-links { position: fixed; top: 56px; left: 0; right: 0; background: var(--card-bg); border-bottom:1px solid var(--border); padding: .75rem; display:none; flex-direction: column; gap:.5rem; z-index: 1000; }
  .lai-nav .nav-links.open { display:flex; }
  /* give extra space between sticky nav and hero so the hamburger doesn't collide */
  .hero { padding-top: 2rem; }
}


