/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Light Mode Colors - Enhanced for better readability */
  --light-bg-primary: #f1f5f9;
  --light-bg-white: #ffffff;
  --light-text-primary: #0f172a;
  --light-text-secondary: #475569;
  --light-text-muted: #64748b;
  --light-border-color: #cbd5e1;

  /* Dark Mode Colors */
  --dark-bg-primary: #0f172a;
  --dark-bg-white: rgba(1, 13, 32, 0.8);
  --dark-text-primary: #f1f5f9;
  --dark-text-secondary: #cbd5e1;
  --dark-text-muted: #94a3b8;
  --dark-border-color: #334155;

  /* Accent Colors (same for both modes) */
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-purple: #667eea;
  --accent-purple-dark: #764ba2;

  /* Default to Dark Mode */
  --bg-primary: var(--dark-bg-primary);
  --bg-white: var(--dark-bg-white);
  --text-primary: var(--dark-text-primary);
  --text-secondary: var(--dark-text-secondary);
  --text-muted: var(--dark-text-muted);
  --border-color: var(--dark-border-color);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4),
    0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5),
    0 4px 6px -2px rgba(0, 0, 0, 0.4);

  --title-gradient: linear-gradient(108deg,
      #0894ff,
      #c959dd 34%,
      #ff2e54 68%,
      #ff9004);
}

/* Light Mode Override */
body.light-mode {
  --bg-primary: var(--light-bg-primary);
  --bg-white: var(--light-bg-white);
  --text-primary: var(--light-text-primary);
  --text-secondary: var(--light-text-secondary);
  --text-muted: var(--light-text-muted);
  --border-color: var(--light-border-color);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  position: relative;
}

/* Sidebar */
.sidebar {
  position: relative;
}

/* nav bar desktop mode */
.sidebar-sticky {
  position: sticky;
  top: 2rem;

  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  /* Firefox */
  scrollbar-width: none;
  /* IE and Edge */
  -ms-overflow-style: none;
}

/* Chrome, Safari and Opera */
.sidebar-sticky::-webkit-scrollbar {
  display: none;
}

/* Theme Toggle Button */
.theme-toggle {
  position: relative;
  overflow: hidden;
}

.theme-toggle svg {
  transition: all 0.3s ease;
}

.theme-toggle .sun-icon {
  display: none;
}

.theme-toggle .moon-icon {
  display: block;
}


/* Spin Animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.spin-animation {
  animation: spin 0.5s ease-in-out;
}

body.light-mode .theme-toggle .sun-icon {
  display: block;
}

body.light-mode .theme-toggle .moon-icon {
  display: none;
}

/* Main Content */
.main-content {
  max-width: 900px;
}

/* Profile Card */
.profile-card {
  background: var(--bg-white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

body.light-mode .profile-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.profile-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
}

body.light-mode .profile-card:hover {
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.2);
}

.profile-banner {
  height: 230px;
  background: url("cover.jpg") center/cover no-repeat;
  position: relative;
}

.profile-info {
  padding: 0 2rem 2rem;
  text-align: center;
  position: relative;
  background: var(--bg-white);
}

body.light-mode .profile-info {
  background: rgba(255, 255, 255, 0.9);
}

.profile-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 6px solid var(--bg-white);
  margin-top: -75px;
  object-fit: cover;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.profile-name {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 1rem;
  color: var(--text-primary);
}

.profile-title {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-weight: 500;
}

.profile-institution {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.profile-contact-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.profile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.profile-icon svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.profile-icon:hover svg {
  transform: translateY(-2px) scale(1.15);
  filter: brightness(1.2) drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

/* Content Sections */
.content-section {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: all 0.3s ease, opacity 0.6s ease, transform 0.6s ease;
  opacity: 0;
  background: rgba(255, 255, 255, 0.02);
  transform: translateY(30px);
}

.content-section.visible {
  opacity: 1;
  transform: translateY(0);
}

body.light-mode .content-section {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.content-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.2);
}

body.light-mode .content-section:hover {
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;

  background: var(--title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  /* color: var(--text-primary); */
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.section-content {
  color: var(--text-secondary);
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.info-item {
  padding: 0.75rem;
  background: var(--bg-white);
  border-radius: 8px;
  font-size: 0.95rem;
}

.info-item strong {
  color: var(--text-primary);
  font-weight: 600;
}

.contact-info {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.contact-info p {
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.contact-info a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-info a:hover {
  color: var(--accent-blue-hover);
  text-decoration: underline;
}

/* Contact Buttons */
.contact-buttons {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent-blue);
  border-radius: 12px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.icon-button:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.icon-button svg {
  color: white;
}

.contact-text {
  font-size: 1rem;
  color: var(--text-secondary);
}

.contact-text strong {
  color: var(--text-primary);
}

/* Timeline */
.timeline {
  position: relative;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.timeline-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.timeline-item:has(> .timeline-content:only-child) .timeline-content {
  padding-left: 0;
}

/* Handle timeline items without a year (list-only items) */
.timeline-item:has(> .timeline-content:only-child) {
  grid-template-columns: 1fr;
  gap: 0;
}

.timeline-year {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  padding-top: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
}

.timeline-year svg {
  width: 16px;
  height: 16px;
  color: var(--accent-blue);
  fill: var(--accent-blue);
}

.timeline-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.timeline-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.thesis-title {
  font-style: italic;
  color: var(--text-muted) !important;
  margin-top: 0.5rem !important;
}

/* Custom List */
.custom-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.custom-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.custom-list li::before {
  content: "•";
  color: var(--accent-blue);
  font-weight: bold;
  font-size: 1.5rem;
  position: absolute;
  left: 0;
  top: -0.25rem;
}

/* Language Grid */
.language-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.language-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--bg-white);
  border-radius: 8px;
  transition: transform 0.2s ease;
}

.language-item:hover {
  transform: translateX(4px);
}

.language-name {
  font-weight: 600;
  color: var(--text-primary);
}

.language-level {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Publications */
.publications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.publications-count {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
}

.year-group {
  margin-bottom: 2.5rem;
}

.year-header {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-blue);
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-blue);
}

.btn-view-all {
  background: var(--accent-blue);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.btn-view-all:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.publications-list {
  display: flex;
  flex-direction: column;
  gap: 0rem;
}

.publication-item {
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  position: relative;
}

body.light-mode .publication-item {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.05);
}

.publication-item:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.07);
}

body.light-mode .publication-item:hover {
  background: rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.publication-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 0.75rem;
  line-height: 1.4;
  cursor: pointer;
  transition: color 0.2s ease;
}

.publication-title:hover {
  color: var(--accent-blue-hover);
}

.publication-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.publication-journal {
  color: var(--text-secondary);
  font-weight: 500;
}

.publication-year {
  color: var(--text-muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.publication-year svg {
  color: var(--accent-blue);
  fill: var(--accent-blue);
}

.publication-tag {
  background: var(--bg-primary);
  color: var(--accent-blue);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-weight: 500;
}

.publication-authors {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1rem;
}

.btn-view {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.btn-view:hover {
  color: var(--accent-blue-hover);
}

.btn-view svg {
  width: 16px;
  height: 16px;
}

/* Publications & Congresses Shared Header Styles */
.publications-header,
.congresses-header,
.projects-header,
.expertises-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.publications-count,
.congresses-count,
.projects-count,
.expertises-count {
  font-size: 0.95rem;
  color: var(--text-secondary);
  background: rgba(59, 130, 246, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  display: inline-block;
}

.publications-count strong,
.congresses-count strong,
.projects-count strong,
.expertises-count strong {
  color: var(--accent-blue);
}

.congress-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.congress-item {
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
  position: relative;
}

body.light-mode .congress-item {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.05);
}

.congress-item:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.07);
}

body.light-mode .congress-item:hover {
  background: rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.congress-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.congress-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  align-items: center;
}

.congress-date,
.congress-location {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.congress-date svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--accent-blue);
  fill: var(--accent-blue);
}

.congress-location svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #ef4444;
  fill: #ef4444;
}

.congress-tag {
  background: var(--bg-primary);
  color: var(--accent-blue);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.congress-presentation {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0.75rem 0;
  line-height: 1.5;
}

.congress-authors {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* Books Section */
.book-card {
  display: flex;
  gap: 2rem;
  background: var(--bg-white);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-blue);
}

.book-icon {
  flex-shrink: 0;
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 80px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 8px;
}

.book-info {
  flex: 1;
}

.book-title {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.book-subtitle {
  color: var(--accent-blue);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.book-meta p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.book-meta strong {
  color: var(--text-primary);
  margin-right: 0.5rem;
}

@media (max-width: 768px) {
  .book-card {
    flex-direction: column;
    gap: 1rem;
  }

  .book-icon {
    width: 48px;
    height: 60px;
  }
}

/* Contact Card */

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  background: var(--bg-white);
  border-radius: 12px;
  transition: transform 0.2s ease;
}

.contact-item:hover {
  transform: translateX(4px);
}

.contact-icon-container {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.contact-icon-container svg,
.contact-icon-container img {
  flex-shrink: 0;
}

/* LinkedIn - Official Blue */
.contact-icon-container.linkedin {
  background: rgba(10, 102, 194, 0.08);
}

.contact-icon-container.linkedin svg {
  color: #0a66c2;
  fill: #0a66c2;
}

/* ORCID - Official Green */
.contact-icon-container.orcid {
  background: rgba(166, 206, 57, 0.08);
}

.contact-icon-container.orcid img {
  filter: none;
}

/* Google Scholar - Google Blue */
.contact-icon-container.google-scholar {
  background: rgba(66, 133, 244, 0.08);
}

.contact-icon-container.google-scholar svg {
  color: #4285f4;
  fill: #4285f4;
}

/* ResearchGate - Official Cyan */
.contact-icon-container.researchgate {
  background: rgba(0, 208, 181, 0.08);
}

.contact-icon-container.researchgate img {
  filter: none;
}

/* Address - Vibrant Red/Coral */
.contact-icon-container.address {
  background: rgba(239, 68, 68, 0.08);
}

.contact-icon-container.address svg {
  color: #ef4444;
  fill: #ef4444;
}

.contact-item svg {
  color: var(--accent-blue);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.contact-item strong {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.contact-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

.contact-item a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-item a:hover {
  color: var(--accent-blue-hover);
  text-decoration: underline;
}

.contact-item-button {
  cursor: pointer;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80px;
}

.contact-item-button:hover {
  transform: scale(1.05);
  background: var(--accent-blue);
}

.contact-item-button:hover svg {
  color: white;
}

/* New Gradient Contact Buttons */
.contact-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color: white;
  text-align: center;

  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.btn-contact::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg,
      transparent,
      rgba(255, 255, 255, 0.3),
      transparent);
  transition: all 0.6s;
}

.btn-contact:hover::before {
  left: 100%;
}

.btn-contact svg {
  margin-bottom: 0.75rem;
  color: white !important;
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.btn-contact span {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-email {
  background: linear-gradient(135deg,
      rgba(99, 102, 241, 0.6) 0%,
      rgba(168, 85, 247, 0.6) 100%);
}

.btn-phone {
  background: linear-gradient(135deg,
      rgba(16, 185, 129, 0.6) 0%,
      rgba(59, 130, 246, 0.6) 100%);
}

.btn-contact:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.5);
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.05) 100%);
}

body.light-mode .btn-email {
  background: linear-gradient(135deg,
      rgba(99, 102, 241, 0.8) 0%,
      rgba(168, 85, 247, 0.8) 100%);
}

body.light-mode .btn-phone {
  background: linear-gradient(135deg,
      rgba(16, 185, 129, 0.8) 0%,
      rgba(59, 130, 246, 0.8) 100%);
}

@media (max-width: 600px) {
  .contact-actions {
    grid-template-columns: 1fr;
  }
}

/* Sidebar */
.sidebar {
  position: relative;
}

/* Sidebar Sticky Light Mode Override */
body.light-mode .sidebar-sticky {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.sidebar-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0;
}

.sidebar-header .theme-toggle {
  background: none;

  border: none;
  padding: 0.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
  border-radius: 6px;
}

.sidebar-header .theme-toggle:hover svg {
  transform: translateY(-2px) scale(1.15);
  filter: brightness(1.3) drop-shadow(0 0 8px rgba(139, 92, 246, 0.8));
}

body.light-mode .sidebar-header .theme-toggle:hover svg {
  transform: translateY(-2px) scale(1.15);
  filter: brightness(1.3) drop-shadow(0 0 8px rgba(245, 158, 11, 0.8));
}

.sidebar-header .theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.nav-link:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.nav-link.active {
  background: rgba(1, 13, 32, 0.8);
  color: var(--accent-blue);
  font-weight: 600;
}

.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--accent-blue);
  border-radius: 0 2px 2px 0;
}

.inline-link {
  color: #11f7ff;
  text-decoration: underline;
  font-weight: 500;
}

.inline-link:hover {
  font-family: monospace;
  text-decoration: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .container {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .sidebar {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    border-radius: 100px;
    width: auto;
    margin: 0;
  }

  .sidebar-sticky {
    position: static;
    padding: 0.75rem;
    border-radius: 0;
    box-shadow: none !important;
    background: transparent !important;
    border: none !important;
  }

  .sidebar-actions {
    justify-content: center;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
  }

  .sidebar-header {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    margin: 0;
    z-index: 1010;
    height: 100%;
    display: flex;
    align-items: center;
  }

  .sidebar-header .theme-toggle {
    background: linear-gradient(135deg,
        rgba(1, 2, 32, 0.3),
        rgba(12, 255, 235, 0.1));
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    /* Ensure glass effect is clipped to circle */
    overflow: hidden;
    isolation: isolate;
    border-radius: 50%;
    height: 100%;
    aspect-ratio: 1/1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1011;
    /* Fix for backdrop-filter rendering glitch */
    transform: translateZ(0);
  }

  .sidebar-header .theme-toggle svg {
    width: 26px;
    height: 26px;
  }

  body.light-mode .sidebar-header .theme-toggle {
    background: transparent;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
  }

  .sidebar-title {
    display: none;
  }

  .sidebar-nav {
    flex-direction: row;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 3rem;
    height: 3rem;
    align-items: center;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
  }

  /* Chrome, Safari and Opera */
  .sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
    border-radius: 0;
  }

  .nav-link.active::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    top: auto;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: var(--accent-blue);
    border-radius: 2px 2px 0 0;
  }

  .nav-link.active {
    /* border-bottom: 2px solid var(--accent-blue); */
    background: rgba(1, 13, 32, 0.8);
    border-radius: 10px;



  }
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
    padding-bottom: 5rem;
    /* Space for fixed bottom nav */
  }

  .profile-banner {
    height: 180px;
  }

  .profile-image {
    width: 120px;
    height: 120px;
    margin-top: -60px;
  }

  .profile-name {
    font-size: 1.5rem;
  }

  .profile-title {
    font-size: 1rem;
  }

  .profile-institution {
    font-size: 0.9rem;
  }

  .content-section {
    padding: 1.5rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .timeline-year {
    text-align: left;
    font-size: 0.8rem;
  }

  .timeline-content h3 {
    font-size: 1rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .language-grid {
    grid-template-columns: 1fr;
  }

  .contact-buttons {
    justify-content: center;
  }

  .icon-button {
    width: 56px;
    height: 56px;
  }

  .publication-item {
    padding: 1rem;
  }

  .publication-title {
    font-size: 1rem;
  }

  .contact-card {
    gap: 1rem;
  }

  .contact-item {
    padding: 0.75rem;
  }

  .contact-item-button {
    min-height: 70px;
  }

  /* Make sidebar actions more touch-friendly on mobile */
  .sidebar-actions .btn-action,
  .sidebar-actions .theme-toggle {
    padding: 0.85rem;
    min-width: 44px;
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0.75rem;
    padding-bottom: 5rem;
  }

  .profile-name {
    font-size: 1.25rem;
  }

  .profile-title {
    font-size: 0.95rem;
  }

  .content-section {
    padding: 1rem;
    border-radius: 12px;
  }

  .section-title {
    font-size: 1.125rem;
  }

  .icon-button {
    width: 52px;
    height: 52px;
  }

  .contact-buttons {
    gap: 1rem;
  }

  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .sidebar-actions {
    gap: 0.35rem;
  }

  .sidebar-actions .btn-action,
  .sidebar-actions .theme-toggle {
    padding: 0.75rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-section {
  animation: fadeIn 0.6s ease-out;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection */
::selection {
  background: var(--accent-blue);
  color: white;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {

  .btn-action,
  .theme-toggle,
  .icon-button,
  .nav-link {
    min-width: 44px;
    min-height: 44px;
  }

  .contact-item-button {
    min-height: 80px;
  }
}