/* ----------------- Body Layout ----------------- */
body {
  font-family: system-ui, sans-serif;
  background: #fafafa;
  color: #222;
  margin: 0 auto;
  width: min(90%, 90vw);
  max-width: 1200px;
  min-width: 75%;
  padding: 4%;
  line-height: 1.6;
}

/* Large Screens */
@media (min-width: 1400px) {
  body {
    width: 80%;
    padding: 3%;
  }
}

/* Small Devices */
@media (max-width: 600px) {
  body {
    width: 90%;
    padding: 5%;
  }
}

/* ----------------- Header ----------------- */
header {
  text-align: center;
  border-bottom: 0.2rem solid #eee;
  padding-bottom: 1.5rem;
  margin-bottom: 3rem;
}

/* Title */
header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 0.6rem 0;
}

header h1 a {
  color: inherit;
  text-decoration: none;
}

/* ----------------- Navigation ----------------- */
nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

nav a {
  color: inherit;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

nav a:hover {
  opacity: 0.7;
}

nav a:visited,
nav a:active {
  color: inherit;
  text-decoration: none;
}

/* ----------------- Home Post Section ----------------- */
.post-section {
  margin-top: 3rem;
}

.post-section-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #222;
}

@media (max-width: 600px) {
  .post-section-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }
}


/* ----------------- Post Previews ----------------- */
.post-preview {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 3%;
  padding: 1rem;
  border-radius: 12px;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  gap: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-preview:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.post-preview img {
  width: 20%;
  max-width: 200px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

.post-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 400px;
}

/* ----------------- Post Titles ----------------- */
.post-info h2 a {
  color: inherit;
  text-decoration: none;
}

.post-info h2 a:hover,
.post-info h2 a:active,
.post-info h2 a:visited {
  color: inherit;
  text-decoration: none;
}

.post-info p {
  margin-top: 0.5rem;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.4;
}

.post-date {
  color: #888;
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

/* ----------------- Responsive for smaller screens ----------------- */
@media (max-width: 800px) {
  .post-preview {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.8rem;
    padding: 0.8rem;
  }

  .post-preview img {
    width: 50%;
    max-width: 160px;
  }

  .post-info {
    max-width: 90%;
    text-align: center;
  }

  nav {
    flex-direction: row;
    gap: 0.5rem;
  }
}

/* ----------------- Footer ----------------- */
footer {
  border-top: 0.2rem solid #eee;
  margin-top: 5%;
  padding-top: 2%;
  text-align: center;
  color: #777;
  font-size: 0.9rem;
}

footer a {
  color: inherit;
  text-decoration: none;
}

footer a:hover,
footer a:visited,
footer a:active {
  color: inherit;
  text-decoration: none;
}