/* Research Page Styles */

:root {
  --primary-color: #1b6ef3;
  --primary-light: #4285f4;
  --primary-dark: #0d4cb3;
  --secondary-text: #8b949e;
  --background-dark: #010409;
  --background-medium: #0d1117;
  --background-light: #161b22;
  --header-height: 100px; /* Fixed height for header to reference elsewhere */
}

/* Base styles */
.research-page {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
}

/* Typography with optimal readability */
.research-page h1,
.research-page h2,
.research-page h3 {
  font-weight: 600;
  color: var(--text-light);
}

.research-page h2 {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.research-page h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.research-page p {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Fixed Header at top of page */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(1, 4, 9, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  height: var(--header-height);
}

/* Hero Section with padding to clear the fixed header */
.research-page .page-hero {
  background-image: linear-gradient(to bottom, #010409 0%, #0d1117 100%);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--text-light);
  padding-top: calc(var(--header-height) + 50px);
  padding-bottom: 50px;
  text-align: center;
  position: relative;
}

.research-page .page-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-light);
  background: linear-gradient(to right, #ffffff, #a0c2ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.research-page .page-subtitle {
  color: var(--secondary-text);
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto;
}

/* Intro Section */
.intro-section {
  padding: 3rem 0;
  background-color: var(--background-light);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.intro-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.intro-content p {
  font-size: 1.2rem;
  color: var(--secondary-text);
}

/* Sticky Research Navigation */
.research-nav {
  background-color: rgba(13, 17, 23, 0.95);
  position: sticky;
  top: var(--header-height); /* Stick right below the fixed header */
  z-index: 900;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.research-tabs-wrapper {
  display: flex;
  justify-content: center;
  padding: 0;
  max-width: 1200px;
  margin: 0 auto;
  overflow-x: auto; /* Allow horizontal scrolling if needed */
}

.research-tab {
  color: var(--text-light);
  text-decoration: none;
  padding: 1rem 1.25rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.research-tab:hover, .research-tab.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary-light);
}

/* Publications Styles */
.publications-filter {
  margin: 2rem 0;
}

.filter-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background-color: var(--background-light);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-box {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 250px;
}

.search-box input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px 0 0 4px;
  background-color: var(--background-medium);
  color: var(--text-light);
  font-size: 0.95rem;
}

.search-box button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.filter-dropdowns {
  display: flex;
  gap: 1rem;
}

.filter-dropdowns select {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background-color: var(--background-medium);
  color: var(--text-light);
  font-size: 0.95rem;
  min-width: 150px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 12px top 50%;
  background-size: 12px auto;
  padding-right: 30px;
}

.filter-dropdowns select option {
  background-color: var(--background-medium);
  color: var(--text-light);
}

/* Clear filters button */
.clear-filters-btn {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--secondary-text);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
}

.clear-filters-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
}

/* Publications List */
.publications-list {
  margin-top: 2rem;
}

.publication-item {
  background-color: var(--background-light);
  padding: 1.75rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.publication-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.publication-meta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 0.75rem;
}

.pub-year {
  background-color: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.85rem;
  margin-right: 1rem;
  font-weight: 500;
}

.pub-journal {
  color: var(--secondary-text);
  font-size: 0.95rem;
  font-style: italic;
}

.publication-title {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  color: var(--text-light);
  line-height: 1.4;
}

.publication-authors {
  color: var(--secondary-text);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.publication-abstract {
  color: var(--secondary-text);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.publication-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.pub-link {
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.3s;
}

.pub-link:hover {
  background-color: var(--primary-dark);
}

.abstract-toggle {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-light);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
}

.abstract-toggle:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.publication-full-abstract {
  display: none;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.publication-full-abstract.visible {
  display: block;
  opacity: 1;
}

.publication-full-abstract p {
  color: var(--secondary-text);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Publications counter styling */
.section-intro #pub-count {
  font-weight: 600;
  color: var(--primary-light);
}

/* No results message */
.no-results-message {
  text-align: center;
  padding: 3rem 0;
  color: var(--secondary-text);
  font-size: 1.1rem;
  display: none;
}

.no-results-message.visible {
  display: block;
}

.no-results-message h3 {
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* Coming Soon placeholders */
.coming-soon {
  background-color: var(--background-light);
  border-radius: 8px;
  padding: 3rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.coming-soon h3 {
  margin-bottom: 1rem;
  color: var(--text-light);
}

.coming-soon p {
  color: var(--secondary-text);
  max-width: 700px;
  margin: 0 auto;
}

/* Content Sections */
.content-section {
  padding: 4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.content-section:last-child {
  border-bottom: none;
}

.section-intro {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-intro p {
  font-size: 1.2rem;
  color: var(--secondary-text);
  margin: 0 auto;
}

/* Mobile Research Navigation */
.mobile-research-nav {
  display: none;
}

/* Back to top button */
.back-to-top {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--primary-color);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  cursor: pointer;
  z-index: 999;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.back-to-top:hover {
  opacity: 1;
}

.back-to-top.visible {
  display: block;
}

/* Print styling for citations */
@media print {
  .publications-filter,
  .research-nav,
  .mobile-research-nav,
  .back-to-top,
  .abstract-toggle,
  footer,
  header {
    display: none !important;
  }
  
  .publication-item {
    break-inside: avoid;
    page-break-inside: avoid;
    border: none;
    box-shadow: none;
    padding: 0.5rem 0;
    margin-bottom: 1.5rem;
  }
  
  .publication-full-abstract {
    display: block !important;
    opacity: 1 !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .publication-title,
  .publication-authors,
  .publication-abstract,
  .publication-full-abstract p {
    color: black !important;
  }
  
  .pub-year {
    background-color: transparent !important;
    color: black !important;
    padding: 0 !important;
    font-weight: bold !important;
  }
}

/* Responsive Styles */
@media (max-width: 992px) {
  :root {
    --header-height: 60px; /* Smaller header on medium screens */
  }
  
  .research-page .page-hero h1 {
    font-size: 2.5rem;
  }
  
  .section-intro p {
    font-size: 1.1rem;
  }
  
  .filter-controls {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .search-box {
    width: 100%;
  }
  
  .filter-dropdowns {
    width: 100%;
    justify-content: space-between;
  }
  
  .filter-dropdowns select {
    flex: 1;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px; /* Maintain for small screens */
  }
  
  .research-page .page-hero {
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: 50px;
  }
  
  .research-page .page-hero h1 {
    font-size: 2.25rem;
  }
  
  .research-page h2 {
    font-size: 1.75rem;
  }
  
  .publication-item {
    padding: 1.25rem;
  }
  
  .publication-title {
    font-size: 1.25rem;
  }
  
  /* Show simplified mobile research navigation */
  .research-nav {
    display: none;
  }
  
  .mobile-research-nav {
    display: block;
    background-color: rgba(13, 17, 23, 0.95);
    position: sticky;
    top: var(--header-height);
    z-index: 900;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  
  .mobile-research-tabs {
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    overflow-x: auto;
  }
  
  .mobile-research-tab {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.75rem 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    text-align: center;
    white-space: nowrap;
    flex: 1;
    border-bottom: 3px solid transparent;
  }
  
  .mobile-research-tab.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary-light);
  }
  
  .coming-soon {
    padding: 2rem 1.5rem;
  }
  
  .filter-dropdowns {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }
  
  .filter-dropdowns select,
  .clear-filters-btn {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .research-page .page-hero h1 {
    font-size: 2rem;
  }
  
  .research-page .page-subtitle {
    font-size: 1rem;
  }
  
  .intro-content p {
    font-size: 1rem;
  }
  
  .publication-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .pub-year {
    margin-bottom: 0.5rem;
  }
  
  .publication-links {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .pub-link, .abstract-toggle {
    width: 100%;
    text-align: center;
  }
}