/* General Body Styles */
body {
  background-color: #fff;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
  background-color: #121212;
  color: #eee;
}

/* Header and Navigation */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid #eaeaea;
}

body.dark-mode header {
  border-bottom-color: #333;
}

nav a {
  margin: 0 1rem;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}

nav a:hover {
  text-decoration: underline;
}

/* Main Content */
main {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 2rem;
}

/* Post List on Homepage */
.post-list article {
  padding: 1.5rem 0;
  border-bottom: 1px solid #eaeaea;
}

body.dark-mode .post-list article {
  border-bottom-color: #333;
}

.post-list h2 a {
  color: inherit;
  text-decoration: none;
}

.post-list h2 a:hover {
  text-decoration: underline;
}

.read-more {
  display: inline-block;
  margin-top: 1rem;
  font-weight: bold;
  color: #007bff;
  text-decoration: none;
}

.read-more:hover {
  text-decoration: underline;
}

body.dark-mode .read-more {
  color: #61dafb;
}


/* Single Post Styles */
.post-meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

body.dark-mode .post-meta {
  color: #999;
}

/* Form Styles */
form {
  margin: 20px auto;
  max-width: 500px;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 5px;
  text-align: left;
}

body.dark-mode form {
  border-color: #555;
}

form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

form input[type="text"],
form input[type="email"],
form textarea {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
  background-color: #fff;
  color: #333;
}

body.dark-mode form input[type="text"],
body.dark-mode form input[type="email"],
body.dark-mode form textarea {
  background-color: #333;
  color: #eee;
  border-color: #555;
}

form button[type="submit"], #mode-toggle {
  background-color: #007bff;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

form button[type="submit"]:hover, #mode-toggle:hover {
  background-color: #0056b3;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid #eaeaea;
  font-size: 0.9rem;
  color: #666;
}

body.dark-mode footer {
  border-top-color: #333;
  color: #999;
}

/* References Section */
.references {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eaeaea;
  font-size: 0.9rem;
  color: #666;
}

body.dark-mode .references {
  border-top-color: #333;
  color: #999;
}

.references h3 {
  margin-bottom: 0.5rem;
}

.references p a {
  color: #007bff;
}

body.dark-mode .references p a {
  color: #61dafb;
}
