/* =============================================
   biblioteca-de-hassi — análisis literarios
   ============================================= */

:root {
  --bg:          #f9f8f6;
  --bg-alt:      #f0eee9;
  --text:        #1a1a1a;
  --text-muted:  #5a5a5a;
  --h1:          #5b2d8e;
  --h2:          #7c3fbf;
  --h3:          #9b5fd4;
  --accent:      #7c3fbf;
  --link:        #7c3fbf;
  --link-hover:  #5b2d8e;
  --border:      #c9a8e8;
  --quote-bg:    #f3ecfb;
  --quote-border:#9b5fd4;
}

[data-theme="dark"] {
  --bg:          #0d0d0d;
  --bg-alt:      #161616;
  --text:        #e8e8e8;
  --text-muted:  #999;
  --h1:          #c084fc;
  --h2:          #a855f7;
  --h3:          #9b5fd4;
  --accent:      #a855f7;
  --link:        #c084fc;
  --link-hover:  #e0aaff;
  --border:      #5b2d8e;
  --quote-bg:    #1a0f26;
  --quote-border:#7c3fbf;
}

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

html { font-size: 18px; scroll-behavior: smooth; }

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  transition: background 0.3s, color 0.3s;
}

/* ---- layout ---- */
.site-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* ---- header ---- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 3rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.site-title {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
}
.site-title:hover { color: var(--link-hover); }

/* ---- dark mode toggle ---- */
#toggle-theme {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border-radius: 2rem;
  transition: border-color 0.2s, color 0.2s;
  font-family: inherit;
  letter-spacing: 0.04em;
}
#toggle-theme:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- headings ---- */
h1 { font-size: 2rem; color: var(--h1); font-weight: normal; line-height: 1.25; }
h2 { font-size: 1.35rem; color: var(--h2); font-weight: normal; margin-top: 2.5rem; margin-bottom: 0.6rem; }
h3 { font-size: 1.05rem; color: var(--h3); font-weight: bold; margin-top: 1.8rem; margin-bottom: 0.4rem; }

/* ---- index: book list ---- */
.reading-list { list-style: none; margin-top: 1rem; }

.reading-entry {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}
.reading-entry:first-child { border-top: 1px solid var(--border); }

.book-title {
  font-size: 1.55rem;
  color: var(--h1);
  font-weight: normal;
  line-height: 1.2;
  margin-bottom: 0.15rem;
}

.book-author {
  font-size: 0.9rem;
  color: var(--h3);
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

.book-summary {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  max-width: 55ch;
}

.read-link {
  font-size: 0.85rem;
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}
.read-link:hover {
  color: var(--link-hover);
  border-color: var(--link-hover);
}

/* ---- analysis page ---- */
.analysis-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.analysis-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.3rem;
}

.analysis-year {
  font-size: 0.82rem;
  color: var(--h3);
  letter-spacing: 0.05em;
}

.analysis-body p {
  margin-bottom: 1.1rem;
}

.analysis-body h2 { border-bottom: 1px solid var(--border); padding-bottom: 0.4rem; }

blockquote {
  background: var(--quote-bg);
  border-left: 3px solid var(--quote-border);
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
}

blockquote p { margin: 0; }

/* ---- general links ---- */
a { color: var(--link); }
a:hover { color: var(--link-hover); }

.back-link {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 2rem;
  letter-spacing: 0.03em;
}
.back-link:hover { color: var(--link); }
.back-link::before { content: "← "; }

/* ---- footer ---- */
.site-footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* ---- responsive ---- */
@media (max-width: 480px) {
  html { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  .book-title { font-size: 1.3rem; }
}
