/* General Styles */
body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f0f0f0;
  color: #333;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
  background-color: #1a1a1a;
  color: #f0f0f0;
}

/* Navbar Styles */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: #4caf50;
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar h1 {
  margin: 0;
  font-size: 1.5em;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.navbar button {
  background: none;
  border: none;
  color: white;
  font-size: 1.2em;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.navbar button:hover {
  transform: scale(1.1);
}

/* Search Bar Styles */
.search-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

#search-bar {
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  width: 0;
  transition: width 0.3s ease, padding 0.3s ease;
}

#search-bar.hidden {
  width: 0;
  padding: 0;
  border: none;
}

#search-bar:not(.hidden) {
  width: 200px;
}

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

/* Projects Container */
.projects-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

/* Project Card */
.project-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 300px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Card Thumbnail */
.card-thumbnail img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* Card Content */
.card-content {
  padding: 20px;
}

.card-content h2 {
  margin-bottom: 15px;
  text-align: center;
  font-size: 1.2em;
  color: inherit;
}

/* Card Buttons */
.card-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.view-button,
.github-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  font-size: 14px;
}

.view-button {
  background-color: #4caf50;
  color: white;
}

.github-button {
  background-color: #333;
  color: white;
}

.view-button:hover {
  background-color: #45a049;
}

.github-button:hover {
  background-color: #222;
}

/* Dark Mode Styles for Cards */
body.dark-mode .project-card {
  background-color: #333;
  color: #f0f0f0;
}

body.dark-mode .card-content h2 {
  color: #f0f0f0;
}