/* ==============================================
   Custom styles for enjiema.com
   Comprehensive site-wide improvements
   ============================================== */


/* =============================================
   HOMEPAGE
   ============================================= */

/* --- Section Spacing --- */
.home-section {
  padding: 50px 0 !important;
}

.home-section:first-of-type {
  padding-top: 50px !important;
}

/* Subtle separator between sections */
.home-section + .home-section {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* --- JMP Prominence --- */

/* JMP Highlight Banner */
.jmp-banner {
  background: linear-gradient(135deg, #1a237e 0%, #3f51b5 50%, #4A90E2 100%);
  color: #fff;
  padding: 36px 40px;
  border-radius: 12px;
  margin: 32px 0 8px;
  box-shadow: 0 4px 20px rgba(63, 81, 181, 0.3);
  position: relative;
  overflow: hidden;
}

.jmp-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.jmp-banner-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.jmp-banner-title {
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.jmp-banner-title a {
  color: #fff;
  text-decoration: none;
}

.jmp-banner-title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.jmp-banner-summary {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.92;
  margin-bottom: 20px;
  max-width: 700px;
}

.jmp-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.jmp-btn.btn-primary {
  background: #fff;
  color: #1a237e;
  border: none;
  font-weight: 600;
  border-radius: 6px;
  padding: 8px 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jmp-btn.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  background: #fff;
  color: #1a237e;
}

.jmp-btn.btn-outline-primary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  padding: 8px 20px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.jmp-btn.btn-outline-primary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
  color: #fff;
  transform: translateY(-2px);
}

/* Working Papers section JMP card styling */
#working-papers .card-simple:first-child {
  border-left: 4px solid #4A90E2;
  background: rgba(74, 144, 226, 0.06);
  padding: 18px 24px;
  border-radius: 8px;
  margin-bottom: 28px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

#working-papers .card-simple:first-child .article-metadata::before {
  content: "Job Market Paper";
  display: inline-block;
  background: #4A90E2;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 4px;
  margin-bottom: 8px;
  margin-right: 8px;
  letter-spacing: 0.03em;
}

/* --- Homepage Card Hover --- */
.card-simple {
  transition: box-shadow 0.25s ease, transform 0.2s ease, background 0.25s ease;
  padding: 12px 16px;
  border-radius: 6px;
}

.card-simple:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.13);
  transform: translateY(-3px);
  background: rgba(74, 144, 226, 0.03);
}

/* About section tweaks */
#about .portrait-title {
  margin-bottom: 16px;
}

#about .col-12.col-lg-8 h1 {
  font-size: 2rem;
  margin-bottom: 16px;
}

/* Teaching section tightening */
#teaching h3 {
  margin-top: 20px;
  margin-bottom: 4px;
}


/* =============================================
   NAVBAR (all pages)
   ============================================= */

.navbar {
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

/* Nav link hover — subtle underline animation */
.navbar-nav .nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width 0.25s ease, left 0.25s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 80%;
  left: 10%;
}

/* Site title in nav — subtle hover */
.navbar-brand {
  transition: opacity 0.2s ease;
}

.navbar-brand:hover {
  opacity: 0.85;
}


/* =============================================
   BUTTONS (all pages)
   ============================================= */

/* PDF / Slides / Cite outline buttons */
.btn-outline-primary {
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-width: 2px;
}

.btn-outline-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(74, 144, 226, 0.25);
}

/* General btn-links area (homepage cards) */
.btn-links .btn {
  border-radius: 5px;
  font-weight: 500;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-links .btn:hover {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}


/* =============================================
   PUBLICATION DETAIL PAGES
   ============================================= */

/* Paper title */
.article-container h1 {
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
}

/* Author and date metadata */
.article-container .article-metadata {
  margin-bottom: 16px;
  font-size: 0.95rem;
  opacity: 0.85;
}

/* Abstract section */
.article-container .article-style {
  font-size: 1rem;
  line-height: 1.75;
}

/* Type / Publication metadata table */
.article-container .pub_Type,
.article-container .pub_Publication {
  font-weight: 500;
}

/* Conferences & Presentations section */
.article-container h2 {
  margin-top: 32px;
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.article-container ul {
  line-height: 1.8;
}


/* =============================================
   TAGS / BADGES (paper pages)
   ============================================= */

.article-tags .badge {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  margin-right: 6px;
  margin-bottom: 6px;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.badge-light {
  background: rgba(74, 144, 226, 0.12);
  color: #4A90E2;
  border: 1px solid rgba(74, 144, 226, 0.2);
}

.badge-light:hover {
  background: #4A90E2;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}


/* =============================================
   FOOTER (all pages)
   ============================================= */

.site-footer {
  padding: 24px 0;
  font-size: 0.85rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.site-footer:hover {
  opacity: 1;
}

.powered-by a {
  font-weight: 500;
}


/* =============================================
   SCROLL-TO-TOP BUTTON
   ============================================= */

.back-to-top {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-to-top:hover {
  transform: translateY(-3px);
}


/* =============================================
   SEARCH OVERLAY
   ============================================= */

#search-box #search-query {
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 1.1rem;
}


/* =============================================
   CITE MODAL
   ============================================= */

.modal-content {
  border-radius: 12px;
  overflow: hidden;
}

.modal-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}


/* =============================================
   GENERAL TYPOGRAPHY & LINKS (all pages)
   ============================================= */

/* Smooth link transitions everywhere */
a {
  transition: color 0.2s ease;
}

/* Better content width for readability on publication pages */
.article-container {
  max-width: 800px;
}


/* =============================================
   DARK MODE OVERRIDES
   ============================================= */

.dark .home-section + .home-section {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.dark .jmp-banner {
  background: linear-gradient(135deg, #0d1b3e 0%, #1a3a7a 50%, #2c5faa 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.dark #working-papers .card-simple:first-child {
  background: rgba(74, 144, 226, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.dark .card-simple:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  background: rgba(74, 144, 226, 0.06);
}

.dark .badge-light {
  background: rgba(74, 144, 226, 0.15);
  color: #7EB6FF;
  border-color: rgba(74, 144, 226, 0.25);
}

.dark .badge-light:hover {
  background: #4A90E2;
  color: #fff;
}

.dark .btn-outline-primary:hover {
  box-shadow: 0 3px 10px rgba(74, 144, 226, 0.35);
}

.dark .navbar-nav .nav-link::after {
  background: rgba(255, 255, 255, 0.9);
}

.dark .modal-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark .site-footer {
  opacity: 0.6;
}
