/* ===== Custom additions: Lectures page, sidebar nav, animations ===== */

/* Give the top nav a bit more breathing room now that it has fewer items */
.ftco_navbar .navbar-nav {
  width: 100%;
  justify-content: center;
}
.ftco-navbar-light .navbar-nav > .nav-item > .nav-link {
  padding-left: 38px;
  padding-right: 38px;
  font-size: 14px;
}
@media (max-width: 991.98px) {
  .ftco-navbar-light .navbar-nav > .nav-item > .nav-link {
    padding-left: 0;
    padding-right: 0;
  }
}

/* ---------- Reveal-on-scroll animation (works with existing scrollax/waypoints ftco-animate hook) ---------- */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal-up.reveal-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Inline PDF preview popup (home page "New Research Paper" cards) ---------- */
.mfp-pdf-viewer .mfp-iframe-scaler {
  max-width: 850px;
  margin: 30px auto;
  padding-top: 0;
  height: 85vh;
}
.mfp-pdf-viewer .mfp-iframe-scaler iframe {
  position: static;
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 6px;
}

/* ---------- Lecture cards ---------- */
.lecture-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 40px;
  transition: transform .35s ease, box-shadow .35s ease;
}
.lecture-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0,0,0,.14);
}
@keyframes lectureGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes lectureFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-8px) scale(1.03); }
}

.lecture-card .lecture-thumb {
  flex: 0 0 280px;
  max-width: 280px;
  min-height: 220px;
  background: linear-gradient(120deg, #D35400, #F96D00, #ff8a3d, #D35400);
  background-size: 300% 300%;
  animation: lectureGradient 8s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.lecture-card .lecture-thumb:before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.18), transparent 60%);
}
.lecture-card .lecture-thumb .fa {
  font-size: 64px;
  color: rgba(255,255,255,.95);
  text-shadow: 0 8px 20px rgba(0,0,0,.25);
  animation: lectureFloat 3.5s ease-in-out infinite;
  transition: transform .4s ease;
  position: relative;
}
.lecture-card:hover .lecture-thumb .fa {
  transform: scale(1.15) rotate(-5deg);
}
.lecture-card .lecture-body {
  flex: 1 1 320px;
  padding: 30px 35px;
}
.lecture-card .lecture-body h3 {
  margin-bottom: 10px;
  font-weight: 600;
}
.lecture-card .lecture-body .lecture-summary {
  color: #6f6f6f;
  margin-bottom: 14px;
  line-height: 1.7;
}
.lecture-card .lecture-body .lecture-audio-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #a15600;
  background: #fff4e8;
  border-left: 3px solid #F96D00;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 20px;
}
.lecture-card .lecture-actions .btn {
  border-radius: 30px;
  padding: 10px 24px;
  margin-right: 10px;
  margin-bottom: 10px;
  transition: transform .25s ease;
}
.lecture-card .lecture-actions .btn:hover {
  transform: translateY(-3px);
}

/* ---------- Narrated video preview modal (opened via magnific-popup) ---------- */
.lecture-preview-modal {
  position: relative;
  background: #000;
  width: 90vw;
  max-width: 1100px;
  margin: 20px auto;
  border-radius: 8px;
  overflow: hidden;
}
.lecture-preview-modal .preview-head {
  padding: 15px 20px;
  background: #2c2c2c;
  color: #fff;
}
.lecture-preview-modal .lecture-video {
  width: 100%;
  max-height: 75vh;
  display: block;
  background: #000;
}
.lecture-preview-modal .preview-note {
  padding: 12px 20px;
  font-size: 13px;
  color: #888;
  background: #f7f7f7;
}

/* Close button */
.lecture-preview-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all .25s ease;
}
.lecture-preview-close:hover {
  background: #F96D00;
  transform: rotate(90deg) scale(1.08);
}

/* Open/close animation for the video preview popup: fade + gentle scale-in */
.mfp-wrap .lecture-preview-modal {
  transform: scale(.9);
  opacity: 0;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .3s ease;
}
.mfp-wrap.mfp-ready .lecture-preview-modal {
  transform: scale(1);
  opacity: 1;
}
.mfp-wrap.mfp-removing .lecture-preview-modal {
  transform: scale(.9);
  opacity: 0;
}

/* ---------- Site-wide vertical quick-nav, fixed on the right edge of every page ---------- */
/* Scientific Activity / Personal Information / Jobs -> jump to their sections on about.html */
/* A slim vertical rail with 3 glowing dots and always-visible labels. */
@keyframes quicknavIn {
  from { opacity: 0; transform: translate(24px, -50%); }
  to   { opacity: 1; transform: translate(0, -50%); }
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249,109,0,.45); }
  50%      { box-shadow: 0 0 0 6px rgba(249,109,0,0); }
}

.site-quicknav {
  position: fixed;
  top: 50%;
  right: 22px;
  z-index: 999;
  transform: translateY(-50%);
  animation: quicknavIn .8s cubic-bezier(.2,.8,.2,1) .3s both;
}
.site-quicknav ul {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 42px;
}
.site-quicknav ul:before {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 6px;
  right: 5px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(249,109,0,.55), transparent);
}
.site-quicknav li {
  opacity: 0;
  animation: quicknavIn .6s ease forwards;
}
.site-quicknav li:nth-child(1) { animation-delay: .5s; }
.site-quicknav li:nth-child(2) { animation-delay: .65s; }
.site-quicknav li:nth-child(3) { animation-delay: .8s; }

.site-quicknav a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  text-decoration: none;
  white-space: nowrap;
}
.site-quicknav a .label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .4px;
  color: #fff;
  background: rgba(20,20,20,.68);
  backdrop-filter: blur(6px);
  padding: 5px 12px;
  border-radius: 20px;
  opacity: .85;
  transform: translateX(0);
  transition: all .3s ease;
}
.site-quicknav a .dot {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #F96D00;
  animation: dotPulse 2.6s ease-in-out infinite;
  transition: all .3s ease;
}
.site-quicknav a:hover .label,
.site-quicknav a.active .label {
  opacity: 1;
  background: #F96D00;
  transform: translateX(-3px);
}
.site-quicknav a:hover .dot,
.site-quicknav a.active .dot {
  background: #F96D00;
  transform: scale(1.3);
}

@media (max-width: 767.98px) {
  .site-quicknav {
    right: 10px;
  }
  .site-quicknav a .label {
    display: none;
  }
}

.profile-section {
  scroll-margin-top: 110px;
}
