/* سال‌شمار تاریخ استان بوشهر — Mobile-First Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --primary: #5B3A29;
  --primary-light: #7a5240;
  --primary-dark: #3D2517;
  --secondary: #C4923A;
  --secondary-light: #d4a84e;
  --secondary-dark: #a87c2e;
  --accent: #8B1A1A;
  --accent-light: #a83232;
  --bg: #FAF6F0;
  --surface: #FFFDF9;
  --text: #2C1810;
  --text-light: #6B5244;
  --text-muted: #9A8577;
  --border: #DDD0C2;
  --border-light: #EDE5DA;
  --overlay: rgba(61, 37, 23, 0.88);
  --overlay-dark: rgba(0, 0, 0, 0.6);
  --edition-1: #C4923A;
  --edition-2: #8B5E3C;
  --edition-3: #6B7B3A;
  --edition-4: #8B1A1A;
  --font-family: 'Vazirmatn', sans-serif;
  --fs-hero: clamp(2rem, 5vw, 3.5rem);
  --fs-h1: clamp(1.75rem, 4vw, 2.75rem);
  --fs-h2: clamp(1.5rem, 3vw, 2.25rem);
  --fs-h3: clamp(1.15rem, 2vw, 1.5rem);
  --fs-h4: 1.15rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-xs: 0.8rem;
  --lh-tight: 1.3;
  --lh-normal: 1.6;
  --lh-relaxed: 1.8;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --section-py: clamp(48px, 8vw, 120px);
  --container: 1200px;
  --container-narrow: 900px;
  --container-wide: 1400px;
  --sidebar-w: 80px;
  --sidebar-w-expanded: 240px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;
  --shadow-xs: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.12);
  --transition: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-fast: 0.15s ease;
}

body.dark {
  --primary: #8B6F5A;
  --primary-light: #a68972;
  --primary-dark: #5B3A29;
  --bg: #141010;
  --surface: #1e1815;
  --text: #e8ddd4;
  --text-light: #b0a090;
  --text-muted: #7a6a5a;
  --border: #332820;
  --border-light: #2a201a;
  --shadow-xs: 0 1px 3px rgba(0,0,0,0.25);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.5);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-family);
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  color: var(--text);
  background-color: var(--bg);
  direction: rtl;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition), color var(--transition);
  position: relative;
  z-index: 1;
}

/* Aged parchment texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.8;
}

a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--secondary); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { font-family: var(--font-family); cursor: pointer; border: none; background: none; font-size: inherit; color: inherit; }
input, textarea, select { font-family: var(--font-family); font-size: inherit; color: inherit; }
::selection { background: var(--secondary); color: var(--primary-dark); }
:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }

blockquote {
  border-right: 4px solid var(--secondary);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-xl) 0;
  background: rgba(196,146,58,0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-light);
  font-style: italic;
  line-height: var(--lh-relaxed);
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--space-lg); }
.container-narrow { width: 100%; max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--space-lg); }
.section { padding: var(--section-py) 0; }
.section-surface { background: var(--surface); }
.text-center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: var(--lh-tight); color: var(--text); }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
p { margin-bottom: var(--space-md); line-height: var(--lh-relaxed); }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }

.section-title {
  text-align: center;
  margin-bottom: var(--space-3xl);
  position: relative;
}
.section-title .accent-line {
  display: block;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--secondary), transparent);
  margin: 0 auto var(--space-lg);
  position: relative;
}
.section-title .accent-line::before {
  content: '\25C6  \25C6  \25C6';
  display: block;
  text-align: center;
  color: var(--secondary);
  font-size: 0.4rem;
  margin-top: -5px;
  letter-spacing: 6px;
  opacity: 0.7;
}
.section-title h2 {
  margin-bottom: var(--space-sm);
  position: relative;
  display: inline-block;
}
/* Decorative underline on h2 */
.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: var(--secondary);
  border-radius: 1px;
}
.section-title p {
  color: var(--text-light);
  font-size: var(--fs-body);
  max-width: 600px;
  margin: var(--space-md) auto 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 32px;
  font-size: var(--fs-body);
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.btn:hover::after { transform: translateX(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
  color: var(--primary-dark);
  box-shadow: 0 4px 15px rgba(196,146,58,0.3);
}
.btn-primary:hover {
  color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(196,146,58,0.4);
}
.btn-outline {
  background: transparent;
  color: var(--secondary);
  border: 2px solid rgba(196,146,58,0.4);
  backdrop-filter: blur(5px);
}
.btn-outline:hover {
  background: rgba(196,146,58,0.1);
  border-color: var(--secondary);
  transform: translateY(-3px);
}
.btn-white { background: var(--surface); color: var(--primary); }
.btn-white:hover { color: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-sm { padding: 10px 22px; font-size: var(--fs-small); }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

.card { background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: all var(--transition); }
.card:hover { transform: translateY(-6px); box-shadow: 0 8px 32px rgba(196,146,58,0.12), 0 4px 16px rgba(0,0,0,0.08); }

.book-card {
  background: var(--surface);
  border-radius: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm), 0 1px 0 rgba(196,146,58,0.1);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid rgba(196,146,58,0.08);
}
.book-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 40px rgba(196,146,58,0.08);
  border-color: rgba(196,146,58,0.2);
}

/* Edition-colored edge stripe */
.book-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 4px;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 10;
}
.book-card:nth-child(1)::before { background: linear-gradient(180deg, var(--edition-1), var(--secondary-dark)); }
.book-card:nth-child(2)::before { background: linear-gradient(180deg, var(--edition-2), #6B4226); }
.book-card:nth-child(3)::before { background: linear-gradient(180deg, var(--edition-3), #4A5B2A); }
.book-card:nth-child(4)::before { background: linear-gradient(180deg, var(--edition-4), #5A1010); }
.book-card:hover::before { opacity: 1; }

/* Page curl effect */
.book-card::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 0; height: 0;
  background: linear-gradient(225deg, var(--bg) 45%, transparent 46%);
  transition: all 0.4s ease;
  z-index: 5;
}
.book-card:hover::after { width: 50px; height: 50px; }

.book-card-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.book-card-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.book-card:hover .book-card-cover img { transform: scale(1.08) rotate(-1deg); }

/* Book spine shadow */
.book-card-cover::before {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 15px;
  background: linear-gradient(to left, rgba(0,0,0,0.35), rgba(0,0,0,0.1), transparent);
  z-index: 3;
}

.book-card-info { padding: var(--space-xl); flex: 1; display: flex; flex-direction: column; }
.book-card-info h3 { margin-bottom: var(--space-xs); transition: color 0.3s ease; }
.book-card:hover .book-card-info h3 { color: var(--primary); }
.book-card-info .book-year { color: var(--secondary-dark); font-weight: 600; font-size: var(--fs-small); margin-bottom: var(--space-sm); letter-spacing: 0.03em; }
.book-card-info p { color: var(--text-light); font-size: var(--fs-small); flex: 1; }

.book-card:nth-child(1) .book-card-cover { border-top: 3px solid var(--edition-1); }
.book-card:nth-child(2) .book-card-cover { border-top: 3px solid var(--edition-2); }
.book-card:nth-child(3) .book-card-cover { border-top: 3px solid var(--edition-3); }
.book-card:nth-child(4) .book-card-cover { border-top: 3px solid var(--edition-4); }


/* =========================
   Book Cards
========================= */

.book-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 16px;
  overflow: hidden;
}


/* جلد منتشر شده */

.book-card-active {
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.book-card-active:hover {
  transform: translateY(-8px);
}

.book-card-active .book-card-cover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.3s ease;
}

.book-card-active:hover .book-card-cover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}


/* تصویر جلد */

.book-card-cover {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.book-card-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 300 / 420;
  object-fit: cover;
}


/* وضعیت انتشار */

.book-status {
  position: absolute;
  top: 14px;
  right: 14px;

  padding: 7px 13px;

  border-radius: 999px;

  font-size: 13px;
  font-weight: 600;

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}


/* منتشر شده */

.book-status.published {
  background: rgba(255, 255, 255, 0.95);
  color: #1f7a4d;
}


/* به زودی */

.book-status.coming-soon {
  background: rgba(30, 30, 30, 0.75);
  color: #fff;
}


/* دکمه‌ای که روی جلد اول ظاهر می‌شود */

.book-card-action {
  position: absolute;

  left: 50%;
  bottom: 20px;

  transform: translate(-50%, 15px);

  display: flex;
  align-items: center;
  gap: 8px;

  padding: 10px 18px;

  background: rgba(255, 255, 255, 0.95);
  color: #222;

  border-radius: 999px;

  font-size: 14px;
  font-weight: 600;

  opacity: 0;

  transition:
    opacity 0.3s ease,
    transform 0.3s ease;

  white-space: nowrap;
}

.book-card-active:hover .book-card-action {
  opacity: 1;
  transform: translate(-50%, 0);
}


/* اطلاعات کتاب */

.book-card-info {
  padding: 18px 4px;
}

.book-year {
  font-size: 13px;
  color: #777;
}

.book-card-info h3 {
  margin: 7px 0;

  font-size: 18px;
  line-height: 1.7;
}

.book-card-info p {
  margin: 0;

  font-size: 14px;
  color: #777;
  line-height: 1.8;
}

/* ==============================
   Book Guide
================================ */

.book-guide {
  padding: 90px 20px;
  background: #faf9f6;
  color: #24303a;
}

.book-guide-container {
  max-width: 900px;
  margin: 0 auto;
}


/* Header */

.book-guide-header {
  text-align: center;
  margin-bottom: 55px;
}

.book-guide-label {
  display: inline-block;

  padding: 6px 16px;
  margin-bottom: 16px;

  border: 1px solid rgba(40, 60, 75, 0.15);
  border-radius: 50px;

  font-size: 13px;
  color: #7a684c;
  background: #fff;
}

.book-guide-header h1 {
  margin: 0;

  font-size: 32px;
  font-weight: 700;
  line-height: 1.7;

  color: #172b3a;
}

.book-guide-divider {
  width: 55px;
  height: 3px;

  margin: 20px auto;

  border-radius: 10px;
  background: #a88a55;
}

.book-guide-header > p {
  max-width: 680px;
  margin: 0 auto;

  font-size: 17px;
  line-height: 2.2;

  color: #69727a;
}


/* Items */

.book-guide-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}


/* Individual card */

.book-guide-item {
  display: flex;
  gap: 22px;

  padding: 30px;

  background: #ffffff;

  border: 1px solid rgba(40, 50, 60, 0.08);
  border-radius: 18px;

  box-shadow: 0 5px 25px rgba(30, 40, 50, 0.04);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.book-guide-item:hover {
  transform: translateY(-3px);

  box-shadow: 0 10px 30px rgba(30, 40, 50, 0.08);
}


/* Number */

.book-guide-number {
  flex: 0 0 48px;

  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #172b3a;
  color: #ffffff;

  font-size: 18px;
  font-weight: 700;

  box-shadow: 0 4px 12px rgba(23, 43, 58, 0.18);
}


/* Content */

.book-guide-content {
  flex: 1;
}

.book-guide-content h2 {
  display: flex;
  align-items: center;
  gap: 10px;

  margin: 0 0 15px;

  font-size: 21px;
  color: #172b3a;
}

.book-guide-icon {
  color: #a88a55;
  font-size: 21px;
}


.book-guide-content p {
  margin: 0 0 12px;

  font-size: 16px;
  line-height: 2.15;

  color: #59636b;
}

.book-guide-content p:last-child {
  margin-bottom: 0;
}

.book-guide-content strong {
  color: #283d4c;
  font-weight: 700;
}


/* Source note */

.book-guide-note {
  margin-top: 22px;
  padding: 18px 20px;

  border-right: 3px solid #a88a55;

  background: #faf8f2;
  border-radius: 8px;
}

.book-guide-note strong {
  display: block;
  margin-bottom: 6px;

  color: #7a684c;
}

.book-guide-note p {
  margin: 0;
  font-size: 14px;
  line-height: 2;
}


/* Last source box */

.book-guide-source {
  margin-top: 18px;
  padding: 12px 16px;

  font-size: 14px;
  line-height: 1.9;

  color: #7a684c;

  background: #faf8f2;
  border-radius: 8px;
}


/* Responsive */

@media (max-width: 700px) {

  .book-guide {
    padding: 60px 15px;
  }

  .book-guide-header h1 {
    font-size: 25px;
  }

  .book-guide-header > p {
    font-size: 15px;
  }

  .book-guide-item {
    gap: 15px;
    padding: 22px;
  }

  .book-guide-number {
    flex-basis: 40px;
    width: 40px;
    height: 40px;

    font-size: 15px;
  }

  .book-guide-content h2 {
    font-size: 19px;
  }

  .book-guide-content p {
    font-size: 15px;
    line-height: 2;
  }

}

/* =========================
   جلدهای منتشر نشده
========================= */

.book-card-disabled {
  cursor: default;
  opacity: 0.65;
}

.book-card-disabled .book-card-cover {
  filter: grayscale(35%);
}

.book-card-disabled .book-card-info {
  opacity: 0.8;
}


/* متن مخصوص جلدهای منتشر نشده */

.book-unavailable {
  color: #999 !important;
  font-size: 13px !important;
}


/* روی موبایل دکمه hover معنی ندارد */
@media (max-width: 768px) {

  .book-card-action {
    opacity: 1;
    transform: translate(-50%, 0);
    bottom: 15px;
  }

  .book-card-active:hover {
    transform: none;
  }

}

/* Sidebar — MOBILE-FIRST (hidden off-screen) */
.sidebar {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: var(--primary-dark);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: var(--space-xl) var(--space-lg);
  transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar.open { right: 0; }

.sidebar::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, transparent, var(--secondary), transparent); opacity: 0.3; }

.sidebar-logo { display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-2xl); text-decoration: none; padding-bottom: var(--space-lg); border-bottom: 1px solid rgba(255,255,255,0.1); }
.logo-icon { width: 40px; height: 40px; min-width: 40px; background: var(--secondary); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--primary-dark); font-weight: 900; }
.logo-text { font-weight: 800; font-size: 0.9rem; color: var(--surface); white-space: nowrap; }

.sidebar-nav { display: flex; flex-direction: column; gap: var(--space-xs); width: 100%; flex: 1; }
.sidebar-link { display: flex; align-items: center;  padding: var(--space-md); width: 100%; border-radius: var(--radius); color: rgba(255,255,255,0.6); font-weight: 500; font-size: var(--fs-small); transition: all var(--transition); white-space: nowrap; }
.sidebar-link:hover { color: var(--surface); background: rgba(255,255,255,0.08); }
.sidebar-link.active { color: var(--secondary); background: rgba(212,175,55,0.12); }
.sidebar-link-icon { width: 24px; min-width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.sidebar-link-text { white-space: nowrap; }

.sidebar-footer { display: flex; align-items: center; gap: var(--space-md); width: 100%; border-top: 1px solid rgba(255,255,255,0.1); padding-top: var(--space-lg); margin-top: var(--space-lg); }

.dark-mode-toggle { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-width: 44px; border-radius: var(--radius-full); background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); font-size: 1.2rem; transition: all var(--transition); position: relative; overflow: hidden; }
.dark-mode-toggle:hover { background: rgba(255,255,255,0.15); color: var(--surface); transform: scale(1.1); }
.dark-mode-toggle .icon-sun, .dark-mode-toggle .icon-moon { position: absolute; transition: all var(--transition); }
.dark-mode-toggle .icon-sun { opacity: 1; transform: rotate(0deg) scale(1); }
.dark-mode-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
body.dark .dark-mode-toggle .icon-sun { opacity: 0; transform: rotate(90deg) scale(0.5); }
body.dark .dark-mode-toggle .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }
.dark-mode-label { font-size: var(--fs-xs); color: rgba(255,255,255,0.4); white-space: nowrap; }

/* Mobile Menu Toggle — visible by default */
.menu-toggle { display: flex; position: fixed; top: 14px; left: var(--space-lg); z-index: 1001; flex-direction: column; gap: 5px; padding: 8px; background: var(--primary-dark); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--surface); border-radius: 2px; transition: all var(--transition); }
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999; opacity: 0; visibility: hidden; transition: opacity var(--transition), visibility var(--transition); pointer-events: none; }
.sidebar-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }

.main-content { transition: margin-right var(--transition); }

/* Hero Section — Immersive Historical Showcase */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(91,58,41,0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(61,37,23,0.3) 0%, transparent 50%),
    linear-gradient(180deg, #2C1810 0%, #3D2517 40%, #4A2E1C 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(196,146,58,0.08) 0%, transparent 60%),
    linear-gradient(180deg, rgba(44,24,16,0.3) 0%, rgba(61,37,23,0.6) 100%);
  z-index: 1;
}

/* Aged paper texture on hero */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  z-index: 1;
  pointer-events: none;
}

/* Floating dust particles */
.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image:
    radial-gradient(1.5px 1.5px at 15% 25%, rgba(196,146,58,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 65%, rgba(196,146,58,0.3) 0%, transparent 100%),
    radial-gradient(2px 2px at 55% 15%, rgba(196,146,58,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 75% 45%, rgba(196,146,58,0.35) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 85% 80%, rgba(196,146,58,0.25) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 90%, rgba(196,146,58,0.3) 0%, transparent 100%),
    radial-gradient(2px 2px at 65% 55%, rgba(196,146,58,0.15) 0%, transparent 100%),
    radial-gradient(1px 1px at 45% 35%, rgba(212,175,55,0.2) 0%, transparent 100%);
  animation: dustFloat 25s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes dustFloat {
  0% { transform: translateY(0) translateX(0); opacity: 0.8; }
  25% { transform: translateY(-15px) translateX(8px); opacity: 1; }
  50% { transform: translateY(-8px) translateX(-6px); opacity: 0.7; }
  75% { transform: translateY(-20px) translateX(5px); opacity: 0.9; }
  100% { transform: translateY(0) translateX(0); opacity: 0.8; }
}

.hero .container {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 80px var(--space-lg) var(--space-xl);
  text-align: center;
}

.hero-content { color: var(--surface); }

/* Decorative top flourish */
.hero-content::before {
  content: '۞';
  display: block;
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: var(--space-lg);
  opacity: 0.6;
  text-shadow: 0 0 30px rgba(196,146,58,0.4);
  animation: flourishPulse 3s ease-in-out infinite;
}

@keyframes flourishPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.25);
  color: var(--secondary);
  padding: 10px 24px;
  border-radius: var(--radius-xl);
  font-size: var(--fs-small);
  font-weight: 500;
  margin-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.hero-badge::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  animation: badgeShimmer 4s infinite;
}
@keyframes badgeShimmer { 0% { left: -100%; } 100% { left: 200%; } }

.hero-content h1 {
  color: var(--surface);
  font-size: var(--fs-hero);
  font-weight: 900;
  margin-bottom: var(--space-lg);
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.hero-content h1 .highlight {
  color: var(--secondary);
  display: block;
  text-shadow: 0 2px 20px rgba(196,146,58,0.4);
  position: relative;
}

/* Underline decoration on highlight */
.hero-content h1 .highlight::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary), transparent);
  margin-top: var(--space-sm);
  border-radius: 2px;
}

.hero-description {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--space-lg);
  line-height: var(--lh-relaxed);
  max-width: 100%;
}

.hero-release {
  font-size: var(--fs-small);
  color: var(--secondary);
  margin-bottom: var(--space-2xl);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

.hero-cover { display: none; }
  #book3d { display: none; }

/* Large decorative year */
.hero-year-bg {
  position: absolute;
  bottom: -5%;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(8rem, 20vw, 18rem);
  font-weight: 900;
  color: rgba(196,146,58,0.03);
  line-height: 1;
  z-index: 0;
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
}

/* About Section — Image Slideshow */
.about-grid { display: grid; gap: var(--space-2xl); }
.about-images {
  position: relative;
  width: 100%;
  max-width: 450px;
  height: 480px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25), 0 0 0 1px rgba(196,146,58,0.1);
}
.about-image-item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}
.about-image-item.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}
.about-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Slide navigation dots */
.about-slideshow-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
}
.about-slideshow-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: 2px solid rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.3s ease;
}
.about-slideshow-dot.active {
  background: var(--secondary);
  border-color: var(--secondary);
  transform: scale(1.2);
}
.about-slideshow-dot:hover {
  background: rgba(255,255,255,0.7);
}
.about-content h2 { margin-bottom: var(--space-lg); }
.about-content .gold-line { display: block; width: 50px; height: 3px; background: var(--secondary); margin-bottom: var(--space-xl); border-radius: 2px; }
.about-content p { color: var(--text-light); margin-bottom: var(--space-lg); }
.intro-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); margin-top: var(--space-2xl); padding-top: var(--space-2xl); border-top: 1px solid var(--border); }
.stat-item { text-align: center; }
.stat-number {
  display: block;
  font-size: var(--fs-h2);
  font-weight: 900;
  margin-bottom: var(--space-xs);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: var(--fs-small); color: var(--text-muted); }

/* Books Grid */
.books-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); }

/* Timeline */
.timeline { position: relative; padding-right: 40px; }
.timeline::before { content: ''; position: absolute; top: 0; right: 15px; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--secondary), var(--border), var(--secondary)); }
.timeline-item { position: relative; padding-bottom: var(--space-3xl); padding-right: var(--space-xl); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; right: -29px; top: 4px; width: 14px; height: 14px; border-radius: var(--radius-full); background: var(--secondary); border: 3px solid var(--surface); box-shadow: var(--shadow-sm); z-index: 1; }
.timeline-year { font-size: var(--fs-small); font-weight: 700; color: var(--secondary-dark); margin-bottom: var(--space-xs); }
.timeline-title { font-size: var(--fs-h4); font-weight: 600; margin-bottom: var(--space-sm); }
.timeline-desc { color: var(--text-light); font-size: var(--fs-small); }

/* Accordion */
.accordion { max-width: var(--container-narrow); margin: 0 auto; }
.accordion-item { background: var(--surface); border-radius: var(--radius); margin-bottom: var(--space-md); box-shadow: var(--shadow-xs); overflow: hidden; }
.accordion-header { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: var(--space-xl); font-size: var(--fs-body); font-weight: 600; text-align: right; transition: color var(--transition); }
.accordion-header:hover { color: var(--primary); }
.accordion-icon { width: 24px; height: 24px; flex-shrink: 0; transition: transform var(--transition); color: var(--text-muted); }
.accordion-item.active .accordion-icon { transform: rotate(180deg); color: var(--secondary); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height var(--transition-slow); }
.accordion-body-inner { padding: 0 var(--space-xl) var(--space-xl); color: var(--text-light); line-height: var(--lh-relaxed); }
.accordion-item.active .accordion-body { max-height: 500px; }

/* Contact Form */
.contact-grid { display: grid; gap: var(--space-2xl); }
.form-group { margin-bottom: var(--space-xl); }
.form-label { display: block; font-weight: 600; margin-bottom: var(--space-sm); font-size: var(--fs-small); }
.form-input, .form-textarea { width: 100%; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color var(--transition), box-shadow var(--transition); }
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(212,175,55,0.15); }
.form-textarea { min-height: 150px; resize: vertical; }
.form-error { color: #dc3545; font-size: var(--fs-xs); margin-top: var(--space-xs); display: none; }
.form-group.error .form-error { display: block; }
.form-group.error .form-input, .form-group.error .form-textarea { border-color: #dc3545; }
.form-success { padding: 16px 20px; background: rgba(40,167,69,0.1); border: 1px solid rgba(40,167,69,0.3); border-radius: var(--radius); color: #28a745; font-size: var(--fs-small); margin-top: var(--space-md); text-align: center; }
.newsletter-success { color: var(--secondary); font-size: var(--fs-small); margin-top: var(--space-sm); text-align: center; }
.map-placeholder { width: 100%; height: 200px; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.6); font-size: var(--fs-small); margin-top: var(--space-xl); }
.social-links { display: flex; gap: var(--space-md); margin-top: var(--space-xl); }
.social-link { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-full); background: var(--bg); color: var(--text-light); font-size: 1.2rem; transition: all var(--transition); }
.social-link:hover { background: var(--primary); color: var(--surface); transform: translateY(-3px); }

/* Author Page */
.author-hero { padding: var(--space-4xl) 0 var(--section-py); background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); color: var(--surface); }
.author-hero .container { display: grid; gap: var(--space-2xl); text-align: center; }
.author-portrait { width: 180px; height: 180px; border-radius: var(--radius-full); object-fit: cover; border: 4px solid var(--secondary); box-shadow: 0 8px 32px rgba(0,0,0,0.3); margin: 0 auto; }
.author-hero-content h1 { color: var(--surface); margin-bottom: var(--space-sm); }
.author-hero-content .author-title { color: var(--secondary); font-size: var(--fs-body); margin-bottom: var(--space-md); }
.author-hero-content p { color: rgba(255,255,255,0.75); max-width: 500px; margin: 0 auto; }
.author-tabs { display: flex; justify-content: center; gap: var(--space-md); margin-bottom: var(--space-3xl); flex-wrap: wrap; }
.tab-btn { padding: 10px 28px; border-radius: var(--radius-xl); font-weight: 500; font-size: var(--fs-small); background: var(--surface); color: var(--text-light); border: 1px solid var(--border); transition: all var(--transition); }
.tab-btn:hover, .tab-btn.active { background: var(--primary); color: var(--surface); border-color: var(--primary); }
.author-content-panel { display: none; }
.author-content-panel.active { display: block; }
.achievements-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); }
.achievement-card { background: var(--surface); border-radius: var(--radius); padding: var(--space-2xl); text-align: center; box-shadow: var(--shadow-xs); transition: all var(--transition); }
.achievement-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.achievement-icon { width: 64px; height: 64px; margin: 0 auto var(--space-lg); background: rgba(212,175,55,0.1); border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.achievement-card h4 { margin-bottom: var(--space-sm); }
.achievement-card p { color: var(--text-light); font-size: var(--fs-small); }

/* Footer — Mobile-First */
.footer {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(91,58,41,0.3) 0%, transparent 50%),
    var(--primary-dark);
  color: rgba(255,255,255,0.7);
  padding: var(--space-4xl) 0 0;
  position: relative;
}
.footer::before {
  content: '';
  display: block;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--secondary), transparent);
  margin: 0 auto;
}
.footer-grid { display: grid; gap: var(--space-2xl); padding-bottom: var(--space-2xl); border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-about .logo { display: flex; align-items: center; gap: var(--space-sm); font-weight: 800; font-size: 1.15rem; color: var(--surface); margin-bottom: var(--space-lg); }
.footer-about p { font-size: var(--fs-small); line-height: var(--lh-relaxed); }
.footer h4 { color: var(--surface); font-size: var(--fs-body); margin-bottom: var(--space-lg); }
.footer-links li { margin-bottom: var(--space-sm); }
.footer-links a { font-size: var(--fs-small); color: rgba(255,255,255,0.6); transition: color var(--transition); }
.footer-links a:hover { color: var(--secondary); }
.footer-newsletter p { font-size: var(--fs-small); margin-bottom: var(--space-lg); }
.newsletter-form { display: flex; flex-direction: column; gap: var(--space-sm); }
.newsletter-form input { flex: 1; padding: 12px 16px; border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius); background: rgba(255,255,255,0.08); color: var(--surface); font-size: var(--fs-small); }
.newsletter-form input::placeholder { color: rgba(255,255,255,0.35); }
.newsletter-form input:focus { outline: none; border-color: var(--secondary); }
.newsletter-form button { padding: 12px 24px; background: var(--secondary); color: var(--primary-dark); border-radius: var(--radius); font-weight: 600; font-size: var(--fs-small); transition: all var(--transition); }
.newsletter-form button:hover { background: var(--secondary-light); }
.footer-bottom { display: flex; flex-direction: column; align-items: center; gap: var(--space-md); padding: var(--space-xl) 0; font-size: var(--fs-xs); color: rgba(255,255,255,0.4); text-align: center; }
.footer-social { display: flex; gap: var(--space-md); }
.footer-social a { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-full); background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); font-size: 0.9rem; transition: all var(--transition); }
.footer-social a:hover { background: var(--secondary); color: var(--primary-dark); }

/* Page Header */
.page-header {
  padding: calc(70px + var(--space-3xl)) 0 var(--space-3xl);
  background:
    radial-gradient(ellipse at 30% 50%, rgba(196,146,58,0.1) 0%, transparent 50%),
    linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--surface);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--secondary), transparent);
}
.page-header h1 { color: var(--surface); font-size: var(--fs-h1); margin-bottom: var(--space-sm); }
.page-header p { color: rgba(255,255,255,0.7); max-width: 500px; margin: 0 auto; }
.breadcrumb { display: flex; justify-content: center; gap: var(--space-sm); margin-bottom: var(--space-lg); font-size: var(--fs-small); color: rgba(255,255,255,0.5); }
.breadcrumb a { color: rgba(255,255,255,0.5); }
.breadcrumb a:hover { color: var(--secondary); }
.breadcrumb .separator { margin: 0 var(--space-xs); }

/* Loader */
.loader {
  position: fixed;
  inset: 0;
  background: var(--primary-dark);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-lg);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-spinner {
  width: 50px;
  height: 50px;
  border: 2px solid rgba(196,146,58,0.2);
  border-top-color: var(--secondary);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}
.loader-text {
  font-size: var(--fs-small);
  color: var(--secondary);
  letter-spacing: 0.1em;
  font-weight: 500;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Back to Top */
.back-to-top { position: fixed; bottom: 24px; right: 24px; width: 48px; height: 48px; background: var(--primary); color: var(--surface); border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(20px); transition: all var(--transition); z-index: 999; }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--secondary); color: var(--primary-dark); transform: translateY(-3px); }

/* Scroll Animations — Enhanced */
.fade-up, .fade-left, .fade-right, .scale-in {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up { transform: translateY(50px); }
.fade-left { transform: translateX(60px); }
.fade-right { transform: translateX(-60px); }
.scale-in { transform: scale(0.9); }
.fade-up.visible, .fade-left.visible, .fade-right.visible, .scale-in.visible {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* Reveal line animation for section titles */
.reveal-line {
  width: 0;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-line.visible { width: 120px; }

/* Historical Decorative Elements */
.ornamental-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin: var(--space-3xl) auto;
  max-width: 500px;
  position: relative;
}
.ornamental-divider::before, .ornamental-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--secondary), transparent);
}
.ornamental-divider span {
  color: var(--secondary);
  font-size: 1.5rem;
  text-shadow: 0 0 20px rgba(196,146,58,0.3);
  animation: diamondPulse 3s ease-in-out infinite;
}
@keyframes diamondPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* Book Detail Page */
.book-detail-hero { padding: calc(70px + var(--space-2xl)) 0 var(--space-2xl); background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }
.book-detail-grid { display: grid; gap: var(--space-2xl); }
.book-cover-large { position: relative; }
.book-cover-large img { width: 100%; max-width: 300px; margin: 0 auto; border-radius: var(--radius-lg); box-shadow: 0 16px 48px rgba(0,0,0,0.3); }
.book-info h1 { color: var(--surface); margin-bottom: var(--space-md); }
.book-meta-list { display: flex; flex-wrap: wrap; gap: var(--space-xl); margin-bottom: var(--space-xl); }
.book-meta-item { display: flex; flex-direction: column; gap: 2px; }
.book-meta-item .label { font-size: var(--fs-xs); color: rgba(255,255,255,0.5); }
.book-meta-item .value { font-weight: 600; color: var(--surface); font-size: var(--fs-small); }
.book-description { color: rgba(255,255,255,0.8); line-height: var(--lh-relaxed); margin-bottom: var(--space-xl); }
.preview-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.preview-gallery img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--radius); cursor: pointer; transition: transform var(--transition); }
.preview-gallery img:hover { transform: scale(1.03); }

/* Print */
@media print { .sidebar, .footer, .back-to-top, .menu-toggle, .loader { display: none !important; } body { background: white; color: black; } .hero { min-height: auto; padding: 2rem 0; } }

/* TABLET (768px+) */
@media (min-width: 768px) {
  .container { padding: 0 var(--space-xl); }
  .about-images { max-width: 450px; height: 480px; }
  .intro-stats { gap: var(--space-xl); }
  .stat-number { font-size: var(--fs-h2); }
  .achievements-grid { grid-template-columns: repeat(2, 1fr); }
  .preview-gallery { grid-template-columns: repeat(4, 1fr); }
  .newsletter-form { flex-direction: row; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* DESKTOP (992px+) — Sidebar expands */
@media (min-width: 992px) {
  .sidebar { right: 0; width: var(--sidebar-w); padding: var(--space-xl) 0; align-items: center; overflow: hidden; transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
  .sidebar:hover { width: var(--sidebar-w-expanded); }
  .sidebar.open { right: 0; }
  .sidebar-logo { flex-direction: column; align-items: center; padding: 0 var(--space-md); margin-bottom: var(--space-2xl); border-bottom: none; padding-bottom: 0; }
  .logo-text { opacity: 0; width: 0; overflow: hidden; font-size: 0.85rem; text-align: center; transition: opacity 0.3s ease, width 0.3s ease; }
  .sidebar:hover .logo-text { opacity: 1; width: auto; }
  .sidebar-nav { align-items: center; padding: 0 var(--space-sm); }
  .sidebar-link { width: auto; padding: var(--space-md); justify-content: center; }
  .sidebar-link-text { opacity: 0; max-width: 0; overflow: hidden; transition: opacity 0.3s ease, max-width 0.3s ease; }
  .sidebar:hover .sidebar-link-text { opacity: 1; max-width: 150px; }
  .sidebar-footer { flex-direction: column; align-items: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: var(--space-lg); margin-top: var(--space-lg); width: 100%; padding: 0 var(--space-sm); }
  .dark-mode-label { opacity: 0; width: 0; overflow: hidden; text-align: center; transition: opacity 0.3s ease, width 0.3s ease; }
  .sidebar:hover .dark-mode-label { opacity: 1; width: auto; }
  .menu-toggle { display: none; }
  .main-content { margin-right: var(--sidebar-w); }
  .hero .container { display: grid; grid-template-columns: 1fr; gap: var(--space-3xl); align-items: center; padding: 0 var(--space-xl); text-align: right; position: relative; }
  .hero-content h1 { font-size: var(--fs-hero); text-shadow: 0 4px 30px rgba(0,0,0,0.3); }
  .hero-description { max-width: 500px; }
  .hero-buttons { justify-content: flex-start; }
  .hero-cover { display: flex; justify-content: flex-start; align-items: center; position: absolute; left: 0; top: 0; bottom: 0; z-index: 3; }
  #book3d { display: block; width: 548px; height: 748px; border-radius: var(--radius-lg); position: relative; z-index: 2; cursor: grab; filter: drop-shadow(0 0 30px rgba(196,146,58,0.15)); }
  #book3d:active { cursor: grabbing; }

  .hero-cover-decoration { position: absolute; width: 220px; height: 220px; border: 2px solid rgba(212,175,55,0.2); border-radius: var(--radius-xl); top: -30px; left: -30px; z-index: 0; animation: decorFloat 6s ease-in-out infinite; }
  @keyframes decorFloat { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(-5px, 5px) rotate(2deg); } }
  /* Decorative corner ornaments */
  .hero-cover::before { content: ''; position: absolute; top: -15px; right: -15px; width: 60px; height: 60px; border-top: 3px solid rgba(212,175,55,0.25); border-right: 3px solid rgba(212,175,55,0.25); z-index: 0; }
  .about-grid { grid-template-columns: 1fr 1fr; gap: var(--space-4xl); align-items: center; }
  .about-images { max-width: 500px; height: 500px; }
  .books-grid { grid-template-columns: repeat(4, 1fr); gap: var(--space-xl); }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: var(--space-4xl); }
  .author-hero .container { grid-template-columns: auto 1fr; text-align: right; gap: var(--space-4xl); align-items: center; }
  .author-portrait { margin: 0; }
  .author-hero-content p { margin: 0; }
  .book-detail-grid { grid-template-columns: 300px 1fr; gap: var(--space-4xl); align-items: start; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-2xl); }
  .footer-about { grid-column: 1 / -1; }
}

/* LARGE (1200px+) */
@media (min-width: 1200px) {
  .hero .container { gap: var(--space-4xl); }
  #book3d { width: 634px; height: 864px; filter: drop-shadow(0 0 40px rgba(196,146,58,0.18)); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: var(--space-3xl); }
}

/* XL (1400px+) */
@media (min-width: 1400px) { .container { max-width: var(--container); } }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .fade-up, .fade-left, .fade-right, .scale-in { opacity: 1; transform: none; }
}