@import url(
  'https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Nunito+Sans:wght@300;400;600;700&display=swap'
);

/* ------------------------------
   General styles
------------------------------ */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Nunito Sans', sans-serif;
  color: #4e4742;
  background-color: #f5f0e9;
  background-image:
    linear-gradient(
      rgba(249, 246, 241, 0.88),
      rgba(249, 246, 241, 0.88)
    ),
    url('pattern.png');
}

main {
  width: 100%;
}

a {
  color: #554a43;
  text-decoration: none;
}

a:hover {
  color: #8a6f61;
}

img {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 3px;
}


/* ------------------------------
   Blog header
------------------------------ */

.header-container {
  width: 100%;
  padding: 45px 20px;
  text-align: center;
  background-color: #e6ddd2;
  border-bottom: 1px solid #cfc2b5;
}

.header-container h1 {
  margin: 0;
  color: #51463f;
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 1px;
}

.header-subtitle {
  margin: 8px 0 0;
  color: #83756c;
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: lowercase;
}


/* ------------------------------
   Blog posts
------------------------------ */

.post-container {
  width: min(92%, 900px);
  margin: 45px auto;
}

.blog-post {
  max-width: 800px;
  margin: 0 auto 35px;
  padding: 25px;
  border: 1px solid #d8cec4;
  border-radius: 4px;
  background-color: rgba(255, 253, 249, 0.96);
  box-shadow: 0 5px 18px rgba(82, 69, 59, 0.06);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.blog-post:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(82, 69, 59, 0.1);
}

.blog-post img {
  max-height: 430px;
  margin-bottom: 22px;
  object-fit: cover;
}

.post-title {
  margin: 0;
  padding-top: 18px;
  color: #51463f;
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 400;
  line-height: 1.2;
}

.post-meta {
  display: block;
  margin-top: 8px;
  color: #98877c;
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 300;
}

.post-content {
  margin-top: 25px;
  color: #5d534d;
  font-size: 1rem;
  line-height: 1.9;
  white-space: pre-line;
}

.back-link {
  display: inline-block;
  margin-bottom: 10px;
  color: #806f64;
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}


/* ------------------------------
   Welcome page
------------------------------ */

.welcome-page {
  min-height: 100vh;
  background-color: #d7cec4;
}

.about-container {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: flex-end;
  padding: 60px 8%;
  background-image:
    linear-gradient(
      90deg,
      rgba(67, 56, 49, 0.08),
      rgba(245, 239, 232, 0.35)
    ),
    url('welcome-background.jpg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.about-content {
  width: min(100%, 500px);
  padding: 45px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  background-color: rgba(250, 247, 242, 0.92);
  box-shadow: 0 15px 45px rgba(62, 51, 44, 0.15);
  backdrop-filter: blur(5px);
}

.welcome-label {
  margin: 0 0 10px;
  color: #9a8173;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.about-content h1 {
  margin: 0 0 18px;
  color: #50443d;
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 400;
  line-height: 1;
}

.about-content > p:not(.welcome-label) {
  margin-bottom: 25px;
  color: #665a53;
  font-size: 1rem;
  line-height: 1.8;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 25px 0 35px;
}

.social-links a {
  padding-bottom: 4px;
  color: #746158;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid #a99183;
}

.social-links a:hover {
  color: #3f3732;
  border-bottom-color: #3f3732;
}


/* ------------------------------
   Buttons
------------------------------ */

.button {
  display: inline-flex;
  min-width: 155px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 1px solid #62544c;
  border-radius: 2px;
  color: #fffdf9;
  background-color: #62544c;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    transform 0.25s ease;
}

.button:hover {
  color: #62544c;
  background-color: transparent;
  transform: translateY(-2px);
}


/* ------------------------------
   404 page
------------------------------ */

.error-header {
  width: 100%;
  padding: 30px 20px;
  background-color: #b7a096;
}

.error-title {
  margin: 0;
  color: #fffaf5;
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 400;
  text-align: center;
}

.error-container {
  width: min(90%, 700px);
  margin: 50px auto;
  padding: 30px;
  text-align: center;
  border: 1px solid #d5c8bd;
  background-color: #fffdf9;
}

.error-container h2 {
  color: #554a43;
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  font-weight: 400;
}

.error-container p {
  max-width: 520px;
  margin: 0 auto 25px;
  color: #75675f;
  line-height: 1.7;
}

.error-image img {
  max-height: 350px;
  object-fit: cover;
}


/* ------------------------------
   Responsive design
------------------------------ */

@media screen and (max-width: 768px) {
  .header-container {
    padding: 35px 15px;
  }

  .post-container {
    width: 94%;
    margin-top: 25px;
  }

  .blog-post {
    padding: 18px;
  }

  .about-container {
    align-items: flex-end;
    justify-content: center;
    padding: 30px 18px;
    background-position: center;
  }

  .about-content {
    padding: 30px 24px;
  }

  .social-links {
    gap: 14px;
  }
}

@media screen and (max-width: 480px) {
  .about-content {
    padding: 25px 20px;
  }

  .social-links {
    flex-direction: column;
    align-items: flex-start;
  }

  .button {
    width: 100%;
  }

  .blog-post {
    padding: 15px;
  }
}

body {
  background: #fff8f2;
}

.navbar {
  padding: 12px 20px;
}

.nav-link {
  font-weight: 500;
}

.nav-link:hover {
  text-decoration: underline;
}

.input-group {
  max-width: 260px;
}

.blog-post {
  background: white;
  padding: 24px;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 30px;
}

.blog-post > img {
  margin-bottom: 16px;
  border-radius: 14px;
}

.post-title {
  color: #8a4f3d;
}