:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-color: #f9fafb;
  --card-bg: #ffffff;
  --border-color: #e5e7eb;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1100px;
  --header-height: 70px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: #f0f4f8;
  background-image:
    radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
    radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
    radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
  /* Lighter mesh gradient for light mode */
  background-image:
    radial-gradient(at 40% 20%, hsla(28, 100%, 74%, 0.1) 0px, transparent 50%),
    radial-gradient(at 80% 0%, hsla(189, 100%, 56%, 0.1) 0px, transparent 50%),
    radial-gradient(at 0% 50%, hsla(340, 100%, 76%, 0.1) 0px, transparent 50%),
    radial-gradient(at 80% 50%, hsla(240, 100%, 70%, 0.1) 0px, transparent 50%),
    radial-gradient(at 0% 100%, hsla(22, 100%, 77%, 0.1) 0px, transparent 50%),
    radial-gradient(at 80% 100%, hsla(242, 100%, 70%, 0.1) 0px, transparent 50%),
    radial-gradient(at 0% 0%, hsla(343, 100%, 76%, 0.1) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--secondary-color);
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: none;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: transform 0.3s ease-in-out;
}

.header-hidden {
  transform: translateY(-100%);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-color);
  margin-right: 40px;
  /* Added spacing */
}

.navbar-nav {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-link {
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  padding: 20px 0;
  display: flex;
  align-items: center;
  gap: 60px;
  margin-top: 30px;
  margin-bottom: 20px;
  /* added spacing below header */
}

.hero .container {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-content {
  flex: 1;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
  color: #111827;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-light);
  margin-bottom: 24px;
  font-weight: 400;
}

.hero-text {
  font-size: 1.1rem;
  color: var(--text-color);
  margin-bottom: 32px;
  max-width: 600px;
}

.hero-image-container {
  flex-shrink: 0;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 4px solid white;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.social-links {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 9999px;
  background-color: white;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.social-btn:hover {
  background-color: var(--bg-color);
  border-color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Section General */
section {
  padding: 50px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 40px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.subsection-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: #111827;
}

/* News */
.news-list {
  list-style: none;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  padding: 24px;
}

.news-item {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
  /* Ensure vertical centering */
}

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

.news-date {
  font-weight: 600;
  color: var(--text-light);
  min-width: 100px;
  font-size: 0.95rem;
}

.news-content {
  color: var(--text-color);
}

.news-link-btn {
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 6px;
  background-color: #f3f4f6;
  color: var(--text-color);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
}

.news-link-btn:hover {
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
}

/* Publications */
.publication-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.publication-card {
  display: flex;
  gap: 32px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  transition: transform 0.2s, box-shadow 0.2s;
}

.publication-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.pub-image-container {
  width: 240px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
}

.pub-image {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
}

.pub-content {
  flex: 1;
}

.pub-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #111827;
}

.pub-authors {
  color: var(--text-light);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.pub-venue {
  font-style: italic;
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 16px;
}

.pub-links {
  display: flex;
  gap: 12px;
}

.pub-link {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border-radius: 6px;
  background-color: #f3f4f6;
  color: var(--text-color);
}

.pub-link:hover {
  background-color: var(--primary-color);
  color: white;
}

.pub-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.keyword-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  background-color: #e5e7eb;
  color: var(--text-color);
  text-transform: capitalize;
}

.badge-blue {
  background-color: #dbeafe;
  color: #1e40af;
}

.badge-green {
  background-color: #dcfce7;
  color: #166534;
}

.badge-purple {
  background-color: #f3e8ff;
  color: #6b21a8;
}

.badge-orange {
  background-color: #ffedd5;
  color: #9a3412;
}

.badge-red {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Awards */
.awards-list {
  list-style: none;
}

.award-item {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.award-icon {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-top: 4px;
  width: 30px;
  text-align: center;
  flex-shrink: 0;
}

/* Pictures Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.gallery-item {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  transition: transform 0.2s;
}

.gallery-item:hover {
  transform: translateY(-4px);
}

.gallery-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.gallery-caption {
  padding: 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-color);
}

/* Education */
.education-list {
  list-style: none;
}

.education-item {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.edu-icon {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-top: 4px;
}

.edu-degree {
  font-weight: 700;
  font-size: 1.1rem;
  color: #111827;
}

.edu-institution {
  color: var(--text-color);
  margin-bottom: 4px;
}

.edu-period {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Buttons */
.btn-container {
  text-align: center;
  margin-top: 24px;
}

.btn-more {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 10px 24px;
  border-radius: 9999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-main);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-more:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Footer */
footer {
  background-color: white;
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  margin-top: 50px;
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1280px) {
  .hero .container {
    gap: 40px;
  }

  .hero-image-container {
    width: 250px;
    height: 250px;
  }

  .navbar-brand {
    white-space: nowrap;
  }
}

@media (max-width: 900px) {

  /* Navbar */
  header {
    height: auto;
    padding: 10px 0;
  }

  .navbar {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }

  .navbar-brand {
    margin-right: 0;
    margin-bottom: 2px;
    font-size: 1.1rem;
  }

  .navbar-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    justify-items: center;
    gap: 12px;
    row-gap: 10px;
  }

  .nav-link {
    font-size: 0.85rem;
  }

  /* Hero Section */
  .hero {
    padding: 30px 0;
  }

  .hero .container {
    flex-direction: column-reverse;
    gap: 32px;
  }

  .hero-image-container {
    width: 200px;
    height: 200px;
    margin: 0 auto;
  }

  .hero-title {
    font-size: 1.75rem;
    margin-bottom: 12px;
  }

  .hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 16px;
  }

  .hero-text {
    margin-left: auto;
    margin-right: auto;
    font-size: 0.95rem;
    margin-bottom: 24px;
  }

  .social-links {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Education Section */
  .education-item {
    gap: 12px;
  }

  .edu-icon {
    margin-top: 4px;
  }

  /* News Section */
  .news-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .news-date {
    min-width: auto;
    color: var(--primary-color);
    font-size: 0.9rem;
  }

  .news-link-btn {
    margin-left: 0;
    margin-top: 4px;
  }

  /* Publications Section */
  .publication-card {
    flex-direction: column;
  }

  .pub-image-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }

  .pub-links {
    flex-wrap: wrap;
  }

  /* Awards Section */
  .award-item {
    gap: 12px;
  }

  .award-icon {
    font-size: 1.1rem;
  }

  /* Gallery Section */
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  /* General */
  section {
    padding: 30px 0;
  }

  .section-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
  }

  .pub-title {
    font-size: 1.1rem;
  }

  .edu-degree {
    font-size: 1rem;
  }

  /* Theme Toggle Mobile */
  .theme-toggle-btn {
    margin-left: 0;
    margin-right: 0;
    margin-top: 4px;
    font-size: 0.8rem;
    padding: 6px 12px;
    align-self: center;
  }

  .subsection-title {
    font-size: 1.2rem;
    margin-bottom: 16px;
  }
}

/* Overlay */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
  z-index: 9999;
}

#overlay.active {
  opacity: 1;
  pointer-events: auto;
}

#overlay img {
  max-width: 90%;
  max-height: 90%;
  border: 2px solid #fff;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.gallery-img {
  cursor: pointer;
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Theme Modes */

/* White Mode */
body.white-mode {
  background-image: none;
  background-color: #ffffff;
}

/* Dark Mode */
body.dark-mode {
  --text-color: #f9fafb;
  --text-light: #d1d5db;
  --bg-color: #111827;
  --card-bg: rgba(31, 41, 55, 0.7);
  --border-color: #374151;
  --primary-color: #60a5fa;
  /* Lighter blue for dark mode */
  --secondary-color: #3b82f6;

  background-image: none;
  background-color: #111827;
  color: var(--text-color);
}

body.dark-mode .hero-title,
body.dark-mode .section-title,
body.dark-mode .subsection-title,
body.dark-mode .edu-degree,
body.dark-mode .pub-title {
  color: #f9fafb;
}

body.dark-mode .navbar,
body.dark-mode header {
  background-color: rgba(17, 24, 39, 0.9);
  border-bottom: none;
}

body.dark-mode .news-list,
body.dark-mode .publication-card,
body.dark-mode .gallery-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
}

body.dark-mode .social-btn {
  background-color: #1f2937;
  border-color: var(--border-color);
  color: var(--text-color);
}

body.dark-mode .social-btn:hover {
  background-color: #374151;
}

body.dark-mode .pub-image-container {
  background-color: #1f2937;
  border-color: var(--border-color);
}

body.dark-mode .news-link-btn,
body.dark-mode .pub-link {
  background-color: #374151;
  color: var(--text-color);
}

body.dark-mode .news-link-btn:hover,
body.dark-mode .pub-link:hover {
  background-color: var(--primary-color);
  color: white;
}

body.dark-mode footer {
  background-color: #111827;
  border-top: 1px solid var(--border-color);
}

/* Toggle Button */
.theme-toggle-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.2s;
  margin-left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-main);
}

.theme-toggle-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

body.dark-mode .theme-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}