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

:root {
  --bg: #fafaf8;
  --text: #1a1a18;
  --muted: #888884;
  --accent: #2a2a28;
  --sidebar-width: 180px;
  --font-serif: 'Libre Baskerville', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --border: #e5e5e0;
}

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
}

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

/* ─── Sidebar ─── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  padding: 48px 32px 48px 40px;
  position: fixed;
  top: 0;
  left: 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sidebar-name a {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text);
  letter-spacing: -0.01em;
}

.sidebar-name a:hover {
  color: var(--muted);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-nav a {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0.01em;
  transition: color 0.15s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--text);
}

/* ─── Main Content ─── */
.content {
  margin-left: var(--sidebar-width);
  padding: 48px 64px 80px 64px;
  max-width: 720px;
  width: 100%;
}

/* ─── Homepage ─── */
.home-image {
  margin-top: 40px;
  margin-bottom: 32px;
}

.home-image img {
  display: block;
  width: 70%;
  height: auto;
}

.home-image-placeholder {
  width: 70%;
  aspect-ratio: 3 / 1;
  background: var(--border);
}

.home-intro {
  padding-top: 0;
}

.home-intro p {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
  max-width: 360px;
}

/* ─── Section Headers ─── */
.section-header {
  margin-bottom: 40px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.section-header h1 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── Book List ─── */
.book-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.book-card {
  display: flex;
  gap: 28px;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.book-card-cover-link {
  flex-shrink: 0;
}

.book-card-cover {
  width: 90px;
  height: auto;
  display: block;
  box-shadow: 0 2px 10px rgba(0,0,0,0.13);
}

.book-card-body {
  flex: 1;
  min-width: 0;
}

.book-card-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-bottom: 5px;
  transition: opacity 0.15s ease;
}

.book-card-title:hover { opacity: 0.65; }

.book-card-author {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 300;
  margin-bottom: 14px;
}

.book-card-review {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  line-height: 1.85;
  color: var(--text);
}

.book-card-review p { margin-bottom: 1em; }
.book-card-review p:last-child { margin-bottom: 0; }

/* ─── Book Single Page ─── */
.book-single {
  max-width: 580px;
}

.book-single .book-cover {
  width: 100px;
  height: auto;
  margin-bottom: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

.book-single .book-meta {
  margin-bottom: 28px;
}

.book-single .book-meta h1 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
}

.book-single .book-meta .author {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 300;
}

.book-single .review {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
}

.book-single .review p { margin-bottom: 1.2em; }

/* ─── Podcast List ─── */
.podcast-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.podcast-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.15s ease;
}

.podcast-item:hover { opacity: 0.65; }

.podcast-item a.podcast-link {
  display: block;
}

.podcast-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 3px;
}

.podcast-show {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 300;
}

.podcast-note {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 300;
}

/* ─── Writing List ─── */
.writing-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.writing-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.15s ease;
}

.writing-item:hover { opacity: 0.65; }

.writing-item a {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.writing-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--text);
  flex: 1;
}

.writing-date {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 300;
  white-space: nowrap;
}

/* ─── Writing Single ─── */
.writing-single {
  max-width: 580px;
}

.writing-single .writing-meta {
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.writing-single .writing-meta h1 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}

.writing-single .writing-meta .date {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 300;
}

.writing-single .body {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.85;
}

.writing-single .body p { margin-bottom: 1.3em; }
.writing-single .body h2 { font-size: 1.05rem; margin: 2em 0 0.6em; }
.writing-single .body blockquote {
  border-left: 2px solid var(--border);
  padding-left: 16px;
  color: var(--muted);
  margin: 1.5em 0;
}

/* ─── Links ─── */
.links-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.link-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.link-item a.link-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
  transition: opacity 0.15s ease;
}

.link-item a.link-title:hover { opacity: 0.65; }

.link-item .link-note {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 300;
}

.link-item .link-source {
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.6;
  margin-top: 3px;
}

/* ─── Quotes ─── */
.quotes-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.quote-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.quote-text {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
  font-style: italic;
  margin-bottom: 10px;
}

.quote-author {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 300;
}

/* ─── About ─── */
.about-body {
  max-width: 520px;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.85;
}

.about-body p { margin-bottom: 1.3em; }

.about-body a {
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.15s ease;
}

.about-body a:hover { border-color: var(--text); }

/* ─── Back link ─── */
.back {
  display: inline-block;
  margin-bottom: 32px;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  transition: color 0.15s ease;
}

.back:hover { color: var(--text); }

/* ─── Mobile ─── */
@media (max-width: 640px) {
  body { flex-direction: column; }

  .sidebar {
    width: 100%;
    min-height: unset;
    position: static;
    padding: 28px 24px 20px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    align-items: center;
    gap: 24px;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 16px;
  }

  .content {
    margin-left: 0;
    padding: 32px 24px 60px;
  }
}
