/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAUi-qNiXg7eU0.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAXC-qNiXg7Q.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_FQftx9897sxZ.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_Gwftx9897g.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjxAwXiWtFCfQ7A.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjx4wXiWtFCc.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwaPGQ3q5d0N7w.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --primary-color: #0065C0;
  --secondary-color: #f09228;
  --text-color: #000000;
  --bg-color: #FFFFFF;
  --border-color: #bbb;
  --sidebar-bg: #FFFFFF;
  --section-bg: #FFFFFF;
  --hover-bg: rgba(240, 146, 40, 0.08);
  --shadow-color: rgba(0, 0, 0, 0.1);
  --placeholder-bg: #f5f5f5;
  --placeholder-text: #666;
}

/* Dark mode colors */
[data-theme="dark"] {
  --primary-color: #6BA3F5;
  --secondary-color: #FFB366;
  --text-color: #D4D4D4;
  --bg-color: #1F1F1F;
  --border-color: #4A4A4A;
  --sidebar-bg: #2A2A2A;
  --section-bg: #252525;
  --hover-bg: rgba(255, 179, 102, 0.12);
  --shadow-color: rgba(0, 0, 0, 0.2);
  --placeholder-bg: #333333;
  --placeholder-text: #B8B8B8;
}

/* Ensure body background changes in dark mode */
[data-theme="dark"] body {
  background-color: var(--bg-color) !important;
}

/* Fix profile photo background in dark mode */
[data-theme="dark"] .profile-photo {
  background-color: transparent !important;
  border-color: var(--border-color);
}

/* Ensure main content has proper background in dark mode */
[data-theme="dark"] #main-content {
  background-color: var(--bg-color);
}

/* Fix table backgrounds in dark mode */
[data-theme="dark"] table {
  background-color: var(--bg-color) !important;
}

/* Remove section background styling for cleaner look */

/* Fix highlight color in dark mode */
[data-theme="dark"] span.highlight {
  background-color: #3a3a00;
  color: #ffff80;
}

/* Fix venue colors in dark mode */
[data-theme="dark"] .venue {
  color: var(--primary-color);
}

/* Fix paper rest color in dark mode */
[data-theme="dark"] .paper_rest {
  color: var(--text-color);
}

/* Global styles */
body {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  margin: 0;
  padding: 0;
}

p, strong, td, th, tr {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 16px;
  color: var(--text-color);
}

a {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 16px;
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:focus, a:hover {
  color: var(--secondary-color);
  text-decoration: none;
}

heading {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 22px;
  color: var(--primary-color);
  display: block;
  margin: 1em 0;
  font-weight: bold;
}

name {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 32px;
  color: var(--text-color);
  font-weight: bold;
}

/* Publication styles */
.papertitle {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.venue {
  color: var(--primary-color);
}

.paper_rest {
  font-size: 16px;
  margin-bottom: 5px;
}

.paper_bottom_space {
  margin-bottom: 20px;
}

/* Image styles */
.one {
  width: 160px;
  height: 160px;
  position: relative;
}

.two {
  width: 160px;
  height: 160px;
  position: absolute;
  transition: opacity .2s ease-in-out;
  -moz-transition: opacity .2s ease-in-out;
  -webkit-transition: opacity .2s ease-in-out;
}

.fade {
  transition: opacity .2s ease-in-out;
  -moz-transition: opacity .2s ease-in-out;
  -webkit-transition: opacity .2s ease-in-out;
}

span.highlight {
  background-color: #ffffd0;
}

/* Floating Outline Sidebar - ensure it doesn't affect content */
#outline-sidebar {
  position: fixed;
  top: 200px;
  left: 10px;
  width: 200px;
  background-color: var(--sidebar-bg);
  border: none;
  padding: 15px;
  border-radius: 8px;
  z-index: 1000;
  transition: all 0.3s ease;
  /* Ensure it doesn't affect document flow */
  pointer-events: auto;
}

#outline-sidebar .sidebar-heading {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 18px;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-weight: bold;
}

#outline-sidebar ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

#outline-sidebar ul li {
  margin-bottom: 8px;
}

#outline-sidebar ul li a {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
  color: var(--primary-color);
  text-decoration: none;
  display: block;
  padding: 3px 0;
  transition: all 0.2s ease;
}

#outline-sidebar ul li a:hover,
#outline-sidebar ul li a:focus {
  color: var(--secondary-color);
  transform: translateX(3px);
}

/* Main Content - Properly centered layout (sidebar floats over content) */
#main-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 80px;
  box-sizing: border-box;
}

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

/* Enhanced hover effects for links */
a {
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

a:hover {
  text-shadow: 0 1px 2px rgba(0, 101, 192, 0.1);
}

/* Subtle animations for sections */
.section-spacing {
  transition: transform 0.2s ease;
}

.section-spacing:hover {
  transform: translateY(-1px);
}

/* Profile photo enhancements */
.profile-photo {
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.profile-photo:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}



/* Focus styles for accessibility */
a:focus, button:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Skip to main content link (hidden by default) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 1000;
  border-radius: 4px;
}

.skip-link:focus {
  top: 6px;
}

/* Scroll progress indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  z-index: 1000;
  transition: width 0.1s ease;
}

/* Loading animation for lazy content */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Improved section transitions */
.section-spacing {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.section-spacing:nth-child(1) { animation-delay: 0.1s; }
.section-spacing:nth-child(2) { animation-delay: 0.2s; }
.section-spacing:nth-child(3) { animation-delay: 0.3s; }
.section-spacing:nth-child(4) { animation-delay: 0.4s; }
.section-spacing:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media screen and (max-width: 992px) {
  #outline-sidebar {
    width: 180px;
  }
  
  #main-content {
    padding: 0 60px;
  }
}

@media screen and (max-width: 768px) {
  #outline-sidebar {
    display: block; /* Changed from none to block to allow mobile menu */
  }
  
  #main-content {
    padding: 0 40px;
  }
  
  name {
    font-size: 28px;
  }
  
  heading {
    font-size: 20px;
  }
  
  /* Improve mobile layout for profile section */
  .profile-photo {
    float: none !important;
    display: block;
    margin: 20px auto !important;
    width: 150px !important;
    height: 150px !important;
  }
  
  /* Adjust text centering for mobile */
  .profile-photo + div p[style*="text-align:center"] {
    text-align: center !important;
    margin-left: 0 !important;
  }
  
  /* Make map container responsive */
  #map-container {
    width: 120px !important;
    height: 120px !important;
    margin: 0 auto;
  }
}

@media screen and (max-width: 480px) {
  body {
    font-size: 14px;
  }
  
  p, strong, td, th, tr, a {
    font-size: 14px;
  }
  
  name {
    font-size: 24px;
  }
  
  heading {
    font-size: 18px;
  }
  
  .papertitle {
    font-size: 15px;
  }
  
  .paper_rest {
    font-size: 14px;
  }
  
  /* Further mobile optimizations */
  #main-content {
    padding: 0 20px;
  }
  
  .profile-photo {
    width: 120px !important;
    height: 120px !important;
  }
  
  /* Stack honors and map vertically on very small screens */
  .honors-map-container {
    display: block !important;
  }
  
  .honors-map-container td {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
  }
  
  #map-container {
    margin: 20px auto 0 !important;
    text-align: center;
  }
}

/* Print styles */
@media print {
  #outline-sidebar {
    display: none;
  }
  
  #main-content {
    padding-left: 0;
  }
  
  a {
    color: var(--text-color);
    text-decoration: underline;
  }
}