* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "EB Garamond", serif;
  line-height: 1.7;
  color: #4a453f;
  background-color: #faf9f7;
  font-size: 20px;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

.main-content {
  max-width: 100%;
}

/* ===== HEADER SECTION ===== */
.header {
  margin-bottom: 45px;
  padding-top: 20px;
  border-bottom: 1px solid #e8e2d9;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.site-title {
  font-size: 2.5rem;
  font-weight: 400;
  color: #3d2317;
  margin-bottom: 2px;
  letter-spacing: -0.02em;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.header-nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  margin: 0;
}

.header-nav a {
  color: #6b5e4f;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: 1.1rem;
}

.header-nav a:hover {
  color: #3d362e;
}

/* ===== POST STYLES ===== */
.post-date {
  font-size: 0.8rem;
  color: #b8a898;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-title {
  display: block;
  font-size: 2rem;
  font-weight: 600;
  color: #3d362e;
  margin-bottom: 8px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.post-subtitle {
  display: block;
  border-bottom: 1px solid #f0ece6;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.post-excerpt {
  color: #5a5248;
  margin: 20px 0;
  line-height: 1.6;
}

.post-separator {
  border: none;
  height: 1px;
  background-color: #e8e2d9;
  margin: 50px 0;
  width: 100%;
}

/* ===== FEATURED POST VARIANTS ===== */
.featured-post {
  margin-bottom: 20px;
}

.featured-post.first-post {
  margin-bottom: 30px;
}

.featured-post.subsequent-post {
  opacity: 0.95;
}

.featured-post.subsequent-post .post-title {
  font-size: 1.5rem;
}

.featured-post.subsequent-post .post-subtitle {
  font-size: 0.95rem;
}

/* ===== NAVIGATION & LINKS ===== */
.read-more,
.nav-button {
  color: #6b5e4f;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.read-more:hover,
.nav-button:hover {
  border-bottom-color: #6b5e4f;
}

.read-more {
  margin-bottom: 0;
  display: inline-block;
}

.nav-button {
  text-align: center;
}

/* ===== POST NAVIGATION ===== */
.post-nav-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
  position: relative;
  margin-bottom: 20px;
  height: 50px;
}

.post-nav-left {
  position: absolute;
  left: 25%;
  transform: translateX(-50%);
}

.post-nav-right {
  position: absolute;
  right: 25%;
  transform: translateX(50%);
}

/* ===== ARCHIVE PAGE ===== */
.archive-year {
  margin-bottom: 30px;
}

.archive-year h2 {
  font-size: 1.5rem;
  margin: 20px 0 10px 0;
  color: #3d362e;
}

.archive-month {
  margin-bottom: 20px;
}

.archive-entry {
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
}

.archive-entry.first-in-month {
  padding-left: 20px;
}

.archive-month-header {
  font-size: 1.3rem;
  color: #6b5e4f;
  min-width: 100px;
}

.archive-month-spacer {
  min-width: 100px;
}

.archive-date {
  color: #a0907d;
  font-size: 1.2rem;
  min-width: 25px;
}

.archive-link {
  color: #4a453f;
  text-decoration: none;
}

.archive-link:hover {
  color: #3d362e;
}

/* ===== CONTENT AREAS ===== */
.content-body {
  margin: 30px 0;
  line-height: 1.8;
  max-width: 100%;
}

.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4 {
  color: #3d362e;
  margin: 30px 0 15px 0;
  line-height: 1.3;
}

.content-body h1 {
  font-size: 1.8rem;
}

.content-body h2 {
  font-size: 1.5rem;
}

.content-body h3 {
  font-size: 1.3rem;
}

.content-body p {
  margin: 20px 0;
}

.content-body ul,
.content-body ol {
  margin: 20px 0;
  padding-left: 30px;
}

.content-body li {
  margin: 8px 0;
}

.content-body blockquote {
  border-left: 3px solid #e8e2d9;
  padding-left: 20px;
  margin: 25px 0;
  font-style: italic;
  color: #6b5e4f;
}

/* ===== IMAGES ===== */
.post-image {
  text-align: center;
  margin: 30px 0;
}

.post-image img {
  max-width: 100%;
  height: auto;
}

.post-image figcaption {
  display: block !important;
  font-style: italic !important;
  color: #a0907d !important;
  font-size: 1.2rem !important;
  text-align: center !important;
}

/* ===== FOOTER ===== */
.footer-content {
  display: block;
}

.footer-copyright {
  text-align: center;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #f0ebe4;
}

.footer-copyright p {
  color: #a0907d;
  font-size: 0.85rem;
  margin: 0;
}

.rss-link {
  color: #6b5e4f;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.rss-link:hover {
  color: #3d362e;
  text-decoration: underline;
}

.footer-copyright p {
  color: #a0907d;
  font-size: 0.85rem;
  margin: 0;
}

/* ===== CODE STYLES ===== */
code {
  background-color: #45475a; /* Surface1 fallback */
  color: #cdd6f4;
  padding: 2px 5px;
  border-radius: 3px;
  font-family: "Source Code Pro", monospace;
  font-size: 0.9em;
}
/* Inline code */
.content-body code {
  background-color: #313244; /* Catppuccin Surface0 */
  color: #cdd6f4; /* Catppuccin Text */
  padding: 2px 6px;
  border-radius: 3px;
  font-family: "Source Code Pro", monospace;
  font-size: 0.9em;
  border: 1px solid #45475a; /* Catppuccin Surface1 */
}

/* Code blocks */
.content-body pre {
  background-color: #313244; /* Catppuccin Surface0 */
  color: #cdd6f4; /* Catppuccin Text */
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid #45475a; /* Catppuccin Surface1 */
  font-family: "Source Code Pro", monospace;
  font-size: 0.9em;
  line-height: 1.4;
}

.content-body pre code {
  background: none;
  padding: 0;
  border: none;
  color: inherit;
  font-family: "Source Code Pro", monospace;
  font-size: 0.9em;
  line-height: 1.4;
}

.content-body pre ::selection,
.content-body pre code ::selection {
  background: rgba(147, 153, 178, 0.3); /* Catppuccin selection color */
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .container {
    padding: 20px;
  }

  .header-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .site-title {
    font-size: 1.8rem;
  }

  .header-nav {
    width: 100%;
  }

  .header-nav ul {
    justify-content: flex-start;
    gap: 20px;
  }

  .post-title {
    font-size: 1.6rem;
  }

  .post-nav-container {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    height: auto;
  }

  .post-nav-left,
  .post-nav-right {
    position: static;
    transform: none;
  }

  .nav-button {
    display: block;
    text-align: center;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 18px;
  }

  .header-nav ul {
    gap: 15px;
    font-size: 0.9rem;
  }

  .post-image figcaption {
    font-size: 0.9rem !important;
  }

  .footer-content {
    gap: 25px;
  }
}
