/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

/* Container */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Section with improved gradient */
.header {
  padding: 60px 0 40px;
  background: linear-gradient(135deg, #2d3748 0%, #4a5568 50%, #2d3748 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

/* Add subtle pattern overlay */
.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 35px,
      rgba(255,255,255,0.02) 35px,
      rgba(255,255,255,0.02) 70px
    );
  pointer-events: none;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease-out;
}

/* Profile Photo with hover effect */
.profile-photo {
  flex-shrink: 0;
}

.profile-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
}

/* Header Text */
.header-text h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Navigation with improved hover states */
nav {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Main Content */
main {
  padding: 40px 0;
}

/* Sections with fade-in animation */
section {
  margin-bottom: 50px;
  animation: fadeIn 0.6s ease-out;
  animation-fill-mode: both;
}

section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.3s; }

section h2 {
  font-size: 1.8rem;
  color: #2c3e50;
  margin-bottom: 25px;
  padding-bottom: 12px;
  border-bottom: 3px solid #4a5568;
  display: inline-block;
  position: relative;
}

/* Add accent line animation on hover */
section h2::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 3px;
  background: #667eea;
  transition: width 0.3s ease;
}

section:hover h2::after {
  width: 100%;
}

section p {
  margin-bottom: 15px;
  line-height: 1.8;
  color: #555;
  font-size: 1.05rem;
}

/* Publication List with improved styling */
.pub-list {
  list-style: none;
}

.pub-list li {
  margin-bottom: 24px;
  padding: 18px;
  background: linear-gradient(to right, #f8f9fa 0%, #ffffff 100%);
  border-left: 4px solid #4a5568;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pub-list li:hover {
  transform: translateX(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-left-color: #667eea;
  background: linear-gradient(to right, #ffffff 0%, #f8f9fa 100%);
}

.pub-list strong {
  color: #2c3e50;
  display: block;
  margin-bottom: 8px;
  font-size: 1.1rem;
  line-height: 1.4;
}

/* Publication metadata styling */


.pdf-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  margin-left: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(102, 126, 234, 0.1);
  transition: all 0.3s ease;
  display: inline-block;
}

.pdf-link:hover {
  background: rgba(102, 126, 234, 0.2);
  transform: translateX(2px);
}

/* Teaching List */
section ul {
  list-style: none;
  padding-left: 0;
}

section ul li {
  margin-bottom: 12px;
  padding-left: 25px;
  position: relative;
  color: #555;
}

section ul li:before {
  content: "▸";
  position: absolute;
  left: 0;
  color: #4a5568;
  font-weight: bold;
  transition: transform 0.3s ease;
}

section ul li:hover:before {
  transform: translateX(4px);
  color: #667eea;
}

/* Contact Section with icons */
#contact p {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

#contact p strong {
  color: #2c3e50;
  display: inline-block;
  min-width: 140px;
}

#contact a {
  color: #667eea;
  text-decoration: none;
  transition: all 0.3s ease;
}

#contact a:hover {
  color: #4a5568;
  text-decoration: underline;
}

/* Footer with improved design */
.footer {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  text-align: center;
  padding: 40px 0;
  margin-top: 80px;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(to bottom, transparent, rgba(44, 62, 80, 0.1));
}

.footer p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Selection color */
::selection {
  background: #667eea;
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }

  .profile-img {
    width: 140px;
    height: 140px;
  }

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

  nav {
    justify-content: center;
  }

  nav a {
    padding: 6px 12px;
    font-size: 0.95rem;
  }

  section h2 {
    font-size: 1.5rem;
  }

  .pub-list li {
    padding: 14px;
  }

  #contact p strong {
    display: block;
    margin-bottom: 4px;
  }
}

/* Print styles */
@media print {
  .header {
    background: none;
    color: black;
  }
  
  nav {
    display: none;
  }
  
  .profile-img {
    width: 100px;
    height: 100px;
  }
  
  .pub-list li::before {
    display: none;
  }
}

/* Additional styles for new elements */
.academic-metrics {
  display: flex;
  gap: 20px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.metric-badge {
  background: rgba(255, 255, 255, 0.15);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.metric-badge strong {
  color: #fff;
  font-weight: 600;
}

.research-interests {
  margin: 25px 0;
}

.research-interests h3 {
  font-size: 1.2rem;
  color: #2c3e50;
  margin-bottom: 15px;
  font-weight: 600;
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.interest-tag {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.interest-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.publication-meta {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.year-badge {
  background: #4a5568;
  color: white;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.venue-badge {
  background: #e2e8f0;
  color: #4a5568;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

.pub-title {
  color: #2c3e50;
  display: block;
  margin-bottom: 4px;
  font-size: 1.1rem;
  line-height: 1.4;
  font-weight: 600;
}

.pub-authors {
  color: #718096;
  font-size: 0.95rem;
  font-style: italic;
  margin-bottom: 6px;
}

#contact .contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .academic-metrics {
    gap: 10px;
  }
  
  .metric-badge {
    font-size: 0.85rem;
    padding: 5px 10px;
  }

  .interest-tags {
    gap: 8px;
  }

  .interest-tag {
    font-size: 0.85rem;
    padding: 5px 12px;
  }
}

main.container {
  margin-top: 0.8cm;
}

/* QR Code Section */
#qr-code {
  display: none;
  text-align: center;
  margin-top: 40px;
  padding: 30px 20px;
  background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px;
}

.qr-container {
  display: inline-block;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.qr-image {
  width: 200px;
  height: 200px;
  display: block;
  border-radius: 8px;
}

.qr-caption {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #718096;
  font-style: italic;
  letter-spacing: 0.3px;
}

@media (max-width: 768px) {
  #qr-code {
    display: block;
  }

  .qr-image {
    width: 150px;
    height: 150px;
  }
  
  .qr-caption {
    font-size: 0.8rem;
  }
}