:root {
  --max: 720px;
  --fg: #111;
  --muted: #666;
  --bd: #ddd;
  --bg: #fff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 "Times New Roman", Times, serif;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
  text-align: left;
}

header.site {
  max-width: var(--max);
  margin: 3rem auto 0.5rem;
  text-align: center;
  font-style: normal;
}

/* --- Main navigation (Home · Essays · Poems · About) --- */
.main-nav {
  display: inline-flex;
  gap: 0.6rem;
  justify-content: center;
  font-style: normal;
  font-size: 1.1rem;
  letter-spacing: 0.3px;
}

.main-nav a {
  color: inherit;
  text-decoration: none;
}

.main-nav a:hover {
  text-decoration: underline;
}

nav {
  margin-top: 1rem;
  font-style: normal;
}

.posts article {
  padding: 0;
  border-top: none;
  margin: 0;  
}
.posts article:first-of-type {
  border-top: none;
}

h1 {
  font-weight: normal;
  font-style: normal;
  font-size: 1rem;
  margin: 0 0 0.4rem 0;
  line-height: 1.3;
}

h2, h3 {
  font-weight: normal;
  font-style: normal;
  font-size: 1.7rem;
  margin: 0 0 0.3rem 0;
  line-height: 1.3;
}

/* --- Balanced header sizes --- */
.wrap > h2 {
  font-size: 1.8rem;      /* section/page headers: Recent, Essays, Poems, etc. */
  font-style: normal;
  margin-bottom: 0.8rem;
  letter-spacing: 0.15px;
}

.posts .post-body h2 {
  font-size: 1.4rem;      /* preview titles */
  font-style: normal;
  margin-bottom: 0.3rem;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.3rem 0;
}

footer.site {
  max-width: var(--max);
  margin: 0.1rem auto;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
footer.site .icon img {
  width: 20px;
  height: 20px;
  margin: 0 0.4rem;
  vertical-align: middle;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
footer.site .icon img:hover { opacity: 1; }

.signature {
  max-width: 150px;
  height: auto;
  display: block;
  margin: 0 auto 0.5rem auto;
  padding: 0;
}

/* simple intro text if you add one later */
.intro {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 0.8rem 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
@media (max-width: 640px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  transition: opacity 0.3s ease;
}
.gallery img:hover { opacity: 0.9; }
.gallery figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: normal;
  margin-top: 0.5rem;
}

.post-image {
  text-align: center;
  margin: 0 rem 0 rem 0;
}
.post-image img {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: 8px;
  opacity: 0.95;
  transition: opacity 0.3s ease;
}
.post-image img:hover { opacity: 1; }
.post-image figcaption {
  margin-top: 0rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: normal;
}

/* --- Post list with thumbnail on the RIGHT (desktop) --- */
.posts .post {
  display: grid;
  grid-template-columns: 1fr 120px;  /* text | image */
  gap: 0.7rem;
  align-items: start;
  padding: 0.3rem 0;       /* tightened */
}

.posts .post + .post {
  margin-top: 0.2rem;      /* much tighter gap */
}

.posts .thumb img {
  width: 100%;
  max-width: 160px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
}

.epigraph {
  text-align: left;
  font-style: italic;
  margin: 2rem 0;
  line-height: 1.6;
}
.epigraph-author {
  display: block;
  margin-top: 0.5rem;
  margin-left: 2.5rem;
  font-style: normal;
}

/* --- MOBILE LAYOUT --- */
@media (max-width: 640px) {

  .wrap {
    padding: 0.6rem 0.9rem 2rem;
  }

  .main-nav {
    font-size: 0.83rem;
    gap: 0.32rem;
    flex-wrap: wrap;
  }

  .posts {
    margin-top: 0.3rem;
  }

  .posts .post {
    grid-template-columns: 2.4fr 1fr;  /* text | thumb */
    gap: 0.3rem;
    padding: 0.25rem 0;
    margin-top: 0.15rem;
  }

  .posts .thumb {
    order: 0;
    max-width: 100px;   /* was 80px */
    margin: 0;
    justify-self: end;
  }

  .posts .thumb img {
    width: 100%;
    height: auto;
    border-radius: 4px;
  }

  /* smaller preview titles on mobile */
    .posts .post-body h2 {
    font-size: 0.975rem;      /* 75% of 1.3rem */
    line-height: 1.25;
    font-weight: normal;
    margin: 0 0 0.06rem 0;
  }

  .wrap > h2 {
    font-size: 1.3rem;     /* smaller section headers on mobile */
    margin-bottom: 0.5rem;
  }

  .meta {
  font-size: 0.72rem;
  margin: 0 0 0.05rem 0;   /* much tighter below */
  line-height: 1.1;
}

.post-body p {
  font-size: 0.8rem;
  line-height: 1.3;
  margin-top: 0.1rem;       /* gentle, consistent gap */
  margin-bottom: 0;
}

  h2 {
    margin-bottom: 0.18rem;
  }

  .post-image {
    margin: 0.5rem 0 0.8rem 0;
  }

  .post-image img {
    max-width: 180px;
  }

  .post-image figcaption {
    margin-top: 0.3rem;
    font-size: 0.75rem;
  }

  .signature {
    max-width: 120px;      /* smaller logo on mobile */
  }
}

