:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --background-color: #ffffff;
  --text-color: #333333;
  --header-bg: #f4f4f4;
  --footer-bg: #333333;
  --accent-color: #007bff;
  --divider-color: rgba(0, 0, 0, 0.1);
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  color: var(--text-color);
  background-color: var(--background-color);
  transition: background-color 0.3s, color 0.3s;
}

.dark-theme {
  --background-color: #2c3e50;
  --text-color: #ecf0f1;
  --header-bg: #34495e;
  --footer-bg: #2c3e50;
  --divider-color: rgba(255, 255, 255, 0.1);
}

header {
  background-color: var(--header-bg);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: row;
}

nav ul li {
  margin-right: 1rem;
}

nav ul li:last-child {
  margin-right: 0;
}

nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: background-color 0.3s;
}

nav ul li a:hover {
  background-color: var(--primary-color);
  color: white;
}

.controls {
  display: flex;
  align-items: center;
}

.toggle-buttons {
  display: flex;
  margin-right: 10px;
}

.toggle-buttons button,
.language-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-color);
  padding: 5px;
  transition: color 0.3s ease;
}

.toggle-buttons button:hover,
.language-toggle:hover {
  color: var(--accent-color);
  background: none;
}

.search-container {
  display: flex;
  align-items: center;
}

#search {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 5px 0 0 5px;
}

#search-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
}

main {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

section {
  margin-bottom: 2rem;
}

h1, h2, h3 {
  color: var(--primary-color);
}

.research-areas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.research-item {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

footer {
  background-color: var(--footer-bg);
  color: white;
  text-align: center;
  padding: 1rem;
}

.social-links a {
  color: white;
  margin: 0 0.5rem;
  font-size: 1.5rem;
  transition: color 0.3s;
}

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

#search-results {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--background-color);
  padding: 2rem;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  z-index: 1000;
  max-width: 80%;
  max-height: 80%;
  overflow-y: auto;
}

#search-results.hidden {
  display: none;
}

.intro-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.intro-container h1 {
  text-align: center;
  margin-bottom: 1rem;
}

.intro-image {
  width: 100%;
  max-width: 500px;
  margin-bottom: 1rem;
}

.intro-logo {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.intro-text {
  text-align: justify;
}

.content-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: center;
}

.content-container h1,
.content-container h2 {
  width: 100%;
  text-align: center;
  margin-bottom: 1rem;
}

.intro-image {
  width: 100%;
  max-width: 500px;
  margin-bottom: 1rem;
}

.intro-logo {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.intro-text,
.research-areas,
#contact p {
  width: 100%;
  text-align: justify;
}

.research-areas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.research-item {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

section:not(:last-child) {
  border-bottom: 1px solid var(--divider-color);
  padding-bottom: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
  }

  nav ul {
    justify-content: center;
    flex-wrap: wrap;
  }

  nav ul li {
    margin: 0.25rem 0.5rem;
  }

  .search-container {
    width: 100%;
  }

  #search {
    width: 100%;
  }
  .intro-container {
    padding: 0 1rem;
}

.intro-image {
    max-width: 100%;
}
.research-areas {
  grid-template-columns: 1fr;
}
}