/* ============================================================
   iCNL AI Lecture Series — main.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@300;400;500&display=swap');

:root {
  --white:        #ffffff;
  --off-white:    #f5f3ef;
  --paper:        #faf8f5;
  --border:       #e2ddd6;
  --border2:      #c8c2b8;

  --ink:          #0f0f1a;
  --ink2:         #252538;
  --ink3:         #5a5a72;
  --ink4:         #9090a8;

  --navy:         #152040;
  --navy2:        #1e2f5a;
  --navy3:        #0d1628;
  --accent:       #2b4899;
  --accent2:      #4a6fd4;
  --accent-light: rgba(43,72,153,0.07);
  --accent-mid:   rgba(43,72,153,0.15);

  --teal:         #147a6e;
  --teal-light:   rgba(20,122,110,0.09);
  --amber:        #b05c0a;
  --amber-light:  rgba(176,92,10,0.09);
  --red:          #b03a3a;

  --shadow-sm:    0 1px 4px rgba(15,15,26,0.07), 0 1px 2px rgba(15,15,26,0.04);
  --shadow-md:    0 4px 16px rgba(15,15,26,0.09), 0 2px 6px rgba(15,15,26,0.05);
  --shadow-lg:    0 12px 40px rgba(15,15,26,0.11), 0 4px 10px rgba(15,15,26,0.06);

  --radius:       4px;
  --radius-lg:    10px;
  --radius-xl:    16px;

  --font-serif:   'Playfair Display', Georgia, serif;
  --font-sans:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  --max-width:    1100px;
  --nav-height:   64px;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy);
}

h1 { font-size: clamp(32px, 4.5vw, 56px); letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.01em; }
h3 { font-size: 20px; letter-spacing: -0.01em; }

p { color: var(--ink2); line-height: 1.8; font-size: 15px; }

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--navy); }

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-height);
  background: rgba(250,248,245,0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 48px;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.01em;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-logo-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--ink4);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-left: 1px solid var(--border2);
  padding-left: 14px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2px;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink3);
  padding: 7px 16px;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-light);
}

.nav-discuss-link { position: relative; }

.discuss-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red);
  border: 2px solid rgba(255,255,255,0.9);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 14px;
  text-align: center;
  pointer-events: none;
}

/* ── LAYOUT ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 48px;
}

.page-content {
  padding-top: calc(var(--nav-height) + 40px);
  padding-bottom: 100px;
}

/* ── PAGE HEADER ── */
.page-header {
  margin-bottom: 56px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 16px;
}

.page-title { margin-bottom: 16px; }

.page-desc {
  font-size: 16.5px;
  color: var(--ink2);
  max-width: 100%;
  line-height: 1.75;
  text-align: justify;
}

/* ── SECTION HEADER ── */
.section-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 32px;
}

.section-title-sm {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink3);
  white-space: nowrap;
  font-weight: 500;
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section-action {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  transition: color 0.2s;
}
.section-action:hover { color: var(--navy); }

/* ── CARDS ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s, border-color 0.25s, transform 0.25s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border2);
  transform: translateY(-2px);
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* ── LECTURE CARD ── */
.lecture-card { position: relative; overflow: hidden; }

.lecture-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--hover-bar, linear-gradient(90deg, var(--accent), var(--accent2)));
  opacity: 0;
  transition: opacity 0.25s;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.lecture-card:hover::before { opacity: 1; }

.lecture-card-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--ink4);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* segments injected by JS */
.lecture-progress-bar {
  flex: 1;
  display: flex;
  gap: 3px;
  align-items: center;
}

.lecture-progress-seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.35s ease, background 0.3s ease;
}

.lecture-progress-seg.filled {
  transform: scaleX(1);
}

.lecture-card-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.35;
  transition: color 0.2s;
}

.lecture-card-title-link:hover .lecture-card-title { color: var(--accent); }

.lecture-card-meta {
  font-size: 13px;
  color: var(--ink3);
  margin-bottom: 16px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-weight: 400;
}

.lecture-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.lecture-card-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Status indicator */
.status {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-done     { background: var(--teal); box-shadow: 0 0 0 3px var(--teal-light); }
.status-upcoming { background: var(--ink4); }
.status-live     { background: var(--red); animation: pulse 2s infinite; }

/* ── PAPER CARD ── */
.paper-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
  text-decoration: none;
  color: inherit;
}

.paper-card-date {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink4);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.paper-card-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 6px;
}

.paper-card-authors {
  font-size: 13px;
  color: var(--ink3);
  margin-bottom: 8px;
  font-weight: 400;
}

.paper-card-abstract {
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.paper-card-notes {
  font-size: 13px;
  color: var(--teal);
  margin-bottom: 10px;
  font-style: italic;
}

.paper-card-arrow {
  font-size: 20px;
  color: var(--ink4);
  transition: all 0.2s;
  padding-top: 2px;
}

.card:hover .paper-card-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* ── TAGS ── */
.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--ink3);
  background: var(--off-white);
  transition: all 0.2s;
}

.tag-accent  { border-color: rgba(43,72,153,0.3);   color: var(--accent);  background: var(--accent-light); }
.tag-teal    { border-color: rgba(20,122,110,0.3);  color: var(--teal);    background: var(--teal-light);  }
.tag-amber   { border-color: rgba(176,92,10,0.3);   color: var(--amber);   background: var(--amber-light); }

/* ── BADGES ── */
.badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
}

.badge-venue  { border: 1px solid rgba(43,72,153,0.25);  color: var(--accent2); background: var(--accent-light); }
.badge-manual { border: 1px solid rgba(176,92,10,0.3);   color: var(--amber);   background: var(--amber-light); }
.badge-error  { border: 1px solid rgba(176,58,58,0.3);   color: var(--red);     background: rgba(176,58,58,0.07); }

/* ── BUTTONS ── */
.btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 9px 18px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 1px 3px rgba(15,15,26,0.2);
}
.btn-primary:hover {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 3px 10px rgba(43,72,153,0.3);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--ink2);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.btn-ghost {
  background: transparent;
  color: var(--ink3);
}
.btn-ghost:hover {
  color: var(--accent);
  background: var(--accent-light);
}

.btn:disabled, .btn.disabled { opacity: 0.3; pointer-events: none; }

/* ── FILTER BAR ── */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.filter-btn {
  position: relative;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 7px 16px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink3);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* ── TAG COUNT BADGE ── */
.filter-btn .tag-count {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  font-size: 9px;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
  border: 2px solid var(--paper);
}

/* ── YEAR TABS ── */
.year-tabs {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: fit-content;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.year-tab {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 9px 20px;
  background: var(--white);
  color: var(--ink3);
  border: none;
  border-right: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.year-tab:last-child { border-right: none; }
.year-tab.active, .year-tab:hover { background: var(--navy); color: var(--white); }

/* ── GRID LAYOUTS ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.papers-list { display: flex; flex-direction: column; gap: 28px; }

/* ── DIVIDER ── */
hr { border: none; border-top: 1px solid var(--border); margin: 52px 0; }
.hr-thin { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ── SKELETON LOADING ── */
.skeleton { pointer-events: none; }

.skel {
  background: linear-gradient(90deg, var(--off-white) 25%, var(--border) 50%, var(--off-white) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 3px;
  margin-bottom: 10px;
}

.skel-title  { height: 18px; width: 85%; }
.skel-meta   { height: 13px; width: 50%; }
.skel-body   { height: 13px; width: 95%; }
.skel-body2  { height: 13px; width: 70%; }
.skel-short  { height: 12px; width: 100px; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── UPCOMING BANNER ── */
.upcoming-banner {
  background: linear-gradient(135deg, var(--accent-light), rgba(43,72,153,0.03));
  border: 1px solid rgba(43,72,153,0.2);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 20px 26px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.upcoming-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse 2s infinite;
}

.upcoming-text { font-size: 15px; color: var(--ink2); }
.upcoming-text strong { color: var(--navy); font-weight: 600; }

.upcoming-date {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  white-space: nowrap;
}

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--white);
}

.footer-left {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink3);
}

.footer-left strong { color: var(--navy); font-weight: 700; }

.footer-right {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--ink4);
  text-transform: uppercase;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

.fade-up { opacity: 0; animation: fadeUp 0.65s ease forwards; }
.fade-up-1 { animation-delay: 0.08s; }
.fade-up-2 { animation-delay: 0.18s; }
.fade-up-3 { animation-delay: 0.28s; }
.fade-up-4 { animation-delay: 0.38s; }

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  :root { --nav-height: 58px; }
  .nav { padding: 0 20px; }
  .nav-logo-sub { display: none; }
  .container { padding: 0 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer { padding: 20px; flex-direction: column; gap: 8px; text-align: center; }
  .upcoming-date { display: none; }
}

@media (max-width: 540px) {
  .nav-links { display: none; }
}

/* ── PAPER VENUE BADGE ── */
.paper-venue-badge {
  position: absolute;
  top: 0;
  right: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid rgba(43,72,153,0.2);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ── LECTURES LIST ── */
.lectures-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── PART SEARCH RESULT CARDS ── */
.part-result-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
  box-shadow: var(--shadow-sm);
}
.part-result-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.part-result-section {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 16px;
  font-weight: 600;
}

.part-result-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.part-result-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.part-result-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}

.part-result-meta {
  display: flex;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink4);
  padding-left: 17px;
  flex-wrap: wrap;
}

.part-result-status {
  text-transform: uppercase;
  font-weight: 600;
}

.part-result-desc {
  font-size: 13px;
  color: var(--ink3);
  line-height: 1.6;
  padding-left: 17px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#lectures-grid:has(.part-result-card) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}



/* ── LECTURES THEME ── */
.lectures-theme {
  --accent:       #147a6e;
  --accent2:      #1fa394;
  --accent-light: rgba(20,122,110,0.07);
  --accent-mid:   rgba(20,122,110,0.15);
  --navy:         #0d3d36;
  --navy2:        #145c52;
  --navy3:        #092920;
}

.lectures-theme h1,
.lectures-theme h2,
.lectures-theme h3 { color: #0d3d36; }

.lectures-theme .lecture-card::before {
  background: linear-gradient(90deg, #147a6e, #1fa394);
}

.lectures-theme .page-eyebrow { color: #1fa394; }
.lectures-theme .btn-primary { background: #147a6e; color: #ffffff; }
.lectures-theme .btn-primary:hover { background: #0d3d36; color: #ffffff; box-shadow: 0 3px 10px rgba(20,122,110,0.3); }
.lectures-theme a { color: #147a6e; }
.lectures-theme a:hover { color: #0d3d36; }
.lectures-theme .lecture-card-title { color: #0d3d36; }
.lectures-theme .lecture-card-title-link:hover .lecture-card-title { color: #147a6e; }
.lectures-theme .status-done { background: #147a6e; box-shadow: 0 0 0 3px rgba(20,122,110,0.15); }
.lectures-theme .upcoming-banner { border-left-color: #147a6e; background: linear-gradient(135deg, rgba(20,122,110,0.07), rgba(20,122,110,0.02)); border-color: rgba(20,122,110,0.2); }
.lectures-theme .upcoming-dot { background: #147a6e; }
.lectures-theme .upcoming-date { color: #147a6e; }
.lectures-theme .section-action { color: #147a6e; }
.lectures-theme .section-action:hover { color: #0d3d36; }
.lectures-theme .filter-btn:hover,
.lectures-theme .filter-btn.active { border-color: #147a6e; color: #147a6e; background: rgba(20,122,110,0.07); }
.lectures-theme .btn-outline:hover { border-color: #147a6e; color: #147a6e; background: rgba(20,122,110,0.07); }
.lectures-theme .btn-ghost:hover { color: #147a6e; background: rgba(20,122,110,0.07); }

/* ── MBOI THEME ── */
.mboi-theme {
  --accent:       #8b3a1a;
  --accent2:      #b05530;
  --accent-light: rgba(139,58,26,0.07);
  --accent-mid:   rgba(139,58,26,0.15);
  --navy:         #4a1e0a;
  --navy2:        #6b2e12;
  --navy3:        #2e1206;
  --amber:        #8b3a1a;
  --amber-light:  rgba(139,58,26,0.07);
}

.mboi-theme h1,
.mboi-theme h2,
.mboi-theme h3 { color: #4a1e0a; }

.mboi-theme .page-eyebrow { color: #b05530; }
.mboi-theme a { color: #8b3a1a; }
.mboi-theme a:hover { color: #4a1e0a; }
.mboi-theme .btn-primary { background: #8b3a1a; }
.mboi-theme .btn-primary:hover { background: #4a1e0a; box-shadow: 0 3px 10px rgba(139,58,26,0.3); }
.mboi-theme .btn-outline:hover { border-color: #8b3a1a; color: #8b3a1a; background: rgba(139,58,26,0.07); }
.mboi-theme .btn-ghost:hover { color: #8b3a1a; background: rgba(139,58,26,0.07); }
.mboi-theme .year-tab.active,
.mboi-theme .year-tab:hover { background: #4a1e0a; }
.mboi-theme .filter-btn:hover,
.mboi-theme .filter-btn.active { border-color: #8b3a1a; color: #8b3a1a; background: rgba(139,58,26,0.07); }
.mboi-theme .paper-card-title { color: #4a1e0a; }
.mboi-theme .card:hover .paper-card-arrow { color: #8b3a1a; }
.mboi-theme .badge-venue { border-color: rgba(139,58,26,0.25); color: #b05530; background: rgba(139,58,26,0.07); }
.mboi-theme .tag-accent { border-color: rgba(139,58,26,0.3); color: #8b3a1a; background: rgba(139,58,26,0.07); }
.mboi-theme .section-action { color: #8b3a1a; }
.mboi-theme .section-action:hover { color: #4a1e0a; }
.mboi-theme .filter-btn .tag-count { background: #8b3a1a; }

/* ── COLORED NAV BARS ── */
.nav-home     { background: rgba(21,32,64,0.97);   border-bottom-color: rgba(255,255,255,0.08); }
.nav-lectures { background: rgba(14,90,78,0.97);   border-bottom-color: rgba(255,255,255,0.1);  }
.nav-mboi     { background: rgba(120,40,20,0.97);  border-bottom-color: rgba(255,255,255,0.1);  }
.nav-discuss  { background: rgba(75,46,27,0.97);   border-bottom-color: rgba(255,255,255,0.1);  }

.nav-home .nav-logo,
.nav-lectures .nav-logo,
.nav-mboi .nav-logo,
.nav-discuss .nav-logo { color: #ffffff; }

.nav-home .nav-logo-sub,
.nav-lectures .nav-logo-sub,
.nav-mboi .nav-logo-sub,
.nav-discuss .nav-logo-sub { color: rgba(255,255,255,0.55); border-left-color: rgba(255,255,255,0.2); }

.nav-home .nav-links a,
.nav-lectures .nav-links a,
.nav-mboi .nav-links a,
.nav-discuss .nav-links a { color: rgba(255,255,255,0.7); }

.nav-home .nav-links a:hover,
.nav-home .nav-links a.active,
.nav-lectures .nav-links a:hover,
.nav-lectures .nav-links a.active,
.nav-mboi .nav-links a:hover,
.nav-mboi .nav-links a.active,
.nav-discuss .nav-links a:hover,
.nav-discuss .nav-links a.active { color: #ffffff; background: rgba(255,255,255,0.15); }

/* ── TOOLTIP ── */
.tooltip-wrap {
  position: relative;
  display: inline-block;
}

.tooltip-wrap .tooltip-box {
  visibility: hidden;
  opacity: 0;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: var(--radius);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.tooltip-wrap .tooltip-box::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--navy);
}

.tooltip-wrap:hover .tooltip-box {
  visibility: visible;
  opacity: 1;
}

/* ── KPI HOVER BUBBLE ── */
/* .kpi-item wraps each stat in the hero stats row (index.html). Hovering it
   reveals a cloud-style bubble in the empty space below the stats row. */
.kpi-item {
  position: relative;
}

.kpi-bubble {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  min-width: 190px;
  max-width: 240px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 14px 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -6px) scale(0.95);
  transform-origin: top center;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 60;
}

/* speech-bubble tail pointing back up at the KPI */
.kpi-bubble::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-bottom-color: var(--border);
}
.kpi-bubble::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(1px);
  border: 6px solid transparent;
  border-bottom-color: var(--white);
}

.kpi-item:hover .kpi-bubble {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.kpi-bubble-text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink3);
}

.kpi-bubble-caption {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink4);
  text-align: center;
  margin-bottom: 10px;
}

/* Speakers bubble: wider, houses the 3 waving avatars */
.kpi-bubble-speakers {
  min-width: unset;
  padding: 14px 14px 12px;
}

.speaker-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

/* Each avatar is a 3-frame sprite (idle / wave / blink) stacked vertically
   in one PNG. background-size: auto 300% keeps each frame's native aspect
   ratio (no stretching); background-position-y switches frames; center-x
   keeps the face centered regardless of the source image's width. */
.speaker-avatar {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--white);
  box-shadow: var(--shadow-sm);
  background-repeat: no-repeat;
  background-size: auto 300%;
  background-position: 50% 0%;
  animation: speaker-wave-loop 2.8s ease-in-out infinite;
}

.speaker-avatar-sam    { background-image: url('../img/speakers/sam.png');    animation-delay: 0s; }
.speaker-avatar-priyam { background-image: url('../img/speakers/priyam.png'); animation-delay: 0.55s; }
.speaker-avatar-gargi  { background-image: url('../img/speakers/gargi.png'); animation-delay: 1.1s; }

/* idle (frame 1) → wave (frame 2) → idle → blink (frame 3) → idle, looped.
   Percentage pairs are kept close together so the frame swap reads as an
   instant cut rather than a slide. */
@keyframes speaker-wave-loop {
  0%,   18%  { background-position: 50% 0%; }    /* idle */
  22%,  42%  { background-position: 50% 50%; }   /* wave */
  46%,  64%  { background-position: 50% 0%; }    /* idle */
  68%,  80%  { background-position: 50% 100%; }  /* blink / neutral */
  84%,  100% { background-position: 50% 0%; }    /* idle */
}

.part-expand { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
a:hover .part-expand,
div:hover > .part-expand { max-height: 90px; }

/* ── BOOKMARK BUTTON ── */
.bookmark-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  cursor: pointer;
  color: var(--ink4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.bookmark-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.bookmark-btn.bookmarked {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.mboi-theme .bookmark-btn:hover,
.mboi-theme .bookmark-btn.bookmarked {
  border-color: #8b3a1a;
  color: #8b3a1a;
  background: rgba(139,58,26,0.07);
}

/* ── Taxonomy column navigator ── */
.tax-col-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
}

.tax-col-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--off-white);
}

.tax-col-title {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.tax-crumb-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.tax-crumb-pill {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid rgba(43,72,153,0.2);
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.tax-crumb-x {
  cursor: pointer;
  opacity: 0.6;
  font-size: 13px;
  line-height: 1;
}
.tax-crumb-x:hover { opacity: 1; }

.tax-clear-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink4);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s;
}
.tax-clear-btn:hover { color: var(--ink); }

.tax-cols-wrap {
  display: flex;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  scroll-behavior: smooth;
}
.tax-cols-wrap::-webkit-scrollbar { height: 3px; }
.tax-cols-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.tax-col {
  min-width: 178px;
  max-width: 178px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  max-height: 290px;
  flex-shrink: 0;
}
.tax-col:last-child { border-right: none; }

.tax-col-head {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink4);
  padding: 7px 12px 6px;
  font-weight: 500;
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tax-row {
  display: flex;
  align-items: center;
  padding: 6px 10px 6px 12px;
  cursor: pointer;
  transition: background 0.1s;
  gap: 6px;
  min-height: 32px;
}
.tax-row:hover { background: var(--off-white); }
.tax-row.selected { background: var(--accent-light); }

.tax-row-label {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink2);
  flex: 1;
  line-height: 1.35;
  word-break: break-word;
}
.tax-row.selected .tax-row-label { color: var(--accent); font-weight: 500; }

.tax-row-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.tax-row-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink4);
  font-variant-numeric: tabular-nums;
}
.tax-row.selected .tax-row-count { color: var(--accent); }

.tax-row-arrow {
  font-size: 12px;
  color: var(--border2);
  line-height: 1;
}
.tax-row.selected .tax-row-arrow { color: var(--accent); }
.tax-row.tax-leaf .tax-row-arrow { display: none; }

.tax-filter-strip {
  border-top: 1px solid var(--border);
  padding: 6px 10px;
  position: sticky;
  bottom: 0;
  background: var(--white);
}

.tax-filter-chip {
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--ink4);
  cursor: pointer;
  transition: all 0.15s;
  background: var(--white);
}
.tax-filter-chip:hover { border-color: var(--border2); color: var(--ink); }
.tax-filter-chip.on { background: var(--accent-light); border-color: rgba(43,72,153,0.3); color: var(--accent); }

.tax-leaf-end {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 14px;
  gap: 6px;
  min-width: 130px;
  border-right: none;
}
.tax-leaf-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--border2); }
.tax-leaf-text { font-family: var(--font-sans); font-size: 11px; color: var(--ink4); text-align: center; line-height: 1.5; }

/* mboi-theme column nav overrides */
.mboi-theme .tax-row:hover { background: rgba(139,58,26,0.04); }
.mboi-theme .tax-row.selected { background: rgba(139,58,26,0.07); }
.mboi-theme .tax-row.selected .tax-row-label { color: #8b3a1a; }
.mboi-theme .tax-row.selected .tax-row-count { color: #8b3a1a; }
.mboi-theme .tax-row.selected .tax-row-arrow { color: #8b3a1a; }
.mboi-theme .tax-crumb-pill { color: #8b3a1a; background: rgba(139,58,26,0.07); border-color: rgba(139,58,26,0.2); }
.mboi-theme .tax-filter-chip.on { background: rgba(139,58,26,0.07); border-color: rgba(139,58,26,0.3); color: #8b3a1a; }
