/* One-Page Modern Researcher Design - Additional Styles */

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

/* Typography improvements */
.onepage-wrapper {
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.onepage-wrapper h1, 
.onepage-wrapper h2, 
.onepage-wrapper h3 {
  font-weight: 600;
  line-height: 1.3;
}

.onepage-wrapper p {
  margin-bottom: 1.2rem;
}

/* Link styling */
.onepage-wrapper a {
  color: var(--global-theme-color);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.onepage-wrapper a:hover {
  color: var(--global-hover-color);
}

.onepage-wrapper .content a:not(.btn):not(.social-link):after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--global-theme-color);
  transition: width 0.3s ease;
}

.onepage-wrapper .content a:not(.btn):not(.social-link):hover:after {
  width: 100%;
}

/* Button styling */
.btn {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border-radius: 4px;
  background: var(--global-theme-color);
  color: white !important;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid var(--global-theme-color);
  font-weight: 500;
}

.btn:hover {
  background: transparent;
  color: var(--global-theme-color) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn:after {
  display: none !important;
}

/* Scroll progress indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--global-theme-color), rgba(var(--global-theme-color-rgb, 0,0,0), 0.6));
  z-index: 9999;
  transition: width 0.1s ease;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--global-theme-color);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 1000;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

/* Enhanced section transitions */
.content-section {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.content-section.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Modern card design for publications */
.bibliography li {
  background: var(--global-bg-color);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--global-theme-color);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.bibliography li:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* News items styling */
.news table {
  border: none;
}

.news table tr {
  border-bottom: 1px solid var(--global-divider-color);
  transition: background 0.2s ease;
}

.news table tr:hover {
  background: rgba(0,0,0,0.02);
}

.news table tr:last-child {
  border-bottom: none;
}

/* Social icons enhancement */
.social a {
  display: inline-block;
  margin: 0 0.5rem;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.social a:hover {
  transform: translateY(-3px);
  color: var(--global-theme-color);
}

/* Section title underline animation */
.section-title {
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--global-theme-color);
  transition: width 0.5s ease;
}

.content-section.in-view .section-title::after {
  width: 100%;
}

/* Mobile responsive improvements */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
  }
  
  .hero-section {
    min-height: auto;
    padding: 3rem 0;
  }
  
  .section-title {
    font-size: 1.8rem;
  }

  .profile-container {
    gap: 2rem;
  }

  .header-content h1 {
    font-size: 2rem;
  }

  .content-section {
    padding: 3rem 0;
  }
}

@media (max-width: 576px) {
  .section-title {
    font-size: 1.5rem;
  }

  .header-content h1 {
    font-size: 1.6rem;
  }

  .profile {
    width: 150px;
  }

  .social-icons {
    font-size: 1.2rem;
  }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
  .profile-container {
    gap: 2.5rem;
  }

  .content-section {
    padding: 3.5rem 0;
  }
}

/* Gradient background for hero section */
.hero-section {
  background: linear-gradient(135deg, 
    var(--global-bg-color) 0%, 
    rgba(var(--global-theme-color-rgb, 0,0,0), 0.03) 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(var(--global-theme-color-rgb, 0,0,0), 0.05) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -50px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

/* Button hover effects */
.btn {
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Loading animation for sections */
@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-section.animate-in {
  animation: slideInFromBottom 0.8s ease-out forwards;
}

/* Navbar transparent on top, solid on scroll */
#navbar {
  transition: all 0.3s ease;
}

#navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Profile image border effect */
.profile img {
  border: 4px solid transparent;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, var(--global-theme-color), rgba(var(--global-theme-color-rgb, 0,0,0), 0.5)) border-box;
}

/* Abstract toggle enhancement */
.abstract.hidden {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.abstract:not(.hidden) {
  max-height: 1000px;
  padding-top: 1rem;
  transition: max-height 0.5s ease;
}

/* Year markers */
.year {
  position: relative;
  padding-left: 2rem;
}

.year::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: var(--global-theme-color);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(var(--global-theme-color-rgb, 0,0,0), 0.2);
}
