/* ===========================
   MODERN RESEARCH PAGE WITH INTERACTIONS
   =========================== */

/* Color Theme Variables */
:root {
  --viz-color: #3b82f6;
  --viz-bg: #dbeafe;
  --viz-light: #eff6ff;
  
  --hci-color: #10b981;
  --hci-bg: #d1fae5;
  --hci-light: #ecfdf5;
  
  --ai-color: #f59e0b;
  --ai-bg: #fef3c7;
  --ai-light: #fffbeb;
  
  --health-color: #ef4444;
  --health-bg: #fee2e2;
  --health-light: #fef2f2;
}

/* Global Font Settings */
body, h1, h2, h3, h4, h5, h6, p, span, a, button {
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--navy);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

/* Research Grid */
.research-grid-section {
  padding: 2rem 0;
  background: linear-gradient(135deg, var(--color-slate-50), #ffffff);
  min-height: 70vh;
}

.research-container {
  max-width: 85rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Enhanced Research Card with Gradient Merge */
.research-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  padding: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1px solid var(--color-gray-100);
  position: relative;
}

.research-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.research-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 
              0 8px 16px rgba(0, 0, 0, 0.08);
}

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

/* Gradient Merged Image Section */
.research-image-container {
  position: relative;
  height: 160px;
  background: linear-gradient(135deg, var(--color-slate-100), var(--color-slate-200));
  overflow: hidden;
}

.research-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.research-card:hover .research-image {
  transform: scale(1.05);
}

/* Gradient Overlay for Seamless Merge */
.research-image-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, 
    transparent 0%, 
    rgba(255, 255, 255, 0.3) 30%,
    rgba(255, 255, 255, 0.8) 70%,
    white 100%
  );
  pointer-events: none;
}

/* Enhanced Overlays */
.image-overlay {
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  right: 0.2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.venue-overlay {
  /* Use a deep neutral rather than blue to avoid merging */
  background: rgba(15, 23, 42, 0.9); 
  backdrop-filter: blur(12px);
  /* Add a subtle light border to define the edges against dark images */
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  /* Change shadow to dark so it lifts the badge off the image */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.research-card:hover .venue-overlay {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.award-overlay {
  background: rgba(255, 140, 0, 0.85);
  opacity: 0.95; 
  backdrop-filter: blur(20px);
  color: white;
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 140, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes glow {
  from { box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3); }
  to { box-shadow: 0 4px 16px rgba(251, 191, 36, 0.6); }
}

/* Seamless Content Section */
.research-content {
  padding: 0.5rem 0.5rem 0.5rem;
  background: linear-gradient(to bottom, 
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.9) 50%,
    white 100%
  );
  position: relative;
  margin-top: -40px;
  z-index: 2;
}

.research-authors {
  font-size: 0.85rem;
  color: var(--color-gray-600);
  margin-bottom: 0.75rem;
  margin-top:1.2rem;
  font-style: italic;
  line-height: 1.4;
}

.research-authors strong {
  color: var(--color-navy);
  font-weight: 600;
  font-style: normal;
}

.research-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

.research-card:hover .research-title {
  color: var(--color-steel-blue);
}

.research-description {
  font-size: 0.8rem;
  color: var(--color-gray-600);
  line-height: 1.4;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Interactive Tags */
.research-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.research-tag {
  padding: 0.35rem 0.75rem;
  border-radius: 2rem; /* Softer, more organic pill shape */
  font-size: 0.65rem;
  font-weight: 700; /* Bold for better contrast on colored backgrounds */
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1px solid transparent; /* Prevents layout shift on hover */
  display: inline-flex;
  align-items: center;
  user-select: none;
}

/* Enhanced Hover State */
.research-tag:hover {
  transform: translateY(-2px);
  filter: brightness(0.95); /* Deepens the color slightly on hover */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Category Specific Styles with Border Integration */
.research-tag[data-tag="visualization"] { 
  background: var(--viz-bg); 
  color: var(--viz-color);
  border-color: rgba(59, 130, 246, 0.2); 
}

.research-tag[data-tag="hci"] { 
  background: var(--hci-bg); 
  color: var(--hci-color); 
  border-color: rgba(16, 185, 129, 0.2);
}

.research-tag[data-tag="ai"] { 
  background: var(--ai-bg); 
  color: var(--ai-color); 
  border-color: rgba(245, 158, 11, 0.2);
}

.research-tag[data-tag="health"] { 
  background: var(--health-bg); 
  color: var(--health-color); 
  border-color: rgba(239, 68, 68, 0.2);
}

.research-tag[data-tag="design"] { 
  background: #f3e8ff; 
  color: #7c3aed; 
  border-color: rgba(124, 58, 237, 0.2);
}
/* Interactive Minimalist Links */
.research-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.research-link {
  color: var(--slate);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
}

/* The "Underline" is replaced by a subtle "Fill" effect for a cleaner look */
.research-link:hover {
  color: var(--navy);
  background: var(--line); /* Soft grey background on hover */
  border-color: var(--line);
  transform: translateY(-2px);
}

.research-link i {
  font-size: 0.8rem;
  color: var(--light-slate);
  transition: color 0.25s ease, transform 0.25s ease;
}

.research-link:hover i {
  color: var(--accent); /* Icon changes color to draw the eye */
  transform: scale(1.1);
}

/* Optional: Special styling for the primary "Paper" link */
.research-link[title*="PDF"], .research-link[title*="Paper"] {
  color: var(--navy);
  border-color: var(--line);
}
/* ============================================================
   ULTIMATE DUAL-COLUMN MODAL SYSTEM - ENHANCED VERSION
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 18, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  backdrop-filter: blur(15px) saturate(160%);
  padding: 20px;
}

.modal-overlay.active {
  display: flex !important;
}

.modal-content {
  background: #ffffff;
  border-radius: 1.5rem;
  max-width: 1050px;
  width: 100%;
  max-height: 85vh;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 50px 100px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  display: flex;
  flex-direction: column;
}

/* Internal Scrolling Fix */
.modal-body {
  overflow-y: auto !important;
  height: 100%;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.modal-body-grid {
  display: grid !important;
  grid-template-columns: 1.6fr 1fr !important;
  min-height: 100%;
  width: 100% !important;
}

/* LEFT COLUMN - NARRATIVE */
.modal-main-col {
  padding: 3.5rem;
  background: #ffffff;
  border-right: 1px solid #f1f5f9;
}

/* RIGHT COLUMN - SIDEBAR */
.modal-side-col {
  padding: 3.5rem 2.5rem;
  background: #f8fafc; /* Subtle grey-blue sidebar tint */
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Sidebar Links Stack - Clean and Vertical */
.sidebar-links-stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* REFINED TYPOGRAPHY */
.modal-title {
  font-size: 1.75rem; /* Slightly larger for better hierarchy */
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.modal-authors {
  font-size: 1.05rem;
  color: #64748b;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.modal-authors strong {
  color: #1e293b;
  font-weight: 700;
  border-bottom: 1.5px solid #cbd5e1; /* Subtle highlight for your name */
}
.modal-section-label {
    font-size: 0.72rem;
    font-weight: 900; /* Maximum boldness */
    text-transform: uppercase;
    color: #3b82f6; /* Keep the accent blue to distinguish it from body text */
    letter-spacing: 0.2em; /* Wide spacing for that high-end editorial feel */
    margin-bottom: 1.25rem;
    display: block;
    line-height: 1;
}

/* Clear out any previous decorators from your CSS */
.modal-section-label::before,
.modal-section-label::after {
    display: none !important;
    content: none !important;
}


/* COMPONENTS */
.modal-header-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.modal-header-img:hover {
  transform: scale(1.02);
}

.modal-link-btn {
  background: #ffffff; /* Clean white background */
  color: #475569 !important;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
  width: 100%; /* Fill the sidebar width */
}

.modal-link-btn:hover {
  background: #f8fafc;
  border-color: #3b82f6;
  color: #3b82f6 !important;
  transform: translateX(4px); /* Subtle nudge instead of lift */
}

/* THE AWARD BADGE */
.modal-award-pill {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 25px rgba(217, 119, 6, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* THE X BUTTON */
.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid #e2e8f0;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: #0f172a;
  color: #ffffff;
  transform: rotate(90deg) scale(1.1);
}

/* RESPONSIVE */
@media (max-width: 850px) {
  .modal-body-grid { grid-template-columns: 1fr !important; }
  .modal-main-col, .modal-side-col { padding: 2.5rem; border-right: none; }
}

/* Sidebar Venue Text */
.full-venue-text {
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
    font-size: 0.95rem;
    padding-left: 0.5rem;
    border-left: 2px solid #e2e8f0;
}


/* RESOURCE ACTION CARDS */
.resource-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.resource-action-card {
    display: flex;
    align-items: center;
    background: #ffffff;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.action-icon-wrapper {
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    margin-right: 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.action-text {
    display: flex;
    flex-direction: column;
}

.action-label {
    font-size: 0.7rem;
    font-weight: 850;
    color: #1e293b;
    letter-spacing: 0.05em;
}

.action-subtext {
    font-size: 0.6rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
}

.action-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    color: #cbd5e1;
    transition: transform 0.3s ease;
}

/* Hover States */
.resource-action-card:hover {
    border-color: #3b82f6;
    background: #f0f7ff;
    transform: translateX(6px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

.resource-action-card:hover .action-icon-wrapper {
    background: #3b82f6;
    color: #ffffff;
}

.resource-action-card:hover .action-arrow {
    color: #3b82f6;
    transform: translateX(3px);
}

/* Ensure Navigation Logo remains consistent with Home Page */
/* .navbar .nav-logo {
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-weight: 800 !important; 
    font-size: 1.1rem;
    color: var(--navy);
    letter-spacing: -0.5px;
    text-decoration: none;
} */

/* Force nav logo to match other pages *