/* Custom styles for Zhaoyang Lv's website */

body {
  padding-top: 70px;
  padding-bottom: 30px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom button hover effects */
.btn-outline-primary:hover,
.btn-outline-danger:hover,
.btn-outline-dark:hover {
  transform: translateY(-1px);
  transition: transform 0.2s ease;
}

/* Social media icons hover effect */
.navbar-nav .nav-link:hover,
.social-links a:hover {
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

/* Publication cards hover effect */
.publication-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

/* Custom gradient divider */
.gradient-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0,0,0,0.3), transparent);
  border: none;
  margin: 2rem 0;
}

/* Responsive image improvements */
.img-fluid {
  max-width: 100%;
  height: auto;
}

/* Better typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
}

/* Custom blockquote styling */
.blockquote {
  border-left: 4px solid #007bff;
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
}

/* Improved link styling */
a {
  color: #007bff;
  text-decoration: none;
}

a:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* Social media icons spacing */
.social-links i {
  margin: 0 0.5rem;
}

/* Dark mode styles */
body.dark-mode {
  background-color: #181a1b !important;
  color: #e0e0e0 !important;
}
body.dark-mode .bg-light,
body.dark-mode .rounded-3 {
  background-color: #23272b !important;
  color: #e0e0e0 !important;
}
body.dark-mode .navbar,
body.dark-mode .navbar.bg-dark {
  background-color: #23272b !important;
}
body.dark-mode .card {
  background-color: #23272b !important;
  color: #e0e0e0 !important;
}
body.dark-mode .btn-outline-primary {
  color: #e0e0e0;
  border-color: #e0e0e0;
}
body.dark-mode .btn-outline-primary:hover {
  background-color: #e0e0e0;
  color: #23272b;
}
body.dark-mode .btn-outline-light {
  color: #e0e0e0;
  border-color: #e0e0e0;
}
body.dark-mode .btn-outline-light:hover {
  background-color: #e0e0e0;
  color: #23272b;
}
body.dark-mode .text-muted {
  color: #b0b0b0 !important;
}
body.dark-mode hr {
  border-color: #444 !important;
}
body.dark-mode a {
  color: #8ecae6;
}
body.dark-mode a:hover {
  color: #219ebc;
}

/* Floating dark mode button (mobile) */
#theme-toggle-mobile {
  background-color: rgba(33, 37, 41, 0.85) !important; /* Same as navbar */
  color: #fff !important;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
#theme-toggle-mobile:focus, #theme-toggle-mobile:hover {
  background-color: rgba(52, 58, 64, 1) !important;
  color: #fff !important;
}
#theme-toggle-mobile .fa-moon, #theme-toggle-mobile .fa-sun {
  color: #fff !important;
}
body.dark-mode #theme-toggle-mobile {
  background-color: rgba(33, 37, 41, 0.95) !important;
  color: #fff !important;
}

/* Dark mode fixes for publication/project buttons */
body.dark-mode .btn-outline-danger {
  color: #ff4d4f !important;
  border-color: #ff4d4f !important;
  background-color: transparent !important;
}
body.dark-mode .btn-outline-danger:hover, body.dark-mode .btn-outline-danger:focus {
  background-color: #ff4d4f !important;
  color: #fff !important;
  border-color: #ff4d4f !important;
}
body.dark-mode .btn-outline-dark {
  color: #fff !important;
  border-color: #fff !important;
  background-color: transparent !important;
}
body.dark-mode .btn-outline-dark:hover, body.dark-mode .btn-outline-dark:focus {
  background-color: #fff !important;
  color: #23272b !important;
  border-color: #fff !important;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .social-links {
    justify-content: center !important;
  }
  
  .publication-card {
    margin-bottom: 1.5rem;
  }
}

/* Dark mode support (if needed later) */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here */
}

/* Print styles */
@media print {
  .navbar,
  .btn,
  .social-links {
    display: none !important;
  }
  
  body {
    padding-top: 0;
  }
}

/* Navbar shadow and blur */
.navbar {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  backdrop-filter: blur(8px);
  background-color: rgba(33, 37, 41, 0.85) !important;
}

/* Touch targets for navbar links */
.navbar-nav .nav-link {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Touch targets for social icons */
.d-flex.gap-3 a {
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background 0.2s;
}
.d-flex.gap-3 a:focus, .d-flex.gap-3 a:hover {
  background: rgba(0,0,0,0.05);
}