/* -------------------------- Fonts -------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Spectral:ital,wght@0,300;0,400;1,300&family=Cormorant+Garamond:wght@300;400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap');

/* -------------------------- Reset -------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  font-family: 'Spectral', serif;
  background-color: #faf9f7;
  color: #333;
}

/* -------------------------- Header -------------------------- */
.site-header {
  text-align: left;
  padding: 2rem;
}

.site-header h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.site-header .intro-text {
  font-size: 1rem;
  line-height: 1.5;
  color: #444;
  max-width: 800px;
}

/* -------------------------- Essay List -------------------------- */
.essay-list {
  display: flex;
  flex-direction: column;
}

/* -------------------------- Essay Preview (4:3 Landscape) -------------------------- */
.essay-preview {
  display: flex;
  width: 100%;
  aspect-ratio: 9 / 3; /* landscape */
  margin: 0;
}

.essay-preview.reverse {
  flex-direction: row-reverse;
}

.essay-image,
.essay-text {
  flex: 0 0 50%;
  height: 100%;
}

/* -------------------------- Images -------------------------- */
.essay-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

/* -------------------------- Text Box -------------------------- */
.essay-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #f2f2f2;
  padding: 2rem;
}

/* -------------------------- Category Label -------------------------- */
.article-index {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #222;
  margin-bottom: 0.8rem;
  display: inline-flex;
  align-items: center;
}

.article-index .after {
  display: inline-flex;
  align-items: center;
  margin-left: 0.4rem;
}

.article-index .after::before {
  content: "●";
  font-size: 0.6em;
  line-height: 1;
  margin-right: 0.3rem;
}

/* -------------------------- Titles & Paragraph -------------------------- */
.essay-text h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 0.8rem;
}

.essay-text h2 a {
  color: #2b2b2b;
  text-decoration: none;
}

.essay-text p {
  font-size: 0.95rem;
  line-height: 1.45;
  color: #444;
  max-width: 90%;
}

/* -------------------------- Footer -------------------------- */
footer {
  padding: 1rem 2rem;
  font-size: 0.9rem;
  color: #222;
}

footer a {
  color: #333;
  text-decoration: none;
}

footer a:hover {
  border-bottom: 1px solid #999;
}

/* -------------------------- Responsive -------------------------- */
@media (max-width: 768px) {

  .essay-preview,
  .essay-preview.reverse {
    flex-direction: column;
    aspect-ratio: auto;
  }

  /* Force consistent image rectangles on mobile */
  .essay-image {
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  .essay-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Text container spacing */
  .essay-text {
    padding: 1.2rem 1.3rem;
    text-align: left;
  }

  /* Category label */
  .article-index {
    text-align: left;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;   /* ← THIS is the key */
    text-transform: uppercase;
    margin-bottom: 0.6rem;
  }

  /* Title */
  .essay-text h2 {
    font-size: 2.0 rem;
    font-weight: 500;
    line-height: 1.15;
  }

  /* Preview paragraph — THIS was missing */
  .essay-text p {
    font-size: 1.0rem;
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: 0.01em;
  }
}

@media (max-width: 480px) {
  .essay-text h2 {
    font-size: 1.5rem;
  }
}