/**
 * Shared Styles for All Pages
 * Contains navigation, layout, and common component styles
 */

/* Navigation Styles */
.nav-buttons {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  padding: 20px 35px;
  flex-wrap: wrap;
}

.nav-button {
  display: inline-block;
  padding: 6px 12px;
  background-color: transparent;
  color: var(--primary-color);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.25s ease;
  text-align: center;
  border: none;
  border-radius: 4px;
}

.nav-button:hover {
  color: var(--secondary-color);
  background-color: var(--hover-bg);
}

/* Theme Toggle Button - Split Grey/White Design */
.theme-toggle {
  background: linear-gradient(90deg, #888 50%, #fff 50%);
  border: 1px solid #ccc;
  border-radius: 12px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 0; /* Hide any text content */
  position: relative;
}

.theme-toggle:hover {
  opacity: 0.8;
}

.theme-toggle:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* In dark mode, flip the gradient */
[data-theme="dark"] .theme-toggle {
  background: linear-gradient(90deg, #fff 50%, #888 50%);
  border-color: #666;
}

[data-theme="dark"] .theme-toggle:hover {
  opacity: 0.8;
}

/* Mobile Hamburger Menu */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  position: relative;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background-color: var(--text-color);
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-menu-toggle:hover .hamburger-line,
.mobile-menu-toggle:active .hamburger-line {
  background-color: var(--primary-color);
}

/* Touch-friendly mobile button */
@media (hover: none) and (pointer: coarse) {
  .mobile-menu-toggle {
    width: 44px;
    height: 44px;
    padding: 7px;
  }
}

/* Hamburger animation when active */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile sidebar overlay */
.mobile-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  transition: opacity 0.3s ease;
}

.mobile-sidebar-overlay.active {
  display: block !important;
  opacity: 1;
}

/* Main Content Layout - Only applies to pages without specific overrides */

/* Consistent Heading Styles */
heading {
  margin-bottom: 15px !important;
  margin-top: 0px !important;
  display: block;
}

/* List Spacing */
.section-spacing ul,
.section-spacing ul.publication-list,
heading + ul,
heading + ul.publication-list,
td ul {
  margin-top: 0px !important;
  margin-bottom: 0px !important;
}

.section-spacing li,
.section-spacing ul li,
td li,
td ul li,
li {
  margin-bottom: 8px !important;
  margin-top: 0px !important;
  padding-bottom: 0px !important;
  padding-top: 0px !important;
}

.publication-list li,
ul.publication-list li {
  margin-bottom: 12px !important;
  margin-top: 0px !important;
  padding-bottom: 0px !important;
  padding-top: 0px !important;
}

li p {
  margin: 0px !important;
  padding: 0px !important;
}

/* Publication Styles - Consistent indentation */
.publication-list {
  list-style-type: disc !important;
  padding-left: 20px !important;
  margin: 0 0 20px 0 !important;
  list-style-position: outside !important;
}

/* Ensure all lists have consistent indentation */
ul, ol {
  padding-left: 20px !important;
  margin: 0 0 20px 0 !important;
}

/* Override any specific list variations */
#projects-list, #research-experience-list, #academic-services-list, #teaching-list, #honors-list {
  padding-left: 20px !important;
  margin: 0 0 20px 0 !important;
}

/* Ensure all content inside main-content-wrapper is properly aligned */
.main-content-wrapper > * {
  box-sizing: border-box;
}

.publication-list li {
  margin-bottom: 16px;
}

.papertitle {
  margin-bottom: 6px;
}

.paper_rest {
  margin-bottom: 6px;
}

/* Page Title Styles */
.page-title {
  text-align: center;
  font-size: 28px;
  margin-bottom: 30px;
  color: var(--primary-color);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .nav-buttons {
    justify-content: space-between;
    gap: 10px;
    padding: 15px 20px;
  }
  
  .nav-button {
    display: none; /* Hide regular nav buttons on mobile */
  }
  
  .theme-toggle {
    order: -1; /* Move theme toggle to the left */
  }
  
  .mobile-menu-toggle {
    display: flex; /* Show hamburger menu on mobile */
  }
  
  /* Mobile sidebar modifications */
  #outline-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -280px !important; /* Hide off-screen */
    width: 250px !important;
    height: 100vh !important;
    padding: 80px 20px 20px !important;
    border-radius: 0 !important;
    border: none !important;
    transition: left 0.3s ease !important;
    overflow-y: auto !important;
    z-index: 1000 !important;
    transform: none !important; /* Reset any transforms */
    opacity: 1 !important; /* Override section animations */
    animation: none !important; /* Disable section animations */
  }
  
  #outline-sidebar.mobile-active {
    left: 0 !important; /* Show when active */
    display: block !important; /* Force display when active */
    background-color: var(--sidebar-bg) !important;
  }
  
  .main-content-wrapper {
    padding: 0 15px;
  }
}

@media screen and (max-width: 600px) {
  .theme-toggle {
    width: 20px;
    height: 20px;
  }
} 