/* Base styles extracted from index.html */

body {
  font-family: 'Roboto', sans-serif;
  color: #333;
  line-height: 1.8;
  margin: 0;
  padding: 0;
  background-color: #f4f4f9;
}

header {
  background-color: #3498db;
  color: white;
  text-align: center;
  padding: 50px;
  animation: fadeIn 2s ease-in-out;
}

nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  background: #444;
  padding: 10px;
}

nav a {
  color: white;
  text-decoration: none;
}
nav a:hover {
  text-decoration: underline;
  color: #007bff;
}

section {
  padding: 20px;
  max-width: 800px;
  margin: auto;
}

section img {
  width: 150px;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: block;
  margin: 10px auto;
}

footer {
  text-align: center;
  padding: 20px;
  background: #333;
  color: white;
  position: relative;
}

footer a {
  color: white;
  margin: 0 10px;
}
footer a:hover {
  color: #007bff;
}

#scrollTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #333;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
}
#scrollTop:hover {
  background-color: #0056b3;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

/* Form styles */
form {
  display: flex;
  flex-direction: column;
  max-width: 400px;
  margin: 20px auto;
}
label {
  font-weight: bold;
  margin-top: 10px;
}
input,
textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
}
button {
  margin-top: 15px;
  padding: 10px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
button:hover {
  background-color: #0056b3;
}

* ================================ */
/* Blog Listing Styles (blog/index.html) */
/* ================================ */
#posts > article {
  margin: 2rem 0;
  border-bottom: 1px solid #ddd;
  padding-bottom: 1rem;
}

#posts > article h2 a {
  font-size: 1.4rem;
  text-decoration: none;
  color: #333;
}

#posts > article time {
  display: block;
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.25rem;
}

/* Responsive title on small screens */
@media (max-width: 600px) {
  #posts > article h2 a {
    font-size: 1.2rem;
  }
}

/* ================================ */
/* Individual Post Page Styles */
/* ================================ */
body.blog-post article > h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

body.blog-post article > time {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 1.5rem;
}

/* Extra paragraph spacing for readability */
body.blog-post article p + p {
  margin-top: 1rem;
}

/* ================================ */
/* Navigation Active Link Styling */
/* ================================ */
nav a.active {
  text-decoration: underline;
  color: #007bff;
}