html {
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

.hidden {
  display: none;
}

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
}

.topic-link {
  text-decoration: none;
  color: inherit; 
}

.topic-link:hover {
  color: #972d00; 
  font-weight: bold; 
}

.quote-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
  margin-top: 1rem;
}

.quote-link:hover {
  color: #2b00ff; 
  font-weight: bold; 
}

/* Responsive Design - Website*/
@media (min-width: 768px) {
  .menu ul {
      display: flex;
      justify-content: center;
  }

  .menu ul li {
    margin: 0 0.25rem;
    padding: 0.15rem 0;
}

  .content {
    margin-left: 0;
  }

  .sidebar {
    width: 30vw;
  }

  .more-text {
    font-size:1rem
  }

}

/*- Responsive Design - Mobile*/
@media (max-width: 767px) {
  .sidebar {
    width: 100vw;
  }

  .post {
    max-width: 350px;
    margin: 0 auto;
  }

  .excerpt-short p {
    font-size: 1rem;
  }

  .quote {
    font-size: 1rem;
  }

  .post--detail {
    width: 95%;
  }

  .post--detail .quote-body {
    padding: 1.2rem;
    font-size: 1rem;
  }
}

/* Sidebar */
.sidebar {
  transform: translateX(-100%);
  position: fixed;
  min-width: 10rem;
  background: #333;
  color: rgb(255, 255, 255);
  padding-top: 3rem;
  padding-left: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  overflow-y: auto;
  transition: transform 0.3s ease-in-out;
  z-index: 999;
}

.sidebar.active {
  transform: translateX(0);
}

.sidebar h2 {
  font-size: 1.5rem;
}

/* Sidebar point form */
.sidebar ul {
  list-style: none;
  padding: 0;
}

/* Sidebar height */
.sidebar ul li {
  padding: 0.2rem;
}

.sidebar ul li a {
  color: white;
  text-decoration: none;
}

.sidebar-toggle {
  position: fixed;
  top: 1rem;
  left: 1rem;
  background: #c3c0b2;
  color: white;
  border: none;
  padding: 1rem;
  cursor: pointer;
  z-index: 1000;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.sidebar-toggle::before {
  content: "☰"; 
  font-size: 1.8rem;
}

.sidebar-toggle.active::before {
  content: "x";
}

.sidebar-toggle.active {
  background: #333;
}

.sidebar-toggle:hover {
  background: #c8c8bf;
}

.sidebar-toggle.active:hover {
  background: #444;
}

/* Menu toggle */
.menu-toggle {
  display: block;
  background: transparent;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0.25rem 0.6rem;
  margin: 0.25rem auto 0;
}

.menu-toggle:hover {
  opacity: 0.75;
}

.menu {
  display: none;
  background: #c3c0b2;
  text-align: center;
  padding: 0.5rem 0;
}

@media (min-width: 768px) {
  .menu {
    display: block;
  }
}

.menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu ul li {
  padding: 0.5rem;
}

.menu ul li a {
  color: white;
  text-decoration: none;
  display: block;
}

/* Header */
header {
  background-color: #c3c0b2;
  color: white;
  padding: 1.5rem;
  text-align: center;
  position: relative;
  z-index: 999;
}

header h1 {
  margin: 0;
  font-size: clamp(2rem, 2.5vw, 3rem);
}

header h2{
  margin: 0;
  font-size: clamp(0.6rem, 0.7vw, 1rem);
}

/* Main Content */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* main quotes page */
.post {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  width: 85%;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column; /* mobile: stacked */
  font-size: 0.9rem;
  margin: 1.5rem auto;
}

#quotes {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Column 1: book cover + title + author */
.book-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 15px;
  gap: 0.4rem;
}

.book-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.book-author {
  margin: 0;
  font-size: 0.8rem;
  color: #777;
  font-style: italic;
}

/* 3:2 image — matches the majority of the source photos */
.quote-image-wrap {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 4px;
}

.quote-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Column 2: excerpt + link + tags */
.quote-body {
  text-align: left;
  padding: 15px;
}

/* image on quote detail page */
.quote-detail-image-wrap {
  width: 75%;
  max-width: 300px;
  border-radius: 10px;
  margin: 0 auto 1.5rem;
  overflow: hidden;
}

.quote-detail-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.quote-detail-title {
  text-align: center;
  margin: 1.5rem 0 1rem;
  padding: 0 1rem;
  font-size: 1.8rem;
  width: 100%;
  box-sizing: border-box;
}

/* individual quotes page */
.quote {
  text-align: left;
  font-size: 1rem;
  line-height: 1.75;
}

.excerpt-short p {
  font-size: 1rem;
}

.post--detail {
  align-items: center;
  width: 90%;
  padding-bottom: 2.5rem;
}

.excerpt-short p {
  margin: 0 0 0.6em;
}
.excerpt-short p:last-child {
  margin-bottom: 0;
}

.excerpt-short {
  margin-top: 1rem;
}

/* ── Inline expansion on the quotes list ── */

/* Card measure, scoped so books.html keeps its own width */
.quotes-list .post {
  max-width: 820px;
}

.quote-expand {
  margin-top: 1rem;
}

/* The toggle, styled to match .back-link on the detail page */
.quote-expand > summary {
  display: inline-block;
  cursor: pointer;
  font-size: 0.88rem;
  color: #c3c0b2;
  border-bottom: 1px solid #c3c0b2;
  list-style: none;
}

.quote-expand > summary::-webkit-details-marker { display: none; }
.quote-expand > summary:hover { color: #888; border-color: #888; }

.quote-expand .label-less { display: none; }
.quote-expand[open] .label-more { display: none; }
.quote-expand[open] .label-less { display: inline; }

/* Once expanded, the excerpt would just repeat the opening paragraphs */
.post:has(.quote-expand[open]) .excerpt-short { display: none; }

/* ── Desktop: image left, title + quote right ── */
@media (min-width: 768px) {
  .post {
    flex-direction: row;
    align-items: stretch;
  }

  /* Individual quote detail page: always stacked */
  .post--detail {
    flex-direction: column;
    align-items: center;
  }

  .book-info {
    width: 190px;
    flex-shrink: 0;
    border-right: 1px solid #eee;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 15px;
  }

  .quote-image-wrap {
    width: 160px;
    aspect-ratio: 3 / 2;
  }

  .quote-body {
    flex: 1;
    padding: 20px;
  }

  .book-title,
  .book-author {
    display: block;
  }
}

.book-cover {
  display: block;
  max-width: min(100%, 400px);
  max-height: 15rem;
  height: auto;
  width: auto;
  border-radius: 10px;
  margin: 0 auto;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 images per row */
  gap: 0px; /* Space between images */
  justify-items: center;
}

.image-grid a {
  display: block; 
}

.image-grid img {
  max-height: 10rem;
  max-width: 10rem;
  width: auto; 
  height: auto;
  object-fit: contain; 
}


/* Tags */
.tags {
  margin-top: 30px;
}

.tags span {
  display: inline-block;
  background-color: #e0e0e0;
  color: #333;
  padding: 5px 10px;
  border-radius: 5px;
  margin-right: 10px;
  font-size: 0.9rem;
}

.hidden {
  display: none;
}

/* Footer */
footer {
  text-align: center;
  background-color: #333;
  color: white;
  margin-top: 40px;
  padding: 0.5rem;
  width: 100%;
  bottom: 0;
}

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


main {
  padding: 20px;
  text-align: center;
}

/* =====================
   Quote expanded page
   ===================== */

.musings-feed {
  max-width: 820px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

.musing-post {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 1.8rem 2.2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  font-size: 0.95rem;
  line-height: 1.8;
  overflow: hidden;
}

.musing-image-wrap {
  max-width: 85%;
  max-height: 200px;
  border-radius: 8px;
  margin: 0 auto 1.2rem;
}

.musing-image-wrap img {
  display: block;
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  border-radius: 8px;
  margin: 0 auto;
}

.musing-post h2 {
  margin: 0 0 1.2rem;
  font-size: 1.3rem;
  color: #222;
  font-weight: 700;
}

/* Shared by the quote detail page and the inline expansion on the quotes
   list, so the two stay visually identical. */
.quotes-list .post-content {
  font-size: 0.95rem;
  line-height: 1.8;
  margin-top: 1rem;
}

:is(.musing-post, .quotes-list) .post-content p {
  margin: 1rem 0;
  color: #333;
}

:is(.musing-post, .quotes-list) .post-content a {
  color: #c3c0b2;
  word-break: break-word;
}

:is(.musing-post, .quotes-list) .post-content ul,
:is(.musing-post, .quotes-list) .post-content ol {
  padding-left: 1.4rem;
  color: #333;
}

:is(.musing-post, .quotes-list) .post-content blockquote {
  border-left: 3px solid #ddd;
  margin: 0.8rem 0;
  padding: 0.3rem 1rem;
  color: #777;
  font-style: italic;
}

:is(.musing-post, .quotes-list) .post-content code {
  background: #f5f4f0;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.88em;
}

:is(.musing-post, .quotes-list) .post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  margin: 0.75rem auto;
}

.edit-post-link {
  margin-left: 0.75rem;
  font-size: 0.78rem;
  color: #c3c0b2;
  text-decoration: none;
  border-bottom: 1px dashed #c3c0b2;
}

.edit-post-link:hover { color: #888; border-color: #888; }

.back-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: #c3c0b2;
  text-decoration: none;
  border-bottom: 1px solid #c3c0b2;
}

.back-link:hover { color: #888; border-color: #888; }

@media (max-width: 767px) {
  .musing-post {
    padding: 1.2rem 1.2rem;
  }

  .musing-post .post-content p {
    font-size: 1rem;
  }
}
  

  
