/* Quiet Home Journal — luiskapostum.com */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.75;
  color: #222222;
  background-color: #f7f5f2;
  background-image:
    linear-gradient(rgba(247, 245, 242, 0.86), rgba(247, 245, 242, 0.86)),
    url('../images/background_home_memory.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url('../images/background_paper_texture.jpg');
  opacity: 0.05;
  pointer-events: none;
  z-index: -1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #222222;
  text-decoration: underline;
  text-decoration-color: #9ab2c8;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.3s ease, color 0.3s ease;
}

a:hover {
  text-decoration-color: #222222;
  color: #9ab2c8;
}

/* Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(154, 178, 200, 0.25);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-size: 1.1rem;
  font-style: italic;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #222222;
}

.site-logo:hover {
  color: #9ab2c8;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.75rem;
}

.nav-menu a {
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: #222222;
  position: relative;
  padding-bottom: 2px;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: #9ab2c8;
  transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.nav-menu a.active {
  color: #9ab2c8;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #222222;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Layout */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.page-wrapper,
.article-container,
.contact-container,
.privacy-container {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  padding: 3rem 3.5rem;
  margin-bottom: 2.5rem;
}

.content-section {
  margin-bottom: 3.5rem;
}

.content-section:last-child {
  margin-bottom: 0;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Typography */
h1 {
  font-size: 2rem;
  font-weight: normal;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.5rem;
  font-weight: normal;
  margin-bottom: 1.25rem;
  color: #222222;
  letter-spacing: 0.01em;
}

h3 {
  font-size: 1.15rem;
  font-weight: normal;
  font-style: italic;
  margin-bottom: 0.75rem;
  color: #555;
}

p {
  margin-bottom: 1.25rem;
}

.intro-lead {
  font-size: 1.15rem;
  font-style: italic;
  color: #444;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.section-divider {
  border: none;
  border-top: 1px solid rgba(154, 178, 200, 0.35);
  margin: 3rem 0;
}

.reading-width {
  max-width: 680px;
}

/* Homepage hero intro */
.home-intro {
  max-width: 720px;
}

.home-intro h1 {
  font-size: 1.85rem;
  text-transform: lowercase;
}

.site-tagline {
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9ab2c8;
  margin-bottom: 2rem;
}

/* Blog Dashboard */
.dashboard-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.dashboard-header h2 {
  font-size: 1.75rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

.blog-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.blog-card h3 {
  font-size: 1.2rem;
  font-style: normal;
  color: #222222;
  margin-bottom: 0.75rem;
  transition: color 0.3s ease;
}

.blog-card:hover h3 {
  color: #9ab2c8;
}

.blog-card-excerpt {
  font-size: 0.95rem;
  color: #555;
  flex-grow: 1;
  margin-bottom: 1rem;
}

.blog-card-meta {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ab2c8;
}

/* Archive list */
.archive-list {
  list-style: none;
  columns: 1;
}

.archive-list li {
  margin-bottom: 0.75rem;
  break-inside: avoid;
}

.archive-list a {
  text-decoration: none;
  font-size: 1.05rem;
}

.archive-list a:hover {
  color: #9ab2c8;
}

/* Article pages */
.article-container {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.article-meta {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9ab2c8;
  margin-bottom: 1.5rem;
}

.article-intro {
  font-size: 1.1rem;
  font-style: italic;
  color: #444;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(154, 178, 200, 0.3);
}

.article-body p {
  text-align: left;
}

.related-section {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(154, 178, 200, 0.35);
}

.related-section h2 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

.related-links {
  list-style: none;
}

.related-links li {
  margin-bottom: 0.85rem;
}

.related-links a {
  text-decoration: none;
  font-size: 1.05rem;
}

.return-btn {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 0.85rem 1.75rem;
  background: rgba(154, 178, 200, 0.15);
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  transition: background 0.3s ease, transform 0.3s ease;
}

.return-btn:hover {
  background: rgba(154, 178, 200, 0.35);
  transform: translateX(-4px);
  color: #222222;
}

/* Contact page */
.contact-details {
  margin: 2rem 0;
  padding: 1.75rem;
  background: rgba(154, 178, 200, 0.08);
  border-radius: 12px;
}

.contact-details p {
  margin-bottom: 0.75rem;
}

.contact-form {
  margin-top: 2.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: Georgia, serif;
  font-size: 1rem;
  border: 1px solid rgba(154, 178, 200, 0.4);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
  color: #222222;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #9ab2c8;
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.submit-btn {
  padding: 0.85rem 2rem;
  font-family: Georgia, serif;
  font-size: 1rem;
  background: #9ab2c8;
  color: #fff;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.submit-btn:hover {
  background: #7a9bb0;
  transform: translateY(-2px);
}

/* Privacy policy */
.privacy-container h2 {
  margin-top: 2rem;
}

.privacy-container h2:first-of-type {
  margin-top: 0;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem 1.5rem 3rem;
  font-size: 0.85rem;
  color: #666;
}

.site-footer a {
  text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }

  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0 2rem;
    gap: 1.25rem;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
  }

  .page-wrapper,
  .article-container,
  .contact-container,
  .privacy-container {
    padding: 2rem 1.5rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .archive-list {
    columns: 1;
  }
}

@media (min-width: 600px) {
  .archive-list {
    columns: 2;
    column-gap: 2rem;
  }
}
