/* ==========================================================================
   BUKU ISPARMO — STYLE SYSTEM
   Personal Publishing Catalog Design System
   https://buku.isparmo.com
   ========================================================================== */

:root {
  /* Brand Palette */
  --primary: #111111;
  --primary-hover: #262626;
  --accent: #F97316;
  --accent-hover: #EA580C;
  --accent-light: #FFF7ED;
  --accent-border: #FFEDD5;
  --background: #FAFAF7;
  --surface: #FFFFFF;
  --surface-subtle: #F4F4F0;
  --text: #171717;
  --muted: #666666;
  --muted-light: #8E8E8E;
  --border: #E5E5E5;
  --border-subtle: #ECECE8;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Elevation & Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 16px -2px rgba(0, 0, 0, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 16px 32px -4px rgba(0, 0, 0, 0.1), 0 6px 12px -2px rgba(0, 0, 0, 0.05);
  --shadow-book: 0 8px 24px -4px rgba(17, 17, 17, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
  --shadow-book-lg: 0 20px 40px -8px rgba(17, 17, 17, 0.22), 0 4px 12px rgba(0, 0, 0, 0.08);

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);

  /* Container */
  --container-max: 1200px;
  --container-narrow: 840px;
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--background);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--background);
  color: var(--text);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.main-content {
  flex: 1 0 auto;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.625rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 620px;
  line-height: 1.6;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(250, 250, 247, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition-base), background-color var(--transition-base);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
  background-color: rgba(255, 255, 255, 0.98);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: var(--primary);
  text-transform: uppercase;
}

.brand-logo .brand-mark {
  width: 8px;
  height: 22px;
  background-color: var(--accent);
  border-radius: 2px;
}

.brand-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  padding: 0.5rem 0;
  transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent);
  border-radius: 2px;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  color: var(--primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.mobile-toggle:hover {
  background-color: var(--surface);
  border-color: var(--muted);
}

.mobile-drawer {
  display: none;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-md);
}

.mobile-drawer.open {
  display: block;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav-link {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  display: block;
  padding: 0.5rem 0;
}

.mobile-nav-link:hover {
  color: var(--accent);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 4.5rem 0 3.5rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-title {
  font-size: 3.125rem;
  font-weight: 900;
  letter-spacing: -0.035em;
  color: var(--primary);
  margin-bottom: 1rem;
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.hero-desc {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Visual fan/stack for hero */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}

.hero-cover-stack {
  position: relative;
  width: 230px;
  height: 340px;
}

.hero-stack-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-book);
  overflow: hidden;
  background-color: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.hero-stack-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-stack-card.card-1 {
  transform: rotate(-7deg) translate(-36px, 14px);
  z-index: 1;
}

.hero-stack-card.card-2 {
  transform: rotate(5deg) translate(36px, 20px);
  z-index: 2;
}

.hero-stack-card.card-main {
  transform: rotate(0deg) translate(0, 0);
  z-index: 3;
  box-shadow: var(--shadow-book-lg);
}

.hero-visual:hover .hero-stack-card.card-1 {
  transform: rotate(-11deg) translate(-50px, 10px);
}

.hero-visual:hover .hero-stack-card.card-2 {
  transform: rotate(9deg) translate(50px, 18px);
}

.hero-visual:hover .hero-stack-card.card-main {
  transform: translateY(-8px) scale(1.02);
}

/* ==========================================================================
   Featured Book Section
   ========================================================================== */
.featured-section {
  padding: 4rem 0;
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.featured-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3.5rem;
  align-items: center;
  background: linear-gradient(135deg, #FFFFFF 0%, #FAFAF8 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.75rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--accent);
}

.featured-cover-wrapper {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.featured-cover-link {
  display: block;
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-book-lg);
  aspect-ratio: 2 / 3;
  background-color: var(--surface-subtle);
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.featured-cover-link:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -10px rgba(0, 0, 0, 0.25);
}

.featured-cover-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-info {
  display: flex;
  flex-direction: column;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.875rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-pill);
  line-height: 1.3;
}

.badge-accent {
  background-color: var(--accent-light);
  color: var(--accent-hover);
  border: 1px solid var(--accent-border);
}

.badge-neutral {
  background-color: var(--surface-subtle);
  color: var(--muted);
  border: 1px solid var(--border);
}

.badge-free {
  background-color: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
}

.featured-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.35rem;
  line-height: 1.25;
}

.featured-title a:hover {
  color: var(--accent);
}

.featured-subtitle {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 1rem;
}

.book-author-meta {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.book-author-meta strong {
  color: var(--primary);
}

.featured-resume {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 1.75rem;
}

.featured-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.75rem 1.375rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  line-height: 1.3;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--surface);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: var(--surface);
  box-shadow: var(--shadow-sm);
}

.btn-accent {
  background-color: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

.btn-outline {
  background-color: var(--surface);
  color: var(--primary);
  border-color: var(--border);
}

.btn-outline:hover {
  background-color: var(--surface-subtle);
  border-color: var(--muted);
  color: var(--primary);
}

.btn-lynk {
  background-color: #6366F1;
  color: #FFFFFF;
  border-color: #6366F1;
}

.btn-lynk:hover {
  background-color: #4F46E5;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-sm {
  padding: 0.5rem 0.875rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1.05rem;
}

/* ==========================================================================
   Catalog Section
   ========================================================================== */
.catalog-section {
  padding: 4.5rem 0 5.5rem;
}

.catalog-header {
  margin-bottom: 2rem;
}

/* Search, Filter & Sort Controls */
.catalog-controls {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.25rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.search-and-sort-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

.search-box-wrapper {
  position: relative;
  flex: 1 1 320px;
  max-width: 480px;
}

.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-light);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 44px;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  font-size: 0.9375rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
  outline: none;
}

.clear-search-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1rem;
  line-height: 1;
  display: none;
}

.clear-search-btn.visible {
  display: block;
}

.sort-wrapper {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.sort-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.sort-select {
  height: 44px;
  padding: 0.5rem 2rem 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
  transition: border-color var(--transition-fast);
}

.sort-select:focus {
  border-color: var(--accent);
  outline: none;
}

/* Category Filter Pills */
.filter-pills-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--muted);
  color: var(--primary);
}

.filter-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

/* Results Count Bar */
.results-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.results-count {
  font-weight: 600;
  color: var(--primary);
}

/* ==========================================================================
   Book Cards Grid
   ========================================================================== */
.books-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.875rem;
}

.book-card {
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
  position: relative;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 0, 0, 0.15);
}

.card-cover-container {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  margin-bottom: 1.15rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--surface-subtle);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-book);
}

.card-cover-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.book-card:hover .card-cover-container img {
  transform: scale(1.03);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}

.card-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
}

.card-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.card-pages {
  font-size: 0.75rem;
  color: var(--muted-light);
  white-space: nowrap;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--primary);
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a:hover {
  color: var(--accent);
}

.card-author {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.card-resume {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1 0 auto;
}

.card-footer {
  margin-top: auto;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border-subtle);
}

.card-footer .btn {
  width: 100%;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  background-color: var(--surface);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  grid-column: 1 / -1;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.empty-state-desc {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   About Author Section
   ========================================================================== */
.about-section {
  padding: 4.5rem 0;
  background-color: var(--surface);
  border-top: 1px solid var(--border);
}

.about-card {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-tag {
  margin-bottom: 0.75rem;
}

.about-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.about-bio {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 2rem;
}

.about-action {
  display: inline-block;
}

/* ==========================================================================
   Detail Page Layout (book.html)
   ========================================================================== */
.breadcrumb-nav {
  padding: 1.5rem 0 0.5rem;
}

.breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.breadcrumb-link:hover {
  color: var(--primary);
  border-color: var(--muted);
}

.book-detail-wrapper {
  padding: 2rem 0 5rem;
}

.detail-hero-card {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 3.5rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 3rem;
}

.detail-cover-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.detail-cover-wrapper {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-book-lg);
  background-color: var(--surface-subtle);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.detail-cover-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.detail-header-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.detail-title {
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 1.2;
  color: var(--primary);
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

.detail-subtitle {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 1.25rem;
}

.detail-author-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.detail-author-row strong {
  color: var(--primary);
}

.detail-resume-lead {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 2rem;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: auto;
}

/* Detail Subsections */
.detail-sections-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.detail-main-col {
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}

.detail-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.detail-block {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  box-shadow: var(--shadow-xs);
}

.detail-block-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1.25rem;
  position: relative;
  display: inline-block;
}

.detail-block-title::after {
  content: '';
  position: absolute;
  bottom: -0.35rem;
  left: 0;
  width: 2rem;
  height: 2px;
  background-color: var(--accent);
}

.detail-block p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}

/* Audience and Topics list */
.audience-list,
.topics-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  list-style: none;
}

.audience-item,
.topic-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
}

.audience-bullet,
.topic-bullet {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 0.15rem;
}

/* Sidebar Information Box */
.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table tr {
  border-bottom: 1px solid var(--border-subtle);
}

.info-table tr:last-child {
  border-bottom: none;
}

.info-table th {
  text-align: left;
  padding: 0.875rem 0.5rem 0.875rem 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  width: 42%;
}

.info-table td {
  padding: 0.875rem 0 0.875rem 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

/* Error / Not Found View */
.not-found-card {
  text-align: center;
  padding: 5rem 2rem;
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  max-width: 600px;
  margin: 3rem auto;
}

.not-found-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.not-found-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.not-found-desc {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: var(--primary);
  color: #FAFAF7;
  padding: 4rem 0 2.5rem;
  border-top: 1px solid #222222;
  margin-top: auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #262626;
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 380px;
}

.footer-logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #FFFFFF;
  margin-bottom: 0.75rem;
}

.footer-tagline {
  font-size: 0.9375rem;
  color: #A3A3A3;
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.footer-link {
  font-size: 0.9375rem;
  color: #D4D4D4;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #737373;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Tablet & Smaller Desktops */
@media (max-width: 1024px) {
  .books-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .featured-card {
    grid-template-columns: 260px 1fr;
    gap: 2.5rem;
    padding: 2rem;
  }

  .hero-grid {
    gap: 2rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .detail-hero-card {
    grid-template-columns: 300px 1fr;
    gap: 2.5rem;
    padding: 2rem;
  }

  .detail-sections-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Mobile Devices */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .hero-section {
    padding: 3rem 0 2rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-content {
    align-items: stretch;
    text-align: left;
  }

  .hero-title {
    font-size: 2.15rem;
  }

  .hero-subtitle {
    font-size: 1.15rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-visual {
    min-height: 280px;
  }

  .hero-cover-stack {
    width: 180px;
    height: 270px;
  }

  .featured-card {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.75rem;
  }

  .featured-cover-wrapper {
    max-width: 220px;
  }

  .featured-title {
    font-size: 1.5rem;
  }

  .featured-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .featured-actions .btn {
    width: 100%;
  }

  .books-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .search-and-sort-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box-wrapper {
    max-width: 100%;
  }

  .sort-wrapper {
    width: 100%;
    justify-content: space-between;
  }

  .sort-select {
    flex: 1;
  }

  .detail-hero-card {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    gap: 2rem;
  }

  .detail-cover-wrapper {
    max-width: 240px;
  }

  .detail-title {
    font-size: 1.75rem;
  }

  .detail-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-actions .btn {
    width: 100%;
  }

  .detail-block {
    padding: 1.5rem;
  }

  .footer-top {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-nav {
    flex-direction: column;
    gap: 1rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Very Small Mobile */
@media (max-width: 380px) {
  .hero-title {
    font-size: 1.85rem;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
